* [PATCH 0/4] ALSA: mixer_evo: minor fixes and tlv addition
@ 2026-10-26 17:44 Christian Ruppert
2026-10-26 17:44 ` [PATCH 1/4] ALSA: mixer_evo: Remove double end marker device list Christian Ruppert
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Christian Ruppert @ 2026-10-26 17:44 UTC (permalink / raw)
To: perex, tiwai, linux-kernel, linux-sound; +Cc: arc, mrwillporter
This patch set contains fixes for minor issues discovered while reviewing
the proposed audient_id driver as well as the tlv definition for the
recording mixer channels. Thanks to Will Porter for triggering this with
his submission.
Christian Ruppert (4):
ALSA: mixer_evo: Remove double end marker device list
ALSA: mixer_evo: Add missing snd_usb_lock calls
ALSA: mixer_evo: Fix endianness of boolean inversion
ALSA: mixer_evo: Add tlv for mixer channels
sound/usb/mixer_evo.c | 35 ++++++++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 7 deletions(-)
--
2.56.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] ALSA: mixer_evo: Remove double end marker device list
2026-10-26 17:44 [PATCH 0/4] ALSA: mixer_evo: minor fixes and tlv addition Christian Ruppert
@ 2026-10-26 17:44 ` Christian Ruppert
2026-10-26 17:44 ` [PATCH 2/4] ALSA: mixer_evo: Add missing snd_usb_lock calls Christian Ruppert
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Christian Ruppert @ 2026-10-26 17:44 UTC (permalink / raw)
To: perex, tiwai, linux-kernel, linux-sound; +Cc: arc, mrwillporter
The evo_devinfo array accidentally contained two end-of-array markers.
This isn't harmful but not very clean. Remove one of them.
Signed-off-by: Christian Ruppert <arc@gmx.li>
---
sound/usb/mixer_evo.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sound/usb/mixer_evo.c b/sound/usb/mixer_evo.c
index c327b82c8d2d..26846108a3e1 100644
--- a/sound/usb/mixer_evo.c
+++ b/sound/usb/mixer_evo.c
@@ -196,10 +196,6 @@ static const struct evo_devinfo {
.usb_id = USB_ID(USB_AUDIENT_VID, USB_EVO4_PID),
.controls = evo4_controls,
},
- {
- .usb_id = USB_ID(USB_AUDIENT_VID, USB_EVO4_PID),
- .controls = NULL,
- },
{ 0 } /* sentinel */
};
--
2.56.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/4] ALSA: mixer_evo: Add missing snd_usb_lock calls
2026-10-26 17:44 [PATCH 0/4] ALSA: mixer_evo: minor fixes and tlv addition Christian Ruppert
2026-10-26 17:44 ` [PATCH 1/4] ALSA: mixer_evo: Remove double end marker device list Christian Ruppert
@ 2026-10-26 17:44 ` Christian Ruppert
2026-10-26 17:44 ` [PATCH 3/4] ALSA: mixer_evo: Fix endianness of boolean inversion Christian Ruppert
2026-10-26 17:44 ` [PATCH 4/4] ALSA: mixer_evo: Add tlv for mixer channels Christian Ruppert
3 siblings, 0 replies; 5+ messages in thread
From: Christian Ruppert @ 2026-10-26 17:44 UTC (permalink / raw)
To: perex, tiwai, linux-kernel, linux-sound; +Cc: arc, mrwillporter
Bugfix: Add missing snd_usb_lock_shutdown calls to mixer_evo.c.
Signed-off-by: Christian Ruppert <arc@gmx.li>
---
sound/usb/mixer_evo.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/sound/usb/mixer_evo.c b/sound/usb/mixer_evo.c
index 26846108a3e1..1fbcbe61b708 100644
--- a/sound/usb/mixer_evo.c
+++ b/sound/usb/mixer_evo.c
@@ -275,6 +275,10 @@ static int snd_ctl_evo_boolean_get(struct snd_kcontrol *kctl,
int i;
+ CLASS(snd_usb_lock, pm)(mixer->chip);
+ if (pm.err < 0)
+ return pm.err;
+
for (i = 0; i < hwchan; i++) {
u32 buf;
int ret;
@@ -312,6 +316,10 @@ static int snd_ctl_evo_boolean_set(struct snd_kcontrol *kctl,
int changed = 0;
int i;
+ CLASS(snd_usb_lock, pm)(mixer->chip);
+ if (pm.err < 0)
+ return pm.err;
+
for (i = 0; i < hwchan; i++) {
u32 rbuf;
u32 buf = cpu_to_le32(ctl_val->value.integer.value[i] ? 1 : 0);
@@ -352,6 +360,10 @@ static int snd_ctl_evo_integer_get(struct snd_kcontrol *kctl,
int i;
+ CLASS(snd_usb_lock, pm)(mixer->chip);
+ if (pm.err < 0)
+ return pm.err;
+
for (i = 0; i < hwchan; i++) {
u16 buf;
s16 val;
@@ -386,6 +398,10 @@ static int snd_ctl_evo_integer_set(struct snd_kcontrol *kctl,
int changed = 0;
int i;
+ CLASS(snd_usb_lock, pm)(mixer->chip);
+ if (pm.err < 0)
+ return pm.err;
+
for (i = 0; i < hwchan; i++) {
s16 rbuf;
s16 buf = cpu_to_le16(ctl_val->value.integer.value[i]);
--
2.56.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/4] ALSA: mixer_evo: Fix endianness of boolean inversion
2026-10-26 17:44 [PATCH 0/4] ALSA: mixer_evo: minor fixes and tlv addition Christian Ruppert
2026-10-26 17:44 ` [PATCH 1/4] ALSA: mixer_evo: Remove double end marker device list Christian Ruppert
2026-10-26 17:44 ` [PATCH 2/4] ALSA: mixer_evo: Add missing snd_usb_lock calls Christian Ruppert
@ 2026-10-26 17:44 ` Christian Ruppert
2026-10-26 17:44 ` [PATCH 4/4] ALSA: mixer_evo: Add tlv for mixer channels Christian Ruppert
3 siblings, 0 replies; 5+ messages in thread
From: Christian Ruppert @ 2026-10-26 17:44 UTC (permalink / raw)
To: perex, tiwai, linux-kernel, linux-sound; +Cc: arc, mrwillporter
Bugfix: The optional inversion in snd_ctl_evo_boolean_get was in the
wrong endianness domain (CPU).
Move it to LE domain to make it work on all machines.
Signed-off-by: Christian Ruppert <arc@gmx.li>
---
sound/usb/mixer_evo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/usb/mixer_evo.c b/sound/usb/mixer_evo.c
index 1fbcbe61b708..867d083953ba 100644
--- a/sound/usb/mixer_evo.c
+++ b/sound/usb/mixer_evo.c
@@ -326,7 +326,7 @@ static int snd_ctl_evo_boolean_set(struct snd_kcontrol *kctl,
int ret;
if (ctype->invert)
- buf ^= 0x1;
+ buf ^= cpu_to_le32(0x1);
ret = snd_evo_get_cur(mixer, value + i, index,
&rbuf, sizeof(rbuf));
--
2.56.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/4] ALSA: mixer_evo: Add tlv for mixer channels
2026-10-26 17:44 [PATCH 0/4] ALSA: mixer_evo: minor fixes and tlv addition Christian Ruppert
` (2 preceding siblings ...)
2026-10-26 17:44 ` [PATCH 3/4] ALSA: mixer_evo: Fix endianness of boolean inversion Christian Ruppert
@ 2026-10-26 17:44 ` Christian Ruppert
3 siblings, 0 replies; 5+ messages in thread
From: Christian Ruppert @ 2026-10-26 17:44 UTC (permalink / raw)
To: perex, tiwai, linux-kernel, linux-sound; +Cc: arc, mrwillporter
mixer_evo didn't declare tlv for the recording mixer matrix which seems to
confuse some userland programs. Add tlv definitions to fix this.
We still do not add tlv for the crossfader (generally labelled "mixer")
because there doesn't seem to be a way to declare this so that userland
programs just keep it as linear as it is and should be.
Signed-off-by: Christian Ruppert <arc@gmx.li>
---
sound/usb/mixer_evo.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/sound/usb/mixer_evo.c b/sound/usb/mixer_evo.c
index 867d083953ba..c1e0332232f2 100644
--- a/sound/usb/mixer_evo.c
+++ b/sound/usb/mixer_evo.c
@@ -14,6 +14,7 @@
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/control.h>
+#include <sound/tlv.h>
#include "usbaudio.h"
#include "mixer.h"
@@ -31,6 +32,9 @@ enum snd_evo_type {
SND_EVO_TYPE_NCTYPES
};
+/* Mixer matrix: -128dB (mute) to +6dB */
+static const DECLARE_TLV_DB_MINMAX_MUTE(snd_evo_tlv_mixer, -12800, 600);
+
static const struct snd_evo_ctrl_type {
snd_ctl_elem_type_t type;
bool invert;
@@ -40,6 +44,7 @@ static const struct snd_evo_ctrl_type {
union {
int integer;
} max;
+ const unsigned int *tlv;
u16 wValue;
u16 wIndex;
} snd_evo_ctypes[SND_EVO_TYPE_NCTYPES] = {
@@ -49,6 +54,7 @@ static const struct snd_evo_ctrl_type {
.max.integer = 127,
.wValue = 0x0000,
.wIndex = 0x3800,
+ /* no TLV here because we can't describe the cross-fader */
},
[SND_EVO_TYPE_PHANTOM] = {
.type = SNDRV_CTL_ELEM_TYPE_BOOLEAN,
@@ -80,6 +86,7 @@ static const struct snd_evo_ctrl_type {
.max.integer = 6 * 256,
.wValue = 0x0100,
.wIndex = 0x3C00,
+ .tlv = snd_evo_tlv_mixer,
},
};
@@ -431,8 +438,6 @@ static int snd_ctl_evo_info(struct snd_kcontrol *kctl,
const struct snd_evo_ctrl_type *const ctype = snd_evo_kctl_type(kctl);
uinfo->type = ctype->type;
- uinfo->access = SNDRV_CTL_ELEM_ACCESS_READWRITE
- | SNDRV_CTL_ELEM_ACCESS_VOLATILE;
uinfo->count = snd_evo_kctl_channels(kctl);
uinfo->value.integer.min = ctype->min.integer;
uinfo->value.integer.max = ctype->max.integer;
@@ -454,6 +459,10 @@ static int snd_evo_add_ctrl(struct usb_mixer_interface *mixer,
knew.info = snd_ctl_evo_info;
knew.private_value = snd_evo_kctl_priv(ctrl->type, ctrl->val_offs,
ctrl->hwchannels);
+ knew.tlv.p = ctype->tlv;
+ knew.access = SNDRV_CTL_ELEM_ACCESS_READWRITE
+ | SNDRV_CTL_ELEM_ACCESS_VOLATILE
+ | (ctype->tlv ? SNDRV_CTL_ELEM_ACCESS_TLV_READ : 0);
switch (ctype->type) {
case SNDRV_CTL_ELEM_TYPE_INTEGER:
--
2.56.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-26 17:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 17:44 [PATCH 0/4] ALSA: mixer_evo: minor fixes and tlv addition Christian Ruppert
2026-10-26 17:44 ` [PATCH 1/4] ALSA: mixer_evo: Remove double end marker device list Christian Ruppert
2026-10-26 17:44 ` [PATCH 2/4] ALSA: mixer_evo: Add missing snd_usb_lock calls Christian Ruppert
2026-10-26 17:44 ` [PATCH 3/4] ALSA: mixer_evo: Fix endianness of boolean inversion Christian Ruppert
2026-10-26 17:44 ` [PATCH 4/4] ALSA: mixer_evo: Add tlv for mixer channels Christian Ruppert
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®