• Home
  • Raw
  • Download

Lines Matching refs:ch

366 					unsigned int ch, unsigned int count)  in snd_sgio2audio_dma_pull_frag()  argument
376 struct snd_pcm_runtime *runtime = chip->channel[ch].substream->runtime; in snd_sgio2audio_dma_pull_frag()
378 spin_lock_irqsave(&chip->channel[ch].lock, flags); in snd_sgio2audio_dma_pull_frag()
380 src_base = (unsigned long) chip->ring_base | (ch << CHANNEL_RING_SHIFT); in snd_sgio2audio_dma_pull_frag()
381 src_pos = readq(&mace->perif.audio.chan[ch].read_ptr); in snd_sgio2audio_dma_pull_frag()
383 dst_pos = chip->channel[ch].pos; in snd_sgio2audio_dma_pull_frag()
387 chip->channel[ch].size += (count >> 3); /* in frames */ in snd_sgio2audio_dma_pull_frag()
388 ret = chip->channel[ch].size >= runtime->period_size; in snd_sgio2audio_dma_pull_frag()
389 chip->channel[ch].size %= runtime->period_size; in snd_sgio2audio_dma_pull_frag()
404 writeq(src_pos, &mace->perif.audio.chan[ch].read_ptr); /* in bytes */ in snd_sgio2audio_dma_pull_frag()
405 chip->channel[ch].pos = dst_pos; in snd_sgio2audio_dma_pull_frag()
407 spin_unlock_irqrestore(&chip->channel[ch].lock, flags); in snd_sgio2audio_dma_pull_frag()
414 unsigned int ch, unsigned int count) in snd_sgio2audio_dma_push_frag() argument
424 struct snd_pcm_runtime *runtime = chip->channel[ch].substream->runtime; in snd_sgio2audio_dma_push_frag()
426 spin_lock_irqsave(&chip->channel[ch].lock, flags); in snd_sgio2audio_dma_push_frag()
428 dst_base = (unsigned long)chip->ring_base | (ch << CHANNEL_RING_SHIFT); in snd_sgio2audio_dma_push_frag()
429 dst_pos = readq(&mace->perif.audio.chan[ch].write_ptr); in snd_sgio2audio_dma_push_frag()
431 src_pos = chip->channel[ch].pos; in snd_sgio2audio_dma_push_frag()
435 chip->channel[ch].size += (count >> 3); /* in frames */ in snd_sgio2audio_dma_push_frag()
436 ret = chip->channel[ch].size >= runtime->period_size; in snd_sgio2audio_dma_push_frag()
437 chip->channel[ch].size %= runtime->period_size; in snd_sgio2audio_dma_push_frag()
454 writeq(dst_pos, &mace->perif.audio.chan[ch].write_ptr); /* in bytes */ in snd_sgio2audio_dma_push_frag()
455 chip->channel[ch].pos = src_pos; in snd_sgio2audio_dma_push_frag()
457 spin_unlock_irqrestore(&chip->channel[ch].lock, flags); in snd_sgio2audio_dma_push_frag()
465 int ch = chan->idx; in snd_sgio2audio_dma_start() local
468 writeq(CHANNEL_CONTROL_RESET, &mace->perif.audio.chan[ch].control); in snd_sgio2audio_dma_start()
470 writeq(0, &mace->perif.audio.chan[ch].control); in snd_sgio2audio_dma_start()
474 snd_sgio2audio_dma_push_frag(chip, ch, CHANNEL_RING_SIZE - 32); in snd_sgio2audio_dma_start()
478 &mace->perif.audio.chan[ch].control); in snd_sgio2audio_dma_start()
495 int count, ch; in snd_sgio2audio_dma_in_isr() local
499 ch = chan->idx; in snd_sgio2audio_dma_in_isr()
503 readq(&mace->perif.audio.chan[ch].depth) - 32; in snd_sgio2audio_dma_in_isr()
504 if (snd_sgio2audio_dma_pull_frag(chip, ch, count)) in snd_sgio2audio_dma_in_isr()
515 int count, ch; in snd_sgio2audio_dma_out_isr() local
519 ch = chan->idx; in snd_sgio2audio_dma_out_isr()
522 readq(&mace->perif.audio.chan[ch].depth) - 32; in snd_sgio2audio_dma_out_isr()
523 if (snd_sgio2audio_dma_push_frag(chip, ch, count)) in snd_sgio2audio_dma_out_isr()
622 int ch = chan->idx; in snd_sgio2audio_pcm_prepare() local
625 spin_lock_irqsave(&chip->channel[ch].lock, flags); in snd_sgio2audio_pcm_prepare()
628 chip->channel[ch].pos = 0; in snd_sgio2audio_pcm_prepare()
629 chip->channel[ch].size = 0; in snd_sgio2audio_pcm_prepare()
630 chip->channel[ch].substream = substream; in snd_sgio2audio_pcm_prepare()
637 ch - 1, in snd_sgio2audio_pcm_prepare()
649 spin_unlock_irqrestore(&chip->channel[ch].lock, flags); in snd_sgio2audio_pcm_prepare()