* [PATCH] ALSA: hda: Use readl() to read PPCTL register
@ 2026-12-06 10:15 Sreeraj S Kurup
2026-12-06 10:35 ` [PATCH v2] " Sreeraj S Kurup
0 siblings, 1 reply; 4+ messages in thread
From: Sreeraj S Kurup @ 2026-12-06 10:15 UTC (permalink / raw)
To: perex, tiwai; +Cc: linux-sound, linux-kernel, Sreeraj S Kurup
The PPCTL register is a 32-bit register, but
snd_hdac_ext_stream_decouple_locked() currently uses readw()
to read it.
This reads only the lower 16 bits of the register. As a
result, PROCEN bits above bit 15 cannot be detected, causing
the function to incorrectly determine the stream decoupling
state on hardware that implements these bits.
Use readl() instead of readw() to read the full 32-bit
PPCTL register. This allows the function to correctly check
all implemented PROCEN bits across supported hardware
generations.
Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
---
sound/hda/core/ext/stream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/hda/core/ext/stream.c b/sound/hda/core/ext/stream.c
index 1f96e0484660..23fe9291c04d 100644
--- a/sound/hda/core/ext/stream.c
+++ b/sound/hda/core/ext/stream.c
@@ -143,7 +143,7 @@ void snd_hdac_ext_stream_decouple_locked(struct hdac_bus *bus,
u32 val;
int mask = AZX_PPCTL_PROCEN(hstream->index);
- val = readw(bus->ppcap + AZX_REG_PP_PPCTL) & mask;
+ val = readl(bus->ppcap + AZX_REG_PP_PPCTL) & mask;
if (decouple && !val)
snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, mask);
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] ALSA: hda: Use readl() to read PPCTL register
2026-12-06 10:15 [PATCH] ALSA: hda: Use readl() to read PPCTL register Sreeraj S Kurup
@ 2026-12-06 10:35 ` Sreeraj S Kurup
2026-12-06 11:04 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Sreeraj S Kurup @ 2026-12-06 10:35 UTC (permalink / raw)
To: sreekuttan2156239, perex, tiwai; +Cc: linux-kernel, linux-sound
The PPCTL register is a 32-bit register, but
snd_hdac_ext_stream_decouple_locked() currently uses readw()
to read it.
This reads only the lower 16 bits of the register. As a
result, PROCEN bits above bit 15 cannot be detected, causing
the function to incorrectly determine the stream decoupling
state on hardware that implements these bits.
Use readl() instead of readw() to read the full 32-bit
PPCTL register. This allows the function to correctly check
all implemented PROCEN bits across supported hardware
generations.
Fixes: 09a8bf812c66 ("ALSA: hda: check stream decoupled register state")
Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
---
v2:
- Add Fixes trailer.
sound/hda/core/ext/stream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/hda/core/ext/stream.c b/sound/hda/core/ext/stream.c
index 1f96e0484660..23fe9291c04d 100644
--- a/sound/hda/core/ext/stream.c
+++ b/sound/hda/core/ext/stream.c
@@ -143,7 +143,7 @@ void snd_hdac_ext_stream_decouple_locked(struct hdac_bus *bus,
u32 val;
int mask = AZX_PPCTL_PROCEN(hstream->index);
- val = readw(bus->ppcap + AZX_REG_PP_PPCTL) & mask;
+ val = readl(bus->ppcap + AZX_REG_PP_PPCTL) & mask;
if (decouple && !val)
snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, mask);
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ALSA: hda: Use readl() to read PPCTL register
2026-12-06 10:35 ` [PATCH v2] " Sreeraj S Kurup
@ 2026-12-06 11:04 ` Takashi Iwai
2026-12-06 13:04 ` Sreeraj S Kurup
0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2026-12-06 11:04 UTC (permalink / raw)
To: Sreeraj S Kurup; +Cc: perex, tiwai, linux-kernel, linux-sound
On Sun, 06 Dec 2026 11:35:49 +0100,
Sreeraj S Kurup wrote:
>
> The PPCTL register is a 32-bit register, but
> snd_hdac_ext_stream_decouple_locked() currently uses readw()
> to read it.
>
> This reads only the lower 16 bits of the register. As a
> result, PROCEN bits above bit 15 cannot be detected, causing
> the function to incorrectly determine the stream decoupling
> state on hardware that implements these bits.
>
> Use readl() instead of readw() to read the full 32-bit
> PPCTL register. This allows the function to correctly check
> all implemented PROCEN bits across supported hardware
> generations.
>
> Fixes: 09a8bf812c66 ("ALSA: hda: check stream decoupled register state")
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Applied to for-next branch.
thanks,
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ALSA: hda: Use readl() to read PPCTL register
2026-12-06 11:04 ` Takashi Iwai
@ 2026-12-06 13:04 ` Sreeraj S Kurup
0 siblings, 0 replies; 4+ messages in thread
From: Sreeraj S Kurup @ 2026-12-06 13:04 UTC (permalink / raw)
To: tiwai; +Cc: linux-kernel, linux-sound, perex, sreekuttan2156239
Hi,
Thanks for applying the patch!
Best regards,
Sreeraj
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-12-06 13:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-06 10:15 [PATCH] ALSA: hda: Use readl() to read PPCTL register Sreeraj S Kurup
2026-12-06 10:35 ` [PATCH v2] " Sreeraj S Kurup
2026-12-06 11:04 ` Takashi Iwai
2026-12-06 13:04 ` Sreeraj S Kurup
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®