From: Greg Kroah-Hartman Date: Mon, 4 Oct 2021 10:40:26 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v4.4.286~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3796076033b235a6829b2491de056ee730a7ac48;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: asoc-dapm-use-component-prefix-when-checking-widget-names.patch --- diff --git a/queue-5.10/asoc-dapm-use-component-prefix-when-checking-widget-names.patch b/queue-5.10/asoc-dapm-use-component-prefix-when-checking-widget-names.patch new file mode 100644 index 00000000000..4c7d059bb46 --- /dev/null +++ b/queue-5.10/asoc-dapm-use-component-prefix-when-checking-widget-names.patch @@ -0,0 +1,54 @@ +From ae4fc532244b3bb4d86c397418d980b0c6be1dfd Mon Sep 17 00:00:00 2001 +From: Shuming Fan +Date: Mon, 8 Feb 2021 17:40:42 -0600 +Subject: ASoC: dapm: use component prefix when checking widget names + +From: Shuming Fan + +commit ae4fc532244b3bb4d86c397418d980b0c6be1dfd upstream. + +On a TigerLake SoundWire platform, we see these warnings: + +[ 27.360086] rt5682 sdw:0:25d:5682:0: ASoC: DAPM unknown pin MICBIAS +[ 27.360092] rt5682 sdw:0:25d:5682:0: ASoC: DAPM unknown pin Vref2 + +This is root-caused to the addition of a component prefix in the +machine driver. The tests in soc-dapm should account for a prefix +instead of reporting an invalid issue. + +Reported-by: Pierre-Louis Bossart +Reviewed-by: Rander Wang +Signed-off-by: Shuming Fan +Signed-off-by: Pierre-Louis Bossart +Link: https://lore.kernel.org/r/20210208234043.59750-2-pierre-louis.bossart@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Robert Lee +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/soc-dapm.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +--- a/sound/soc/soc-dapm.c ++++ b/sound/soc/soc-dapm.c +@@ -2528,9 +2528,20 @@ static struct snd_soc_dapm_widget *dapm_ + { + struct snd_soc_dapm_widget *w; + struct snd_soc_dapm_widget *fallback = NULL; ++ char prefixed_pin[80]; ++ const char *pin_name; ++ const char *prefix = soc_dapm_prefix(dapm); ++ ++ if (prefix) { ++ snprintf(prefixed_pin, sizeof(prefixed_pin), "%s %s", ++ prefix, pin); ++ pin_name = prefixed_pin; ++ } else { ++ pin_name = pin; ++ } + + for_each_card_widgets(dapm->card, w) { +- if (!strcmp(w->name, pin)) { ++ if (!strcmp(w->name, pin_name)) { + if (w->dapm == dapm) + return w; + else diff --git a/queue-5.10/series b/queue-5.10/series index c3df123f54e..e025bc6255f 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -80,3 +80,4 @@ ext4-add-error-checking-to-ext4_ext_replay_set_iblocks.patch ext4-fix-potential-infinite-loop-in-ext4_dx_readdir.patch hid-u2fzero-ignore-incomplete-packets-without-data.patch net-udp-annotate-data-race-around-udp_sk-sk-corkflag.patch +asoc-dapm-use-component-prefix-when-checking-widget-names.patch