]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Feb 2022 11:37:27 +0000 (12:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Feb 2022 11:37:27 +0000 (12:37 +0100)
added patches:
alsa-hda-fix-missing-codec-probe-on-shenker-dock-15.patch
alsa-hda-fix-regression-on-forced-probe-mask-option.patch
asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw.patch
asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw_range.patch

queue-4.9/alsa-hda-fix-missing-codec-probe-on-shenker-dock-15.patch [new file with mode: 0644]
queue-4.9/alsa-hda-fix-regression-on-forced-probe-mask-option.patch [new file with mode: 0644]
queue-4.9/asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw.patch [new file with mode: 0644]
queue-4.9/asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw_range.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/alsa-hda-fix-missing-codec-probe-on-shenker-dock-15.patch b/queue-4.9/alsa-hda-fix-missing-codec-probe-on-shenker-dock-15.patch
new file mode 100644 (file)
index 0000000..4be3f93
--- /dev/null
@@ -0,0 +1,33 @@
+From dd8e5b161d7fb9cefa1f1d6e35a39b9e1563c8d3 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 14 Feb 2022 11:00:20 +0100
+Subject: ALSA: hda: Fix missing codec probe on Shenker Dock 15
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit dd8e5b161d7fb9cefa1f1d6e35a39b9e1563c8d3 upstream.
+
+By some unknown reason, BIOS on Shenker Dock 15 doesn't set up the
+codec mask properly for the onboard audio.  Let's set the forced codec
+mask to enable the codec discovery.
+
+Reported-by: dmummenschanz@web.de
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/trinity-f018660b-95c9-442b-a2a8-c92a56eb07ed-1644345967148@3c-app-webde-bap22
+Link: https://lore.kernel.org/r/20220214100020.8870-2-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/hda_intel.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -1424,6 +1424,7 @@ static struct snd_pci_quirk probe_mask_l
+       /* forced codec slots */
+       SND_PCI_QUIRK(0x1043, 0x1262, "ASUS W5Fm", 0x103),
+       SND_PCI_QUIRK(0x1046, 0x1262, "ASUS W5F", 0x103),
++      SND_PCI_QUIRK(0x1558, 0x0351, "Schenker Dock 15", 0x105),
+       /* WinFast VP200 H (Teradici) user reported broken communication */
+       SND_PCI_QUIRK(0x3a21, 0x040d, "WinFast VP200 H", 0x101),
+       {}
diff --git a/queue-4.9/alsa-hda-fix-regression-on-forced-probe-mask-option.patch b/queue-4.9/alsa-hda-fix-regression-on-forced-probe-mask-option.patch
new file mode 100644 (file)
index 0000000..064dcc6
--- /dev/null
@@ -0,0 +1,45 @@
+From 6317f7449348a897483a2b4841f7a9190745c81b Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 14 Feb 2022 11:00:19 +0100
+Subject: ALSA: hda: Fix regression on forced probe mask option
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 6317f7449348a897483a2b4841f7a9190745c81b upstream.
+
+The forced probe mask via probe_mask 0x100 bit doesn't work any longer
+as expected since the bus init code was moved and it's clearing the
+codec_mask value that was set beforehand.  This patch fixes the
+long-time regression by moving the check_probe_mask() call.
+
+Fixes: a41d122449be ("ALSA: hda - Embed bus into controller object")
+Reported-by: dmummenschanz@web.de
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/trinity-f018660b-95c9-442b-a2a8-c92a56eb07ed-1644345967148@3c-app-webde-bap22
+Link: https://lore.kernel.org/r/20220214100020.8870-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/hda_intel.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -1609,8 +1609,6 @@ static int azx_create(struct snd_card *c
+       assign_position_fix(chip, check_position_fix(chip, position_fix[dev]));
+-      check_probe_mask(chip, dev);
+-
+       chip->single_cmd = single_cmd;
+       azx_check_snoop_available(chip);
+@@ -1631,6 +1629,8 @@ static int azx_create(struct snd_card *c
+               chip->bus.needs_damn_long_delay = 1;
+       }
++      check_probe_mask(chip, dev);
++
+       err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
+       if (err < 0) {
+               dev_err(card->dev, "Error creating device [card]!\n");
diff --git a/queue-4.9/asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw.patch b/queue-4.9/asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw.patch
new file mode 100644 (file)
index 0000000..dcfc3b7
--- /dev/null
@@ -0,0 +1,56 @@
+From 564778d7b1ea465f9487eedeece7527a033549c5 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@kernel.org>
+Date: Tue, 1 Feb 2022 15:56:26 +0000
+Subject: ASoC: ops: Fix stereo change notifications in snd_soc_put_volsw()
+
+From: Mark Brown <broonie@kernel.org>
+
+commit 564778d7b1ea465f9487eedeece7527a033549c5 upstream.
+
+When writing out a stereo control we discard the change notification from
+the first channel, meaning that events are only generated based on changes
+to the second channel. Ensure that we report a change if either channel
+has changed.
+
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20220201155629.120510-2-broonie@kernel.org
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/soc-ops.c |   14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+--- a/sound/soc/soc-ops.c
++++ b/sound/soc/soc-ops.c
+@@ -319,7 +319,7 @@ int snd_soc_put_volsw(struct snd_kcontro
+       unsigned int sign_bit = mc->sign_bit;
+       unsigned int mask = (1 << fls(max)) - 1;
+       unsigned int invert = mc->invert;
+-      int err;
++      int err, ret;
+       bool type_2r = false;
+       unsigned int val2 = 0;
+       unsigned int val, val_mask;
+@@ -361,12 +361,18 @@ int snd_soc_put_volsw(struct snd_kcontro
+       err = snd_soc_component_update_bits(component, reg, val_mask, val);
+       if (err < 0)
+               return err;
++      ret = err;
+-      if (type_2r)
++      if (type_2r) {
+               err = snd_soc_component_update_bits(component, reg2, val_mask,
+-                      val2);
++                                                  val2);
++              /* Don't discard any error code or drop change flag */
++              if (ret == 0 || err < 0) {
++                      ret = err;
++              }
++      }
+-      return err;
++      return ret;
+ }
+ EXPORT_SYMBOL_GPL(snd_soc_put_volsw);
diff --git a/queue-4.9/asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw_range.patch b/queue-4.9/asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw_range.patch
new file mode 100644 (file)
index 0000000..03fbaf8
--- /dev/null
@@ -0,0 +1,62 @@
+From 650204ded3703b5817bd4b6a77fa47d333c4f902 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@kernel.org>
+Date: Tue, 1 Feb 2022 15:56:28 +0000
+Subject: ASoC: ops: Fix stereo change notifications in snd_soc_put_volsw_range()
+
+From: Mark Brown <broonie@kernel.org>
+
+commit 650204ded3703b5817bd4b6a77fa47d333c4f902 upstream.
+
+When writing out a stereo control we discard the change notification from
+the first channel, meaning that events are only generated based on changes
+to the second channel. Ensure that we report a change if either channel
+has changed.
+
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20220201155629.120510-4-broonie@kernel.org
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/soc-ops.c |   15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+--- a/sound/soc/soc-ops.c
++++ b/sound/soc/soc-ops.c
+@@ -528,7 +528,7 @@ int snd_soc_put_volsw_range(struct snd_k
+       unsigned int mask = (1 << fls(max)) - 1;
+       unsigned int invert = mc->invert;
+       unsigned int val, val_mask;
+-      int ret;
++      int err, ret;
+       if (invert)
+               val = (max - ucontrol->value.integer.value[0]) & mask;
+@@ -537,9 +537,10 @@ int snd_soc_put_volsw_range(struct snd_k
+       val_mask = mask << shift;
+       val = val << shift;
+-      ret = snd_soc_component_update_bits(component, reg, val_mask, val);
+-      if (ret < 0)
+-              return ret;
++      err = snd_soc_component_update_bits(component, reg, val_mask, val);
++      if (err < 0)
++              return err;
++      ret = err;
+       if (snd_soc_volsw_is_stereo(mc)) {
+               if (invert)
+@@ -549,8 +550,12 @@ int snd_soc_put_volsw_range(struct snd_k
+               val_mask = mask << shift;
+               val = val << shift;
+-              ret = snd_soc_component_update_bits(component, rreg, val_mask,
++              err = snd_soc_component_update_bits(component, rreg, val_mask,
+                       val);
++              /* Don't discard any error code or drop change flag */
++              if (ret == 0 || err < 0) {
++                      ret = err;
++              }
+       }
+       return ret;
index f5a2a8ab40a59f122e9127d9ed7bbf08a9aee8ab..fb07fbb564fb20c71cb5d3cf6f7a536763682283 100644 (file)
@@ -19,3 +19,7 @@ vsock-remove-vsock-from-connected-table-when-connect-is-interrupted-by-a-signal.
 iwlwifi-pcie-fix-locking-when-hw-not-ready.patch
 drop_monitor-fix-data-race-in-dropmon_net_event-trace_napi_poll_hit.patch
 libsubcmd-fix-use-after-free-for-realloc-...-0.patch
+alsa-hda-fix-regression-on-forced-probe-mask-option.patch
+alsa-hda-fix-missing-codec-probe-on-shenker-dock-15.patch
+asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw.patch
+asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw_range.patch