diff options
| author | Xu Rao <raoxu@uniontech.com> | 2026-08-13 14:55:24 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-09-07 17:22:55 +0200 |
| commit | 13d61a920435de6cef8ee9bc4e097b6c98e9832e (patch) | |
| tree | 0c0a5881922a5eba176ce04b849fe9cf77c13761 | |
| parent | 7df3194bdb7479cad9199889655a566a2c0c1d1b (diff) | |
| download | linux-13d61a920435de6cef8ee9bc4e097b6c98e9832e.tar.gz linux-13d61a920435de6cef8ee9bc4e097b6c98e9832e.zip | |
ALSA: hda/ext: preserve PPLCCTL bits when clearing reset
commit 36aa66de481d29edd63cbad9b5c4dc18c340fdf6 upstream.
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>
Link: https://patch.msgid.link/43BB7930B0F07C09+20260813065524.1955696-1-raoxu@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | sound/hda/core/ext/stream.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/hda/core/ext/stream.c b/sound/hda/core/ext/stream.c index b4759198e51d..f6d80f95333b 100644 --- a/sound/hda/core/ext/stream.c +++ b/sound/hda/core/ext/stream.c @@ -211,8 +211,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; |
