Have to select audio settings twice for pulseaudio

Bug #1333466 reported by Owen Williams
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Low
Daniel Schürmann

Bug Description

If I select pulseaudio as my output option, and pulseaudio wasn't running at startup, the following happens:

* I select the "pulse" device, and hit apply
* I get an alert that the configuration has changed and I need to reselect
* I select pulse again, and hit apply again
* it works.

I think what is happening is that the first time I hit apply, the pulse device is actually created, and then when mixxx goes to configure it, something has changed because now pulse is running. The clue is that the list of available devices is different between my first and second selections of pulseaudio -- first it's the full list (because pulse isn't running) and then it's a partial list (minus the device that pulse has claimed)

Owen Williams (ywwg)
Changed in mixxx:
importance: Undecided → Low
Changed in mixxx:
status: New → In Progress
assignee: nobody → Daniel Schürmann (daschuer)
milestone: none → 1.12.0
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Should be fixed with:
https://github.com/mixxxdj/mixxx/pull/770

However, we have still a general issue with pasuspender.
I think we should remove it from our desktop link and move its invocation to the Mixxx source.
It would be best if we had a preference option for it.
Maybe we should add a starting script, that reads the preference option or something.

Revision history for this message
Owen Williams (ywwg) wrote :

Modern versions of pulseaudio don't hold on to the sound card, so pasuspender might not be needed at all any more. If I start mixxx without pasuspender, as long as another application hasn't used the sound card within the timeout period (30 secs?) I can set up my hardware with no problem. If pulseaudio has grabbed the soundcard, I just have to wait a little, then push "Query Devices" and then I can set it up. Perhaps we could pop up a warning when devices are enumerated if pulseaudio is grabbing a device -- or perhaps list which devices are grabbed. Then we could tell the user to quit other apps that are using the soundcard or call pasuspender manually.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

It looks like PA is not able to enumerate used devices.
Pa_Initialize() enumerates only the number of available devices so Pa_GetDeviceCount () is the number of available devices.

Revision history for this message
Owen Williams (ywwg) wrote :

In that case, can we query pulseaudio to see if it is active? Also please specify if you mean portaudio or pulseaudio

Revision history for this message
Daniel Schürmann (daschuer) wrote :

In #3 I refer to portaudio functions.

Probably yes, we could query Pulse, and we can introduce some of the source of pasuspender to Mixxx.
I think we may load the libs dynamicly to avoid that Mixxx requires Pulse.

Currently Mixxx uses Pulse as a generic ALSA soundcard. This means we have Mixxx -> ALSA -> Pulse -> ALSA, which is also suboptimal.

We may add a sounddevicepulse to fix that.

Unfortunately Pulseaudio and its config tools are somehow hard to setup fully working Mixxx setup.
Pulse supports an application (client) to Soundcard routing, using pavucontrol, but this is to infexible to be a neat solution.
Mixxx may register more than one pulse client to get around this

An other somhow neat integration with pulse may work like that:

If we could manage to setup the alsa-loopback device.
> modprobe snd-aloop

Instead of suspend pulse, we may redirect it to this new "Loopback PCM" device

This allows to Mixxx the Pulse system sound via an Aux Input in Mixxx.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Related Bug #1414456

Revision history for this message
Owen Williams (ywwg) wrote :

I don't think we have to support Pulseaudio. It would be enough to ask "is pulseaudio running, and has it grabbed a soundcard?" And *maybe* try to figure out which card it grabbed. Then we can alert the user and make suggestions for them like closing other applications playing audio.

Changed in mixxx:
status: In Progress → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/7517

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.