Lines Matching refs:bebob
95 pcm_init_hw_params(struct snd_bebob *bebob, in pcm_init_hw_params() argument
105 s = &bebob->tx_stream; in pcm_init_hw_params()
106 formations = bebob->tx_stream_formations; in pcm_init_hw_params()
109 s = &bebob->rx_stream; in pcm_init_hw_params()
110 formations = bebob->rx_stream_formations; in pcm_init_hw_params()
134 struct snd_bebob *bebob = substream->private_data; in pcm_open() local
135 const struct snd_bebob_rate_spec *spec = bebob->spec->rate; in pcm_open()
136 struct amdtp_domain *d = &bebob->domain; in pcm_open()
140 err = snd_bebob_stream_lock_try(bebob); in pcm_open()
144 err = pcm_init_hw_params(bebob, substream); in pcm_open()
148 err = snd_bebob_stream_get_clock_src(bebob, &src); in pcm_open()
152 mutex_lock(&bebob->mutex); in pcm_open()
158 (bebob->substreams_counter > 0 && d->events_per_period > 0)) { in pcm_open()
163 err = spec->get(bebob, &sampling_rate); in pcm_open()
165 mutex_unlock(&bebob->mutex); in pcm_open()
166 dev_err(&bebob->unit->device, in pcm_open()
179 mutex_unlock(&bebob->mutex); in pcm_open()
187 mutex_unlock(&bebob->mutex); in pcm_open()
193 mutex_unlock(&bebob->mutex); in pcm_open()
199 snd_bebob_stream_lock_release(bebob); in pcm_open()
206 struct snd_bebob *bebob = substream->private_data; in pcm_close() local
207 snd_bebob_stream_lock_release(bebob); in pcm_close()
214 struct snd_bebob *bebob = substream->private_data; in pcm_hw_params() local
222 mutex_lock(&bebob->mutex); in pcm_hw_params()
223 err = snd_bebob_stream_reserve_duplex(bebob, rate, in pcm_hw_params()
226 ++bebob->substreams_counter; in pcm_hw_params()
227 mutex_unlock(&bebob->mutex); in pcm_hw_params()
235 struct snd_bebob *bebob = substream->private_data; in pcm_hw_free() local
237 mutex_lock(&bebob->mutex); in pcm_hw_free()
240 bebob->substreams_counter--; in pcm_hw_free()
242 snd_bebob_stream_stop_duplex(bebob); in pcm_hw_free()
244 mutex_unlock(&bebob->mutex); in pcm_hw_free()
252 struct snd_bebob *bebob = substream->private_data; in pcm_capture_prepare() local
255 err = snd_bebob_stream_start_duplex(bebob); in pcm_capture_prepare()
257 amdtp_stream_pcm_prepare(&bebob->tx_stream); in pcm_capture_prepare()
264 struct snd_bebob *bebob = substream->private_data; in pcm_playback_prepare() local
267 err = snd_bebob_stream_start_duplex(bebob); in pcm_playback_prepare()
269 amdtp_stream_pcm_prepare(&bebob->rx_stream); in pcm_playback_prepare()
277 struct snd_bebob *bebob = substream->private_data; in pcm_capture_trigger() local
281 amdtp_stream_pcm_trigger(&bebob->tx_stream, substream); in pcm_capture_trigger()
284 amdtp_stream_pcm_trigger(&bebob->tx_stream, NULL); in pcm_capture_trigger()
295 struct snd_bebob *bebob = substream->private_data; in pcm_playback_trigger() local
299 amdtp_stream_pcm_trigger(&bebob->rx_stream, substream); in pcm_playback_trigger()
302 amdtp_stream_pcm_trigger(&bebob->rx_stream, NULL); in pcm_playback_trigger()
313 struct snd_bebob *bebob = sbstrm->private_data; in pcm_capture_pointer() local
315 return amdtp_domain_stream_pcm_pointer(&bebob->domain, in pcm_capture_pointer()
316 &bebob->tx_stream); in pcm_capture_pointer()
320 struct snd_bebob *bebob = sbstrm->private_data; in pcm_playback_pointer() local
322 return amdtp_domain_stream_pcm_pointer(&bebob->domain, in pcm_playback_pointer()
323 &bebob->rx_stream); in pcm_playback_pointer()
328 struct snd_bebob *bebob = substream->private_data; in pcm_capture_ack() local
330 return amdtp_domain_stream_pcm_ack(&bebob->domain, &bebob->tx_stream); in pcm_capture_ack()
335 struct snd_bebob *bebob = substream->private_data; in pcm_playback_ack() local
337 return amdtp_domain_stream_pcm_ack(&bebob->domain, &bebob->rx_stream); in pcm_playback_ack()
340 int snd_bebob_create_pcm_devices(struct snd_bebob *bebob) in snd_bebob_create_pcm_devices() argument
365 err = snd_pcm_new(bebob->card, bebob->card->driver, 0, 1, 1, &pcm); in snd_bebob_create_pcm_devices()
369 pcm->private_data = bebob; in snd_bebob_create_pcm_devices()
372 "%s PCM", bebob->card->shortname); in snd_bebob_create_pcm_devices()