Lines Matching refs:substream

22 			      struct snd_pcm_substream *substream)  in pcm_init_hw_params()  argument
40 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_init_hw_params()
46 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in pcm_init_hw_params()
68 static int pcm_open(struct snd_pcm_substream *substream) in pcm_open() argument
70 struct snd_tscm *tscm = substream->private_data; in pcm_open()
79 err = pcm_init_hw_params(tscm, substream); in pcm_open()
90 substream->runtime->hw.rate_min = rate; in pcm_open()
91 substream->runtime->hw.rate_max = rate; in pcm_open()
94 snd_pcm_set_sync(substream); in pcm_open()
102 static int pcm_close(struct snd_pcm_substream *substream) in pcm_close() argument
104 struct snd_tscm *tscm = substream->private_data; in pcm_close()
111 static int pcm_capture_hw_params(struct snd_pcm_substream *substream, in pcm_capture_hw_params() argument
114 struct snd_tscm *tscm = substream->private_data; in pcm_capture_hw_params()
117 err = snd_pcm_lib_alloc_vmalloc_buffer(substream, in pcm_capture_hw_params()
122 if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { in pcm_capture_hw_params()
133 static int pcm_playback_hw_params(struct snd_pcm_substream *substream, in pcm_playback_hw_params() argument
136 struct snd_tscm *tscm = substream->private_data; in pcm_playback_hw_params()
139 err = snd_pcm_lib_alloc_vmalloc_buffer(substream, in pcm_playback_hw_params()
144 if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { in pcm_playback_hw_params()
155 static int pcm_capture_hw_free(struct snd_pcm_substream *substream) in pcm_capture_hw_free() argument
157 struct snd_tscm *tscm = substream->private_data; in pcm_capture_hw_free()
161 if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) in pcm_capture_hw_free()
168 return snd_pcm_lib_free_vmalloc_buffer(substream); in pcm_capture_hw_free()
171 static int pcm_playback_hw_free(struct snd_pcm_substream *substream) in pcm_playback_hw_free() argument
173 struct snd_tscm *tscm = substream->private_data; in pcm_playback_hw_free()
177 if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) in pcm_playback_hw_free()
184 return snd_pcm_lib_free_vmalloc_buffer(substream); in pcm_playback_hw_free()
187 static int pcm_capture_prepare(struct snd_pcm_substream *substream) in pcm_capture_prepare() argument
189 struct snd_tscm *tscm = substream->private_data; in pcm_capture_prepare()
190 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_capture_prepare()
204 static int pcm_playback_prepare(struct snd_pcm_substream *substream) in pcm_playback_prepare() argument
206 struct snd_tscm *tscm = substream->private_data; in pcm_playback_prepare()
207 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_playback_prepare()
221 static int pcm_capture_trigger(struct snd_pcm_substream *substream, int cmd) in pcm_capture_trigger() argument
223 struct snd_tscm *tscm = substream->private_data; in pcm_capture_trigger()
227 amdtp_stream_pcm_trigger(&tscm->tx_stream, substream); in pcm_capture_trigger()
239 static int pcm_playback_trigger(struct snd_pcm_substream *substream, int cmd) in pcm_playback_trigger() argument
241 struct snd_tscm *tscm = substream->private_data; in pcm_playback_trigger()
245 amdtp_stream_pcm_trigger(&tscm->rx_stream, substream); in pcm_playback_trigger()