* [PATCH] ALSA: hda/ext: preserve PPLCCTL bits when clearing reset
@ 2026-08-13 6:55 raoxu
2026-08-13 7:11 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: raoxu @ 2026-08-13 6:55 UTC (permalink / raw)
To: perex; +Cc: tiwai, kees, raoxu, linux-sound, linux-kernel, stable
From: Xu Rao <raoxu@uniontech.com>
snd_hdac_ext_stream_reset() polls PPLCCTL for STRST by masking the
register value with AZX_PPLCCTL_STRST:
val = readl(...) & AZX_PPLCCTL_STRST;
The same masked value is then used when clearing STRST. Since val
contains no bits other than STRST, clearing STRST from it always
produces zero. The subsequent writel() therefore writes zero to the
entire PPLCCTL register instead of clearing only the reset bit.
PPLCCTL contains other stream control fields, including the stream tag
in AZX_PPLCCTL_STRM_MASK. Those fields must not be modified as a side
effect of clearing stream reset.
Use snd_hdac_updatel() to clear STRST, matching the existing set-reset
path and preserving all unrelated PPLCCTL bits.
Fixes: df203a4e46f4 ("ALSA: hdac_ext: add extended stream capabilities")
Cc: stable@vger.kernel.org
Signed-off-by: Xu Rao <raoxu@uniontech.com>
---
sound/hda/core/ext/stream.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/hda/core/ext/stream.c b/sound/hda/core/ext/stream.c
index 4c7506d49f55..517bd151fcc3 100644
--- a/sound/hda/core/ext/stream.c
+++ b/sound/hda/core/ext/stream.c
@@ -210,8 +210,8 @@ void snd_hdac_ext_stream_reset(struct hdac_ext_stream *hext_stream)
break;
udelay(3);
} while (--timeout);
- val &= ~AZX_PPLCCTL_STRST;
- writel(val, hext_stream->pplc_addr + AZX_REG_PPLCCTL);
+ snd_hdac_updatel(hext_stream->pplc_addr, AZX_REG_PPLCCTL,
+ AZX_PPLCCTL_STRST, 0);
udelay(3);
timeout = 50;
--
2.50.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: hda/ext: preserve PPLCCTL bits when clearing reset
2026-08-13 6:55 [PATCH] ALSA: hda/ext: preserve PPLCCTL bits when clearing reset raoxu
@ 2026-08-13 7:11 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-08-13 7:11 UTC (permalink / raw)
To: raoxu; +Cc: perex, tiwai, kees, linux-sound, linux-kernel, stable
On Thu, 13 Aug 2026 08:55:24 +0200,
raoxu wrote:
>
> From: Xu Rao <raoxu@uniontech.com>
>
> snd_hdac_ext_stream_reset() polls PPLCCTL for STRST by masking the
> register value with AZX_PPLCCTL_STRST:
>
> val = readl(...) & AZX_PPLCCTL_STRST;
>
> The same masked value is then used when clearing STRST. Since val
> contains no bits other than STRST, clearing STRST from it always
> produces zero. The subsequent writel() therefore writes zero to the
> entire PPLCCTL register instead of clearing only the reset bit.
>
> PPLCCTL contains other stream control fields, including the stream tag
> in AZX_PPLCCTL_STRM_MASK. Those fields must not be modified as a side
> effect of clearing stream reset.
>
> Use snd_hdac_updatel() to clear STRST, matching the existing set-reset
> path and preserving all unrelated PPLCCTL bits.
>
> Fixes: df203a4e46f4 ("ALSA: hdac_ext: add extended stream capabilities")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xu Rao <raoxu@uniontech.com>
Applied to for-next branch. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-13 7:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-13 6:55 [PATCH] ALSA: hda/ext: preserve PPLCCTL bits when clearing reset raoxu
2026-08-13 7:11 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®