aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-06-27 18:27:03 +0100
committerMark Brown <broonie@kernel.org>2022-06-27 18:27:03 +0100
commitb9566b1d1fb41c7745d872c303766961614431ec (patch)
treefa4a43020d196767b66d409b0c8f28b4f6371596 /sound/soc/soc-dapm.c
parentASoC: cs35l41: Add support for CLSA3541 ACPI device ID (diff)
parentASoC: audio_graph_card2: Fix port numbers in example (diff)
downloadlinux-dev-b9566b1d1fb41c7745d872c303766961614431ec.tar.xz
linux-dev-b9566b1d1fb41c7745d872c303766961614431ec.zip
ASoC: Merge up fixes
Further development will need some of the fixes.
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 62c90e297aab..b05231414c1d 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -62,6 +62,8 @@ struct snd_soc_dapm_widget *
snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
const struct snd_soc_dapm_widget *widget);
+static unsigned int soc_dapm_read(struct snd_soc_dapm_context *dapm, int reg);
+
/* dapm power sequences - make this per codec in the future */
static int dapm_up_seq[] = {
[snd_soc_dapm_pre] = 1,
@@ -442,6 +444,9 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget,
snd_soc_dapm_add_path(widget->dapm, data->widget,
widget, NULL, NULL);
+ } else if (e->reg != SND_SOC_NOPM) {
+ data->value = soc_dapm_read(widget->dapm, e->reg) &
+ (e->mask << e->shift_l);
}
break;
default: