Lines Matching +full:ignore +full:- +full:suspend +full:- +full:widgets
1 /* SPDX-License-Identifier: GPL-2.0
3 * linux/sound/soc.h -- ALSA SoC Layer
238 .mask = xitems ? roundup_pow_of_two(xitems) - 1 : 0}
440 #include <sound/soc-dapm.h>
441 #include <sound/soc-dpcm.h>
442 #include <sound/soc-topology.h>
516 snd_soc_runtime_action(rtd, stream, -1); in snd_soc_runtime_deactivate()
547 substream->runtime->hw = *hw; in snd_soc_set_runtime_hwparams()
640 SND_SOC_TRIGGER_ORDER_DEFAULT = 0, /* Link->Component->DAI DAI->Component->Link */
641 SND_SOC_TRIGGER_ORDER_LDC, /* Link->DAI->Component Component->DAI->Link */
690 * It will be used with dai_link->dai_fmt
698 * [dai_link->ch_maps Image sample]
700 *-------------------------
701 * CPU0 <---> Codec0
703 * ch-map[0].cpu = 0 ch-map[0].codec = 0
705 *-------------------------
706 * CPU0 <---> Codec0
707 * CPU1 <---> Codec1
708 * CPU2 <---> Codec2
710 * ch-map[0].cpu = 0 ch-map[0].codec = 0
711 * ch-map[1].cpu = 1 ch-map[1].codec = 1
712 * ch-map[2].cpu = 2 ch-map[2].codec = 2
714 *-------------------------
715 * CPU0 <---> Codec0
716 * CPU1 <-+-> Codec1
717 * CPU2 <-/
719 * ch-map[0].cpu = 0 ch-map[0].codec = 0
720 * ch-map[1].cpu = 1 ch-map[1].codec = 1
721 * ch-map[2].cpu = 2 ch-map[2].codec = 1
723 *-------------------------
724 * CPU0 <---> Codec0
725 * CPU1 <-+-> Codec1
726 * \-> Codec2
728 * ch-map[0].cpu = 0 ch-map[0].codec = 0
729 * ch-map[1].cpu = 1 ch-map[1].codec = 1
730 * ch-map[2].cpu = 1 ch-map[2].codec = 2
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
753 * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node
790 /* codec/machine specific init - e.g. add machine controls */
793 /* codec/machine specific exit - dual of init() */
796 /* optional hw_params re-writing for BE and FE sync */
820 /* Keep DAI active over suspend */
845 unsigned int ignore:1; member
854 return max(link->num_cpus, link->num_codecs); in snd_soc_link_num_ch_map()
859 return &(link)->cpus[n]; in snd_soc_link_to_cpu()
864 return &(link)->codecs[n]; in snd_soc_link_to_codec()
869 return &(link)->platforms[n]; in snd_soc_link_to_platform()
874 ((i) < link->num_codecs) && \
880 ((i) < link->num_platforms) && \
886 ((i) < link->num_cpus) && \
893 ((ch_map) = link->ch_maps + i)); \
999 * specify multi-codec either by device name, or by
1004 /* codec/machine specific init - e.g. add machine controls */
1068 /* CPU <--> Codec DAI links */
1091 * Card-specific routes and widgets.
1092 * Note: of_dapm_xxx for Device Tree; Otherwise for driver build-in.
1107 struct list_head widgets; member
1139 ((i) < (card)->num_links) && ((link) = &(card)->dai_link[i]); \
1143 ((i) < (card)->num_aux_devs) && ((aux) = &(card)->aux_dev[i]); \
1147 list_for_each_entry(rtd, &(card)->rtd_list, list)
1149 list_for_each_entry_safe(rtd, _rtd, &(card)->rtd_list, list)
1152 list_for_each_entry(component, &card->aux_comp_list, card_aux_list)
1155 &card->aux_comp_list, card_aux_list)
1158 list_for_each_entry(component, &(card)->component_dev_list, card_list)
1161 list_for_each_entry(dapm, &card->dapm_list, list)
1164 list_for_each_entry(w, &card->widgets, list)
1166 list_for_each_entry_safe(w, _w, &card->widgets, list)
1171 return card && card->instantiated; in snd_soc_card_is_instantiated()
1208 unsigned int id; /* 0-based and monotonic increasing */
1228 #define snd_soc_rtd_to_cpu(rtd, n) (rtd)->dais[n]
1229 #define snd_soc_rtd_to_codec(rtd, n) (rtd)->dais[n + (rtd)->dai_link->num_cpus]
1239 ((i) < rtd->num_components) && ((component) = rtd->components[i]);\
1243 ((i) < rtd->dai_link->num_cpus) && ((dai) = snd_soc_rtd_to_cpu(rtd, i)); \
1247 ((i) < rtd->dai_link->num_codecs) && ((dai) = snd_soc_rtd_to_codec(rtd, i)); \
1251 ((i) < (rtd)->dai_link->num_cpus + (rtd)->dai_link->num_codecs) && \
1252 ((dai) = (rtd)->dais[i]); \
1255 for ((i) = (rtd)->dai_link->num_cpus + (rtd)->dai_link->num_codecs - 1; \
1256 (i) >= 0 && ((dai) = (rtd)->dais[i]); \
1257 (i)--)
1258 #define for_each_rtd_ch_maps(rtd, i, ch_maps) for_each_link_ch_maps(rtd->dai_link, i, ch_maps)
1319 if (mc->reg == mc->rreg && mc->shift == mc->rshift) in snd_soc_volsw_is_stereo()
1322 * mc->reg == mc->rreg && mc->shift != mc->rshift, or in snd_soc_volsw_is_stereo()
1323 * mc->reg != mc->rreg means that the control is in snd_soc_volsw_is_stereo()
1334 if (!e->values) in snd_soc_enum_val_to_item()
1337 for (i = 0; i < e->items; i++) in snd_soc_enum_val_to_item()
1338 if (val == e->values[i]) in snd_soc_enum_val_to_item()
1347 if (!e->values) in snd_soc_enum_item_to_val()
1350 return e->values[item]; in snd_soc_enum_item_to_val()
1354 * snd_soc_kcontrol_component() - Returns the component that registered the
1395 snd_soc_of_parse_node_prefix(card->dev->of_node, in snd_soc_of_parse_audio_prefix()
1461 #include <sound/soc-dai.h>
1477 if (dai_link->num_platforms != 1) in snd_soc_fixup_dai_links_platform_name()
1478 return -EINVAL; in snd_soc_fixup_dai_links_platform_name()
1480 if (!dai_link->platforms) in snd_soc_fixup_dai_links_platform_name()
1481 return -EINVAL; in snd_soc_fixup_dai_links_platform_name()
1483 name = devm_kstrdup(card->dev, platform_name, GFP_KERNEL); in snd_soc_fixup_dai_links_platform_name()
1485 return -ENOMEM; in snd_soc_fixup_dai_links_platform_name()
1488 dai_link->platforms->name = name; in snd_soc_fixup_dai_links_platform_name()
1510 mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_ROOT); in _snd_soc_dapm_mutex_lock_root_c()
1515 mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); in _snd_soc_dapm_mutex_lock_c()
1520 mutex_unlock(&card->dapm_mutex); in _snd_soc_dapm_mutex_unlock_c()
1525 lockdep_assert_held(&card->dapm_mutex); in _snd_soc_dapm_mutex_assert_held_c()
1530 _snd_soc_dapm_mutex_lock_root_c(dapm->card); in _snd_soc_dapm_mutex_lock_root_d()
1535 _snd_soc_dapm_mutex_lock_c(dapm->card); in _snd_soc_dapm_mutex_lock_d()
1540 _snd_soc_dapm_mutex_unlock_c(dapm->card); in _snd_soc_dapm_mutex_unlock_d()
1545 _snd_soc_dapm_mutex_assert_held_c(dapm->card); in _snd_soc_dapm_mutex_assert_held_d()
1566 mutex_lock_nested(&card->pcm_mutex, card->pcm_subclass); in _snd_soc_dpcm_mutex_lock_c()
1571 mutex_unlock(&card->pcm_mutex); in _snd_soc_dpcm_mutex_unlock_c()
1576 lockdep_assert_held(&card->pcm_mutex); in _snd_soc_dpcm_mutex_assert_held_c()
1581 _snd_soc_dpcm_mutex_lock_c(rtd->card); in _snd_soc_dpcm_mutex_lock_r()
1586 _snd_soc_dpcm_mutex_unlock_c(rtd->card); in _snd_soc_dpcm_mutex_unlock_r()
1591 _snd_soc_dpcm_mutex_assert_held_c(rtd->card); in _snd_soc_dpcm_mutex_assert_held_r()
1606 #include <sound/soc-component.h>
1607 #include <sound/soc-card.h>
1608 #include <sound/soc-jack.h>