Lines Matching refs:dg00x
57 static int pcm_init_hw_params(struct snd_dg00x *dg00x, in pcm_init_hw_params() argument
68 s = &dg00x->tx_stream; in pcm_init_hw_params()
71 s = &dg00x->rx_stream; in pcm_init_hw_params()
102 struct snd_dg00x *dg00x = substream->private_data; in pcm_open() local
103 struct amdtp_domain *d = &dg00x->domain; in pcm_open()
108 err = snd_dg00x_stream_lock_try(dg00x); in pcm_open()
112 err = pcm_init_hw_params(dg00x, substream); in pcm_open()
117 err = snd_dg00x_stream_get_clock(dg00x, &clock); in pcm_open()
121 err = snd_dg00x_stream_check_external_clock(dg00x, &detect); in pcm_open()
130 mutex_lock(&dg00x->mutex); in pcm_open()
136 (dg00x->substreams_counter > 0 && d->events_per_period > 0)) { in pcm_open()
141 err = snd_dg00x_stream_get_external_rate(dg00x, &rate); in pcm_open()
143 mutex_unlock(&dg00x->mutex); in pcm_open()
154 mutex_unlock(&dg00x->mutex); in pcm_open()
162 mutex_unlock(&dg00x->mutex); in pcm_open()
168 mutex_unlock(&dg00x->mutex); in pcm_open()
174 snd_dg00x_stream_lock_release(dg00x); in pcm_open()
180 struct snd_dg00x *dg00x = substream->private_data; in pcm_close() local
182 snd_dg00x_stream_lock_release(dg00x); in pcm_close()
190 struct snd_dg00x *dg00x = substream->private_data; in pcm_hw_params() local
198 mutex_lock(&dg00x->mutex); in pcm_hw_params()
199 err = snd_dg00x_stream_reserve_duplex(dg00x, rate, in pcm_hw_params()
202 ++dg00x->substreams_counter; in pcm_hw_params()
203 mutex_unlock(&dg00x->mutex); in pcm_hw_params()
211 struct snd_dg00x *dg00x = substream->private_data; in pcm_hw_free() local
213 mutex_lock(&dg00x->mutex); in pcm_hw_free()
216 --dg00x->substreams_counter; in pcm_hw_free()
218 snd_dg00x_stream_stop_duplex(dg00x); in pcm_hw_free()
220 mutex_unlock(&dg00x->mutex); in pcm_hw_free()
227 struct snd_dg00x *dg00x = substream->private_data; in pcm_capture_prepare() local
230 mutex_lock(&dg00x->mutex); in pcm_capture_prepare()
232 err = snd_dg00x_stream_start_duplex(dg00x); in pcm_capture_prepare()
234 amdtp_stream_pcm_prepare(&dg00x->tx_stream); in pcm_capture_prepare()
236 mutex_unlock(&dg00x->mutex); in pcm_capture_prepare()
243 struct snd_dg00x *dg00x = substream->private_data; in pcm_playback_prepare() local
246 mutex_lock(&dg00x->mutex); in pcm_playback_prepare()
248 err = snd_dg00x_stream_start_duplex(dg00x); in pcm_playback_prepare()
250 amdtp_stream_pcm_prepare(&dg00x->rx_stream); in pcm_playback_prepare()
251 amdtp_dot_reset(&dg00x->rx_stream); in pcm_playback_prepare()
254 mutex_unlock(&dg00x->mutex); in pcm_playback_prepare()
261 struct snd_dg00x *dg00x = substream->private_data; in pcm_capture_trigger() local
265 amdtp_stream_pcm_trigger(&dg00x->tx_stream, substream); in pcm_capture_trigger()
268 amdtp_stream_pcm_trigger(&dg00x->tx_stream, NULL); in pcm_capture_trigger()
279 struct snd_dg00x *dg00x = substream->private_data; in pcm_playback_trigger() local
283 amdtp_stream_pcm_trigger(&dg00x->rx_stream, substream); in pcm_playback_trigger()
286 amdtp_stream_pcm_trigger(&dg00x->rx_stream, NULL); in pcm_playback_trigger()
297 struct snd_dg00x *dg00x = sbstrm->private_data; in pcm_capture_pointer() local
299 return amdtp_domain_stream_pcm_pointer(&dg00x->domain, &dg00x->tx_stream); in pcm_capture_pointer()
304 struct snd_dg00x *dg00x = sbstrm->private_data; in pcm_playback_pointer() local
306 return amdtp_domain_stream_pcm_pointer(&dg00x->domain, &dg00x->rx_stream); in pcm_playback_pointer()
311 struct snd_dg00x *dg00x = substream->private_data; in pcm_capture_ack() local
313 return amdtp_domain_stream_pcm_ack(&dg00x->domain, &dg00x->tx_stream); in pcm_capture_ack()
318 struct snd_dg00x *dg00x = substream->private_data; in pcm_playback_ack() local
320 return amdtp_domain_stream_pcm_ack(&dg00x->domain, &dg00x->rx_stream); in pcm_playback_ack()
323 int snd_dg00x_create_pcm_devices(struct snd_dg00x *dg00x) in snd_dg00x_create_pcm_devices() argument
348 err = snd_pcm_new(dg00x->card, dg00x->card->driver, 0, 1, 1, &pcm); in snd_dg00x_create_pcm_devices()
352 pcm->private_data = dg00x; in snd_dg00x_create_pcm_devices()
354 "%s PCM", dg00x->card->shortname); in snd_dg00x_create_pcm_devices()