i got two sound cards (internal hw:0,0 and pci hw:1,0)
when i select hw:1,0 as playback (toolbar) and use the playback volume slider (toolbar), nothing happens.
i disabled pulseaudio, so just using ALSA.
with alsamixer i can see the PCM volume of hw:0,0 (internal onboard) is used instead, no matter what i select as output
playback does work, just the volume slider controls only the first card.
Audacity 2.2.0 (compiled by myself)
Enabling/Disabling PA doesn’t make a difference: in pavucontrol the same happens, MixerToolBar slider just changes volume of first card.
when loading the snd_cs46xx first and snd_hda_intel second, MTB slider uses snd_cs46xx
and i don’t have a /etc/asound.conf (tried to set defaults there too, no change)
It’s neither a bug or your set up. The playback level slider doesn’t really do anything - it’s just an alias for the primary sound card main output level control. It’s a convenience for many users that either have just one sound card, or only use the primary device. It’s no substitute for a full featured audio device mixer, but then most operating systems provide one of those anyway (for example, pavucontrol)
That could be pretty tough to achieve reliably and cross-platform.
How would you deal (for example) with Jack Audio System? I don’t think that Jack tells the application what device it is connected to.
What about PulseAudio? In this case the selected device as far as Audacity is concerned is PulseAudio, but if Audacity uses the “virtual” sound card output level provided by Pulse, and the volume is turned down on the “real” sound card, then there is no way that Audacity can turn up the level on the real (physical) device.
Personally, if I were writing Audacity from scratch, I’d not bother having either the of the device toolbar sliders, because computer sound systems have become so much more complex over the past 18 years that having just one slider for input and one for output will hardly ever be enough, 18 years ago when the first version of Audacity was written, sound systems were generally very much simpler things.
I started from audacity-minsrc-2.2.0/src/toolbars/MixerToolBar.cpp and went backwards in the code to portmixer, which uses portaudio functions
so i landed here audacity-minsrc-2.2.0/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c
I put some code together to test pulsemixer/pulseaudio from the examples and found out that it is fixed in stable PortAudio
And because the latest PortAudio doesn’t work with Audacity i compared it with stable portaudio and found the difference…