Disable loopback on Audient EVO 4

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

Post Reply
to1ne
Established Member
Posts: 7
Joined: Wed Feb 12, 2020 8:31 am

Disable loopback on Audient EVO 4

Post by to1ne »

Recently I've bought myself an Audient EVO 4: https://evo.audio/products/evo-4/overview/

It's a really nice device, and works with Linux out of the box. But it only has one channel for input. And that's an issue for me.

The device has "loopback audio", so desktop audio sent to the device is also looped back through the input channel. This can be great if you want to record microphone input together with the music playing on your computer. But I also want to use this thing for video calls, and that's where the problem arises. When I'm in a call, I have my headphones connected to the EVO 4, and I only want the microphone input sent to the video call app, otherwise other people will hear themselves again.

So I'd like to disable loopback audio.

In this YouTube review I've seen it's possible to toggle Loopback on Mac, so I was wondering if it was also possible on Linux.

I've been digging with alsa-utils, but I didn't find it.

Here is my alsa information: http://alsa-project.org/db/?f=37fb9177a ... c93fb350ab

I think I got pretty close with amixer, but I did not succeed:

Code: Select all

numid=4,iface=CARD,name='Audient Internal Clock Validity'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=7,iface=CARD,name='Keep Interface'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=3,iface=MIXER,name='Analogue 2 Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=254,step=0
  : values=247,247
  | dBminmax-min=-127.00dB,max=0.00dB
numid=6,iface=MIXER,name='EVO4  Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=116,step=0
  : values=17,0
  | dBminmax-min=-8.00dB,max=50.00dB
numid=5,iface=MIXER,name='Extension Unit Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=2,iface=PCM,name='Capture Channel Map'
  ; type=INTEGER,access=r----R--,values=4,min=0,max=36,step=0
  : values=3,4,7,8
  | container
    | chmap-fixed=FL,FR,FC,LFE
numid=1,iface=PCM,name='Playback Channel Map'
  ; type=INTEGER,access=r----R--,values=4,min=0,max=36,step=0
  : values=3,4,7,8
  | container
    | chmap-fixed=FL,FR,FC,LFE
The "Capture Channel Map" is read-only, so I could not edit that. The "Extension Unit Switch" is writable, but it refuses to toggle. I could change the "Keep Interface", but I have no idea what it does.

So any one else here running the EVO 4? Or tips to disable Loopback audio?

Or if it's impossible to fix this on Linux, which audio interface do you recommend which also has loopback audio, but with option to disable it?

puleglot
Established Member
Posts: 102
Joined: Thu Jan 23, 2020 3:14 pm

Re: Disable loopback on Audient EVO 4

Post by puleglot »

Are you using alsa directly, pulseaudio or jack? Looks like the device has 4 channel IN and 4 channels OUT. So I guess that one pair of output channels (probably 1-2) is Main Monitor output and another pair of outputs (probably 3-4) is Loop-back send channels. As for inputs, one pair is mixed with Loop-back send and another is mixed with Main Monitor output. Again, that's my guess only.

If I'm right, and if you are using pulseaudio, then setting 'remixing-use-all-sink-channels = no' in daemon.conf might help. With this setting pulseaudio will send stereo sound to outputs 1-2 and silence to 3-4. By default pulseaudio sends audio to both 1-2 and 3-4 channels. You can also try to configure jackdbus and try different routing settings using QjackCtl.

to1ne
Established Member
Posts: 7
Joined: Wed Feb 12, 2020 8:31 am

Re: Disable loopback on Audient EVO 4

Post by to1ne »

Are you using alsa directly, pulseaudio or jack?
I'm using pulseaudio. But I also having been playing around with alsamixer.
Looks like the device has 4 channel IN and 4 channels OUT. So I guess that one pair of output channels (probably 1-2) is Main Monitor output and another pair of outputs (probably 3-4) is Loop-back send channels.
I'm curious where you see this?

In alsamixer I'm seeing 1 input and 1 output device. Interesting to note thought, when I change the input 1 volume on the device with the dial, it changes the left channel of the input, input 2 is the right channel.
As for inputs, one pair is mixed with Loop-back send and another is mixed with Main Monitor output. Again, that's my guess only.
I'm not sure what "Main Monitor output" would be? Or at least in comparison to "Loopback"? But that's interesting. So you're saying loopback would be mixed with one of both inputs?

