From a75067ee5596a83aaed5f04b7729862b65be589f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 20 Dec 2019 07:28:36 +0100 Subject: [PATCH] 5.4-stable patches added patches: alsa-hda-fix-regression-by-strip-mask-fix.patch --- ...hda-fix-regression-by-strip-mask-fix.patch | 61 +++++++++++++++++++ queue-5.4/series | 1 + 2 files changed, 62 insertions(+) create mode 100644 queue-5.4/alsa-hda-fix-regression-by-strip-mask-fix.patch diff --git a/queue-5.4/alsa-hda-fix-regression-by-strip-mask-fix.patch b/queue-5.4/alsa-hda-fix-regression-by-strip-mask-fix.patch new file mode 100644 index 00000000000..2d70aa590ae --- /dev/null +++ b/queue-5.4/alsa-hda-fix-regression-by-strip-mask-fix.patch @@ -0,0 +1,61 @@ +From 6fd739c04ffd877641b01371f9fde67901e7f9cb Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Sat, 14 Dec 2019 18:52:17 +0100 +Subject: ALSA: hda: Fix regression by strip mask fix + +From: Takashi Iwai + +commit 6fd739c04ffd877641b01371f9fde67901e7f9cb upstream. + +The commit e38e486d66e2 ("ALSA: hda: Modify stream stripe mask only +when needed") tried to address the regression by the unconditional +application of the stripe mask, but this caused yet another +regression for the previously working devices. Namely, the patch +clears the azx_dev->stripe flag at snd_hdac_stream_clear(), but this +may be called multiple times before restarting the stream, so this +ended up with clearance of the flag for the whole time. + +This patch fixes the regression by moving the azx_dev->stripe flag +clearance at the counter-part, the close callback of HDMI codec +driver instead. + +Fixes: e38e486d66e2 ("ALSA: hda: Modify stream stripe mask only when needed") +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205855 +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204477 +Cc: +Link: https://lore.kernel.org/r/20191214175217.31852-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Cc: Stefani Seibold +Cc: Laura Abbott +Signed-off-by: Greg Kroah-Hartman + +--- + sound/hda/hdac_stream.c | 4 +--- + sound/pci/hda/patch_hdmi.c | 2 ++ + 2 files changed, 3 insertions(+), 3 deletions(-) + +--- a/sound/hda/hdac_stream.c ++++ b/sound/hda/hdac_stream.c +@@ -120,10 +120,8 @@ void snd_hdac_stream_clear(struct hdac_s + snd_hdac_stream_updateb(azx_dev, SD_CTL, + SD_CTL_DMA_START | SD_INT_MASK, 0); + snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK); /* to be sure */ +- if (azx_dev->stripe) { ++ if (azx_dev->stripe) + snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK, 0); +- azx_dev->stripe = 0; +- } + azx_dev->running = false; + } + EXPORT_SYMBOL_GPL(snd_hdac_stream_clear); +--- a/sound/pci/hda/patch_hdmi.c ++++ b/sound/pci/hda/patch_hdmi.c +@@ -1983,6 +1983,8 @@ static int hdmi_pcm_close(struct hda_pcm + per_cvt->assigned = 0; + hinfo->nid = 0; + ++ azx_stream(get_azx_dev(substream))->stripe = 0; ++ + mutex_lock(&spec->pcm_lock); + snd_hda_spdif_ctls_unassign(codec, pcm_idx); + clear_bit(pcm_idx, &spec->pcm_in_use); diff --git a/queue-5.4/series b/queue-5.4/series index 429b7e9b73a..728abdfb664 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -78,3 +78,4 @@ drm-amdgpu-gfx10-re-init-clear-state-buffer-after-gpu-reset.patch drm-i915-gvt-fix-cmd-length-check-for-mi_atomic.patch drm-amdgpu-avoid-using-invalidate-semaphore-for-picasso.patch drm-amdgpu-add-invalidate-semaphore-limit-for-sriov-and-picasso-in-gmc9.patch +alsa-hda-fix-regression-by-strip-mask-fix.patch -- 2.47.3