Skip to contentSkip to conversation

Add Audient EVO4 support

PATCH In review Christian Ruppert 4 participants 9 messages Sep 19 – Sep 29 Sound

lore
Share & tools
lore
#0 lore raw

cover Add Audient EVO4 support

This patch set adds support for advanced mixer features of the Audient EVO4 audio interface. The code is structured so that support for the EVO8 (and potentially other Audient devices) should be trivial to add but I don't have access to the hardware and no way of testing them so they are not supported by this patch set.

The third patch in the series (Add Kconfig option for Audient EVO4 mixer quirks) is optional. Other mixer quirks are compiled in by default and don't provide Kconfig options but as this one adds a few hundred lines of code I decided to provide this last patch as an option and leave the choice if such an option should be added to the subsystem maintainers.

Christian Ruppert (3):
Fix Audient EVO4 master playback control name Add Audient EVO4 mixer quirks
Add Kconfig option for Audient EVO4 mixer quirks

 MAINTAINERS              |   7 +
 sound/usb/Kconfig        |  10 +
 sound/usb/Makefile       |   2 +
 sound/usb/mixer_evo.c    | 505 +++++++++++++++++++++++++++++++++++++++
 sound/usb/mixer_evo.h    |  12 +
 sound/usb/mixer_maps.c   |  13 +
 sound/usb/mixer_quirks.c |   9 +
 7 files changed, 558 insertions(+)
 create mode 100644 sound/usb/mixer_evo.c
 create mode 100644 sound/usb/mixer_evo.h
Signature · 1 line
2.55.0
#1 lore raw

PATCH 1/3 Fix Audient EVO4 master playback control name

The Audient EVO4 master volume mixer channel enumerates as 'EVO4 '. Rename it to 'Master' according to control-names.rst.

---
 sound/usb/mixer_maps.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
sound/usb/mixer_maps.c +13 -0
index 41454cb403d0..1a6ad776126b 100644
@@ -505,6 +505,14 @@ static const struct usbmix_connector_map gigabyte_b450_connector_map[] = {
 	{}
 };
 