So I decided to test that, but something strange happened. I unplugged my mic from input 1 and plugged it in in input 2. And now the loopback audio seems to gone. I don't know what happened. And I also cannot get it back.

puleglot
Established Member
Posts: 102
Joined: Thu Jan 23, 2020 3:14 pm

Re: Disable loopback on Audient EVO 4

Post by puleglot »

to1ne wrote:
Mon Apr 20, 2020 4:03 pm
I'm curious where you see this?
In your alsa info. You can confirm that by looking into /proc/asound/EVO4/stream0. You should see 4 playback channels and 4 capture channels.

to1ne
Established Member
Posts: 7
Joined: Wed Feb 12, 2020 8:31 am

Re: Disable loopback on Audient EVO 4

Post by to1ne »

This is what's in there:

Code: Select all

$ cat /proc/asound/EVO4/stream0
Audient EVO4 at usb-0000:3c:00.0-1.2.1.1, high speed : USB Audio

Playback:
  Status: Running
    Interface = 1
    Altset = 1
    Packet Size = 144
    Momentary freq = 44098 Hz (0x5.8320)
    Feedback Format = 16.16
  Interface 1
    Altset 1
    Format: S32_LE
    Channels: 4
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000
    Data packet interval: 125 us
    Bits: 24
  Interface 1
    Altset 2
    Format: S16_LE
    Channels: 4
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000
    Data packet interval: 125 us
    Bits: 16

Capture:
  Status: Running
    Interface = 2
    Altset = 1
    Packet Size = 144
    Momentary freq = 44100 Hz (0x5.8333)
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 4
    Endpoint: 2 IN (ASYNC)
    Rates: 44100, 48000, 88200, 96000
    Data packet interval: 125 us
    Bits: 24
But you're on to something here. I'm not sure what happened, but you are right the "remixing-use-all-sink-channels = no" makes a difference.

When I set that value, the input channel 1 is the left channel of the input, and input the right channel. Loopback audio is gone with that set to "no". So we're getting closer.

So I probably need to reconfigure pulse (or do I do this in alsa?) so:
- separate input channel for input 1, with left and right the same signal
- same for input 2 if possible
- separate input for loopback if that's possible, but that's less of deal breaker

Would that be possible? Can you help me with that?

puleglot
Established Member
Posts: 102
Joined: Thu Jan 23, 2020 3:14 pm

Re: Disable loopback on Audient EVO 4

Post by puleglot »

to1ne wrote:
Tue Apr 21, 2020 7:59 am
Would that be possible? Can you help me with that?
You need to create custom pulseaudio profile:

/etc/udev/rules.d/91-pulseaudio-custom-profiles.rules:

Code: Select all

# Audient EVO4
SUBSYSTEM=="sound",  SUBSYSTEMS=="usb", ACTION=="change", KERNEL=="card*", ENV{ID_VENDOR}=="Audient", ENV{ID_MODEL}=="EVO4", ENV{PULSE_PROFILE_SET}="/etc/pulse/profile-sets/audient-evo4.conf"
/etc/pulse/profile-sets/audient-evo4.conf:

Code: Select all

[General]
auto-profiles = yes


[Mapping analog-mono-1]
description = Analog Mono 1
device-strings = hw:%f
channel-map = mono,aux1,aux1,aux1
paths-input = analog-input-mic
direction = input
priority = 2

[Mapping analog-mono-2]
description = Analog Mono 2
device-strings = hw:%f
channel-map = aux1,mono,aux1,aux1
paths-input = analog-input-mic
direction = input
priority = 1


[Mapping analog-stereo]
description = Analog Stereo
device-strings = front:%f
channel-map = left,right,aux1,aux1
paths-output = analog-output
direction = output
priority = 2

[Mapping analog-stereo-loopback]
description = Analog Stereo loopback
device-strings = front:%f
channel-map = aux1,aux1,left,right
paths-output = analog-output
direction = output
priority = 1


[Profile output:analog-stereo+input:analog-mono-1]
description = Analog Stereo output, Analog Mono input 1
output-mappings = analog-stereo
input-mappings = analog-mono-1
priority = 100
skip-probe = yes

[Profile output:analog-stereo+input:analog-mono-2]
description = Analog Stereo output, Analog Mono input 2
output-mappings = analog-stereo
input-mappings = analog-mono-2
priority = 80
skip-probe = yes

