* [PATCH] ALSA: ctxfi: Fix CA20K2 S/PDIF passthrough
@ 2026-09-03 21:14 Roman Prucha via B4 Relay
2026-09-06 8:02 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Roman Prucha via B4 Relay @ 2026-09-03 21:14 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Colin Ian King
Cc: Takashi Iwai, linux-sound, linux-kernel, stable, Roman Prucha
From: Roman Prucha <zorgan.roman@gmail.com>
dao_rsc_init() encodes the DAIO configuration as
conf = (desc->msr & 0x7) | (desc->passthru << 3);
S/PDIF passthrough uses msr=1 and passthru=1, resulting in
conf=9.
daio_mgr_dao_init() masks conf with 0xf, but handles only values
1, 2, 4 and 8 when programming ATXCTL_NUC. As a result, conf=9
falls through to the default case and leaves NUC at its previous
setting.
On a Creative X-Fi Titanium HD SB1270 (CA20K2), this breaks AC3
IEC61937 passthrough when snd_ctxfi runs with
reference_rate=48000,multiple=2. The receiver detects a non-audio
stream but cannot decode the AC3 payload.
With the unmodified driver, multiple=1 makes the same stream work.
Handle conf=9 through the same NUC=0 path as conf=1.
The change was runtime tested on the SB1270 with multiple=2 using
IEC958 stereo PCM, pre-encoded AC3 IEC61937 passthrough and ALSA
A52 live 5.1 encoding.
Fixes: 26a9630c72eb ("ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Roman Prucha <zorgan.roman@gmail.com>
---
sound/pci/ctxfi/cthw20k2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c
index 07e1490a6d17..36066ffe8784 100644
--- a/sound/pci/ctxfi/cthw20k2.c
+++ b/sound/pci/ctxfi/cthw20k2.c
@@ -994,6 +994,7 @@ static int daio_mgr_dao_init(struct hw *hw, void *blk, unsigned int idx, unsigne
/* S/PDIF output */
switch ((conf & 0xf)) {
case 1:
+ case 9:
set_field(&ctl->txctl[idx], ATXCTL_NUC, 0);
break;
case 2:
---
base-commit: 7f71fd44a1089b362eacf87e1f451ddd4fb7df62
change-id: 20260903-ctxfi-spdif-conf9-fix-b909f7e366dc
Best regards,
--
Roman Prucha <zorgan.roman@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: ctxfi: Fix CA20K2 S/PDIF passthrough
2026-09-03 21:14 [PATCH] ALSA: ctxfi: Fix CA20K2 S/PDIF passthrough Roman Prucha via B4 Relay
@ 2026-09-06 8:02 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-09-06 8:02 UTC (permalink / raw)
To: zorgan.roman
Cc: Jaroslav Kysela, Takashi Iwai, Colin Ian King, Takashi Iwai,
linux-sound, linux-kernel, stable
On Thu, 03 Sep 2026 23:14:44 +0200,
Roman Prucha via B4 Relay wrote:
>
> From: Roman Prucha <zorgan.roman@gmail.com>
>
> dao_rsc_init() encodes the DAIO configuration as
>
> conf = (desc->msr & 0x7) | (desc->passthru << 3);
>
> S/PDIF passthrough uses msr=1 and passthru=1, resulting in
> conf=9.
>
> daio_mgr_dao_init() masks conf with 0xf, but handles only values
> 1, 2, 4 and 8 when programming ATXCTL_NUC. As a result, conf=9
> falls through to the default case and leaves NUC at its previous
> setting.
>
> On a Creative X-Fi Titanium HD SB1270 (CA20K2), this breaks AC3
> IEC61937 passthrough when snd_ctxfi runs with
> reference_rate=48000,multiple=2. The receiver detects a non-audio
> stream but cannot decode the AC3 payload.
>
> With the unmodified driver, multiple=1 makes the same stream work.
> Handle conf=9 through the same NUC=0 path as conf=1.
>
> The change was runtime tested on the SB1270 with multiple=2 using
> IEC958 stereo PCM, pre-encoded AC3 IEC61937 passthrough and ALSA
> A52 live 5.1 encoding.
>
> Fixes: 26a9630c72eb ("ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Roman Prucha <zorgan.roman@gmail.com>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-06 8:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-03 21:14 [PATCH] ALSA: ctxfi: Fix CA20K2 S/PDIF passthrough Roman Prucha via B4 Relay
2026-09-06 8:02 ` 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®