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()
248 if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) in pcm_capture_hw_params()
252 return snd_pcm_lib_alloc_vmalloc_buffer(substream, in pcm_capture_hw_params()
255 static int pcm_playback_hw_params(struct snd_pcm_substream *substream, in pcm_playback_hw_params() argument
258 struct snd_efw *efw = substream->private_data; in pcm_playback_hw_params()
260 if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) in pcm_playback_hw_params()
264 return snd_pcm_lib_alloc_vmalloc_buffer(substream, in pcm_playback_hw_params()
268 static int pcm_capture_hw_free(struct snd_pcm_substream *substream) in pcm_capture_hw_free() argument
270 struct snd_efw *efw = substream->private_data; in pcm_capture_hw_free()
272 if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) in pcm_capture_hw_free()
277 return snd_pcm_lib_free_vmalloc_buffer(substream); in pcm_capture_hw_free()
279 static int pcm_playback_hw_free(struct snd_pcm_substream *substream) in pcm_playback_hw_free() argument
281 struct snd_efw *efw = substream->private_data; in pcm_playback_hw_free()
283 if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) in pcm_playback_hw_free()
288 return snd_pcm_lib_free_vmalloc_buffer(substream); in pcm_playback_hw_free()
291 static int pcm_capture_prepare(struct snd_pcm_substream *substream) in pcm_capture_prepare() argument
293 struct snd_efw *efw = substream->private_data; in pcm_capture_prepare()
294 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_capture_prepare()
303 static int pcm_playback_prepare(struct snd_pcm_substream *substream) in pcm_playback_prepare() argument
305 struct snd_efw *efw = substream->private_data; in pcm_playback_prepare()
306 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_playback_prepare()
316 static int pcm_capture_trigger(struct snd_pcm_substream *substream, int cmd) in pcm_capture_trigger() argument
318 struct snd_efw *efw = substream->private_data; in pcm_capture_trigger()
322 amdtp_stream_pcm_trigger(&efw->tx_stream, substream); in pcm_capture_trigger()
333 static int pcm_playback_trigger(struct snd_pcm_substream *substream, int cmd) in pcm_playback_trigger() argument
335 struct snd_efw *efw = substream->private_data; in pcm_playback_trigger()
339 amdtp_stream_pcm_trigger(&efw->rx_stream, substream); in pcm_playback_trigger()