mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
To: perex@perex.cz, tiwai@suse.de
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Subject: [PATCH] ALSA: hda: Use readl() to read PPCTL register
Date: Sun,  6 Dec 2026 10:15:00 +0000	[thread overview]
Message-ID: <20261206101500.2818-1-sreekuttan2156239@gmail.com> (raw)

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


             reply	other threads:[~2026-12-06 10:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-06 10:15 Sreeraj S Kurup [this message]
2026-12-06 10:35 ` [PATCH v2] " Sreeraj S Kurup
2026-12-06 11:04   ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261206101500.2818-1-sreekuttan2156239@gmail.com \
    --to=sreekuttan2156239@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®