Re: [PATCH] ALSA: hda/generic: Add indep_dig_outs hint

From: Takashi Iwai

Date: Wed Nov 04 2026 - 12:10:30 EST


On Tue, 03 Nov 2026 00:55:23 +0100,
Joseph Telaak wrote:
>
> The generic parser gives a codec one digital playback PCM. Any further
> digital output pin is set up as a follower of the first: it gets the
> same stream tag, so every digital jack plays the same stream. That is
> the right default for a codec with, say, a coax and an optical jack.
>
> Some boards wire two digital converters to different places instead.
> On the Control4 HC-800, an ALC888 has converter 0x10 driving pin 0x11,
> which feeds an HDMI transmitter, and converter 0x06 driving pin 0x1e,
> the S/PDIF coax jack. These are two outputs that should play different
> streams at the same time. The follower setup cannot express that, and
> userspace cannot split one stream tag in two.
>
> Add an "indep_dig_outs" hint. Like indep_hp does for the headphone DAC,
> it gives the second digital output pin its own stream: its own
> hda_multi_out and its own PCM, "Alt Digital", typed from its pin and
> with its own IEC958 controls. The digital playback ops pick the
> multiout by the stream's NID. The analog "IEC958 Default PCM"
> duplication stays on the first digital output only. Unlike indep_hp,
> the split is fixed at parse time; there is no mixer switch. A codec
> driver can also set spec->indep_dig_outs itself. Without the hint or
> the flag nothing changes.
>
> The new PCM takes the next free device number of its type. With an
> HDMI-typed first output and an S/PDIF-typed second one, as on the
> HC-800, the HDMI output stays the "Digital" PCM (device 3) and the
> coax output becomes "Alt Digital" (device 1), with its IEC958 controls
> at index 16.
>
> Assisted-by: LLM
> Signed-off-by: Joseph Telaak <joseph@xxxxxxxxxx>
> ---
> Tested on a Control4 HC-800 (Atom D525, ALC888-VD) with this patch on 7.1.8,
> with [hint] indep_dig_outs = yes in an hda patch file: HDMI and coax run at
> the same time on separate stream tags, also at different rates (48 kHz and
> 44.1 kHz) and alongside the analog output. Each IEC958 switch affects only
> its own converter, and closing or reopening one output leaves the other
> running. The HDMI transmitter fed from pin 0x11 (an ADV7513) decodes the
> sample rate of the Digital PCM in every combination, and never the Alt
> Digital one. With the coax output connected to an external S/PDIF receiver,
> the coax carries the Alt Digital PCM bit-exact and never the Digital one, at
> equal and at different rates. Built on sound.git for-next with W=1, with no
> new warnings.
>
> The HC-800 turns this on with a patch file, and the patch adds no quirk for
> it. It is meant as a generic option for any board whose digital outputs go
> to different places.

Applied to for-next branch now. Thanks.


Takashi