Bug 250281 - KMix does not use the "default/Fallback" PulseAudio sink as it's "Global Master" (thus controls the wrong device via keyboard/laptop buttons)
Summary: KMix does not use the "default/Fallback" PulseAudio sink as it's "Global Mast...
Status: RESOLVED DUPLICATE of bug 181652
Alias: None
Product: kmix
Classification: Applications
Component: Backend: Pulseaudio (show other bugs)
Version: 3.7
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Colin Guthrie
URL:
Keywords:
: 251258 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-09-05 15:59 UTC by RussianNeuroMancer
Modified: 2012-11-11 10:43 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RussianNeuroMancer 2010-09-05 15:59:11 UTC
Version:           3.7 (using KDE 4.5.0) 
OS:                Linux

Change volume in KMix not change system volume. Disable volume in KMix not disable sound in system.
I can change system volume only when I use PulseAudio volume control (pavucontrol).

Reproducible: Always
Comment 1 Colin Guthrie 2010-09-05 16:31:31 UTC
Which version of kmix is used in this distro?

Does it present four fixed tabs as per the screenshots here: http://pulseaudio.org/wiki/KDE#KMix

If it does look like this, can you be more specific on the problem as kmix in PA mode should behave pretty much identically to pavucontrol.

If it doesn't look like this, please contact your distro to ensure it is compiled/included. I have made available patches to ensure that this mode is enabled for older versions of kmix too.
Comment 2 RussianNeuroMancer 2010-09-05 16:40:40 UTC
Yes, it's have fixed tabs.

Sorry, look like I report this bug by mistake. I try to change volume using volume buttons on laptop - in KDE environment this buttons change volume of main channel, what selected in KMix. But there is another bug - I have HDMI and analog output. KMix selected HDMI by default. I try to select main channel by hands, but after reboot KMix again select HDMI by default. When I try to use volume buttons - KMix change volume of HDMI, but not of Analog. Here I think there is a problem PulseAudio and KMix communication.

Okay, there is a no problems with PulseAudio back-end, but for some reasons KMix selected HDMI as main channel after reboot. It's KMix, PulseAudio or Phonon bug?
Comment 3 Colin Guthrie 2010-09-05 16:49:18 UTC
I'll have to look at the code, but I thought I'd made kmix behave correctly with regards to setting it's "Master" channel according to the "Default/Fallback" device in PA, but there were a few tricky interactions and feedback loops with that approach so I'm not 100% sure it's working perfectly. I'll probably take the updated version Christian worked on for a spin soon and see if I can fix the remaining niggles like this.
Comment 4 RussianNeuroMancer 2010-09-05 22:04:25 UTC
Also please look at another "master channel" issue.

For example Analog output selected. You press hardware volume buttons on laptop or change volume using tray icon - volume of analog output changed, everything is fine.
If you select digital output as main channel in KMix, you get this result: change volume using hardware buttons is work as expected, but if you click to KMix tray icon, you will see Analog output volume slider.
Comment 5 Colin Guthrie 2010-09-15 10:15:33 UTC
*** Bug 251258 has been marked as a duplicate of this bug. ***
Comment 6 Oliver Henshaw 2010-12-18 22:17:22 UTC
I tested a nightly compose of the F15/rawhide kde spin and see that phonon now correctly prefers the internal audio device to the hdmi output (from the amd integrated graphics). But the kmix master channel is still the hdmi output.

phonon-4.4.3-2.fc15.i686
pulseaudio-0.9.22-1.fc15.i686
kdemultimedia-4.5.85-1.fc15.i686
Comment 7 Colin Guthrie 2010-12-19 01:18:12 UTC
Yeah this is still an issue at the moment (certainly I've not fixed it personally). There was an issue with this before, that made it complicated, but I can't remember what it is off the top of my head :s Hopefully I'll get around to fixing this properly soon.
Comment 8 RussianNeuroMancer 2011-05-01 06:56:30 UTC
Looks like KMix didn't save selected main channel to kmixrc configuration file.
Comment 9 Alan Aversa 2012-06-24 02:21:16 UTC
Yes, I had the same issue. I simply switched the primary channel from master to another and back to master. Then the audio through master finally worked!
Comment 10 Ralf Jung 2012-09-13 18:31:39 UTC
I can confirm the issue. It is easy to reproduce on my system, which has an intel chipset and graphics card with analog and HDMI output. PA shows a single "Built-in Audio device".

- Start pavucontrol
- Make sure the current output profile (in the configuration tab) is "Analog Stereo Duplex" and kmix correctly configures this channel
- Now change the profile to some HDMI profile
- Observation: The KMix icon in the systray changes to the icon shown for unknown files (as if the icon loader failed to load it?), and the +/- volume keys have no effect. The playback devices show a single device, changing volume here works fine.
- In KMix choose settings - select master channel. One device is presented ("Built-in HDMI..."), but no radio button is selected
- Select the only device
- Now the systray icon is correct again, and the +/- volume keys work

The same happens when changing the profile back to "Analog Stereo Duplex".
Comment 11 Christian Esken 2012-11-10 15:24:08 UTC
If anything, KMix should follow Phonon, not Pulseaudio. Because PA might not even be in use. Marking as duplicate.

*** This bug has been marked as a duplicate of bug 181652 ***
Comment 12 Ralf Jung 2012-11-10 15:58:49 UTC
Well, currently it follows PA's default channel after a restart, so something in KWin is already doing it right - it just doesn't notice PA changing the default output while KWin is running.
When I asked about that a year ago or so, I was told that having PA running, but not being used by Phonon, was not a supported usecase.
Comment 13 Christian Esken 2012-11-10 16:13:28 UTC
To get things straight: Master selection is always done manually by the user. It does not matter if you use Pulseaudio or not. Thus the whole discussion is moot - unless automatic master selection is implemented, the behaviour you described is expected, and not even a bug.

Phonon is the KDE sound abstraction layer, so KMix should follow Phonon if anything. Thus please follow bug 181652.
Comment 14 Colin Guthrie 2012-11-11 10:43:22 UTC
Yeah the concept of "default" or "master" is somewhat blurred these days and IMO should be fully automatic in most cases (or at least have an "Auto" tickbox before allowing manual overrides.

The reason I say this is due to the fact that Phonon has multiple categories. The "Default" category makes sense in most cases but what if you have Amarok (Music) playing some tunes? Your "Default" device might not be your "Music" device, so should the media keys on your keyboard control the Default device or the Music device in this case? I'd personally suggest that it should control your Music device.

Sadly Phonon has no API to enumerate streams and which devices are actively playing to allow kmix to make such decisions, so while I would agree in principle that the "phonon settings" should be used, it's likely far more practical to get said setting directly from PA (as with "Phonon settings" are actually just pushed to PA with this kind of setup anyway).

Now we're hoping that (eventually) we'll be able to redo the whole routing system in PA thanks to help from some Intel folks using it for IVI purposes. With this in place I think it would be the right time to get this bit of kmix fixed up.