Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-08-16 22:01:45 +0200
committerJiri Slaby <jslaby@suse.cz>2019-08-16 22:25:11 +0200
commite6088522402e5843c947d1a87cdf56246bb8fd34 (patch)
tree85a0a4a6431dc6393f3c77578a2d154866435d09
parent6b7b9dddd0bfc710cf2813494df3ebda5c4f534a (diff)
ALSA: hda - Don't override global PCM hw info flag
-rw-r--r--patches.kernel.org/5.2.9-128-ALSA-hda-Don-t-override-global-PCM-hw-info-flag.patch47
-rw-r--r--series.conf1
2 files changed, 48 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.9-128-ALSA-hda-Don-t-override-global-PCM-hw-info-flag.patch b/patches.kernel.org/5.2.9-128-ALSA-hda-Don-t-override-global-PCM-hw-info-flag.patch
new file mode 100644
index 0000000000..23f7a28128
--- /dev/null
+++ b/patches.kernel.org/5.2.9-128-ALSA-hda-Don-t-override-global-PCM-hw-info-flag.patch
@@ -0,0 +1,47 @@
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 6 Aug 2019 14:03:56 +0200
+Subject: [PATCH] ALSA: hda - Don't override global PCM hw info flag
+References: bnc#1012628
+Patch-mainline: 5.2.9
+Git-commit: c1c6c877b0c79fd7e05c931435aa42211eaeebaf
+
+commit c1c6c877b0c79fd7e05c931435aa42211eaeebaf upstream.
+
+The commit bfcba288b97f ("ALSA - hda: Add support for link audio time
+reporting") introduced the conditional PCM hw info setup, but it
+overwrites the global azx_pcm_hw object. This will cause a problem if
+any other HD-audio controller, as it'll inherit the same bit flag
+although another controller doesn't support that feature.
+
+Fix the bug by setting the PCM hw info flag locally.
+
+Fixes: bfcba288b97f ("ALSA - hda: Add support for link audio time reporting")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ sound/pci/hda/hda_controller.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
+index 232a1926758a..f01b3f5b135c 100644
+--- a/sound/pci/hda/hda_controller.c
++++ b/sound/pci/hda/hda_controller.c
+@@ -598,11 +598,9 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
+ }
+ runtime->private_data = azx_dev;
+
+- if (chip->gts_present)
+- azx_pcm_hw.info = azx_pcm_hw.info |
+- SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME;
+-
+ runtime->hw = azx_pcm_hw;
++ if (chip->gts_present)
++ runtime->hw.info |= SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME;
+ runtime->hw.channels_min = hinfo->channels_min;
+ runtime->hw.channels_max = hinfo->channels_max;
+ runtime->hw.formats = hinfo->formats;
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index 98015f938a..46b6e6fb2c 100644
--- a/series.conf
+++ b/series.conf
@@ -1148,6 +1148,7 @@
patches.kernel.org/5.2.9-125-drm-i915-Fix-wrong-escape-clock-divisor-init-fo.patch
patches.kernel.org/5.2.9-126-ALSA-firewire-fix-a-memory-leak-bug.patch
patches.kernel.org/5.2.9-127-ALSA-hiface-fix-multiple-memory-leak-bugs.patch
+ patches.kernel.org/5.2.9-128-ALSA-hda-Don-t-override-global-PCM-hw-info-flag.patch
########################################################
# Build fixes that apply to the vanilla kernel too.