Re: [RFC V4 PATCH 00/19] Re: ALSA: mixer_audient: Cache rework and simplifications

From: Christian Ruppert

Date: Mon Nov 16 2026 - 17:19:33 EST


Hi Will,

On Sun, Nov 15, 2026 at 08:53:36PM -0600, Will Porter wrote:
> [...]
> Patch 19
> --------
>
> I like it. One thing: the FU 12 type has INIT_HW and CACHE, but not
> GET_BROKEN. On the iD14, GET CUR on FU 12 does not return the FU 12
> value. It returns a reply buffer that the device shares with other
> units.

Ah, OK. I had understood this is only a problem before the value is
first written/initialized.

> If the probe write of a Cue channel fails, that channel has no cache
> entry, so the next get or put sends this GET and caches the reply.
> The control can then show a value that is not the value of that
> channel. A later put whose device value matches that reply sends no
> SET for the channel: for example, a stale 0 dB shows as 127, and a put
> of 127 sends nothing. A stale value below -127 dB can also show as a
> negative control value.
>
> So FU 12 looks to me like a write-only control with an init value.
> With GET_BROKEN, an unknown channel reads as init (mute), and every
> put sends all four channels, as the comment above ID14_FU12_* says.
>
> I checked this with a test build that skips the probe write of Cue L.
> With V4, the first access after the load sent one GET for Cue L. The
> reply was 0x8000, matching the value just written to Cue R, so Cue L
> showed 0. Puts of the shown values then sent no SET, also not for Cue
> L, which the driver had never written. With the diff, the driver sent
> no GET, Cue L showed 0, and each put sent all four channels.
>
> Does that match how you read the flags?

Yes, if the read doesn't work we should not rely on it so let's mark it as
broken.

> > We could even get rid of the FU12 specific value type if the iD14
> > accepts -127 * 256 as a volume setting
>
> The device accepts a SET of -127 dB without a stall, but I tested
> that only on Main L, which the firmware ignores. On Cue, -126 dB and
> mute (0x8000) both measure at the same small residual level that the
> headphone output keeps. I have not tested a SET of -127 dB on Cue.
> The type also has to stay for now, because it holds Main at 0 dB. So
> I would keep value 0 as mute in this series. Could we do the plain
> integer together with your don't-touch channel mask as a follow-up?

agreed. let's push this into the follow-up.

> Patch 18
> --------
>
> The old gets read only the channels below hwchannels and filled in the
> rest. The new get reads every channel and then ignores the value of
> the channels at or above hwchannels, so an error on such a channel
> fails the whole get. I think this affects only the EVO4 "Mic Playback
> Switch" (4 channels, 2 on the device): it now also sends GET for CN 2
> and 3. Does the EVO4 answer those? Either way, the diff skips the
> transfer for those channels and keeps the values they show now.

yes, the channels marked as sw-only are actually read-only. Probably
something to address in the follow-up if we want to make it properly
clean. but your patch is fine for now, this way the behaviour is
consistent with what we had before.

> Small things, also in the diff:
>
> - raw_get_one() and raw_set_one() accept cidx == MAX_CHANNELS, but
> cache_val[] has MAX_CHANNELS entries. No table reaches it (the
> highest channel is 55), so ">=" is only a guard.
> - Two comments from patch 10 still say FORCE_SET.
> - Patch 19 removes extra_init but keeps its comment.

Great, thanks for reviewing and fixing these. I tested the diff on 7.3.4
and everything works like before.

> Next steps
> ----------
>
> After patch 19, nothing of patch 16's own FU 12 code is left. So I
> would drop patch 16 and send one FU 12 patch after patch 18: the
> control as patch 16 describes it, built on the unified get and put
> with your code from patch 19. Would you like to be its author, with a
> Co-developed-by for me, or the other way round?

I think it's best if you're the author if you agree. My patch 19 was
little more than a sketch, definitely not intended for submission, and if
you want to replace patch 16 altogether I suspect you'll have to rework it
anyway.

> A note on trailers: V4 dropped "Assisted-by: Claude:claude-opus-5-5"
> from patches 8, 11 and 12 to 16. I put it back on them, and I added it
> to patch 10, because patch 10 now holds code from my cache patch.

Yes, these tags don't pass checkpatch on recent kernels anymore and all
mention of it was removed from the documentation in commit 1e035297ffdadf.
I don't know any more details than the commit message but apparently it
wasn't respected and thus useless.

> May I fold the diff into your patches 10, 18 and 19 for the final
> series? I would send it as a normal series, not as another RFC.
> Should it wait for Takashi's answer on your four mixer_evo fixes, or
> carry them at the front?

Yes, please do so and add your tags to the commit messages. I don't think
there's a need for another iteration unless if final testing discovers a
major flaw on either hardware. Concerning the four fixes let's give
Takashi another week or two and then submit with or without them,
depending on what he says. There should still be enough time before the
merge window.

Thanks,
Christian