Lines Matching refs:substream
216 if (!aacirun->substream || !aacirun->start) { in aaci_fifo_irq()
263 snd_pcm_period_elapsed(aacirun->substream); in aaci_fifo_irq()
276 if (!aacirun->substream || !aacirun->start) { in aaci_fifo_irq()
323 snd_pcm_period_elapsed(aacirun->substream); in aaci_fifo_irq()
402 static int aaci_pcm_open(struct snd_pcm_substream *substream) in aaci_pcm_open() argument
404 struct snd_pcm_runtime *runtime = substream->runtime; in aaci_pcm_open()
405 struct aaci *aaci = substream->private_data; in aaci_pcm_open()
409 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in aaci_pcm_open()
415 aacirun->substream = substream; in aaci_pcm_open()
421 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in aaci_pcm_open()
425 ret = snd_pcm_hw_rule_add(substream->runtime, 0, in aaci_pcm_open()
459 static int aaci_pcm_close(struct snd_pcm_substream *substream) in aaci_pcm_close() argument
461 struct aaci *aaci = substream->private_data; in aaci_pcm_close()
462 struct aaci_runtime *aacirun = substream->runtime->private_data; in aaci_pcm_close()
466 aacirun->substream = NULL; in aaci_pcm_close()
476 static int aaci_pcm_hw_free(struct snd_pcm_substream *substream) in aaci_pcm_hw_free() argument
478 struct aaci_runtime *aacirun = substream->runtime->private_data; in aaci_pcm_hw_free()
492 snd_pcm_lib_free_pages(substream); in aaci_pcm_hw_free()
504 static int aaci_pcm_hw_params(struct snd_pcm_substream *substream, in aaci_pcm_hw_params() argument
507 struct aaci_runtime *aacirun = substream->runtime->private_data; in aaci_pcm_hw_params()
513 aaci_pcm_hw_free(substream); in aaci_pcm_hw_params()
523 err = snd_pcm_lib_malloc_pages(substream, in aaci_pcm_hw_params()
526 struct aaci *aaci = substream->private_data; in aaci_pcm_hw_params()
546 static int aaci_pcm_prepare(struct snd_pcm_substream *substream) in aaci_pcm_prepare() argument
548 struct snd_pcm_runtime *runtime = substream->runtime; in aaci_pcm_prepare()
551 aacirun->period = snd_pcm_lib_period_bytes(substream); in aaci_pcm_prepare()
553 aacirun->end = aacirun->start + snd_pcm_lib_buffer_bytes(substream); in aaci_pcm_prepare()
560 static snd_pcm_uframes_t aaci_pcm_pointer(struct snd_pcm_substream *substream) in aaci_pcm_pointer() argument
562 struct snd_pcm_runtime *runtime = substream->runtime; in aaci_pcm_pointer()
598 static int aaci_pcm_playback_trigger(struct snd_pcm_substream *substream, int cmd) in aaci_pcm_playback_trigger() argument
600 struct aaci_runtime *aacirun = substream->runtime->private_data; in aaci_pcm_playback_trigger()
683 static int aaci_pcm_capture_trigger(struct snd_pcm_substream *substream, int cmd) in aaci_pcm_capture_trigger() argument
685 struct aaci_runtime *aacirun = substream->runtime->private_data; in aaci_pcm_capture_trigger()
723 static int aaci_pcm_capture_prepare(struct snd_pcm_substream *substream) in aaci_pcm_capture_prepare() argument
725 struct snd_pcm_runtime *runtime = substream->runtime; in aaci_pcm_capture_prepare()
726 struct aaci *aaci = substream->private_data; in aaci_pcm_capture_prepare()
728 aaci_pcm_prepare(substream); in aaci_pcm_capture_prepare()