Lines Matching +full:dai +full:- +full:format
1 // SPDX-License-Identifier: GPL-2.0
3 // soc-dai.c
10 #include <sound/soc-dai.h>
11 #include <sound/soc-link.h>
13 #define soc_dai_ret(dai, ret) _soc_dai_ret(dai, __func__, ret) argument
14 static inline int _soc_dai_ret(struct snd_soc_dai *dai, in _soc_dai_ret() argument
23 case -EPROBE_DEFER: in _soc_dai_ret()
24 case -ENOTSUPP: in _soc_dai_ret()
27 dev_err(dai->dev, in _soc_dai_ret()
29 func, dai->name, ret); in _soc_dai_ret()
39 #define soc_dai_mark_push(dai, substream, tgt) ((dai)->mark_##tgt = substream) argument
40 #define soc_dai_mark_pop(dai, substream, tgt) ((dai)->mark_##tgt = NULL) argument
41 #define soc_dai_mark_match(dai, substream, tgt) ((dai)->mark_##tgt == substream) argument
44 * snd_soc_dai_set_sysclk - configure DAI system or master clock.
45 * @dai: DAI
46 * @clk_id: DAI specific clock ID
48 * @dir: new clock direction - input/output.
50 * Configures the DAI master (MCLK) or system (SYSCLK) clocking.
52 int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id, in snd_soc_dai_set_sysclk() argument
57 if (dai->driver->ops && in snd_soc_dai_set_sysclk()
58 dai->driver->ops->set_sysclk) in snd_soc_dai_set_sysclk()
59 ret = dai->driver->ops->set_sysclk(dai, clk_id, freq, dir); in snd_soc_dai_set_sysclk()
61 ret = snd_soc_component_set_sysclk(dai->component, clk_id, 0, in snd_soc_dai_set_sysclk()
64 return soc_dai_ret(dai, ret); in snd_soc_dai_set_sysclk()
69 * snd_soc_dai_set_clkdiv - configure DAI clock dividers.
70 * @dai: DAI
71 * @div_id: DAI specific clock divider ID
74 * Configures the clock dividers. This is used to derive the best DAI bit and
75 * frame clocks from the system or master clock. It's best to set the DAI bit
78 int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai, in snd_soc_dai_set_clkdiv() argument
81 int ret = -EINVAL; in snd_soc_dai_set_clkdiv()
83 if (dai->driver->ops && in snd_soc_dai_set_clkdiv()
84 dai->driver->ops->set_clkdiv) in snd_soc_dai_set_clkdiv()
85 ret = dai->driver->ops->set_clkdiv(dai, div_id, div); in snd_soc_dai_set_clkdiv()
87 return soc_dai_ret(dai, ret); in snd_soc_dai_set_clkdiv()
92 * snd_soc_dai_set_pll - configure DAI PLL.
93 * @dai: DAI
94 * @pll_id: DAI specific PLL ID
95 * @source: DAI specific source for the PLL
101 int snd_soc_dai_set_pll(struct snd_soc_dai *dai, int pll_id, int source, in snd_soc_dai_set_pll() argument
106 if (dai->driver->ops && in snd_soc_dai_set_pll()
107 dai->driver->ops->set_pll) in snd_soc_dai_set_pll()
108 ret = dai->driver->ops->set_pll(dai, pll_id, source, in snd_soc_dai_set_pll()
111 ret = snd_soc_component_set_pll(dai->component, pll_id, source, in snd_soc_dai_set_pll()
114 return soc_dai_ret(dai, ret); in snd_soc_dai_set_pll()
119 * snd_soc_dai_set_bclk_ratio - configure BCLK to sample rate ratio.
120 * @dai: DAI
123 * Configures the DAI for a preset BCLK to sample rate ratio.
125 int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio) in snd_soc_dai_set_bclk_ratio() argument
127 int ret = -ENOTSUPP; in snd_soc_dai_set_bclk_ratio()
129 if (dai->driver->ops && in snd_soc_dai_set_bclk_ratio()
130 dai->driver->ops->set_bclk_ratio) in snd_soc_dai_set_bclk_ratio()
131 ret = dai->driver->ops->set_bclk_ratio(dai, ratio); in snd_soc_dai_set_bclk_ratio()
133 return soc_dai_ret(dai, ret); in snd_soc_dai_set_bclk_ratio()
139 struct snd_soc_dai *dai; in snd_soc_dai_get_fmt_max_priority() local
145 for_each_rtd_dais(rtd, i, dai) { in snd_soc_dai_get_fmt_max_priority()
146 if (dai->driver->ops && in snd_soc_dai_get_fmt_max_priority()
147 dai->driver->ops->num_auto_selectable_formats) in snd_soc_dai_get_fmt_max_priority()
148 max = max(max, dai->driver->ops->num_auto_selectable_formats); in snd_soc_dai_get_fmt_max_priority()
157 * snd_soc_dai_get_fmt - get supported audio format.
158 * @dai: DAI
159 * @priority: priority level of supported audio format.
162 * quality by the DAI so that the core can configure a
163 * format which will work well with other devices.
169 u64 snd_soc_dai_get_fmt(struct snd_soc_dai *dai, int priority) in snd_soc_dai_get_fmt() argument
171 const struct snd_soc_dai_ops *ops = dai->driver->ops; in snd_soc_dai_get_fmt()
189 max = ops->num_auto_selectable_formats; in snd_soc_dai_get_fmt()
195 fmt |= ops->auto_selectable_formats[i]; in snd_soc_dai_get_fmt()
201 * snd_soc_dai_set_fmt - configure DAI hardware audio format.
202 * @dai: DAI
203 * @fmt: SND_SOC_DAIFMT_* format value.
205 * Configures the DAI hardware format and clocking.
207 int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) in snd_soc_dai_set_fmt() argument
209 int ret = -ENOTSUPP; in snd_soc_dai_set_fmt()
211 if (dai->driver->ops && dai->driver->ops->set_fmt) in snd_soc_dai_set_fmt()
212 ret = dai->driver->ops->set_fmt(dai, fmt); in snd_soc_dai_set_fmt()
214 return soc_dai_ret(dai, ret); in snd_soc_dai_set_fmt()
219 * snd_soc_xlate_tdm_slot_mask - generate tx/rx slot mask.
224 * Generates the TDM tx and rx slot default masks for DAI.
234 return -EINVAL; in snd_soc_xlate_tdm_slot_mask()
236 *tx_mask = (1 << slots) - 1; in snd_soc_xlate_tdm_slot_mask()
237 *rx_mask = (1 << slots) - 1; in snd_soc_xlate_tdm_slot_mask()
243 * snd_soc_dai_set_tdm_slot() - Configures a DAI for TDM operation
244 * @dai: The DAI to configure
250 * This function configures the specified DAI for TDM operation. @slot contains
253 * active slots of the TDM stream for the specified DAI, i.e. which slots the
254 * DAI should write to or read from. If a bit is set the corresponding slot is
257 * maps to the first channel of the DAI, the second active slot to the second
265 int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai, in snd_soc_dai_set_tdm_slot() argument
269 int ret = -ENOTSUPP; in snd_soc_dai_set_tdm_slot()
276 if (dai->driver->ops && in snd_soc_dai_set_tdm_slot()
277 dai->driver->ops->xlate_tdm_slot_mask) in snd_soc_dai_set_tdm_slot()
278 dai->driver->ops->xlate_tdm_slot_mask(slots, in snd_soc_dai_set_tdm_slot()
284 snd_soc_dai_tdm_mask_set(dai, stream, *tdm_mask[stream]); in snd_soc_dai_set_tdm_slot()
286 if (dai->driver->ops && in snd_soc_dai_set_tdm_slot()
287 dai->driver->ops->set_tdm_slot) in snd_soc_dai_set_tdm_slot()
288 ret = dai->driver->ops->set_tdm_slot(dai, tx_mask, rx_mask, in snd_soc_dai_set_tdm_slot()
290 return soc_dai_ret(dai, ret); in snd_soc_dai_set_tdm_slot()
295 * snd_soc_dai_set_channel_map - configure DAI audio channel map
296 * @dai: DAI
299 * 0~num-1 uses
302 * 0~num-1 uses
306 int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai, in snd_soc_dai_set_channel_map() argument
310 int ret = -ENOTSUPP; in snd_soc_dai_set_channel_map()
312 if (dai->driver->ops && in snd_soc_dai_set_channel_map()
313 dai->driver->ops->set_channel_map) in snd_soc_dai_set_channel_map()
314 ret = dai->driver->ops->set_channel_map(dai, tx_num, tx_slot, in snd_soc_dai_set_channel_map()
316 return soc_dai_ret(dai, ret); in snd_soc_dai_set_channel_map()
321 * snd_soc_dai_get_channel_map - Get DAI audio channel map
322 * @dai: DAI
325 * 0~num-1 uses
328 * 0~num-1 uses
330 int snd_soc_dai_get_channel_map(struct snd_soc_dai *dai, in snd_soc_dai_get_channel_map() argument
334 int ret = -ENOTSUPP; in snd_soc_dai_get_channel_map()
336 if (dai->driver->ops && in snd_soc_dai_get_channel_map()
337 dai->driver->ops->get_channel_map) in snd_soc_dai_get_channel_map()
338 ret = dai->driver->ops->get_channel_map(dai, tx_num, tx_slot, in snd_soc_dai_get_channel_map()
340 return soc_dai_ret(dai, ret); in snd_soc_dai_get_channel_map()
345 * snd_soc_dai_set_tristate - configure DAI system or master clock.
346 * @dai: DAI
349 * Tristates the DAI so that others can use it.
351 int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate) in snd_soc_dai_set_tristate() argument
353 int ret = -EINVAL; in snd_soc_dai_set_tristate()
355 if (dai->driver->ops && in snd_soc_dai_set_tristate()
356 dai->driver->ops->set_tristate) in snd_soc_dai_set_tristate()
357 ret = dai->driver->ops->set_tristate(dai, tristate); in snd_soc_dai_set_tristate()
359 return soc_dai_ret(dai, ret); in snd_soc_dai_set_tristate()
364 * snd_soc_dai_digital_mute - configure DAI system or master clock.
365 * @dai: DAI
369 * Mutes the DAI DAC.
371 int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute, in snd_soc_dai_digital_mute() argument
374 int ret = -ENOTSUPP; in snd_soc_dai_digital_mute()
380 if (dai->driver->ops && in snd_soc_dai_digital_mute()
381 dai->driver->ops->mute_stream && in snd_soc_dai_digital_mute()
383 !dai->driver->ops->no_capture_mute)) in snd_soc_dai_digital_mute()
384 ret = dai->driver->ops->mute_stream(dai, mute, direction); in snd_soc_dai_digital_mute()
386 return soc_dai_ret(dai, ret); in snd_soc_dai_digital_mute()
390 int snd_soc_dai_hw_params(struct snd_soc_dai *dai, in snd_soc_dai_hw_params() argument
396 if (dai->driver->ops && in snd_soc_dai_hw_params()
397 dai->driver->ops->hw_params) in snd_soc_dai_hw_params()
398 ret = dai->driver->ops->hw_params(substream, params, dai); in snd_soc_dai_hw_params()
402 soc_dai_mark_push(dai, substream, hw_params); in snd_soc_dai_hw_params()
404 return soc_dai_ret(dai, ret); in snd_soc_dai_hw_params()
407 void snd_soc_dai_hw_free(struct snd_soc_dai *dai, in snd_soc_dai_hw_free() argument
411 if (rollback && !soc_dai_mark_match(dai, substream, hw_params)) in snd_soc_dai_hw_free()
414 if (dai->driver->ops && in snd_soc_dai_hw_free()
415 dai->driver->ops->hw_free) in snd_soc_dai_hw_free()
416 dai->driver->ops->hw_free(substream, dai); in snd_soc_dai_hw_free()
419 soc_dai_mark_pop(dai, substream, hw_params); in snd_soc_dai_hw_free()
422 int snd_soc_dai_startup(struct snd_soc_dai *dai, in snd_soc_dai_startup() argument
427 if (!snd_soc_dai_stream_valid(dai, substream->stream)) in snd_soc_dai_startup()
430 if (dai->driver->ops && in snd_soc_dai_startup()
431 dai->driver->ops->startup) in snd_soc_dai_startup()
432 ret = dai->driver->ops->startup(substream, dai); in snd_soc_dai_startup()
436 soc_dai_mark_push(dai, substream, startup); in snd_soc_dai_startup()
438 return soc_dai_ret(dai, ret); in snd_soc_dai_startup()
441 void snd_soc_dai_shutdown(struct snd_soc_dai *dai, in snd_soc_dai_shutdown() argument
445 if (!snd_soc_dai_stream_valid(dai, substream->stream)) in snd_soc_dai_shutdown()
448 if (rollback && !soc_dai_mark_match(dai, substream, startup)) in snd_soc_dai_shutdown()
451 if (dai->driver->ops && in snd_soc_dai_shutdown()
452 dai->driver->ops->shutdown) in snd_soc_dai_shutdown()
453 dai->driver->ops->shutdown(substream, dai); in snd_soc_dai_shutdown()
456 soc_dai_mark_pop(dai, substream, startup); in snd_soc_dai_shutdown()
459 int snd_soc_dai_compress_new(struct snd_soc_dai *dai, in snd_soc_dai_compress_new() argument
462 int ret = -ENOTSUPP; in snd_soc_dai_compress_new()
463 if (dai->driver->ops && in snd_soc_dai_compress_new()
464 dai->driver->ops->compress_new) in snd_soc_dai_compress_new()
465 ret = dai->driver->ops->compress_new(rtd, num); in snd_soc_dai_compress_new()
466 return soc_dai_ret(dai, ret); in snd_soc_dai_compress_new()
470 * snd_soc_dai_stream_valid() - check if a DAI supports the given stream
472 * Returns true if the DAI supports the indicated stream type.
474 bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int dir) in snd_soc_dai_stream_valid() argument
476 struct snd_soc_pcm_stream *stream = snd_soc_dai_get_pcm_stream(dai, dir); in snd_soc_dai_stream_valid()
479 return stream->channels_min; in snd_soc_dai_stream_valid()
483 * snd_soc_dai_link_set_capabilities() - set dai_link properties based on its DAIs
493 struct snd_soc_dai *dai; in snd_soc_dai_link_set_capabilities() local
499 dai = snd_soc_find_dai_with_mutex(cpu); in snd_soc_dai_link_set_capabilities()
500 if (dai && snd_soc_dai_stream_valid(dai, direction)) { in snd_soc_dai_link_set_capabilities()
506 dai = snd_soc_find_dai_with_mutex(codec); in snd_soc_dai_link_set_capabilities()
507 if (dai && snd_soc_dai_stream_valid(dai, direction)) { in snd_soc_dai_link_set_capabilities()
515 dai_link->dpcm_playback = supported[SNDRV_PCM_STREAM_PLAYBACK]; in snd_soc_dai_link_set_capabilities()
516 dai_link->dpcm_capture = supported[SNDRV_PCM_STREAM_CAPTURE]; in snd_soc_dai_link_set_capabilities()
520 void snd_soc_dai_action(struct snd_soc_dai *dai, in snd_soc_dai_action() argument
524 dai->stream[stream].active += action; in snd_soc_dai_action()
527 dai->component->active += action; in snd_soc_dai_action()
531 int snd_soc_dai_active(struct snd_soc_dai *dai) in snd_soc_dai_active() argument
537 active += dai->stream[stream].active; in snd_soc_dai_active()
545 struct snd_soc_dai *dai; in snd_soc_pcm_dai_probe() local
548 for_each_rtd_dais(rtd, i, dai) { in snd_soc_pcm_dai_probe()
549 if (dai->probed) in snd_soc_pcm_dai_probe()
552 if (dai->driver->ops) { in snd_soc_pcm_dai_probe()
553 if (dai->driver->ops->probe_order != order) in snd_soc_pcm_dai_probe()
556 if (dai->driver->ops->probe) { in snd_soc_pcm_dai_probe()
557 int ret = dai->driver->ops->probe(dai); in snd_soc_pcm_dai_probe()
560 return soc_dai_ret(dai, ret); in snd_soc_pcm_dai_probe()
563 dai->probed = 1; in snd_soc_pcm_dai_probe()
571 struct snd_soc_dai *dai; in snd_soc_pcm_dai_remove() local
574 for_each_rtd_dais(rtd, i, dai) { in snd_soc_pcm_dai_remove()
575 if (!dai->probed) in snd_soc_pcm_dai_remove()
578 if (dai->driver->ops) { in snd_soc_pcm_dai_remove()
579 if (dai->driver->ops->remove_order != order) in snd_soc_pcm_dai_remove()
582 if (dai->driver->ops->remove) { in snd_soc_pcm_dai_remove()
583 r = dai->driver->ops->remove(dai); in snd_soc_pcm_dai_remove()
588 dai->probed = 0; in snd_soc_pcm_dai_remove()
596 struct snd_soc_dai *dai; in snd_soc_pcm_dai_new() local
599 for_each_rtd_dais(rtd, i, dai) { in snd_soc_pcm_dai_new()
600 if (dai->driver->ops && in snd_soc_pcm_dai_new()
601 dai->driver->ops->pcm_new) { in snd_soc_pcm_dai_new()
602 int ret = dai->driver->ops->pcm_new(rtd, dai); in snd_soc_pcm_dai_new()
604 return soc_dai_ret(dai, ret); in snd_soc_pcm_dai_new()
614 struct snd_soc_dai *dai; in snd_soc_pcm_dai_prepare() local
617 for_each_rtd_dais(rtd, i, dai) { in snd_soc_pcm_dai_prepare()
618 if (!snd_soc_dai_stream_valid(dai, substream->stream)) in snd_soc_pcm_dai_prepare()
620 if (dai->driver->ops && in snd_soc_pcm_dai_prepare()
621 dai->driver->ops->prepare) { in snd_soc_pcm_dai_prepare()
622 ret = dai->driver->ops->prepare(substream, dai); in snd_soc_pcm_dai_prepare()
624 return soc_dai_ret(dai, ret); in snd_soc_pcm_dai_prepare()
631 static int soc_dai_trigger(struct snd_soc_dai *dai, in soc_dai_trigger() argument
636 if (!snd_soc_dai_stream_valid(dai, substream->stream)) in soc_dai_trigger()
639 if (dai->driver->ops && in soc_dai_trigger()
640 dai->driver->ops->trigger) in soc_dai_trigger()
641 ret = dai->driver->ops->trigger(substream, cmd, dai); in soc_dai_trigger()
643 return soc_dai_ret(dai, ret); in soc_dai_trigger()
650 struct snd_soc_dai *dai; in snd_soc_pcm_dai_trigger() local
657 for_each_rtd_dais(rtd, i, dai) { in snd_soc_pcm_dai_trigger()
658 ret = soc_dai_trigger(dai, substream, cmd); in snd_soc_pcm_dai_trigger()
662 if (dai->driver->ops && dai->driver->ops->mute_unmute_on_trigger) in snd_soc_pcm_dai_trigger()
663 snd_soc_dai_digital_mute(dai, 0, substream->stream); in snd_soc_pcm_dai_trigger()
665 soc_dai_mark_push(dai, substream, trigger); in snd_soc_pcm_dai_trigger()
671 for_each_rtd_dais(rtd, i, dai) { in snd_soc_pcm_dai_trigger()
672 if (rollback && !soc_dai_mark_match(dai, substream, trigger)) in snd_soc_pcm_dai_trigger()
675 if (dai->driver->ops && dai->driver->ops->mute_unmute_on_trigger) in snd_soc_pcm_dai_trigger()
676 snd_soc_dai_digital_mute(dai, 1, substream->stream); in snd_soc_pcm_dai_trigger()
678 r = soc_dai_trigger(dai, substream, cmd); in snd_soc_pcm_dai_trigger()
681 soc_dai_mark_pop(dai, substream, trigger); in snd_soc_pcm_dai_trigger()
692 struct snd_soc_dai *dai; in snd_soc_pcm_dai_bespoke_trigger() local
695 for_each_rtd_dais(rtd, i, dai) { in snd_soc_pcm_dai_bespoke_trigger()
696 if (dai->driver->ops && in snd_soc_pcm_dai_bespoke_trigger()
697 dai->driver->ops->bespoke_trigger) { in snd_soc_pcm_dai_bespoke_trigger()
698 ret = dai->driver->ops->bespoke_trigger(substream, in snd_soc_pcm_dai_bespoke_trigger()
699 cmd, dai); in snd_soc_pcm_dai_bespoke_trigger()
701 return soc_dai_ret(dai, ret); in snd_soc_pcm_dai_bespoke_trigger()
713 struct snd_soc_dai *dai; in snd_soc_pcm_dai_delay() local
724 for_each_rtd_cpu_dais(rtd, i, dai) in snd_soc_pcm_dai_delay()
725 if (dai->driver->ops && in snd_soc_pcm_dai_delay()
726 dai->driver->ops->delay) in snd_soc_pcm_dai_delay()
727 *cpu_delay = max(*cpu_delay, dai->driver->ops->delay(substream, dai)); in snd_soc_pcm_dai_delay()
730 for_each_rtd_codec_dais(rtd, i, dai) in snd_soc_pcm_dai_delay()
731 if (dai->driver->ops && in snd_soc_pcm_dai_delay()
732 dai->driver->ops->delay) in snd_soc_pcm_dai_delay()
733 *codec_delay = max(*codec_delay, dai->driver->ops->delay(substream, dai)); in snd_soc_pcm_dai_delay()
736 int snd_soc_dai_compr_startup(struct snd_soc_dai *dai, in snd_soc_dai_compr_startup() argument
741 if (dai->driver->cops && in snd_soc_dai_compr_startup()
742 dai->driver->cops->startup) in snd_soc_dai_compr_startup()
743 ret = dai->driver->cops->startup(cstream, dai); in snd_soc_dai_compr_startup()
747 soc_dai_mark_push(dai, cstream, compr_startup); in snd_soc_dai_compr_startup()
749 return soc_dai_ret(dai, ret); in snd_soc_dai_compr_startup()
753 void snd_soc_dai_compr_shutdown(struct snd_soc_dai *dai, in snd_soc_dai_compr_shutdown() argument
757 if (rollback && !soc_dai_mark_match(dai, cstream, compr_startup)) in snd_soc_dai_compr_shutdown()
760 if (dai->driver->cops && in snd_soc_dai_compr_shutdown()
761 dai->driver->cops->shutdown) in snd_soc_dai_compr_shutdown()
762 dai->driver->cops->shutdown(cstream, dai); in snd_soc_dai_compr_shutdown()
765 soc_dai_mark_pop(dai, cstream, compr_startup); in snd_soc_dai_compr_shutdown()
769 int snd_soc_dai_compr_trigger(struct snd_soc_dai *dai, in snd_soc_dai_compr_trigger() argument
774 if (dai->driver->cops && in snd_soc_dai_compr_trigger()
775 dai->driver->cops->trigger) in snd_soc_dai_compr_trigger()
776 ret = dai->driver->cops->trigger(cstream, cmd, dai); in snd_soc_dai_compr_trigger()
778 return soc_dai_ret(dai, ret); in snd_soc_dai_compr_trigger()
782 int snd_soc_dai_compr_set_params(struct snd_soc_dai *dai, in snd_soc_dai_compr_set_params() argument
788 if (dai->driver->cops && in snd_soc_dai_compr_set_params()
789 dai->driver->cops->set_params) in snd_soc_dai_compr_set_params()
790 ret = dai->driver->cops->set_params(cstream, params, dai); in snd_soc_dai_compr_set_params()
792 return soc_dai_ret(dai, ret); in snd_soc_dai_compr_set_params()
796 int snd_soc_dai_compr_get_params(struct snd_soc_dai *dai, in snd_soc_dai_compr_get_params() argument
802 if (dai->driver->cops && in snd_soc_dai_compr_get_params()
803 dai->driver->cops->get_params) in snd_soc_dai_compr_get_params()
804 ret = dai->driver->cops->get_params(cstream, params, dai); in snd_soc_dai_compr_get_params()
806 return soc_dai_ret(dai, ret); in snd_soc_dai_compr_get_params()
810 int snd_soc_dai_compr_ack(struct snd_soc_dai *dai, in snd_soc_dai_compr_ack() argument
816 if (dai->driver->cops && in snd_soc_dai_compr_ack()
817 dai->driver->cops->ack) in snd_soc_dai_compr_ack()
818 ret = dai->driver->cops->ack(cstream, bytes, dai); in snd_soc_dai_compr_ack()
820 return soc_dai_ret(dai, ret); in snd_soc_dai_compr_ack()
824 int snd_soc_dai_compr_pointer(struct snd_soc_dai *dai, in snd_soc_dai_compr_pointer() argument
830 if (dai->driver->cops && in snd_soc_dai_compr_pointer()
831 dai->driver->cops->pointer) in snd_soc_dai_compr_pointer()
832 ret = dai->driver->cops->pointer(cstream, tstamp, dai); in snd_soc_dai_compr_pointer()
834 return soc_dai_ret(dai, ret); in snd_soc_dai_compr_pointer()
838 int snd_soc_dai_compr_set_metadata(struct snd_soc_dai *dai, in snd_soc_dai_compr_set_metadata() argument
844 if (dai->driver->cops && in snd_soc_dai_compr_set_metadata()
845 dai->driver->cops->set_metadata) in snd_soc_dai_compr_set_metadata()
846 ret = dai->driver->cops->set_metadata(cstream, metadata, dai); in snd_soc_dai_compr_set_metadata()
848 return soc_dai_ret(dai, ret); in snd_soc_dai_compr_set_metadata()
852 int snd_soc_dai_compr_get_metadata(struct snd_soc_dai *dai, in snd_soc_dai_compr_get_metadata() argument
858 if (dai->driver->cops && in snd_soc_dai_compr_get_metadata()
859 dai->driver->cops->get_metadata) in snd_soc_dai_compr_get_metadata()
860 ret = dai->driver->cops->get_metadata(cstream, metadata, dai); in snd_soc_dai_compr_get_metadata()
862 return soc_dai_ret(dai, ret); in snd_soc_dai_compr_get_metadata()