+/* Audient EVO4: Rename FU 10 from 'EVO4 ' to 'Master' according to the
+ * ALSA naming convention
+ */
+static const struct usbmix_name_map audient_evo4_map[] = {
+	{ 10, "Master Playback" },
+	{}
+};
+
 /* Audient iD14 MkI and MkII: FU 12 sits on the monitor mixer branch but is
  * traced through to the Speaker output terminal, so it is named "Speaker
  * Playback Volume".  On MkII it controls only 4 of 6 playback channels.  MkI
@@ -632,6 +640,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
 		.id = USB_ID(0x2708, 0x0002),
 		.map = audient_id14_map,
 	},
+	{
+		/* Audient EVO4 MkI */
+		.id = USB_ID(0x2708, 0x0006),
+		.map = audient_evo4_map,
+	},
 	{
 		/* Audient iD14 MkII */
 		.id = USB_ID(0x2708, 0x0008),
Signature · 1 line
2.55.0
#2 lore raw

PATCH 2/3 Add Audient EVO4 mixer quirks

In reply to Christian Ruppert

The controls enumerated by the Audient EVO4 are incomplete. Add missing controls for
* channel muting
* the cross-fader
* the recording mixer
* phantom power

The driver is structured so that it should be trivial to extend it to the EVO8 (and potentially other Audient devices) but we need a kind soul who has access to that hardware to correctly map the control names and test everything.

---
 MAINTAINERS              |   7 +
 sound/usb/Makefile       |   1 +
 sound/usb/mixer_evo.c    | 505 +++++++++++++++++++++++++++++++++++++++
 sound/usb/mixer_evo.h    |  12 +
 sound/usb/mixer_quirks.c |   5 +
 5 files changed, 530 insertions(+)
 create mode 100644 sound/usb/mixer_evo.c
 create mode 100644 sound/usb/mixer_evo.h
MAINTAINERS +7 -0
index c2414447892c..5f8df442b1a5 100644
@@ -4346,6 +4346,13 @@ F:	drivers/net/ieee802154/at86rf230.h
 F:	drivers/net/ieee802154/atusb.c
 F:	drivers/net/ieee802154/atusb.h
 
+AUDIENT EVO MIXER DRIVER
+M:	Christian Ruppert <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	sound/usb/mixer_evo.c
+F:	sound/usb/mixer_evo.h
+
 AUDIT SUBSYSTEM
 M:	Paul Moore <[email protected]>
 M:	Eric Paris <[email protected]>
sound/usb/Makefile +1 -0
index e62794a87e73..2e842dcc73de 100644
@@ -11,6 +11,7 @@ snd-usb-audio-y := 	card.o \
 			helper.o \
 			implicit.o \
 			mixer.o \
+			mixer_evo.o \
 			mixer_quirks.o \
 			mixer_scarlett.o \
 			mixer_scarlett2.o \
sound/usb/mixer_evo.c new file +505 -0

505 lines not on this page · raw message

sound/usb/mixer_evo.h new file +12 -0
new file mode 100644
index 000000000000..7fe7e197185c
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __USB_MIXER_EVO_H
+#define __USB_MIXER_EVO_H
+
+#include "mixer.h"
+
+#define USB_AUDIENT_VID (0x2708)
+#define USB_EVO4_PID (0x0006)
+
+int snd_evo_controls_create(struct usb_mixer_interface *mixer);
+
+#endif /* __USB_MIXER_EVO_H */
sound/usb/mixer_quirks.c +5 -0
index fc622eb95dc5..1e266fdbbb8e 100644
@@ -38,6 +38,7 @@
 #include "mixer_scarlett2.h"
 #include "mixer_us16x08.h"
 #include "mixer_s1810c.h"
+#include "mixer_evo.h"
 #include "helper.h"
 #include "fcp.h"
 
@@ -4539,6 +4540,10 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 		err = snd_fcp_init(mixer);
 		break;
 
+	case USB_ID(USB_AUDIENT_VID, USB_EVO4_PID): /* Audient EVO 4 */
+		err = snd_evo_controls_create(mixer);
+		break;
+
 	case USB_ID(0x041e, 0x323b): /* Creative Sound Blaster E1 */
 		err = snd_soundblaster_e1_switch_create(mixer);
 		break;
Signature · 1 line
2.55.0
#3 lore raw

PATCH 3/3 Add Kconfig option for Audient EVO4 mixer quirks

In reply to Christian Ruppert

Add Kconfig option for the Audient EVO4 support. This is split out from the evo4 driver so it can be optionally applied. Other mixer quirks don't seem to have Kconfig options so I leave it to the upstream to decide what to do with this.

---
 sound/usb/Kconfig        | 10 ++++++++++
 sound/usb/Makefile       |  3 ++-
 sound/usb/mixer_quirks.c |  4 ++++
 3 files changed, 16 insertions(+), 1 deletion(-)
sound/usb/Kconfig +10 -0
index b4588915efa1..21039dd4ae3a 100644
@@ -175,6 +175,16 @@ config SND_USB_HIFACE
 	  To compile this driver as a module, choose M here: the module
 	  will be called snd-usb-hiface.
 
+config SND_USB_EVO
+	bool "Audient EVO advanced mixer features"
+	help
+	  Support advanced mixer features for the Audient EVO4 USB audio
+	  interface such as
+	    * the recording mixer
+	    * the monitor crossfader
+	    * phantom power control
+	    * missing channel mute buttons
+
 config SND_BCD2000
 	tristate "Behringer BCD2000 MIDI driver"
 	select SND_RAWMIDI
sound/usb/Makefile +2 -1
index 2e842dcc73de..f3664adeab85 100644
@@ -11,7 +11,6 @@ snd-usb-audio-y := 	card.o \
 			helper.o \
 			implicit.o \
 			mixer.o \
-			mixer_evo.o \
 			mixer_quirks.o \
 			mixer_scarlett.o \
 			mixer_scarlett2.o \
@@ -27,6 +26,8 @@ snd-usb-audio-y := 	card.o \
 snd-usb-audio-$(CONFIG_SND_USB_AUDIO_MIDI_V2) += midi2.o
 snd-usb-audio-$(CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER) += media.o
 
+snd-usb-audio-$(CONFIG_SND_USB_EVO) += mixer_evo.o
+
 snd-usbmidi-lib-y := midi.o
 
 # Toplevel Module Dependency
sound/usb/mixer_quirks.c +4 -0
index 1e266fdbbb8e..c32ccff40122 100644
@@ -38,7 +38,9 @@
 #include "mixer_scarlett2.h"
 #include "mixer_us16x08.h"
 #include "mixer_s1810c.h"
+#ifdef CONFIG_SND_USB_EVO
 #include "mixer_evo.h"
+#endif
 #include "helper.h"
 #include "fcp.h"
 
@@ -4540,9 +4542,11 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 		err = snd_fcp_init(mixer);
 		break;
 
+#ifdef CONFIG_SND_USB_EVO
 	case USB_ID(USB_AUDIENT_VID, USB_EVO4_PID): /* Audient EVO 4 */
 		err = snd_evo_controls_create(mixer);
 		break;
+#endif
 
 	case USB_ID(0x041e, 0x323b): /* Creative Sound Blaster E1 */
 		err = snd_soundblaster_e1_switch_create(mixer);
Signature · 1 line
2.55.0
#4 lore raw
In reply to Christian Ruppert

Thanks for your work on this - there is currently a regression on the latest kernel versions (7.2 onwards, as well as LTS kernels 6.12 and 6.18). Trying to set the volume in software like wpctl, or pwvucontrol causes the software volume to be pulled down with it - I think it's something to do with "sticky mixers", not completely sure.

I worked through troubleshooting it here as I originally thought it was a wireplumber issue: https://gitlab.freedesktop.org/pipewire/wireplumber/-/work_items/1022

This patch should hopefully solve that, and avoid the usage of external kernel modules like https://github.com/vanzaho/audient-evo-py (which you've based your work from)

I'm not exactly sure how the process with kernel stuff works, but considering a regression on current mainline as well as LTS branches for this device - is there some chance of fast tracking the merge of these patches?

Thanks, Faaris

#5 lore raw
Quoted 11 lines · Faaris Ansari

Thanks for your work on this - there is currently a regression on the latest kernel versions (7.2 onwards, as well as LTS kernels 6.12 and 6.18). Trying to set the volume in software like wpctl, or pwvucontrol causes the software volume to be pulled down with it - I think it's something to do with "sticky mixers", not completely sure.

I worked through troubleshooting it here as I originally thought it was a wireplumber issue:
https://gitlab.freedesktop.org/pipewire/wireplumber/-/work_items/1022

This patch should hopefully solve that,

I'm afraid this is not going to be the case. The patch set doesn't change anything with the pre-existing controls except for renaming the 'EVO4 ' master volume mixer to 'Master'. As a matter of fact, I made a similar observation to yours when testing the patch set on the 'sound' kernel tree and the (very sporadic) issue did not disappear after applying the patches.

Unluckily, I didn't have time to investigate and as it seemed independent from this patch set and was never observed on my (vanilla) 6.18.x day-to-day setup, even with very recent kernels, I forgot about it. I suspect this might be a regression in the sound-USB core modules or possibly the the alsa core.

Quoted 3 lines

and avoid the usage of external
kernel modules like https://github.com/vanzaho/audient-evo-py (which you've based your work from)

This one should be solved with the patch set.

Quoted 4 lines

I'm not exactly sure how the process with kernel stuff works, but considering a regression on current mainline as well as LTS branches for this device - is there some chance of fast tracking the merge of these patches?

The best way of supporting this (even if it only solves half of your concerns) is probably to test it and reply with a Tested-by: tag to the patches.

#6 lore raw
Quoted 7 lines

I'm afraid this is not going to be the case. The patch set doesn't change anything with the pre-existing controls except for renaming the 'EVO4 ' master volume mixer to 'Master'. As a matter of fact, I made a similar observation to yours when testing the patch set on the 'sound' kernel tree and the (very sporadic) issue did not disappear after applying the patches.

Quoted 5 lines

Unluckily, I didn't have time to investigate and as it seemed independent from this patch set and was never observed on my (vanilla) 6.18.x day-to-day setup, even with very recent kernels, I forgot about it. I suspect this might be a regression in the sound-USB core modules or possibly the the alsa core.

I was able to find a work around to this specific issue, adding this below line in modprobe.d made the hardware volume start working correctly again.
options snd_usb_audio quirk_flags=2708:0006:ignore_ctl_error I've reported this regression separately here:
https://lore.kernel.org/regressions/CANBVYRCL=8QdLxGg4S6qrahrFtwJxhv-aSGpW7-1S=+iOe4ZGA@mail.gmail.com/

I also was able to test your patches alongside this workaround. All of the system controls I was expecting were in fact available within alsamixer, including phantom power, mic gain, etc.
Both mic inputs still seem to be reported as stereo even though they're mono - I think the other channel is for loopback or something? I'm not entirely sure if this is something the patches are supposed to solve.

Quoted 2 lines

The patch set doesn't change
anything with the pre-existing controls except for renaming the 'EVO4 '

On the note of the UCM config, I had to patch it due to the above or else PipeWire wasn't able to directly manage the hardware volume knob. Adding the PlaybackSwitch part also allowed the hardware mute to be used by PipeWire.

46c46,47
< PlaybackVolume "EVO4 "
---

Quoted 2 lines

PlaybackVolume "Master Playback Volume"
PlaybackSwitch "Master Playback Switch"

One problem I had with this patchset is the settings I have don't seem to save with UCM / PipeWire. When powering off the interface and powering it back on again all settings are reset except for the Master Playback Volume. After a small discussion on the PipeWire matrix server I was told that these settings should live in the UCM config too which I'm assuming they do not currently.
Muting the microphone in pwvucontrol also didn't seem to use the hardware mic mute. Probably need to add CaptureSwitch for the microphone in UCM too.

However, the current state is by far better than how the interface is being handled by default - thanks so much for your work on this!

Faaris

Quoted 41 lines · Christian Ruppert
Quoted 11 lines · Faaris Ansari

Thanks for your work on this - there is currently a regression on the latest kernel versions (7.2 onwards, as well as LTS kernels 6.12 and 6.18). Trying to set the volume in software like wpctl, or pwvucontrol causes the software volume to be pulled down with it - I think it's something to do with "sticky mixers", not completely sure.

I worked through troubleshooting it here as I originally thought it was a wireplumber issue:
https://gitlab.freedesktop.org/pipewire/wireplumber/-/work_items/1022

This patch should hopefully solve that,

I'm afraid this is not going to be the case. The patch set doesn't change anything with the pre-existing controls except for renaming the 'EVO4 ' master volume mixer to 'Master'. As a matter of fact, I made a similar observation to yours when testing the patch set on the 'sound' kernel tree and the (very sporadic) issue did not disappear after applying the patches.

Unluckily, I didn't have time to investigate and as it seemed independent from this patch set and was never observed on my (vanilla) 6.18.x day-to-day setup, even with very recent kernels, I forgot about it. I suspect this might be a regression in the sound-USB core modules or possibly the the alsa core.

Quoted 3 lines

and avoid the usage of external
kernel modules like https://github.com/vanzaho/audient-evo-py (which you've based your work from)

This one should be solved with the patch set.

Quoted 4 lines

I'm not exactly sure how the process with kernel stuff works, but considering a regression on current mainline as well as LTS branches for this device - is there some chance of fast tracking the merge of these patches?

The best way of supporting this (even if it only solves half of your concerns) is probably to test it and reply with a Tested-by: tag to the patches.

#7 lore raw
In reply to Christian Ruppert
Quoted 13 lines · Christian Ruppert

This patch set adds support for advanced mixer features of the Audient EVO4 audio interface. The code is structured so that support for the EVO8 (and potentially other Audient devices) should be trivial to add but I don't have access to the hardware and no way of testing them so they are not supported by this patch set.

The third patch in the series (Add Kconfig option for Audient EVO4 mixer quirks) is optional. Other mixer quirks are compiled in by default and don't provide Kconfig options but as this one adds a few hundred lines of code I decided to provide this last patch as an option and leave the choice if such an option should be added to the subsystem maintainers.

Quoted 4 lines

Christian Ruppert (3):
Fix Audient EVO4 master playback control name Add Audient EVO4 mixer quirks
Add Kconfig option for Audient EVO4 mixer quirks

I merged the two, but dropped the Kconfig patch.

We have no Kconfig for other mixer stuff, and most likely the users will enable simply all mixer supported devices.

It might make sense to introduce a Kconfig if we build each vendor mixer stuff as an individual module, though. Until then, let's try to reduce Kconfig.

BTW, do you see an issue Faaris reported for the recent kernel?

thanks,

Takashi

#8 lore raw
Quoted 20 lines · Takashi Iwai
Quoted 13 lines · Christian Ruppert

This patch set adds support for advanced mixer features of the Audient EVO4 audio interface. The code is structured so that support for the EVO8 (and potentially other Audient devices) should be trivial to add but I don't have access to the hardware and no way of testing them so they are not supported by this patch set.

The third patch in the series (Add Kconfig option for Audient EVO4 mixer quirks) is optional. Other mixer quirks are compiled in by default and don't provide Kconfig options but as this one adds a few hundred lines of code I decided to provide this last patch as an option and leave the choice if such an option should be added to the subsystem maintainers.

Quoted 4 lines

Christian Ruppert (3):
Fix Audient EVO4 master playback control name Add Audient EVO4 mixer quirks
Add Kconfig option for Audient EVO4 mixer quirks

Quoted 8 lines

I merged the two, but dropped the Kconfig patch.

We have no Kconfig for other mixer stuff, and most likely the users will enable simply all mixer supported devices.

It might make sense to introduce a Kconfig if we build each vendor mixer stuff as an individual module, though. Until then, let's try to reduce Kconfig.

Thanks, makes perfect sense. Thanks to Faaris for testing everything!

Quoted 1 line

BTW, do you see an issue Faaris reported for the recent kernel?

This situation is actually more subtle than I originally thought, I replied to this in the other thread here:
https://lore.kernel.org/regressions/[email protected]/

Christian