]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Sep 2022 13:24:55 +0000 (15:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Sep 2022 13:24:55 +0000 (15:24 +0200)
added patches:
alsa-hda-sigmatel-fix-unused-variable-warning-for-beep-power-change.patch
alsa-hda-sigmatel-keep-power-up-while-beep-is-enabled.patch

queue-5.19/alsa-hda-sigmatel-fix-unused-variable-warning-for-beep-power-change.patch [new file with mode: 0644]
queue-5.19/alsa-hda-sigmatel-keep-power-up-while-beep-is-enabled.patch [new file with mode: 0644]
queue-5.19/series

diff --git a/queue-5.19/alsa-hda-sigmatel-fix-unused-variable-warning-for-beep-power-change.patch b/queue-5.19/alsa-hda-sigmatel-fix-unused-variable-warning-for-beep-power-change.patch
new file mode 100644 (file)
index 0000000..11c3001
--- /dev/null
@@ -0,0 +1,33 @@
+From 51bdc8bb82525cd70feb92279c8b7660ad7948dd Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 5 Sep 2022 15:06:30 +0200
+Subject: ALSA: hda/sigmatel: Fix unused variable warning for beep power change
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 51bdc8bb82525cd70feb92279c8b7660ad7948dd upstream.
+
+The newly added stac_check_power_status() caused a compile warning
+when CONFIG_SND_HDA_INPUT_BEEP is disabled.  Fix it.
+
+Fixes: 414d38ba8710 ("ALSA: hda/sigmatel: Keep power up while beep is enabled")
+Reported-by: kernel test robot <lkp@intel.com>
+Link: https://lore.kernel.org/r/20220905130630.2845-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_sigmatel.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/pci/hda/patch_sigmatel.c
++++ b/sound/pci/hda/patch_sigmatel.c
+@@ -4447,7 +4447,9 @@ static int stac_suspend(struct hda_codec
+ static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid)
+ {
++#ifdef CONFIG_SND_HDA_INPUT_BEEP
+       struct sigmatel_spec *spec = codec->spec;
++#endif
+       int ret = snd_hda_gen_check_power_status(codec, nid);
+ #ifdef CONFIG_SND_HDA_INPUT_BEEP
diff --git a/queue-5.19/alsa-hda-sigmatel-keep-power-up-while-beep-is-enabled.patch b/queue-5.19/alsa-hda-sigmatel-keep-power-up-while-beep-is-enabled.patch
new file mode 100644 (file)
index 0000000..08d659f
--- /dev/null
@@ -0,0 +1,66 @@
+From 414d38ba871092aeac4ed097ac4ced89486646f7 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Sun, 4 Sep 2022 09:27:50 +0200
+Subject: ALSA: hda/sigmatel: Keep power up while beep is enabled
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 414d38ba871092aeac4ed097ac4ced89486646f7 upstream.
+
+It seems that the beep playback doesn't work well on IDT codec devices
+when the codec auto-pm is enabled.  Keep the power on while the beep
+switch is enabled.
+
+Link: https://bugzilla.suse.com/show_bug.cgi?id=1200544
+Link: https://lore.kernel.org/r/20220904072750.26164-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_sigmatel.c |   22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+--- a/sound/pci/hda/patch_sigmatel.c
++++ b/sound/pci/hda/patch_sigmatel.c
+@@ -209,6 +209,7 @@ struct sigmatel_spec {
+       /* beep widgets */
+       hda_nid_t anabeep_nid;
++      bool beep_power_on;
+       /* SPDIF-out mux */
+       const char * const *spdif_labels;
+@@ -4443,6 +4444,26 @@ static int stac_suspend(struct hda_codec
+       return 0;
+ }
++
++static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid)
++{
++      struct sigmatel_spec *spec = codec->spec;
++      int ret = snd_hda_gen_check_power_status(codec, nid);
++
++#ifdef CONFIG_SND_HDA_INPUT_BEEP
++      if (nid == spec->gen.beep_nid && codec->beep) {
++              if (codec->beep->enabled != spec->beep_power_on) {
++                      spec->beep_power_on = codec->beep->enabled;
++                      if (spec->beep_power_on)
++                              snd_hda_power_up_pm(codec);
++                      else
++                              snd_hda_power_down_pm(codec);
++              }
++              ret |= spec->beep_power_on;
++      }
++#endif
++      return ret;
++}
+ #else
+ #define stac_suspend          NULL
+ #endif /* CONFIG_PM */
+@@ -4455,6 +4476,7 @@ static const struct hda_codec_ops stac_p
+       .unsol_event = snd_hda_jack_unsol_event,
+ #ifdef CONFIG_PM
+       .suspend = stac_suspend,
++      .check_power_status = stac_check_power_status,
+ #endif
+ };
index e1eaf412a1edd65f3f7cd4128b5e5a9d5dc33bdf..e215367788b0e57b08b10bafeb68e807e8bc37a0 100644 (file)
@@ -34,3 +34,5 @@ drm-amdgpu-move-nbio-sdma_doorbell_range-into-sdma-code-for-vega.patch
 net-find-dst-with-sk-s-xfrm-policy-not-ctl_sk.patch
 dt-bindings-apple-aic-fix-required-item-apple-fiq-index-in-affinity-description.patch
 cgroup-add-missing-cpus_read_lock-to-cgroup_attach_task_all.patch
+alsa-hda-sigmatel-keep-power-up-while-beep-is-enabled.patch
+alsa-hda-sigmatel-fix-unused-variable-warning-for-beep-power-change.patch