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()
635 SND_SOC_TRIGGER_ORDER_DEFAULT = 0, /* Link->Component->DAI DAI->Component->Link */
636 SND_SOC_TRIGGER_ORDER_LDC, /* Link->DAI->Component Component->DAI->Link */
682 * [dai_link->ch_maps Image sample]
684 *-------------------------
685 * CPU0 <---> Codec0
687 * ch-map[0].cpu = 0 ch-map[0].codec = 0
689 *-------------------------
690 * CPU0 <---> Codec0
691 * CPU1 <---> Codec1
692 * CPU2 <---> Codec2
694 * ch-map[0].cpu = 0 ch-map[0].codec = 0
695 * ch-map[1].cpu = 1 ch-map[1].codec = 1
696 * ch-map[2].cpu = 2 ch-map[2].codec = 2
698 *-------------------------
699 * CPU0 <---> Codec0
700 * CPU1 <-+-> Codec1
701 * CPU2 <-/
703 * ch-map[0].cpu = 0 ch-map[0].codec = 0
704 * ch-map[1].cpu = 1 ch-map[1].codec = 1
705 * ch-map[2].cpu = 2 ch-map[2].codec = 1
707 *-------------------------
708 * CPU0 <---> Codec0
709 * CPU1 <-+-> Codec1
710 * \-> Codec2
712 * ch-map[0].cpu = 0 ch-map[0].codec = 0
713 * ch-map[1].cpu = 1 ch-map[1].codec = 1
714 * ch-map[2].cpu = 1 ch-map[2].codec = 2
724 /* config - must be set by machine driver */
729 * You MAY specify the link's CPU-side device, either by device name,
731 * the CPU-side DAI is matched using .cpu_dai_name only, which hence
737 * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node
774 /* codec/machine specific init - e.g. add machine controls */
777 /* codec/machine specific exit - dual of init() */
780 /* optional hw_params re-writing for BE and FE sync */
804 /* Keep DAI active over suspend */
834 unsigned int ignore:1; member
843 return max(link->num_cpus, link->num_codecs); in snd_soc_link_num_ch_map()
848 return &(link)->cpus[n]; in snd_soc_link_to_cpu()
853 return &(link)->codecs[n]; in snd_soc_link_to_codec()
858 return &(link)->platforms[n]; in snd_soc_link_to_platform()
863 ((i) < link->num_codecs) && \
869 ((i) < link->num_platforms) && \
875 ((i) < link->num_cpus) && \
882 ((ch_map) = link->ch_maps + i)); \
988 * specify multi-codec either by device name, or by
993 /* codec/machine specific init - e.g. add machine controls */
1057 /* CPU <--> Codec DAI links */
1080 * Card-specific routes and widgets.
1081 * Note: of_dapm_xxx for Device Tree; Otherwise for driver build-in.
1096 struct list_head widgets; member
1129 ((i) < (card)->num_links) && ((link) = &(card)->dai_link[i]); \
1133 ((i) < (card)->num_aux_devs) && ((aux) = &(card)->aux_dev[i]); \
1137 list_for_each_entry(rtd, &(card)->rtd_list, list)
1139 list_for_each_entry_safe(rtd, _rtd, &(card)->rtd_list, list)
1142 list_for_each_entry(component, &card->aux_comp_list, card_aux_list)
1145 &card->aux_comp_list, card_aux_list)
1148 list_for_each_entry(component, &(card)->component_dev_list, card_list)
1151 list_for_each_entry(dapm, &card->dapm_list, list)
1154 list_for_each_entry(w, &card->widgets, list)
1156 list_for_each_entry_safe(w, _w, &card->widgets, list)
1161 return card && card->instantiated; in snd_soc_card_is_instantiated()
1198 unsigned int num; /* 0-based and monotonic increasing */
1218 #define snd_soc_rtd_to_cpu(rtd, n) (rtd)->dais[n]
1219 #define snd_soc_rtd_to_codec(rtd, n) (rtd)->dais[n + (rtd)->dai_link->num_cpus]
1229 ((i) < rtd->num_components) && ((component) = rtd->components[i]);\
1233 ((i) < rtd->dai_link->num_cpus) && ((dai) = snd_soc_rtd_to_cpu(rtd, i)); \
1237 ((i) < rtd->dai_link->num_codecs) && ((dai) = snd_soc_rtd_to_codec(rtd, i)); \
1241 ((i) < (rtd)->dai_link->num_cpus + (rtd)->dai_link->num_codecs) && \
1242 ((dai) = (rtd)->dais[i]); \
1245 for ((i) = (rtd)->dai_link->num_cpus + (rtd)->dai_link->num_codecs - 1; \
1246 (i) >= 0 && ((dai) = (rtd)->dais[i]); \
1247 (i)--)
1248 #define for_each_rtd_ch_maps(rtd, i, ch_maps) for_each_link_ch_maps(rtd->dai_link, i, ch_maps)
1306 if (mc->reg == mc->rreg && mc->shift == mc->rshift) in snd_soc_volsw_is_stereo()
1309 * mc->reg == mc->rreg && mc->shift != mc->rshift, or in snd_soc_volsw_is_stereo()
1310 * mc->reg != mc->rreg means that the control is in snd_soc_volsw_is_stereo()
1321 if (!e->values) in snd_soc_enum_val_to_item()
1324 for (i = 0; i < e->items; i++) in snd_soc_enum_val_to_item()
1325 if (val == e->values[i]) in snd_soc_enum_val_to_item()
1334 if (!e->values) in snd_soc_enum_item_to_val()
1337 return e->values[item]; in snd_soc_enum_item_to_val()
1341 * snd_soc_kcontrol_component() - Returns the component that registered the
1382 snd_soc_of_parse_node_prefix(card->dev->of_node, in snd_soc_of_parse_audio_prefix()
1452 #include <sound/soc-dai.h>
1468 if (dai_link->num_platforms != 1) in snd_soc_fixup_dai_links_platform_name()
1469 return -EINVAL; in snd_soc_fixup_dai_links_platform_name()
1471 if (!dai_link->platforms) in snd_soc_fixup_dai_links_platform_name()
1472 return -EINVAL; in snd_soc_fixup_dai_links_platform_name()
1474 name = devm_kstrdup(card->dev, platform_name, GFP_KERNEL); in snd_soc_fixup_dai_links_platform_name()
1476 return -ENOMEM; in snd_soc_fixup_dai_links_platform_name()
1479 dai_link->platforms->name = name; in snd_soc_fixup_dai_links_platform_name()
1501 mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_ROOT); in _snd_soc_dapm_mutex_lock_root_c()
1506 mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); in _snd_soc_dapm_mutex_lock_c()
1511 mutex_unlock(&card->dapm_mutex); in _snd_soc_dapm_mutex_unlock_c()
1516 lockdep_assert_held(&card->dapm_mutex); in _snd_soc_dapm_mutex_assert_held_c()
1521 _snd_soc_dapm_mutex_lock_root_c(dapm->card); in _snd_soc_dapm_mutex_lock_root_d()
1526 _snd_soc_dapm_mutex_lock_c(dapm->card); in _snd_soc_dapm_mutex_lock_d()
1531 _snd_soc_dapm_mutex_unlock_c(dapm->card); in _snd_soc_dapm_mutex_unlock_d()
1536 _snd_soc_dapm_mutex_assert_held_c(dapm->card); in _snd_soc_dapm_mutex_assert_held_d()
1557 mutex_lock_nested(&card->pcm_mutex, card->pcm_subclass); in _snd_soc_dpcm_mutex_lock_c()
1562 mutex_unlock(&card->pcm_mutex); in _snd_soc_dpcm_mutex_unlock_c()
1567 lockdep_assert_held(&card->pcm_mutex); in _snd_soc_dpcm_mutex_assert_held_c()
1572 _snd_soc_dpcm_mutex_lock_c(rtd->card); in _snd_soc_dpcm_mutex_lock_r()
1577 _snd_soc_dpcm_mutex_unlock_c(rtd->card); in _snd_soc_dpcm_mutex_unlock_r()
1582 _snd_soc_dpcm_mutex_assert_held_c(rtd->card); in _snd_soc_dpcm_mutex_assert_held_r()
1597 #include <sound/soc-component.h>
1598 #include <sound/soc-card.h>
1599 #include <sound/soc-jack.h>