[Profile output:analog-stereo-loopback+input:analog-mono-1]
description = Analog Stereo Loopback output, Analog Mono input 1
output-mappings = analog-stereo-loopback
input-mappings = analog-mono-1
priority = 60
skip-probe = yes

[Profile output:analog-stereo-loopback+input:analog-mono-2]
description = Analog Stereo Loopback output, Analog Mono input 2
output-mappings = analog-stereo-loopback
input-mappings = analog-mono-2
priority = 40
skip-probe = yes
Then run:

sudo udevadm control --reload
sudo udevadm trigger --subsystem-match=sound
pulseaudio --kill

Not sure if I've got channel mapping right. :)

to1ne
Established Member
Posts: 7
Joined: Wed Feb 12, 2020 8:31 am

Re: Disable loopback on Audient EVO 4

Post by to1ne »

puleglot, this is awesome!!!!

I still need to tune the channel mapping because the loopback part is not working (yet). I think loopback audio should be treated as input instead of as output. But I need to play around with it some.
Anyhow this looks really promising and proves I'll be able to do what I want with this audio interface.

I feel I really owe on this! Thank you so much!

puleglot
Established Member
Posts: 102
Joined: Thu Jan 23, 2020 3:14 pm

Re: Disable loopback on Audient EVO 4

Post by puleglot »

So switching between analog-stereo and analog-stereo-loopback doesn't make any difference? You can play with channel-map in analog-mono-1 and analog-mono-2 mappings (e.g. aux1,aux1,mono,aux1 and aux1,aux1,aux1,mono), or create new mappings and profiles to figure out if they work with loopback. I think this is pretty straightforward. :) "aux1" is a "fake" channel here.

to1ne
Established Member
Posts: 7
Joined: Wed Feb 12, 2020 8:31 am

Re: Disable loopback on Audient EVO 4

Post by to1ne »

Thanks, but so far I haven't figured it out yet.

This is what I tried:

Code: Select all

[Mapping analog-both]
description = Analog Both
device-strings = hw:%f
channel-map = mono,mono,aux1,aux1
paths-input = analog-input-mic
direction = input
priority = 1

[Mapping analog-both-loopback]
description = Analog Both + Loopback
device-strings = hw:%f
channel-map = mono,mono,left,right
paths-input = analog-input-mic
direction = input
priority = 2
But that didn't work. I don't fully understand which values are allowed/accepted in the channel-map. So I removed the config files again, and printed the info from pactl list:

Code: Select all

Sink #0
	State: IDLE
	Name: alsa_output.usb-Audient_EVO4-00.analog-surround-40
	Description: EVO4 Analog Surround 4.0
	Driver: module-alsa-card.c
	Sample Specification: s32le 4ch 44100Hz
	Channel Map: front-left,front-right,rear-left,rear-right
	Owner Module: 6
	Mute: no
	Volume: front-left: 58982 /  90% / -2.75 dB,   front-right: 58982 /  90% / -2.75 dB,   rear-left: 58982 /  90% / -2.75 dB,   rear-right: 58982 /  90% / -2.75 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor Source: alsa_output.usb-Audient_EVO4-00.analog-surround-40.monitor
	Latency: 250737 usec, configured 249977 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "32"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "USB Audio"
		alsa.id = "USB Audio"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "1"
		alsa.card_name = "EVO4"
		alsa.long_card_name = "Audient EVO4 at usb-0000:3c:00.0-1.2.1.1, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:3c:00.0-usb-0:1.2.1.1:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1d.0/0000:04:00.0/0000:05:02.0/0000:3c:00.0/usb3/3-1/3-1.2/3-1.2.1/3-1.2.1.1/3-1.2.1.1:1.0/sound/card1"
		udev.id = "usb-Audient_EVO4-00"
		device.bus = "usb"
		device.vendor.id = "2708"
		device.vendor.name = "Audient"
		device.product.id = "0006"
		device.product.name = "EVO4"
		device.serial = "Audient_EVO4"
		device.string = "surround40:1"
		device.buffering.buffer_size = "176384"
		device.buffering.fragment_size = "88192"
		device.access_mode = "mmap"
		device.profile.name = "analog-surround-40"
		device.profile.description = "Analog Surround 4.0"
		device.description = "EVO4 Analog Surround 4.0"
		alsa.mixer_name = "USB Mixer"
		alsa.components = "USB2708:0006"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
	Ports:
		analog-output: Analog Output (priority: 9900)
	Active Port: analog-output
	Formats:
		pcm

