Lines Matching +full:fe +full:- +full:dai +full:- +full:link
1 /* SPDX-License-Identifier: GPL-2.0
3 * linux/sound/soc.h -- ALSA SoC Layer
201 .mask = xitems ? roundup_pow_of_two(xitems) - 1 : 0}
386 #include <sound/soc-dapm.h>
387 #include <sound/soc-dpcm.h>
388 #include <sound/soc-topology.h>
464 snd_soc_runtime_action(rtd, stream, -1); in snd_soc_runtime_deactivate()
567 int snd_soc_add_dai_controls(struct snd_soc_dai *dai,
620 * struct snd_soc_jack_pin - Describes a pin to update based on jack detection
624 * @invert: if non-zero then pin is enabled when status is not reported
635 * struct snd_soc_jack_zone - Describes voltage zones of jack detection
653 * struct snd_soc_jack_gpio - Describes a gpio pin for jack detection
740 /* config - must be set by machine driver */
745 * You MAY specify the link's CPU-side device, either by device name,
747 * the CPU-side DAI is matched using .cpu_dai_name only, which hence
752 * You MAY specify the DAI name of the CPU DAI. If this information is
753 * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node
754 * only, which only works well when that device exposes a single DAI.
760 * You MUST specify the link's codec, either by device name, or by
763 /* You MUST specify the DAI name within the codec */
768 * You MAY specify the link's platform/PCM/DMA driver, either by
769 * device name, or by DT/OF node, but not both. Some forms of link
775 int id; /* optional ID for machine driver link identification */
784 /* codec/machine specific init - e.g. add machine controls */
787 /* codec/machine specific exit - dual of init() */
790 /* optional hw_params re-writing for BE and FE sync */
801 /* For unidirectional dai links */
805 /* Keep DAI active over suspend */
813 /* Do not create a PCM for this DAI link (Backend link) */
816 /* This DAI link can route to other DAI links at runtime (Frontend)*/
823 /* DPCM used FE & BE merged format */
825 /* DPCM used FE & BE merged channel */
827 /* DPCM used FE & BE merged rate */
833 /* Do not create a PCM for this DAI link (Backend link) */
840 #define for_each_link_codecs(link, i, codec) \ argument
842 ((i) < link->num_codecs) && ((codec) = &link->codecs[i]); \
845 #define for_each_link_platforms(link, i, platform) \ argument
847 ((i) < link->num_platforms) && \
848 ((platform) = &link->platforms[i]); \
851 #define for_each_link_cpus(link, i, cpu) \ argument
853 ((i) < link->num_cpus) && ((cpu) = &link->cpus[i]); \
864 * struct snd_soc_dai_link link = {
877 * struct snd_soc_dai_link link = {
893 * struct snd_soc_dai_link link = {
902 * struct snd_soc_dai_link link = {
941 #define COMP_DUMMY() { .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", }
962 * specify multi-codec either by device name, or by
967 /* codec/machine specific init - e.g. add machine controls */
1011 * after the codec and DAI's do any PM work. */
1026 struct snd_soc_dai_link *link);
1028 struct snd_soc_dai_link *link);
1032 /* CPU <--> Codec DAI links */
1044 * optional auxiliary devices such as amplifiers or codecs with DAI
1045 * link unused
1055 * Card-specific routes and widgets.
1056 * Note: of_dapm_xxx for Device Tree; Otherwise for driver build-in.
1101 #define for_each_card_prelinks(card, i, link) \ argument
1103 ((i) < (card)->num_links) && ((link) = &(card)->dai_link[i]); \
1107 ((i) < (card)->num_aux_devs) && ((aux) = &(card)->aux_dev[i]); \
1111 list_for_each_entry(rtd, &(card)->rtd_list, list)
1113 list_for_each_entry_safe(rtd, _rtd, &(card)->rtd_list, list)
1116 list_for_each_entry(component, &card->aux_comp_list, card_aux_list)
1119 &card->aux_comp_list, card_aux_list)
1122 list_for_each_entry(component, &(card)->component_dev_list, card_list)
1125 list_for_each_entry(dapm, &card->dapm_list, list)
1128 list_for_each_entry(w, &card->widgets, list)
1130 list_for_each_entry_safe(w, _w, &card->widgets, list)
1132 /* SoC machine DAI configuration, glues a codec and cpu DAI together */
1139 unsigned int params_select; /* currently selected param for dai link */
1170 unsigned int num; /* 0-based and monotonic increasing */
1184 #define asoc_rtd_to_cpu(rtd, n) (rtd)->dais[n]
1185 #define asoc_rtd_to_codec(rtd, n) (rtd)->dais[n + (rtd)->num_cpus]
1191 ((i) < rtd->num_components) && ((component) = rtd->components[i]);\
1193 #define for_each_rtd_cpu_dais(rtd, i, dai) \ argument
1195 ((i) < rtd->num_cpus) && ((dai) = asoc_rtd_to_cpu(rtd, i)); \
1197 #define for_each_rtd_cpu_dais_rollback(rtd, i, dai) \ argument
1198 for (; (--(i) >= 0) && ((dai) = asoc_rtd_to_cpu(rtd, i));)
1199 #define for_each_rtd_codec_dais(rtd, i, dai) \ argument
1201 ((i) < rtd->num_codecs) && ((dai) = asoc_rtd_to_codec(rtd, i)); \
1203 #define for_each_rtd_codec_dais_rollback(rtd, i, dai) \ argument
1204 for (; (--(i) >= 0) && ((dai) = asoc_rtd_to_codec(rtd, i));)
1205 #define for_each_rtd_dais(rtd, i, dai) \ argument
1207 ((i) < (rtd)->num_cpus + (rtd)->num_codecs) && \
1208 ((dai) = (rtd)->dais[i]); \
1210 #define for_each_rtd_dais_rollback(rtd, i, dai) \ argument
1211 for (; (--(i) >= 0) && ((dai) = (rtd)->dais[i]);)
1269 if (mc->reg == mc->rreg && mc->shift == mc->rshift) in snd_soc_volsw_is_stereo()
1272 * mc->reg == mc->rreg && mc->shift != mc->rshift, or in snd_soc_volsw_is_stereo()
1273 * mc->reg != mc->rreg means that the control is in snd_soc_volsw_is_stereo()
1284 if (!e->values) in snd_soc_enum_val_to_item()
1287 for (i = 0; i < e->items; i++) in snd_soc_enum_val_to_item()
1288 if (val == e->values[i]) in snd_soc_enum_val_to_item()
1297 if (!e->values) in snd_soc_enum_item_to_val()
1300 return e->values[item]; in snd_soc_enum_item_to_val()
1304 * snd_soc_kcontrol_component() - Returns the component that registered the
1344 snd_soc_of_parse_node_prefix(card->dev->of_node, in snd_soc_of_parse_audio_prefix()
1377 void snd_soc_unregister_dai(struct snd_soc_dai *dai);
1384 #include <sound/soc-dai.h>
1399 name = devm_kstrdup(card->dev, platform_name, GFP_KERNEL); in snd_soc_fixup_dai_links_platform_name()
1401 return -ENOMEM; in snd_soc_fixup_dai_links_platform_name()
1403 if (!dai_link->platforms) in snd_soc_fixup_dai_links_platform_name()
1404 return -EINVAL; in snd_soc_fixup_dai_links_platform_name()
1407 dai_link->platforms->name = name; in snd_soc_fixup_dai_links_platform_name()
1422 mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); in snd_soc_dapm_mutex_lock()
1427 mutex_unlock(&dapm->card->dapm_mutex); in snd_soc_dapm_mutex_unlock()
1430 #include <sound/soc-component.h>
1431 #include <sound/soc-card.h>