From: Will Porter <mrwillporter@gmail.com>
To: Christian Ruppert <arc@gmx.li>
Cc: Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
Neil Andrews <neil@androos.io>
Subject: Re: [RFC PATCH 13/16] ALSA: mixer_audient: Add enumerated controls
Date: Mon, 9 Nov 2026 20:13:02 -0600 [thread overview]
Message-ID: <20261110021302.1077745-1-mrwillporter@gmail.com> (raw)
In-Reply-To: <avJJgGbAVnVrUlPM@khmer.arcnet>
Hi Christian,
Thank you for squashing the fix and for testing it on 7.3.3.
> patch 12:
> - I would declare snd_audient_int_max, snd_audient_int_min and
> snd_audient_int_from_ctl as inline [...]
Done.
> patch 13:
> - I would have snd_audient_enum_item return the negative errno
> instead of e->items and then propagate it.
Done. It returns the item or -EIO, and get propagates the error.
> - I wonder if it would make the code more readable if we refactor all
> the if-statements snd_ctl_audient_info has grown into something
> like DIFF 1 below?
Done. snd_ctl_audient_info() now uses a switch.
> patch 15:
> - snd_ctl_audient_enum_get uses ctype->init which is not set by the
> ID14_ENUM() macro. Is this intentionally always constant 0? In this
> case, could the logic be removed?
I think the logic is still needed, because init is not always 0.
ID14_ENUM() builds only the readable enums: Mono Mode and the four
routing controls. They have no cache entry, so
snd_audient_raw_get_one() never returns -ENODATA for them, and no code
reads init for them. The three write-only enums (iD key function,
talkback source, optical mode) do not use the macro. They set .init
explicitly, to 0xffff, 0xff and 1. A comment on the macro now says
this.
> - Not sure if this is relevant for the iD14 but we might want to
> apply something like DIFF 2 to make update events work on the
> replaced controls 11 and possibly 60 [...]
I left DIFF 2 out of my patches. I have no objection to it, but I
cannot test it. The audio control interface of the iD14 MkI has no
interrupt endpoint (bNumEndpoints is 0), so
snd_usb_mixer_status_create() returns before it creates the URB. The
device sends no status interrupts, and a knob change shows only by a
read. On the iD14 the diff only moves the table-created controls from
id 0 to their unit in id_elems and in the usbmixer proc file.
Two things in sound/usb/mixer.c may matter for your EVO4 events:
- snd_usb_mixer_interrupt_v2() skips an element when the unit has more
than one element and info->control differs from the control selector
in the message. Our elements leave control at 0. Would the event
reach them?
- The notify paths clear info->cached of the generic mixer, not the
mixer_audient cache. Would a cached control report its old value
after the event?
Could you carry DIFF 2 with your EVO4 event change?
> - In mixer_quirks.c: Fallthrough case statements seem to be used
> almost everywhere else, [...]
Done. The two case labels share one call.
> patch 16:
> - can we rename 'create' to something which makes it obvious from the
> name that the callback is optional, e.g. 'extra_init' or similar?
Done. It is now extra_init, with a comment that it is optional.
With these changes each of the five patches builds with W=1 without
warnings, and checkpatch --strict reports nothing new.
On the iD14 (stable 7.2.15) the read and write checks of the controls
pass with the new version.
For the next version: unless you would like another RFC round, I
would send it as a normal series, on top of your four mixer_evo fixes
as before. Does that work for you?
Thanks,
Will
next prev parent reply other threads:[~2026-11-10 2:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <sashiko-outbox-201869@kernel.org>
2026-11-06 20:29 ` Will Porter
2026-11-09 22:30 ` Christian Ruppert
2026-11-10 2:13 ` Will Porter [this message]
2026-11-03 23:01 [RFC V2 PATCH 00/11] Re: ALSA: usb-audio: Audient iD14 MkI vendor Christian Ruppert
2026-11-06 16:31 ` [RFC PATCH 00/16] ALSA: usb-audio: Audient driver and iD14 MkI support Will Porter
2026-11-06 16:31 ` [RFC PATCH 13/16] ALSA: mixer_audient: Add enumerated controls Will Porter
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=20261110021302.1077745-1-mrwillporter@gmail.com \
--to=mrwillporter@gmail.com \
--cc=arc@gmx.li \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=neil@androos.io \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/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®