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
213 .mask = xitems ? roundup_pow_of_two(xitems) - 1 : 0}
412 #include <sound/soc-dapm.h>
413 #include <sound/soc-dpcm.h>
414 #include <sound/soc-topology.h>
488 snd_soc_runtime_action(rtd, stream, -1); in snd_soc_runtime_deactivate()
510 substream->runtime->hw = *hw; in snd_soc_set_runtime_hwparams()
597 SND_SOC_TRIGGER_ORDER_DEFAULT = 0, /* Link->Component->DAI DAI->Component->Link */
598 SND_SOC_TRIGGER_ORDER_LDC, /* Link->DAI->Component Component->DAI->Link */
647 * It will be used with dai_link->dai_fmt
655 * [dai_link->ch_maps Image sample]
657 *-------------------------
658 * CPU0 <---> Codec0
660 * ch-map[0].cpu = 0 ch-map[0].codec = 0
662 *-------------------------
663 * CPU0 <---> Codec0
664 * CPU1 <---> Codec1
665 * CPU2 <---> Codec2
667 * ch-map[0].cpu = 0 ch-map[0].codec = 0
668 * ch-map[1].cpu = 1 ch-map[1].codec = 1
669 * ch-map[2].cpu = 2 ch-map[2].codec = 2
671 *-------------------------
672 * CPU0 <---> Codec0
673 * CPU1 <-+-> Codec1
674 * CPU2 <-/
676 * ch-map[0].cpu = 0 ch-map[0].codec = 0
677 * ch-map[1].cpu = 1 ch-map[1].codec = 1
678 * ch-map[2].cpu = 2 ch-map[2].codec = 1
680 *-------------------------
681 * CPU0 <---> Codec0
682 * CPU1 <-+-> Codec1
683 * \-> Codec2
685 * ch-map[0].cpu = 0 ch-map[0].codec = 0
686 * ch-map[1].cpu = 1 ch-map[1].codec = 1
687 * ch-map[2].cpu = 1 ch-map[2].codec = 2
697 /* config - must be set by machine driver */
702 * You MAY specify the link's CPU-side device, either by device name,
704 * the CPU-side DAI is matched using .cpu_dai_name only, which hence
710 * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node
747 /* codec/machine specific init - e.g. add machine controls */
750 /* codec/machine specific exit - dual of init() */
753 /* optional hw_params re-writing for BE and FE sync */
777 /* Keep DAI active over suspend */
802 unsigned int ignore:1; member
811 return max(link->num_cpus, link->num_codecs); in snd_soc_link_num_ch_map()
816 return &(link)->cpus[n]; in snd_soc_link_to_cpu()
821 return &(link)->codecs[n]; in snd_soc_link_to_codec()
826 return &(link)->platforms[n]; in snd_soc_link_to_platform()
831 ((i) < link->num_codecs) && \
837 ((i) < link->num_platforms) && \
843 ((i) < link->num_cpus) && \
850 ((ch_map) = link->ch_maps + i)); \
956 * specify multi-codec either by device name, or by
961 /* codec/machine specific init - e.g. add machine controls */
1025 /* CPU <--> Codec DAI links */
1048 * Card-specific routes and widgets.
1049 * Note: of_dapm_xxx for Device Tree; Otherwise for driver build-in.
1064 struct list_head widgets; member
1095 ((i) < (card)->num_links) && ((link) = &(card)->dai_link[i]); \
1099 ((i) < (card)->num_aux_devs) && ((aux) = &(card)->aux_dev[i]); \
1103 list_for_each_entry(rtd, &(card)->rtd_list, list)
1105 list_for_each_entry_safe(rtd, _rtd, &(card)->rtd_list, list)
1108 list_for_each_entry(component, &card->aux_comp_list, card_aux_list)
1111 &card->aux_comp_list, card_aux_list)
1114 list_for_each_entry(component, &(card)->component_dev_list, card_list)
1117 list_for_each_entry(dapm, &card->dapm_list, list)
1120 list_for_each_entry(w, &card->widgets, list)
1122 list_for_each_entry_safe(w, _w, &card->widgets, list)
1127 return card && card->instantiated; in snd_soc_card_is_instantiated()
1164 unsigned int id; /* 0-based and monotonic increasing */
1184 #define snd_soc_rtd_to_cpu(rtd, n) (rtd)->dais[n]
1185 #define snd_soc_rtd_to_codec(rtd, n) (rtd)->dais[n + (rtd)->dai_link->num_cpus]
1195 ((i) < rtd->num_components) && ((component) = rtd->components[i]);\
1199 ((i) < rtd->dai_link->num_cpus) && ((dai) = snd_soc_rtd_to_cpu(rtd, i)); \
1203 ((i) < rtd->dai_link->num_codecs) && ((dai) = snd_soc_rtd_to_codec(rtd, i)); \
1207 ((i) < (rtd)->dai_link->num_cpus + (rtd)->dai_link->num_codecs) && \
1208 ((dai) = (rtd)->dais[i]); \
1211 for ((i) = (rtd)->dai_link->num_cpus + (rtd)->dai_link->num_codecs - 1; \
1212 (i) >= 0 && ((dai) = (rtd)->dais[i]); \
1213 (i)--)
1214 #define for_each_rtd_ch_maps(rtd, i, ch_maps) for_each_link_ch_maps(rtd->dai_link, i, ch_maps)
1276 if (mc->reg == mc->rreg && mc->shift == mc->rshift) in snd_soc_volsw_is_stereo()
1279 * mc->reg == mc->rreg && mc->shift != mc->rshift, or in snd_soc_volsw_is_stereo()
1280 * mc->reg != mc->rreg means that the control is in snd_soc_volsw_is_stereo()
1291 if (!e->values) in snd_soc_enum_val_to_item()
1294 for (i = 0; i < e->items; i++) in snd_soc_enum_val_to_item()
1295 if (val == e->values[i]) in snd_soc_enum_val_to_item()
1304 if (!e->values) in snd_soc_enum_item_to_val()
1307 return e->values[item]; in snd_soc_enum_item_to_val()
1311 * snd_soc_kcontrol_component() - Returns the component that registered the
1352 snd_soc_of_parse_node_prefix(card->dev->of_node, in snd_soc_of_parse_audio_prefix()
1418 #include <sound/soc-dai.h>
1434 if (dai_link->num_platforms != 1) in snd_soc_fixup_dai_links_platform_name()
1435 return -EINVAL; in snd_soc_fixup_dai_links_platform_name()
1437 if (!dai_link->platforms) in snd_soc_fixup_dai_links_platform_name()
1438 return -EINVAL; in snd_soc_fixup_dai_links_platform_name()
1440 name = devm_kstrdup(card->dev, platform_name, GFP_KERNEL); in snd_soc_fixup_dai_links_platform_name()
1442 return -ENOMEM; in snd_soc_fixup_dai_links_platform_name()
1445 dai_link->platforms->name = name; in snd_soc_fixup_dai_links_platform_name()
1467 mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_ROOT); in _snd_soc_dapm_mutex_lock_root_c()
1472 mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); in _snd_soc_dapm_mutex_lock_c()
1477 mutex_unlock(&card->dapm_mutex); in _snd_soc_dapm_mutex_unlock_c()
1482 lockdep_assert_held(&card->dapm_mutex); in _snd_soc_dapm_mutex_assert_held_c()
1487 _snd_soc_dapm_mutex_lock_root_c(dapm->card); in _snd_soc_dapm_mutex_lock_root_d()
1492 _snd_soc_dapm_mutex_lock_c(dapm->card); in _snd_soc_dapm_mutex_lock_d()
1497 _snd_soc_dapm_mutex_unlock_c(dapm->card); in _snd_soc_dapm_mutex_unlock_d()
1502 _snd_soc_dapm_mutex_assert_held_c(dapm->card); in _snd_soc_dapm_mutex_assert_held_d()
1523 mutex_lock_nested(&card->pcm_mutex, card->pcm_subclass); in _snd_soc_dpcm_mutex_lock_c()
1528 mutex_unlock(&card->pcm_mutex); in _snd_soc_dpcm_mutex_unlock_c()
1533 lockdep_assert_held(&card->pcm_mutex); in _snd_soc_dpcm_mutex_assert_held_c()
1538 _snd_soc_dpcm_mutex_lock_c(rtd->card); in _snd_soc_dpcm_mutex_lock_r()
1543 _snd_soc_dpcm_mutex_unlock_c(rtd->card); in _snd_soc_dpcm_mutex_unlock_r()
1548 _snd_soc_dpcm_mutex_assert_held_c(rtd->card); in _snd_soc_dpcm_mutex_assert_held_r()
1563 #include <sound/soc-component.h>
1564 #include <sound/soc-card.h>
1565 #include <sound/soc-jack.h>