Lines Matching refs:substream
87 struct snd_pcm_substream *substream; member
369 struct snd_pcm_runtime *runtime = chip->channel[ch].substream->runtime; in snd_sgio2audio_dma_pull_frag()
417 struct snd_pcm_runtime *runtime = chip->channel[ch].substream->runtime; in snd_sgio2audio_dma_push_frag()
454 static int snd_sgio2audio_dma_start(struct snd_pcm_substream *substream) in snd_sgio2audio_dma_start() argument
456 struct snd_sgio2audio *chip = snd_pcm_substream_chip(substream); in snd_sgio2audio_dma_start()
457 struct snd_sgio2audio_chan *chan = substream->runtime->private_data; in snd_sgio2audio_dma_start()
465 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_sgio2audio_dma_start()
475 static int snd_sgio2audio_dma_stop(struct snd_pcm_substream *substream) in snd_sgio2audio_dma_stop() argument
477 struct snd_sgio2audio_chan *chan = substream->runtime->private_data; in snd_sgio2audio_dma_stop()
486 struct snd_pcm_substream *substream; in snd_sgio2audio_dma_in_isr() local
490 substream = chan->substream; in snd_sgio2audio_dma_in_isr()
491 chip = snd_pcm_substream_chip(substream); in snd_sgio2audio_dma_in_isr()
498 snd_pcm_period_elapsed(substream); in snd_sgio2audio_dma_in_isr()
506 struct snd_pcm_substream *substream; in snd_sgio2audio_dma_out_isr() local
510 substream = chan->substream; in snd_sgio2audio_dma_out_isr()
511 chip = snd_pcm_substream_chip(substream); in snd_sgio2audio_dma_out_isr()
517 snd_pcm_period_elapsed(substream); in snd_sgio2audio_dma_out_isr()
525 struct snd_pcm_substream *substream; in snd_sgio2audio_error_isr() local
527 substream = chan->substream; in snd_sgio2audio_error_isr()
528 snd_sgio2audio_dma_stop(substream); in snd_sgio2audio_error_isr()
529 snd_sgio2audio_dma_start(substream); in snd_sgio2audio_error_isr()
554 static int snd_sgio2audio_playback1_open(struct snd_pcm_substream *substream) in snd_sgio2audio_playback1_open() argument
556 struct snd_sgio2audio *chip = snd_pcm_substream_chip(substream); in snd_sgio2audio_playback1_open()
557 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sgio2audio_playback1_open()
564 static int snd_sgio2audio_playback2_open(struct snd_pcm_substream *substream) in snd_sgio2audio_playback2_open() argument
566 struct snd_sgio2audio *chip = snd_pcm_substream_chip(substream); in snd_sgio2audio_playback2_open()
567 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sgio2audio_playback2_open()
575 static int snd_sgio2audio_capture_open(struct snd_pcm_substream *substream) in snd_sgio2audio_capture_open() argument
577 struct snd_sgio2audio *chip = snd_pcm_substream_chip(substream); in snd_sgio2audio_capture_open()
578 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sgio2audio_capture_open()
586 static int snd_sgio2audio_pcm_close(struct snd_pcm_substream *substream) in snd_sgio2audio_pcm_close() argument
588 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sgio2audio_pcm_close()
596 static int snd_sgio2audio_pcm_hw_params(struct snd_pcm_substream *substream, in snd_sgio2audio_pcm_hw_params() argument
599 return snd_pcm_lib_alloc_vmalloc_buffer(substream, in snd_sgio2audio_pcm_hw_params()
604 static int snd_sgio2audio_pcm_hw_free(struct snd_pcm_substream *substream) in snd_sgio2audio_pcm_hw_free() argument
606 return snd_pcm_lib_free_vmalloc_buffer(substream); in snd_sgio2audio_pcm_hw_free()
610 static int snd_sgio2audio_pcm_prepare(struct snd_pcm_substream *substream) in snd_sgio2audio_pcm_prepare() argument
612 struct snd_sgio2audio *chip = snd_pcm_substream_chip(substream); in snd_sgio2audio_pcm_prepare()
613 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sgio2audio_pcm_prepare()
614 struct snd_sgio2audio_chan *chan = substream->runtime->private_data; in snd_sgio2audio_pcm_prepare()
623 chip->channel[ch].substream = substream; in snd_sgio2audio_pcm_prepare()
627 switch (substream->stream) { in snd_sgio2audio_pcm_prepare()
647 static int snd_sgio2audio_pcm_trigger(struct snd_pcm_substream *substream, in snd_sgio2audio_pcm_trigger() argument
653 snd_sgio2audio_dma_start(substream); in snd_sgio2audio_pcm_trigger()
657 snd_sgio2audio_dma_stop(substream); in snd_sgio2audio_pcm_trigger()
667 snd_sgio2audio_pcm_pointer(struct snd_pcm_substream *substream) in snd_sgio2audio_pcm_pointer() argument
669 struct snd_sgio2audio *chip = snd_pcm_substream_chip(substream); in snd_sgio2audio_pcm_pointer()
670 struct snd_sgio2audio_chan *chan = substream->runtime->private_data; in snd_sgio2audio_pcm_pointer()
673 return bytes_to_frames(substream->runtime, in snd_sgio2audio_pcm_pointer()