Lines Matching refs:substream
104 static int snd_sb8_playback_prepare(struct snd_pcm_substream *substream) in snd_sb8_playback_prepare() argument
107 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_sb8_playback_prepare()
108 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_playback_prepare()
157 size = chip->p_dma_size = snd_pcm_lib_buffer_bytes(substream); in snd_sb8_playback_prepare()
158 count = chip->p_period_size = snd_pcm_lib_period_bytes(substream); in snd_sb8_playback_prepare()
206 static int snd_sb8_playback_trigger(struct snd_pcm_substream *substream, in snd_sb8_playback_trigger() argument
210 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_sb8_playback_trigger()
225 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_playback_trigger()
242 static int snd_sb8_hw_params(struct snd_pcm_substream *substream, in snd_sb8_hw_params() argument
245 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_sb8_hw_params()
248 static int snd_sb8_hw_free(struct snd_pcm_substream *substream) in snd_sb8_hw_free() argument
250 snd_pcm_lib_free_pages(substream); in snd_sb8_hw_free()
254 static int snd_sb8_capture_prepare(struct snd_pcm_substream *substream) in snd_sb8_capture_prepare() argument
257 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_sb8_capture_prepare()
258 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_capture_prepare()
308 size = chip->c_dma_size = snd_pcm_lib_buffer_bytes(substream); in snd_sb8_capture_prepare()
309 count = chip->c_period_size = snd_pcm_lib_period_bytes(substream); in snd_sb8_capture_prepare()
343 static int snd_sb8_capture_trigger(struct snd_pcm_substream *substream, in snd_sb8_capture_trigger() argument
347 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_sb8_capture_trigger()
362 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_capture_trigger()
383 struct snd_pcm_substream *substream; in snd_sb8dsp_interrupt() local
393 substream = chip->playback_substream; in snd_sb8dsp_interrupt()
394 runtime = substream->runtime; in snd_sb8dsp_interrupt()
396 snd_sb8_playback_trigger(substream, SNDRV_PCM_TRIGGER_START); in snd_sb8dsp_interrupt()
397 snd_pcm_period_elapsed(substream); in snd_sb8dsp_interrupt()
404 substream = chip->capture_substream; in snd_sb8dsp_interrupt()
405 runtime = substream->runtime; in snd_sb8dsp_interrupt()
407 snd_sb8_capture_trigger(substream, SNDRV_PCM_TRIGGER_START); in snd_sb8dsp_interrupt()
408 snd_pcm_period_elapsed(substream); in snd_sb8dsp_interrupt()
414 static snd_pcm_uframes_t snd_sb8_playback_pointer(struct snd_pcm_substream *substream) in snd_sb8_playback_pointer() argument
416 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_sb8_playback_pointer()
427 return bytes_to_frames(substream->runtime, ptr); in snd_sb8_playback_pointer()
430 static snd_pcm_uframes_t snd_sb8_capture_pointer(struct snd_pcm_substream *substream) in snd_sb8_capture_pointer() argument
432 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_sb8_capture_pointer()
443 return bytes_to_frames(substream->runtime, ptr); in snd_sb8_capture_pointer()
492 static int snd_sb8_open(struct snd_pcm_substream *substream) in snd_sb8_open() argument
494 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_sb8_open()
495 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_open()
505 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_sb8_open()
506 chip->playback_substream = substream; in snd_sb8_open()
509 chip->capture_substream = substream; in snd_sb8_open()
533 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_sb8_open()
554 static int snd_sb8_close(struct snd_pcm_substream *substream) in snd_sb8_close() argument
557 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_sb8_close()
563 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_sb8_close()