Lines Matching refs:oxfw
109 static int init_hw_params(struct snd_oxfw *oxfw, in init_hw_params() argument
119 stream = &oxfw->tx_stream; in init_hw_params()
120 formats = oxfw->tx_stream_formats; in init_hw_params()
123 stream = &oxfw->rx_stream; in init_hw_params()
124 formats = oxfw->rx_stream_formats; in init_hw_params()
148 struct snd_oxfw *oxfw = substream->private_data; in limit_to_current_params() local
158 err = snd_oxfw_stream_get_current_formation(oxfw, dir, &formation); in limit_to_current_params()
172 struct snd_oxfw *oxfw = substream->private_data; in pcm_open() local
173 struct amdtp_domain *d = &oxfw->domain; in pcm_open()
176 err = snd_oxfw_stream_lock_try(oxfw); in pcm_open()
180 err = init_hw_params(oxfw, substream); in pcm_open()
184 mutex_lock(&oxfw->mutex); in pcm_open()
189 if (oxfw->substreams_count > 0 && d->events_per_period > 0) { in pcm_open()
195 mutex_unlock(&oxfw->mutex); in pcm_open()
204 mutex_unlock(&oxfw->mutex); in pcm_open()
212 mutex_unlock(&oxfw->mutex); in pcm_open()
218 mutex_unlock(&oxfw->mutex); in pcm_open()
224 snd_oxfw_stream_lock_release(oxfw); in pcm_open()
230 struct snd_oxfw *oxfw = substream->private_data; in pcm_close() local
232 snd_oxfw_stream_lock_release(oxfw); in pcm_close()
239 struct snd_oxfw *oxfw = substream->private_data; in pcm_capture_hw_params() local
248 mutex_lock(&oxfw->mutex); in pcm_capture_hw_params()
249 err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->tx_stream, in pcm_capture_hw_params()
253 ++oxfw->substreams_count; in pcm_capture_hw_params()
254 mutex_unlock(&oxfw->mutex); in pcm_capture_hw_params()
262 struct snd_oxfw *oxfw = substream->private_data; in pcm_playback_hw_params() local
271 mutex_lock(&oxfw->mutex); in pcm_playback_hw_params()
272 err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->rx_stream, in pcm_playback_hw_params()
276 ++oxfw->substreams_count; in pcm_playback_hw_params()
277 mutex_unlock(&oxfw->mutex); in pcm_playback_hw_params()
285 struct snd_oxfw *oxfw = substream->private_data; in pcm_capture_hw_free() local
287 mutex_lock(&oxfw->mutex); in pcm_capture_hw_free()
290 --oxfw->substreams_count; in pcm_capture_hw_free()
292 snd_oxfw_stream_stop_duplex(oxfw); in pcm_capture_hw_free()
294 mutex_unlock(&oxfw->mutex); in pcm_capture_hw_free()
300 struct snd_oxfw *oxfw = substream->private_data; in pcm_playback_hw_free() local
302 mutex_lock(&oxfw->mutex); in pcm_playback_hw_free()
305 --oxfw->substreams_count; in pcm_playback_hw_free()
307 snd_oxfw_stream_stop_duplex(oxfw); in pcm_playback_hw_free()
309 mutex_unlock(&oxfw->mutex); in pcm_playback_hw_free()
316 struct snd_oxfw *oxfw = substream->private_data; in pcm_capture_prepare() local
319 mutex_lock(&oxfw->mutex); in pcm_capture_prepare()
320 err = snd_oxfw_stream_start_duplex(oxfw); in pcm_capture_prepare()
321 mutex_unlock(&oxfw->mutex); in pcm_capture_prepare()
325 amdtp_stream_pcm_prepare(&oxfw->tx_stream); in pcm_capture_prepare()
331 struct snd_oxfw *oxfw = substream->private_data; in pcm_playback_prepare() local
334 mutex_lock(&oxfw->mutex); in pcm_playback_prepare()
335 err = snd_oxfw_stream_start_duplex(oxfw); in pcm_playback_prepare()
336 mutex_unlock(&oxfw->mutex); in pcm_playback_prepare()
340 amdtp_stream_pcm_prepare(&oxfw->rx_stream); in pcm_playback_prepare()
347 struct snd_oxfw *oxfw = substream->private_data; in pcm_capture_trigger() local
360 amdtp_stream_pcm_trigger(&oxfw->tx_stream, pcm); in pcm_capture_trigger()
365 struct snd_oxfw *oxfw = substream->private_data; in pcm_playback_trigger() local
378 amdtp_stream_pcm_trigger(&oxfw->rx_stream, pcm); in pcm_playback_trigger()
384 struct snd_oxfw *oxfw = sbstm->private_data; in pcm_capture_pointer() local
386 return amdtp_domain_stream_pcm_pointer(&oxfw->domain, &oxfw->tx_stream); in pcm_capture_pointer()
390 struct snd_oxfw *oxfw = sbstm->private_data; in pcm_playback_pointer() local
392 return amdtp_domain_stream_pcm_pointer(&oxfw->domain, &oxfw->rx_stream); in pcm_playback_pointer()
397 struct snd_oxfw *oxfw = substream->private_data; in pcm_capture_ack() local
399 return amdtp_domain_stream_pcm_ack(&oxfw->domain, &oxfw->tx_stream); in pcm_capture_ack()
404 struct snd_oxfw *oxfw = substream->private_data; in pcm_playback_ack() local
406 return amdtp_domain_stream_pcm_ack(&oxfw->domain, &oxfw->rx_stream); in pcm_playback_ack()
409 int snd_oxfw_create_pcm(struct snd_oxfw *oxfw) in snd_oxfw_create_pcm() argument
435 if (oxfw->has_output) in snd_oxfw_create_pcm()
438 err = snd_pcm_new(oxfw->card, oxfw->card->driver, 0, 1, cap, &pcm); in snd_oxfw_create_pcm()
442 pcm->private_data = oxfw; in snd_oxfw_create_pcm()
443 strcpy(pcm->name, oxfw->card->shortname); in snd_oxfw_create_pcm()