You are not logged in.
Hi!
I try to keep it short and structured.
Setup:
- Lenovo Notebook
- USB 5.1 soundcard (CM106 Like Sound Device)
- Pipewire with pipwire-pulse etc. (same problem with pulseaudio instead of pipewire)
Working:
- 5.1 Sound
- Setting Balance of 5.1 channels (i.e. reduce bass and center, increase rear)
Problem:
- Volume change destroys channel balance
- In alsamixer there is no master channel for USB soundcard (there is a master channel for the onboard intel soundcard)
How can I change the system volume without changing/destroying the 5.1 channel balance?
Offline
- USB 5.1 soundcard (CM106 Like Sound Device)
I have the same or similar device:
❯ lsusb | grep CM106
Bus 003 Device 013: ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device
In AlsaMixer, I have Master Front, Master Rear, Master Center and Master Woofer. Note that the Master volume by default controls all four levels by default.
Your listed problems make no sense as I have no issues with it at all.
Note that I use PulseAudio and use the following daemon settings:
remixing-produce-lfe = yes
remixing-consume-lfe = yes
lfe-crossover-freq = 80
default-sample-format = s32le
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 6
default-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
Last edited by yochananmarqos (2023-09-07 14:20:40)
Offline
Thanks for your response.
In AlsaMixer, I have Master Front, Master Rear, Master Center and Master Woofer. Note that the Master volume by default controls all four levels by default.
Ok, if I select "default/Pipewire" as soundcard I get the same channels you listed. For USB soundcard they are the same, but without "Master". But that's not the point. As long as you don't want to balance the channels it is perfectly fine. Maybe I didn't explain the problem good enough.
With my old desktop onboard soundcard I had the same channels plus an extra "Master" channel. I reduced the bass and center with the none "Master" channels, because they are to loud. By changing the "Master" channel I could change the overall volume, while retaining the balance (reduced bass and center volume).
As there is no separate "Master" channel, changing the system volume clears the balance I set previously.
Is it somehow possible to get a separate "Master" channel to get the described behavior of my old desktop PC?
Offline
What system volume are you changing where and how? Most USB cards do not expose per channel mixers (which is why you won't see that in alsamixer), that integration is done by pipewire directly and should be properly adjustable granted you are using things to change the volume that correctly integrate with pipewire/pulse's abstraction.
Online
Most USB cards do not expose per channel mixers (which is why you won't see that in alsamixer)
Maybe I'm misunderstanding it. In my case the per channel volume mixers are present. But there is no "Master" channel, as was with my old onboard soundcard. So it is the other way around.
I'm changing the system volume with KDE Plasma Applet, or in KDE System Audio settings or Kmix (here I can select a channel, which should be changed: It would be the not present "Master"). Which tools would you suggest?
The actual channel volume should be "Master"-Gain * Channel-Gain. But without a "Master" its obviously not possible...
Offline
Pipewire/Pulse generally aggregrates these and handles them as a single volume and it's likely that whatever userspace you are using simply flatlines over the balance, you'd not necessarily want a master channel, but a user space tool that honors the balance increments you've set, an alternative would be to hook up a virtual sink that directly passes things on but gives you an independent volume control, like described in: https://gitlab.freedesktop.org/pipewire … rtual-sink . But FWIW instead of speculation, can you post
aplay -lL
amixer -c0 #Replace the 0 with the actual index of the USB card
pactl list sinks
Online
That sounds like what I need.
aplay -lL
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault
Default Audio Device
pipewire
PipeWire Sound Server
default
Default ALSA Output (currently PipeWire Media Server)
sysdefault:CARD=ICUSBAUDIO7D
ICUSBAUDIO7D, USB Audio
Default Audio Device
front:CARD=ICUSBAUDIO7D,DEV=0
ICUSBAUDIO7D, USB Audio
Front output / input
surround21:CARD=ICUSBAUDIO7D,DEV=0
ICUSBAUDIO7D, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=ICUSBAUDIO7D,DEV=0
ICUSBAUDIO7D, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=ICUSBAUDIO7D,DEV=0
ICUSBAUDIO7D, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=ICUSBAUDIO7D,DEV=0
ICUSBAUDIO7D, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=ICUSBAUDIO7D,DEV=0
ICUSBAUDIO7D, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=ICUSBAUDIO7D,DEV=0
ICUSBAUDIO7D, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=ICUSBAUDIO7D,DEV=0
ICUSBAUDIO7D, USB Audio
IEC958 (S/PDIF) Digital Audio Output
sysdefault:CARD=PCH
HDA Intel PCH, ALC257 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC257 Analog
Front output / input
surround21:CARD=PCH,DEV=0
HDA Intel PCH, ALC257 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC257 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC257 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC257 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC257 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC257 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
HDA Intel PCH, SyncMaster
HDMI Audio Output
hdmi:CARD=PCH,DEV=1
HDA Intel PCH, HDMI 1
HDMI Audio Output
hdmi:CARD=PCH,DEV=2
HDA Intel PCH, HDMI 2
HDMI Audio Output
hdmi:CARD=PCH,DEV=3
HDA Intel PCH, HDMI 3
HDMI Audio Output
**** List of PLAYBACK Hardware Devices ****
card 0: ICUSBAUDIO7D [ICUSBAUDIO7D], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC257 Analog [ALC257 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [SyncMaster]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
amixer -c0
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right
Limits: Playback 0 - 197
Mono:
Front Left: Playback 30 [15%] [-31.31dB] [on]
Front Right: Playback 30 [15%] [-31.31dB] [on]
Rear Left: Playback 30 [15%] [-31.31dB] [on]
Rear Right: Playback 30 [15%] [-31.31dB] [on]
Front Center: Playback 30 [15%] [-31.31dB] [on]
Woofer: Playback 30 [15%] [-31.31dB] [on]
Side Left: Playback 30 [15%] [-31.31dB] [on]
Side Right: Playback 30 [15%] [-31.31dB] [on]
Simple mixer control 'PCM',0
Capabilities: cvolume cswitch cswitch-joined
Capture channels: Front Left - Front Right
Limits: Capture 0 - 6928
Front Left: Capture 4096 [59%] [-0.01dB] [on]
Front Right: Capture 4096 [59%] [-0.01dB] [on]
Simple mixer control 'PCM Capture Source',0
Capabilities: enum
Items: 'Mic' 'Line' 'IEC958 In' 'Mixer'
Item0: 'IEC958 In'
Simple mixer control 'Line',0
Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 8065 Capture 0 - 6928
Front Left: Playback 6144 [76%] [-0.01dB] [off] Capture 4096 [59%] [-0.01dB] [on]
Front Right: Playback 6144 [76%] [-0.01dB] [off] Capture 4096 [59%] [-0.01dB] [on]
Simple mixer control 'Mic',0
Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 8065 Capture 0 - 6928
Front Left: Playback 6144 [76%] [-0.01dB] [off] Capture 4096 [59%] [-0.01dB] [on]
Front Right: Playback 6144 [76%] [-0.01dB] [off] Capture 4096 [59%] [-0.01dB] [on]
Simple mixer control 'IEC958 In',0
Capabilities: cswitch cswitch-joined
Capture channels: Mono
Mono: Capture [on]
pactl list sinks
Sink #48
State: SUSPENDED
Name: alsa_output.usb-0d8c_USB_Sound_Device-00.analog-surround-51
Description: CM106 Like Sound Device Analog Surround 5.1
Driver: PipeWire
Sample Specification: s16le 6ch 48000Hz
Channel Map: front-left,front-right,rear-left,rear-right,front-center,lfe
Owner Module: 4294967295
Mute: no
Volume: front-left: 19661 / 30% / -31.37 dB, front-right: 19661 / 30% / -31.37 dB, rear-left: 19661 / 30% / -31.37 dB, rear-right: 19661 / 30% / -31.37 dB, front-center: 19661 / 30% / -31.37 dB, lfe: 19661 / 30% / -31.37 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.usb-0d8c_USB_Sound_Device-00.analog-surround-51.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "0"
alsa.card_name = "ICUSBAUDIO7D"
alsa.class = "generic"
alsa.device = "0"
alsa.driver_name = "snd_usb_audio"
alsa.id = "USB Audio"
alsa.long_card_name = "ICUSBAUDIO7D at usb-0000:00:14.0-4, full speed"
alsa.name = "USB Audio"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "ICUSBAUDIO7D at usb-0000:00:14.0-4, full speed"
api.alsa.card.name = "ICUSBAUDIO7D"
api.alsa.path = "surround51:0"
api.alsa.pcm.card = "0"
api.alsa.pcm.stream = "playback"
audio.channels = "6"
audio.position = "FL,FR,RL,RR,FC,LFE"
card.profile.device = "9"
device.api = "alsa"
device.class = "sound"
device.id = "42"
device.profile.description = "Analog Surround 5.1"
device.profile.name = "analog-surround-51"
device.routes = "1"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "CM106 Like Sound Device"
node.name = "alsa_output.usb-0d8c_USB_Sound_Device-00.analog-surround-51"
node.nick = "ICUSBAUDIO7D"
node.pause-on-idle = "false"
object.path = "alsa:pcm:0:surround51:0:playback"
priority.driver = "1009"
priority.session = "1009"
factory.id = "18"
clock.quantum-limit = "8192"
client.id = "33"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "48"
object.serial = "48"
node.max-latency = "16384/48000"
api.alsa.period-size = "512"
api.alsa.period-num = "64"
api.alsa.headroom = "512"
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "0"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio0"
device.bus = "usb"
device.bus-id = "usb-0d8c_USB_Sound_Device-00"
device.bus_path = "pci-0000:00:14.0-usb-0:4:1.0"
device.enum.api = "udev"
device.icon_name = "audio-card-analog-usb"
device.name = "alsa_card.usb-0d8c_USB_Sound_Device-00"
device.nick = "ICUSBAUDIO7D"
device.plugged.usec = "4194968"
device.product.id = "0x0102"
device.product.name = "CM106 Like Sound Device"
device.serial = "0d8c_USB_Sound_Device"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card0"
device.vendor.id = "0x0d8c"
device.vendor.name = "C-Media Electronics, Inc."
device.string = "0"
Ports:
analog-output-speaker: Speakers (type: Speaker, priority: 10000, availability unknown)
Active Port: analog-output-speaker
Formats:
pcm
Sink #50
State: SUSPENDED
Name: alsa_output.pci-0000_00_1f.3.analog-stereo
Description: Built-in Audio Analog Stereo
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 47186 / 72% / -8.56 dB, front-right: 47186 / 72% / -8.56 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "1"
alsa.card_name = "HDA Intel PCH"
alsa.class = "generic"
alsa.device = "0"
alsa.driver_name = "snd_hda_intel"
alsa.id = "ALC257 Analog"
alsa.long_card_name = "HDA Intel PCH at 0x601d170000 irq 176"
alsa.name = "ALC257 Analog"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "HDA Intel PCH at 0x601d170000 irq 176"
api.alsa.card.name = "HDA Intel PCH"
api.alsa.path = "front:1"
api.alsa.pcm.card = "1"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "7"
device.api = "alsa"
device.class = "sound"
device.id = "43"
device.profile.description = "Analog Stereo"
device.profile.name = "analog-stereo"
device.routes = "2"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "Built-in Audio"
node.name = "alsa_output.pci-0000_00_1f.3.analog-stereo"
node.nick = "ALC257 Analog"
node.pause-on-idle = "false"
object.path = "alsa:pcm:1:front:1:playback"
priority.driver = "1009"
priority.session = "1009"
factory.id = "18"
clock.quantum-limit = "8192"
client.id = "33"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "50"
object.serial = "50"
node.max-latency = "16384/48000"
api.alsa.period-size = "1024"
api.alsa.period-num = "32"
api.alsa.headroom = "0"
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "1"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio1"
device.bus = "pci"
device.bus_path = "pci-0000:00:1f.3"
device.enum.api = "udev"
device.form_factor = "internal"
device.icon_name = "audio-card-analog-pci"
device.name = "alsa_card.pci-0000_00_1f.3"
device.nick = "HDA Intel PCH"
device.plugged.usec = "4350208"
device.product.id = "0x51c8"
device.product.name = "Alder Lake PCH-P High Definition Audio Controller"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card1"
device.vendor.id = "0x8086"
device.vendor.name = "Intel Corporation"
device.string = "1"
Ports:
analog-output-speaker: Speakers (type: Speaker, priority: 10000, availability group: Legacy 3, availability unknown)
analog-output-headphones: Headphones (type: Headphones, priority: 9900, availability group: Legacy 4, not available)
Active Port: analog-output-speaker
Formats:
pcm
Offline
Technically the PCM control you have in alsamixer is akin to the "Master" and should/would generally behave the same, but yeah, pipewire will logically adjust both the single channels you have on the 'Speaker' node as well as 'PCM' and so will most user facing pulse mixers. I'd say easiest is allocating a virtual card that doesn't share volume increments with the bound to sink but keeps them on it's own. Simplest for doing something like that is
pactl load-module module-virtual-sink sink_name='"Master Volume USB"' master=alsa_output.usb-0d8c_USB_Sound_Device-00.analog-surround-51
and then move playback to that in the plasma-pa mixer or similar tools (might have to tick the "show virtual devices" box in the hamburger of plasma's volume mixer)
Last edited by V1del (2023-09-07 02:15:49)
Online
Cool, that works! Thank you so much!
Probably independent of this virtual sink, I have really strange phenomena. The Subwoofer is somehow linked to the right rear channel. With right rear channel muted, there is almost no bass. Increasing right rear channel volume increases both, right read and bass. I have to analyze this tomorrow.
Offline
No idea what you did, but all I can suggest is adapting what I did above with PulseAudio with PipeWire. I did it once, but I think it changed since then. It's in the PipeWire wiki somewhere.
Offline
The pulse settings you refer to will have no effect on this (random side note, if that is your config file as is then all of these settings are comments and not actually enabled/taking effect) . This is a problem of volume adjustments resetting the balance depending on the volume application applying the change. your settings would only ensure that all the channels are available, which isn't the problem here and already the case.
Online
Ah, good catch. I edited my post for posterity.
Offline