alsa-ucm-conf
alsa-ucm-conf copied to clipboard
ucm2: HDA: Use Master volume control for dual speakers
This PR extends the existing 'activate Bass Speaker' case with additional configuration
- Use Master mixer for volume control (instead of only using Speaker)
- Configure Speaker Volume and Bass Speaker volume to max since Master volume regulation is used
It fixes a case where only the first speaker volume is changed using the system volume control.
Alternative solution suggestions are also appreciated.
Bump, is it feasible to get this included or is an alternative way preferred?
Is there any update on this when this will be merged?
This does not work on my Tuxedo Sirius 16 Gen1 under NixOS. I applied this patch using the ALSA_CONFIG_UCM2 environment variable like described here (and have a patched kernel with this) but with the patch from this PR sound just disappears entirely. If there is anything I can provide for troubleshooting, I will do so.
@Prunkles
This does not work on my Tuxedo Sirius 16 Gen1 under NixOS. I applied this patch using the ALSA_CONFIG_UCM2 environment variable like described here (and have a patched kernel with this) but with the patch from this PR sound just disappears entirely. If there is anything I can provide for troubleshooting, I will do so.
- Check that alsamixer provides two volume knobs, that is "Bass speakers" in addition to the normal speakers entry for codec "Conexant CX11970" (probably
alsamixer -c 2
), and that the volume knobs regulate the sound of the individual speakers. - Providing the speaker knobs are there and works, this PR means to set both at max, and using the system volume control should regulate the master volume knob seen in alsamixer while the two speaker knobs stay at max.
If (1) doesn't work the kernel patch did not apply. If (2) doesn't work this ucm2 config change didn't apply.
Could you both attach output from amixer -c sofhdadsp contents
command? If this command does not work, replace sofhdadsp
string with card number. Thanks.
Could you both attach output from
amixer -c sofhdadsp contents
command? If this command does not work, replacesofhdadsp
string with card number. Thanks.
Here's from the devices of the original issue. Both use same card and double speaker pairs (sides+top speaker combo in a laptop for context).
amixer-contents-sirius-gen1.txt amixer-contents-sirius-gen2.txt
@perexg I actually didn't mention that there is no sound anyway on system startup, until I restart wireplumber and pipewire.
Without this patch, right after the system is started (no sound): amixer_no-ucm-patch_pre-pw-retart.out.txt Without this patch, after pipewire/wireplumber are restarted (is sound): amixer_no-ucm-patch_post-pw-restart.out.txt With this patch, right after the system is started (no sound): amixer_ucm-patch_pre-pw-restart.out.txt With this patch, after pipewire/wireplumber are restarted (no sound) (the output is the same by the way): amixer_ucm-patch_post-pw-retart.out.txt
So I guess it may be a pipewire/wireplumber issue, but I am not sure how to deal with it either
@Prunkles
This does not work on my Tuxedo Sirius 16 Gen1 under NixOS. I applied this patch using the ALSA_CONFIG_UCM2 environment variable like described here (and have a patched kernel with this) but with the patch from this PR sound just disappears entirely. If there is anything I can provide for troubleshooting, I will do so.
1. Check that alsamixer provides two volume knobs, that is "Bass speakers" in addition to the normal speakers entry for codec "Conexant CX11970" (probably `alsamixer -c 2`), and that the volume knobs regulate the sound of the individual speakers. 2. Providing the speaker knobs are there and works, this PR means to set both at max, and using the system volume control should regulate the master volume knob seen in alsamixer while the two speaker knobs stay at max.
If (1) doesn't work the kernel patch did not apply. If (2) doesn't work this ucm2 config change didn't apply.
There is the "Bass speakers" knob: with or without this PR, 100%-ed, but it doesn't do anything.
There is the "Bass speakers" knob: with or without this PR, 100%-ed, but it doesn't do anything.
For you it sounds like there's a problem unrelated to this PR then to solve first. To debug. Be sure to turn the other speaker off to hear any difference with the "bass speaker" knob. And of course make sure that it's not muted.
@tuxedoxt
For you it sounds like there's a problem unrelated to this PR then to solve first. To debug. Be sure to turn the other speaker off to hear any difference with the "bass speaker" knob. And of course make sure that it's not muted.
Ooh I see. I didn't know you can mute stuff in alsamixer. It solves the entire system mute, but "Bass speakers" still doesn't affect anything
The thing is, I actually once managed to make bass speakers work a long time ago, when I installed the patched tuxedo kernel. And I was able to change volumes of bass and side speakers separately in alsamixer, but when I changed the master knob the other two were changing in a strange manner, so I guess this PR is addressed to exactly this issue. But when I once tried to plug in and then out headphones, bass speakers stopped to work, and even reboot didn't help. I'm still trying to understand why it stopped working entirely, but I think this is beyond the scope of this PR
Those controls exist in all alsa-info dumps:
numid=3,iface=MIXER,name='Speaker Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=74,step=0
: values=74,74
| dBscale-min=-74.00dB,step=1.00dB,mute=0
numid=5,iface=MIXER,name='Bass Speaker Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=74,step=0
: values=74,74
| dBscale-min=-74.00dB,step=1.00dB,mute=0
I don't like the master volume misuse solution because it may affect also different use-cases (like separate output from Headphones) in future. The goal may be to create a "virtual" control using alsa-lib which maps the Speaker Volume
to Bass Speaker Volume
. The question is if 1:1 mapping is sufficient to make the implementation easier for the first code shot. Is 1:1 mapping okay or we need to deal with a more complex mapping (level shifting etc.)?