Page 1 of 2

BUG in MixerToolBar with two soundcards?

Permanent link to this postPosted: Tue Nov 28, 2017 5:16 pm
Posted by AudioHerbert
Hi,

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.

(using Audacity 2.2.0)

Re: BUG in MixerToolBar with two soundcards?

Permanent link to this postPosted: Tue Nov 28, 2017 5:21 pm
Posted by steve
What are the two devices?
Why have you disabled PulseAudio?
Which version of Audacity?
Which version of Debian?

Re: BUG in MixerToolBar with two soundcards?

Permanent link to this postPosted: Tue Nov 28, 2017 6:17 pm
Posted by AudioHerbert
steve wrote:What are the two devices?
Why have you disabled PulseAudio?
Which version of Audacity?
Which version of Debian?


HDA Intel: ALC662 rev1 Analog (hw:0,0)
Sound Fusion CS46xx: - (hw:1,0)

Ubuntu 16.04.3 LTS

Audacity 2.1.2
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)

Re: BUG in MixerToolBar with two soundcards?

Permanent link to this postPosted: Wed Nov 29, 2017 6:28 pm
Posted by steve
Sounds like the two sound cards are conflicting with each other, Why not remove / disable one and just use whichever is the better of the two?

Re: BUG in MixerToolBar with two soundcards?

Permanent link to this postPosted: Wed Nov 29, 2017 7:33 pm
Posted by AudioHerbert
steve wrote:Sounds like the two sound cards are conflicting with each other, Why not remove / disable one and just use whichever is the better of the two?

Too easy ;-)
I'm, reading Audacity source code right now...

I wonder if anyone else has two soundcards and MixerToolBar is working?
Then it would be my setup, and not a bug...

Re: BUG in MixerToolBar with two soundcards?

Permanent link to this postPosted: Wed Nov 29, 2017 8:00 pm
Posted by steve
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)

Re: BUG in MixerToolBar with two soundcards?

Permanent link to this postPosted: Wed Nov 29, 2017 8:04 pm
Posted by AudioHerbert
Ok, i thought it would control the volume of the selected device.
So let's take this as a feature request then :)

Re: BUG in MixerToolBar with two soundcards?

Permanent link to this postPosted: Wed Nov 29, 2017 8:26 pm
Posted by steve
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.

Re: BUG in MixerToolBar with two soundcards?

Permanent link to this postPosted: Fri Dec 01, 2017 6:57 pm
Posted by AudioHerbert
I don't know Jack, or other platforms, they could stay as they are ;)

I found out it was a Portaudio bug that is fixed in stable.
PaAlsa_GetStreamOutputCard() did always set card=0

File: audacity-minsrc-2.2.0/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c
I just copied the functions PaAlsa_GetStreamInputCard and PaAlsa_GetStreamOutputCard from stable.

Now the MixerToolBar uses the PCM of the selected card.

Re: BUG in MixerToolBar with two soundcards?

Permanent link to this postPosted: Fri Dec 01, 2017 7:23 pm
Posted by steve
AudioHerbert wrote:I just copied the functions PaAlsa_GetStreamInputCard and PaAlsa_GetStreamOutputCard from stable.

Now the MixerToolBar uses the PCM of the selected card.

Fancy that :shock: I assumed it was supposed to be like that :mrgreen:

Can you post a link to where you discovered that? I'm aware that one of the Audacity developers is intending to fix some issues with Pulse, so this could be highly relevant.