Lines Matching refs:efw
132 pcm_init_hw_params(struct snd_efw *efw, in pcm_init_hw_params() argument
142 s = &efw->tx_stream; in pcm_init_hw_params()
143 pcm_channels = efw->pcm_capture_channels; in pcm_init_hw_params()
146 s = &efw->rx_stream; in pcm_init_hw_params()
147 pcm_channels = efw->pcm_playback_channels; in pcm_init_hw_params()
151 runtime->hw.rates = efw->supported_sampling_rate; in pcm_init_hw_params()
175 struct snd_efw *efw = substream->private_data; in pcm_open() local
176 struct amdtp_domain *d = &efw->domain; in pcm_open()
180 err = snd_efw_stream_lock_try(efw); in pcm_open()
184 err = pcm_init_hw_params(efw, substream); in pcm_open()
188 err = snd_efw_command_get_clock_source(efw, &clock_source); in pcm_open()
192 mutex_lock(&efw->mutex); in pcm_open()
198 (efw->substreams_counter > 0 && d->events_per_period > 0)) { in pcm_open()
203 err = snd_efw_command_get_sampling_rate(efw, &sampling_rate); in pcm_open()
205 mutex_unlock(&efw->mutex); in pcm_open()
216 mutex_unlock(&efw->mutex); in pcm_open()
224 mutex_unlock(&efw->mutex); in pcm_open()
230 mutex_unlock(&efw->mutex); in pcm_open()
236 snd_efw_stream_lock_release(efw); in pcm_open()
242 struct snd_efw *efw = substream->private_data; in pcm_close() local
243 snd_efw_stream_lock_release(efw); in pcm_close()
250 struct snd_efw *efw = substream->private_data; in pcm_hw_params() local
258 mutex_lock(&efw->mutex); in pcm_hw_params()
259 err = snd_efw_stream_reserve_duplex(efw, rate, in pcm_hw_params()
262 ++efw->substreams_counter; in pcm_hw_params()
263 mutex_unlock(&efw->mutex); in pcm_hw_params()
271 struct snd_efw *efw = substream->private_data; in pcm_hw_free() local
273 mutex_lock(&efw->mutex); in pcm_hw_free()
276 --efw->substreams_counter; in pcm_hw_free()
278 snd_efw_stream_stop_duplex(efw); in pcm_hw_free()
280 mutex_unlock(&efw->mutex); in pcm_hw_free()
287 struct snd_efw *efw = substream->private_data; in pcm_capture_prepare() local
290 err = snd_efw_stream_start_duplex(efw); in pcm_capture_prepare()
292 amdtp_stream_pcm_prepare(&efw->tx_stream); in pcm_capture_prepare()
298 struct snd_efw *efw = substream->private_data; in pcm_playback_prepare() local
301 err = snd_efw_stream_start_duplex(efw); in pcm_playback_prepare()
303 amdtp_stream_pcm_prepare(&efw->rx_stream); in pcm_playback_prepare()
310 struct snd_efw *efw = substream->private_data; in pcm_capture_trigger() local
314 amdtp_stream_pcm_trigger(&efw->tx_stream, substream); in pcm_capture_trigger()
317 amdtp_stream_pcm_trigger(&efw->tx_stream, NULL); in pcm_capture_trigger()
327 struct snd_efw *efw = substream->private_data; in pcm_playback_trigger() local
331 amdtp_stream_pcm_trigger(&efw->rx_stream, substream); in pcm_playback_trigger()
334 amdtp_stream_pcm_trigger(&efw->rx_stream, NULL); in pcm_playback_trigger()
345 struct snd_efw *efw = sbstrm->private_data; in pcm_capture_pointer() local
347 return amdtp_domain_stream_pcm_pointer(&efw->domain, &efw->tx_stream); in pcm_capture_pointer()
351 struct snd_efw *efw = sbstrm->private_data; in pcm_playback_pointer() local
353 return amdtp_domain_stream_pcm_pointer(&efw->domain, &efw->rx_stream); in pcm_playback_pointer()
358 struct snd_efw *efw = substream->private_data; in pcm_capture_ack() local
360 return amdtp_domain_stream_pcm_ack(&efw->domain, &efw->tx_stream); in pcm_capture_ack()
365 struct snd_efw *efw = substream->private_data; in pcm_playback_ack() local
367 return amdtp_domain_stream_pcm_ack(&efw->domain, &efw->rx_stream); in pcm_playback_ack()
370 int snd_efw_create_pcm_devices(struct snd_efw *efw) in snd_efw_create_pcm_devices() argument
395 err = snd_pcm_new(efw->card, efw->card->driver, 0, 1, 1, &pcm); in snd_efw_create_pcm_devices()
399 pcm->private_data = efw; in snd_efw_create_pcm_devices()
400 snprintf(pcm->name, sizeof(pcm->name), "%s PCM", efw->card->shortname); in snd_efw_create_pcm_devices()