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