Lines Matching refs:substream
55 struct snd_pcm_substream *substream) in init_hw_info() argument
57 struct snd_pcm_runtime *runtime = substream->runtime; in init_hw_info()
65 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in init_hw_info()
68 stream = &dice->tx_stream[substream->pcm->device]; in init_hw_info()
74 stream = &dice->rx_stream[substream->pcm->device]; in init_hw_info()
83 if (substream->pcm->device >= count) in init_hw_info()
87 err = limit_channels_and_rates(dice, substream->runtime, dir, in init_hw_info()
88 substream->pcm->device, size); in init_hw_info()
95 static int pcm_open(struct snd_pcm_substream *substream) in pcm_open() argument
97 struct snd_dice *dice = substream->private_data; in pcm_open()
104 err = init_hw_info(dice, substream); in pcm_open()
108 snd_pcm_set_sync(substream); in pcm_open()
116 static int pcm_close(struct snd_pcm_substream *substream) in pcm_close() argument
118 struct snd_dice *dice = substream->private_data; in pcm_close()
125 static int capture_hw_params(struct snd_pcm_substream *substream, in capture_hw_params() argument
128 struct snd_dice *dice = substream->private_data; in capture_hw_params()
131 err = snd_pcm_lib_alloc_vmalloc_buffer(substream, in capture_hw_params()
136 if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { in capture_hw_params()
144 static int playback_hw_params(struct snd_pcm_substream *substream, in playback_hw_params() argument
147 struct snd_dice *dice = substream->private_data; in playback_hw_params()
150 err = snd_pcm_lib_alloc_vmalloc_buffer(substream, in playback_hw_params()
155 if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { in playback_hw_params()
164 static int capture_hw_free(struct snd_pcm_substream *substream) in capture_hw_free() argument
166 struct snd_dice *dice = substream->private_data; in capture_hw_free()
170 if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) in capture_hw_free()
177 return snd_pcm_lib_free_vmalloc_buffer(substream); in capture_hw_free()
180 static int playback_hw_free(struct snd_pcm_substream *substream) in playback_hw_free() argument
182 struct snd_dice *dice = substream->private_data; in playback_hw_free()
186 if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) in playback_hw_free()
193 return snd_pcm_lib_free_vmalloc_buffer(substream); in playback_hw_free()
196 static int capture_prepare(struct snd_pcm_substream *substream) in capture_prepare() argument
198 struct snd_dice *dice = substream->private_data; in capture_prepare()
199 struct amdtp_stream *stream = &dice->tx_stream[substream->pcm->device]; in capture_prepare()
203 err = snd_dice_stream_start_duplex(dice, substream->runtime->rate); in capture_prepare()
210 static int playback_prepare(struct snd_pcm_substream *substream) in playback_prepare() argument
212 struct snd_dice *dice = substream->private_data; in playback_prepare()
213 struct amdtp_stream *stream = &dice->rx_stream[substream->pcm->device]; in playback_prepare()
217 err = snd_dice_stream_start_duplex(dice, substream->runtime->rate); in playback_prepare()
225 static int capture_trigger(struct snd_pcm_substream *substream, int cmd) in capture_trigger() argument
227 struct snd_dice *dice = substream->private_data; in capture_trigger()
228 struct amdtp_stream *stream = &dice->tx_stream[substream->pcm->device]; in capture_trigger()
232 amdtp_stream_pcm_trigger(stream, substream); in capture_trigger()
243 static int playback_trigger(struct snd_pcm_substream *substream, int cmd) in playback_trigger() argument
245 struct snd_dice *dice = substream->private_data; in playback_trigger()
246 struct amdtp_stream *stream = &dice->rx_stream[substream->pcm->device]; in playback_trigger()
250 amdtp_stream_pcm_trigger(stream, substream); in playback_trigger()
262 static snd_pcm_uframes_t capture_pointer(struct snd_pcm_substream *substream) in capture_pointer() argument
264 struct snd_dice *dice = substream->private_data; in capture_pointer()
265 struct amdtp_stream *stream = &dice->tx_stream[substream->pcm->device]; in capture_pointer()
269 static snd_pcm_uframes_t playback_pointer(struct snd_pcm_substream *substream) in playback_pointer() argument
271 struct snd_dice *dice = substream->private_data; in playback_pointer()
272 struct amdtp_stream *stream = &dice->rx_stream[substream->pcm->device]; in playback_pointer()
277 static int capture_ack(struct snd_pcm_substream *substream) in capture_ack() argument
279 struct snd_dice *dice = substream->private_data; in capture_ack()
280 struct amdtp_stream *stream = &dice->tx_stream[substream->pcm->device]; in capture_ack()
285 static int playback_ack(struct snd_pcm_substream *substream) in playback_ack() argument
287 struct snd_dice *dice = substream->private_data; in playback_ack()
288 struct amdtp_stream *stream = &dice->rx_stream[substream->pcm->device]; in playback_ack()