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}
407 #include <sound/soc-dapm.h>
408 #include <sound/soc-dpcm.h>
409 #include <sound/soc-topology.h>
480 snd_soc_runtime_action(rtd, stream, -1);
502 substream->runtime->hw = *hw;
589 SND_SOC_TRIGGER_ORDER_DEFAULT = 0, /* Link->Component->DAI DAI->Component->Link */
590 SND_SOC_TRIGGER_ORDER_LDC, /* Link->DAI->Component Component->DAI->Link */
639 * It will be used with dai_link->dai_fmt
647 * [dai_link->ch_maps Image sample]
649 *-------------------------
650 * CPU0 <---> Codec0
652 * ch-map[0].cpu = 0 ch-map[0].codec = 0
654 *-------------------------
655 * CPU0 <---> Codec0
656 * CPU1 <---> Codec1
657 * CPU2 <---> Codec2
659 * ch-map[0].cpu = 0 ch-map[0].codec = 0
660 * ch-map[1].cpu = 1 ch-map[1].codec = 1
661 * ch-map[2].cpu = 2 ch-map[2].codec = 2
663 *-------------------------
664 * CPU0 <---> Codec0
665 * CPU1 <-+-> Codec1
666 * CPU2 <-/
668 * ch-map[0].cpu = 0 ch-map[0].codec = 0
669 * ch-map[1].cpu = 1 ch-map[1].codec = 1
670 * ch-map[2].cpu = 2 ch-map[2].codec = 1
672 *-------------------------
673 * CPU0 <---> Codec0
674 * CPU1 <-+-> Codec1
675 * \-> Codec2
677 * ch-map[0].cpu = 0 ch-map[0].codec = 0
678 * ch-map[1].cpu = 1 ch-map[1].codec = 1
679 * ch-map[2].cpu = 1 ch-map[2].codec = 2
689 /* config - must be set by machine driver */
694 * You MAY specify the link's CPU-side device, either by device name,
696 * the CPU-side DAI is matched using .cpu_dai_name only, which hence
702 * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node
739 /* codec/machine specific init - e.g. add machine controls */
742 /* codec/machine specific exit - dual of init() */
745 /* optional hw_params re-writing for BE and FE sync */
769 /* Keep DAI active over suspend */
794 unsigned int ignore:1;
803 return max(link->num_cpus, link->num_codecs);
808 return &(link)->cpus[n];
813 return &(link)->codecs[n];
818 return &(link)->platforms[n];
823 ((i) < link->num_codecs) && \
829 ((i) < link->num_platforms) && \
835 ((i) < link->num_cpus) && \
842 ((ch_map) = link->ch_maps + i)); \
948 * specify multi-codec either by device name, or by
953 /* codec/machine specific init - e.g. add machine controls */
1017 /* CPU <--> Codec DAI links */
1040 * Card-specific routes and widgets.
1041 * Note: of_dapm_xxx for Device Tree; Otherwise for driver build-in.
1056 struct list_head widgets;
1088 ((i) < (card)->num_links) && ((link) = &(card)->dai_link[i]); \
1092 ((i) < (card)->num_aux_devs) && ((aux) = &(card)->aux_dev[i]); \
1096 list_for_each_entry(rtd, &(card)->rtd_list, list)
1098 list_for_each_entry_safe(rtd, _rtd, &(card)->rtd_list, list)
1101 list_for_each_entry(component, &card->aux_comp_list, card_aux_list)
1104 &card->aux_comp_list, card_aux_list)
1107 list_for_each_entry(component, &(card)->component_dev_list, card_list)
1110 list_for_each_entry(dapm, &card->dapm_list, list)
1113 list_for_each_entry(w, &card->widgets, list)
1115 list_for_each_entry_safe(w, _w, &card->widgets, list)
1120 return card && card->instantiated;
1125 return &card->dapm;
1162 unsigned int id; /* 0-based and monotonic increasing */
1182 #define snd_soc_rtd_to_cpu(rtd, n) (rtd)->dais[n]
1183 #define snd_soc_rtd_to_codec(rtd, n) (rtd)->dais[n + (rtd)->dai_link->num_cpus]
1193 ((i) < rtd->num_components) && ((component) = rtd->components[i]);\
1197 ((i) < rtd->dai_link->num_cpus) && ((dai) = snd_soc_rtd_to_cpu(rtd, i)); \
1201 ((i) < rtd->dai_link->num_codecs) && ((dai) = snd_soc_rtd_to_codec(rtd, i)); \
1205 ((i) < (rtd)->dai_link->num_cpus + (rtd)->dai_link->num_codecs) && \
1206 ((dai) = (rtd)->dais[i]); \
1209 for ((i) = (rtd)->dai_link->num_cpus + (rtd)->dai_link->num_codecs - 1; \
1210 (i) >= 0 && ((dai) = (rtd)->dais[i]); \
1211 (i)--)
1212 #define for_each_rtd_ch_maps(rtd, i, ch_maps) for_each_link_ch_maps(rtd->dai_link, i, ch_maps)
1274 if (mc->reg == mc->rreg && mc->shift == mc->rshift)
1277 * mc->reg == mc->rreg && mc->shift != mc->rshift, or
1278 * mc->reg != mc->rreg means that the control is
1289 if (!e->values)
1292 for (i = 0; i < e->items; i++)
1293 if (val == e->values[i])
1302 if (!e->values)
1305 return e->values[item];
1309 * snd_soc_kcontrol_component() - Returns the component that registered the
1350 snd_soc_of_parse_node_prefix(card->dev->of_node,
1416 #include <sound/soc-dai.h>
1432 if (dai_link->num_platforms != 1)
1433 return -EINVAL;
1435 if (!dai_link->platforms)
1436 return -EINVAL;
1438 name = devm_kstrdup(card->dev, platform_name, GFP_KERNEL);
1440 return -ENOMEM;
1443 dai_link->platforms->name = name;
1465 mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_ROOT);
1470 mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
1475 mutex_unlock(&card->dapm_mutex);
1480 lockdep_assert_held(&card->dapm_mutex);
1485 _snd_soc_dapm_mutex_lock_root_c(dapm->card);
1490 _snd_soc_dapm_mutex_lock_c(dapm->card);
1495 _snd_soc_dapm_mutex_unlock_c(dapm->card);
1500 _snd_soc_dapm_mutex_assert_held_c(dapm->card);
1521 mutex_lock_nested(&card->pcm_mutex, card->pcm_subclass);
1526 mutex_unlock(&card->pcm_mutex);
1531 lockdep_assert_held(&card->pcm_mutex);
1536 _snd_soc_dpcm_mutex_lock_c(rtd->card);
1541 _snd_soc_dpcm_mutex_unlock_c(rtd->card);
1546 _snd_soc_dpcm_mutex_assert_held_c(rtd->card);
1561 #include <sound/soc-component.h>
1562 #include <sound/soc-card.h>
1563 #include <sound/soc-jack.h>