Lines Matching refs:substream

147 		   struct snd_pcm_substream *substream)  in pcm_init_hw_params()  argument
149 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_init_hw_params()
161 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in pcm_init_hw_params()
195 static int pcm_open(struct snd_pcm_substream *substream) in pcm_open() argument
197 struct snd_efw *efw = substream->private_data; in pcm_open()
206 err = pcm_init_hw_params(efw, substream); in pcm_open()
224 substream->runtime->hw.rate_min = sampling_rate; in pcm_open()
225 substream->runtime->hw.rate_max = sampling_rate; in pcm_open()
228 snd_pcm_set_sync(substream); in pcm_open()
236 static int pcm_close(struct snd_pcm_substream *substream) in pcm_close() argument
238 struct snd_efw *efw = substream->private_data; in pcm_close()
243 static int pcm_capture_hw_params(struct snd_pcm_substream *substream, in pcm_capture_hw_params() argument
246 struct snd_efw *efw = substream->private_data; in pcm_capture_hw_params()
249 err = snd_pcm_lib_alloc_vmalloc_buffer(substream, in pcm_capture_hw_params()
254 if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) in pcm_capture_hw_params()
261 static int pcm_playback_hw_params(struct snd_pcm_substream *substream, in pcm_playback_hw_params() argument
264 struct snd_efw *efw = substream->private_data; in pcm_playback_hw_params()
267 err = snd_pcm_lib_alloc_vmalloc_buffer(substream, in pcm_playback_hw_params()
272 if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) in pcm_playback_hw_params()
280 static int pcm_capture_hw_free(struct snd_pcm_substream *substream) in pcm_capture_hw_free() argument
282 struct snd_efw *efw = substream->private_data; in pcm_capture_hw_free()
284 if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) in pcm_capture_hw_free()
289 return snd_pcm_lib_free_vmalloc_buffer(substream); in pcm_capture_hw_free()
291 static int pcm_playback_hw_free(struct snd_pcm_substream *substream) in pcm_playback_hw_free() argument
293 struct snd_efw *efw = substream->private_data; in pcm_playback_hw_free()
295 if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) in pcm_playback_hw_free()
300 return snd_pcm_lib_free_vmalloc_buffer(substream); in pcm_playback_hw_free()
303 static int pcm_capture_prepare(struct snd_pcm_substream *substream) in pcm_capture_prepare() argument
305 struct snd_efw *efw = substream->private_data; in pcm_capture_prepare()
306 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_capture_prepare()
315 static int pcm_playback_prepare(struct snd_pcm_substream *substream) in pcm_playback_prepare() argument
317 struct snd_efw *efw = substream->private_data; in pcm_playback_prepare()
318 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_playback_prepare()
328 static int pcm_capture_trigger(struct snd_pcm_substream *substream, int cmd) in pcm_capture_trigger() argument
330 struct snd_efw *efw = substream->private_data; in pcm_capture_trigger()
334 amdtp_stream_pcm_trigger(&efw->tx_stream, substream); in pcm_capture_trigger()
345 static int pcm_playback_trigger(struct snd_pcm_substream *substream, int cmd) in pcm_playback_trigger() argument
347 struct snd_efw *efw = substream->private_data; in pcm_playback_trigger()
351 amdtp_stream_pcm_trigger(&efw->rx_stream, substream); in pcm_playback_trigger()