Lines Matching refs:substream

122 			  struct snd_pcm_substream *substream)  in init_hw_params()  argument
124 struct snd_pcm_runtime *runtime = substream->runtime; in init_hw_params()
136 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in init_hw_params()
166 static int limit_to_current_params(struct snd_pcm_substream *substream) in limit_to_current_params() argument
168 struct snd_oxfw *oxfw = substream->private_data; in limit_to_current_params()
173 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in limit_to_current_params()
182 substream->runtime->hw.channels_min = formation.pcm; in limit_to_current_params()
183 substream->runtime->hw.channels_max = formation.pcm; in limit_to_current_params()
184 substream->runtime->hw.rate_min = formation.rate; in limit_to_current_params()
185 substream->runtime->hw.rate_max = formation.rate; in limit_to_current_params()
190 static int pcm_open(struct snd_pcm_substream *substream) in pcm_open() argument
192 struct snd_oxfw *oxfw = substream->private_data; in pcm_open()
199 err = init_hw_params(oxfw, substream); in pcm_open()
209 err = limit_to_current_params(substream); in pcm_open()
214 snd_pcm_set_sync(substream); in pcm_open()
222 static int pcm_close(struct snd_pcm_substream *substream) in pcm_close() argument
224 struct snd_oxfw *oxfw = substream->private_data; in pcm_close()
230 static int pcm_capture_hw_params(struct snd_pcm_substream *substream, in pcm_capture_hw_params() argument
233 struct snd_oxfw *oxfw = substream->private_data; in pcm_capture_hw_params()
236 if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { in pcm_capture_hw_params()
244 return snd_pcm_lib_alloc_vmalloc_buffer(substream, in pcm_capture_hw_params()
247 static int pcm_playback_hw_params(struct snd_pcm_substream *substream, in pcm_playback_hw_params() argument
250 struct snd_oxfw *oxfw = substream->private_data; in pcm_playback_hw_params()
252 if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { in pcm_playback_hw_params()
260 return snd_pcm_lib_alloc_vmalloc_buffer(substream, in pcm_playback_hw_params()
264 static int pcm_capture_hw_free(struct snd_pcm_substream *substream) in pcm_capture_hw_free() argument
266 struct snd_oxfw *oxfw = substream->private_data; in pcm_capture_hw_free()
270 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_oxfw *oxfw = substream->private_data; in pcm_playback_hw_free()
285 if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) in pcm_playback_hw_free()
292 return snd_pcm_lib_free_vmalloc_buffer(substream); in pcm_playback_hw_free()
295 static int pcm_capture_prepare(struct snd_pcm_substream *substream) in pcm_capture_prepare() argument
297 struct snd_oxfw *oxfw = substream->private_data; in pcm_capture_prepare()
298 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_capture_prepare()
312 static int pcm_playback_prepare(struct snd_pcm_substream *substream) in pcm_playback_prepare() argument
314 struct snd_oxfw *oxfw = substream->private_data; in pcm_playback_prepare()
315 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_playback_prepare()
330 static int pcm_capture_trigger(struct snd_pcm_substream *substream, int cmd) in pcm_capture_trigger() argument
332 struct snd_oxfw *oxfw = substream->private_data; in pcm_capture_trigger()
337 pcm = substream; in pcm_capture_trigger()
348 static int pcm_playback_trigger(struct snd_pcm_substream *substream, int cmd) in pcm_playback_trigger() argument
350 struct snd_oxfw *oxfw = substream->private_data; in pcm_playback_trigger()
355 pcm = substream; in pcm_playback_trigger()