Source #0
	State: RUNNING
	Name: alsa_output.usb-Audient_EVO4-00.analog-surround-40.monitor
	Description: Monitor of EVO4 Analog Surround 4.0
	Driver: module-alsa-card.c
	Sample Specification: s32le 4ch 44100Hz
	Channel Map: front-left,front-right,rear-left,rear-right
	Owner Module: 6
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB,   rear-left: 65536 / 100% / 0.00 dB,   rear-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor of Sink: alsa_output.usb-Audient_EVO4-00.analog-surround-40
	Latency: 0 usec, configured 249977 usec
	Flags: DECIBEL_VOLUME LATENCY 
	Properties:
		device.description = "Monitor of EVO4 Analog Surround 4.0"
		device.class = "monitor"
		alsa.card = "1"
		alsa.card_name = "EVO4"
		alsa.long_card_name = "Audient EVO4 at usb-0000:3c:00.0-1.2.1.1, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:3c:00.0-usb-0:1.2.1.1:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1d.0/0000:04:00.0/0000:05:02.0/0000:3c:00.0/usb3/3-1/3-1.2/3-1.2.1/3-1.2.1.1/3-1.2.1.1:1.0/sound/card1"
		udev.id = "usb-Audient_EVO4-00"
		device.bus = "usb"
		device.vendor.id = "2708"
		device.vendor.name = "Audient"
		device.product.id = "0006"
		device.product.name = "EVO4"
		device.serial = "Audient_EVO4"
		device.string = "1"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
	Formats:
		pcm

Source #1
	State: RUNNING
	Name: alsa_input.usb-Audient_EVO4-00.multichannel-input
	Description: EVO4 Multichannel
	Driver: module-alsa-card.c
	Sample Specification: s32le 4ch 44100Hz
	Channel Map: front-left,front-right,rear-left,rear-right
	Owner Module: 6
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB,   rear-left: 65536 / 100% / 0.00 dB,   rear-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor of Sink: n/a
	Latency: 434 usec, configured 249977 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "32"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "USB Audio"
		alsa.id = "USB Audio"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "1"
		alsa.card_name = "EVO4"
		alsa.long_card_name = "Audient EVO4 at usb-0000:3c:00.0-1.2.1.1, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:3c:00.0-usb-0:1.2.1.1:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1d.0/0000:04:00.0/0000:05:02.0/0000:3c:00.0/usb3/3-1/3-1.2/3-1.2.1/3-1.2.1.1/3-1.2.1.1:1.0/sound/card1"
		udev.id = "usb-Audient_EVO4-00"
		device.bus = "usb"
		device.vendor.id = "2708"
		device.vendor.name = "Audient"
		device.product.id = "0006"
		device.product.name = "EVO4"
		device.serial = "Audient_EVO4"
		device.string = "hw:1"
		device.buffering.buffer_size = "176384"
		device.buffering.fragment_size = "88192"
		device.access_mode = "mmap"
		device.profile.name = "multichannel-input"
		device.profile.description = "Multichannel"
		device.description = "EVO4 Multichannel"
		alsa.mixer_name = "USB Mixer"
		alsa.components = "USB2708:0006"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
	Ports:
		multichannel-input: Multichannel Input (priority: 0)
	Active Port: multichannel-input
	Formats:
		pcm

