mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Casey Tunturi via B4 Relay <devnull+casey.samaritansolutions.net@kernel.org>
To: Srinivas Kandagatla <srini@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org,
	 linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
	 stable@vger.kernel.org,
	Casey Tunturi <casey@samaritansolutions.net>
Subject: [PATCH] slimbus: qcom-ngd-ctrl: match downstream DEF_ACT_CHAN encoding
Date: Fri, 07 Aug 2026 20:35:13 -0400	[thread overview]
Message-ID: <20260807-slimbus-def-act-chan-v1-1-fd542efb3d30@samaritansolutions.net> (raw)

From: Casey Tunturi <casey@samaritansolutions.net>

During my investigations, and some rather incessant cross-checking of
blueline's SLIMbus path, I found that Qualcomm's downstream driver
packs the first DEF_ACT_CHAN byte differently from mainline. Bits [7:5]
hold the data format; bits [4:0] hold the five-bit client number.

I changed ours to match. It made no immediate difference on my own
hardware: blueline's current values produce 0x0f either way. The
downstream layout is correct and should help devices that use upper
logical-address bits or a non-zero data format.

Fixes: 52490169cddf ("slimbus: ngd: add stream support")
Cc: stable@vger.kernel.org
Signed-off-by: Casey Tunturi <casey@samaritansolutions.net>
---
 drivers/slimbus/qcom-ngd-ctrl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 3071e46d0..14192380d 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1018,7 +1018,8 @@ static int qcom_slim_ngd_enable_stream(struct slim_stream_runtime *rt)
 		if (txn.msg->num_bytes == 0) {
 			int exp = 0, coef = 0;
 
-			wbuf[txn.msg->num_bytes++] = sdev->laddr;
+			wbuf[txn.msg->num_bytes++] =
+				(port->ch.data_fmt << 5) | (sdev->laddr & 0x1f);
 			wbuf[txn.msg->num_bytes] = rt->bps >> 2 |
 						   (port->ch.aux_fmt << 6);
 

---
base-commit: 55f2ea9ff83cc27a85526b14bc9b32f96a08d6ec
change-id: 20260807-slimbus-def-act-chan-b70e4fb7abb1

Best regards,
--  
Casey Tunturi <casey@samaritansolutions.net>



             reply	other threads:[~2026-08-08  0:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-08  0:35 Casey Tunturi via B4 Relay [this message]
2026-08-18 12:50 ` Konrad Dybcio
2026-09-17 22:26   ` Srinivas Kandagatla

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=20260807-slimbus-def-act-chan-v1-1-fd542efb3d30@samaritansolutions.net \
    --to=devnull+casey.samaritansolutions.net@kernel.org \
    --cc=casey@samaritansolutions.net \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=srini@kernel.org \
    --cc=stable@vger.kernel.org \
    /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®