Lines Matching refs:channel

102 	struct snd_sgio2audio_chan channel[3];  member
369 struct snd_pcm_runtime *runtime = chip->channel[ch].substream->runtime; in snd_sgio2audio_dma_pull_frag()
371 spin_lock_irqsave(&chip->channel[ch].lock, flags); in snd_sgio2audio_dma_pull_frag()
376 dst_pos = chip->channel[ch].pos; in snd_sgio2audio_dma_pull_frag()
380 chip->channel[ch].size += (count >> 3); /* in frames */ in snd_sgio2audio_dma_pull_frag()
381 ret = chip->channel[ch].size >= runtime->period_size; in snd_sgio2audio_dma_pull_frag()
382 chip->channel[ch].size %= runtime->period_size; in snd_sgio2audio_dma_pull_frag()
398 chip->channel[ch].pos = dst_pos; in snd_sgio2audio_dma_pull_frag()
400 spin_unlock_irqrestore(&chip->channel[ch].lock, flags); in snd_sgio2audio_dma_pull_frag()
417 struct snd_pcm_runtime *runtime = chip->channel[ch].substream->runtime; in snd_sgio2audio_dma_push_frag()
419 spin_lock_irqsave(&chip->channel[ch].lock, flags); in snd_sgio2audio_dma_push_frag()
424 src_pos = chip->channel[ch].pos; in snd_sgio2audio_dma_push_frag()
428 chip->channel[ch].size += (count >> 3); /* in frames */ in snd_sgio2audio_dma_push_frag()
429 ret = chip->channel[ch].size >= runtime->period_size; in snd_sgio2audio_dma_push_frag()
430 chip->channel[ch].size %= runtime->period_size; in snd_sgio2audio_dma_push_frag()
448 chip->channel[ch].pos = src_pos; in snd_sgio2audio_dma_push_frag()
450 spin_unlock_irqrestore(&chip->channel[ch].lock, flags); in snd_sgio2audio_dma_push_frag()
560 runtime->private_data = &chip->channel[1]; in snd_sgio2audio_playback1_open()
570 runtime->private_data = &chip->channel[2]; in snd_sgio2audio_playback2_open()
581 runtime->private_data = &chip->channel[0]; in snd_sgio2audio_capture_open()
618 spin_lock_irqsave(&chip->channel[ch].lock, flags); in snd_sgio2audio_pcm_prepare()
621 chip->channel[ch].pos = 0; in snd_sgio2audio_pcm_prepare()
622 chip->channel[ch].size = 0; in snd_sgio2audio_pcm_prepare()
623 chip->channel[ch].substream = substream; in snd_sgio2audio_pcm_prepare()
642 spin_unlock_irqrestore(&chip->channel[ch].lock, flags); in snd_sgio2audio_pcm_prepare()
674 chip->channel[chan->idx].pos); in snd_sgio2audio_pcm_pointer()
809 &chip->channel[snd_sgio2_isr_table[i].idx]); in snd_sgio2audio_free()
862 spin_lock_init(&chip->channel[i].lock); in snd_sgio2audio_create()
863 chip->channel[i].idx = i; in snd_sgio2audio_create()
872 &chip->channel[snd_sgio2_isr_table[i].idx])) { in snd_sgio2audio_create()