Card #0
	Name: alsa_card.usb-Audient_EVO4-00
	Driver: module-alsa-card.c
	Owner Module: 6
	Properties:
		alsa.card = "1"
		alsa.card_name = "EVO4"
		alsa.long_card_name = "Audient EVO4 at usb-0000:3c:00.0-1.2.1.1, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:3c:00.0-usb-0:1.2.1.1:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1d.0/0000:04:00.0/0000:05:02.0/0000:3c:00.0/usb3/3-1/3-1.2/3-1.2.1/3-1.2.1.1/3-1.2.1.1:1.0/sound/card1"
		udev.id = "usb-Audient_EVO4-00"
		device.bus = "usb"
		device.vendor.id = "2708"
		device.vendor.name = "Audient"
		device.product.id = "0006"
		device.product.name = "EVO4"
		device.serial = "Audient_EVO4"
		device.string = "1"
		device.description = "EVO4"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
	Profiles:
		input:multichannel-input: Multichannel Input (sinks: 0, sources: 1, priority: 1, available: yes)
		output:analog-surround-40: Analog Surround 4.0 Output (sinks: 1, sources: 0, priority: 1200, available: yes)
		output:analog-surround-40+input:multichannel-input: Analog Surround 4.0 Output + Multichannel Input (sinks: 1, sources: 1, priority: 1201, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: output:analog-surround-40+input:multichannel-input
	Ports:
		multichannel-input: Multichannel Input (priority: 0, latency offset: 0 usec)
			Part of profile(s): input:multichannel-input, output:analog-surround-40+input:multichannel-input
		analog-output: Analog Output (priority: 9900, latency offset: 0 usec)
			Part of profile(s): output:analog-surround-40, output:analog-surround-40+input:multichannel-input
I don't get how the loopback gets mixed into the multichannel-input.

puleglot
Established Member
Posts: 102
Joined: Thu Jan 23, 2020 3:14 pm

Re: Disable loopback on Audient EVO 4

Post by puleglot »

@to1ne I'll look into this later, maybe next week. What did you mean when you said that "remixing-use-all-sink-channels = no" makes a difference? What exactly changed?

to1ne
Established Member
Posts: 7
Joined: Wed Feb 12, 2020 8:31 am

Re: Disable loopback on Audient EVO 4

Post by to1ne »

No worries @puleglot, you have helped me a lot already. I've been experimenting, and think I've almost got it:

Code: Select all

[General]
auto-profiles = yes


[Mapping analog-mic-input]
description = Mic
device-strings = hw:%f
channel-map = mono,mono,aux1,aux1
paths-input = analog-input-mic
direction = input
priority = 1

[Mapping analog-multichannel-input]
description = Multichannel
device-strings = hw:%f
channel-map = front-left,front-right,rear-left,rear-right
paths-input = multichannel-input
direction = input
priority = 2


[Mapping analog-stereo]
description = Analog Stereo
device-strings = front:%f
channel-map = left,right,aux1,aux1
paths-output = analog-output
direction = output
priority = 1

[Mapping analog-surround]
description = Analog Surround 4.0
device-strings = front:%f
channel-map = front-left,front-right,rear-left,rear-right
paths-output = analog-output
direction = output
priority = 1


[Profile output:analog-surround+input:analog-mic-input]
description = Analog Surround 4.0 Output + Analog Mic Input
output-mappings = analog-surround
input-mappings = analog-mic-input
priority = 100
skip-probe = yes

[Profile output:analog-surround+input:analog-multichannel-input]
description = Analog Surround 4.0 Output + Multichannel Input
output-mappings = analog-surround
input-mappings = analog-multichannel-input
priority = 60
skip-probe = yes


[Profile output:analog-stereo+input:analog-mic-input]
description = Analog Stereo Output + Analog Mic Input
output-mappings = analog-stereo
input-mappings = analog-mic-input
priority = 100
skip-probe = yes

[Profile output:analog-stereo+input:analog-multichannel-input]
description = Analog Stereo Output + Multichannel Input
output-mappings = analog-stereo
input-mappings = analog-multichannel-input
priority = 60
skip-probe = yes
(I was playing around with Stereo output vs Surround 4.0, but it doesn't seem to make any difference)

I need to do more experimenting, but I haven't had more time.

But I'm running into another issue now. Recording audio (in my case with OBS studio) stutters. I think it depends on the load on my machine, but I cannot reproduce it consistently (closing about every application makes it go away).
What did you mean when you said that "remixing-use-all-sink-channels = no" makes a difference?
As I mentioned it gives hardware input 1 on the left input channel, and input 2 on the right channel, and it removes loopback completely. Not exactly what I want. Well, not all the time, having it as a Pulse profile would be nice. I'll play around some more with the config above to get it done. I'll report back when I'm done.

to1ne
Established Member
Posts: 7
Joined: Wed Feb 12, 2020 8:31 am

Re: Disable loopback on Audient EVO 4

Post by to1ne »

I'm settled with my configuration and wrote a blog post about it: https://writepermission.com/evo4-pulsea ... ofile.html

Thanks for all the help @puleglot!

Post Reply