Bug 194902 - phonon-xine does not propose alsa dmix output
Summary: phonon-xine does not propose alsa dmix output
Status: RESOLVED UPSTREAM
Alias: None
Product: Phonon
Classification: Frameworks and Libraries
Component: Xine backend (show other bugs)
Version: 4.3.0 (KDE 4.2.0)
Platform: Fedora RPMs Unspecified
: NOR normal
Target Milestone: ---
Assignee: Matthias Kretz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-01 20:18 UTC by kakashizilla
Modified: 2011-01-13 11:22 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kakashizilla 2009-06-01 20:18:22 UTC
Version:           4.3.1 (using KDE 4.2.3)
Installed from:    Fedora RPMs

I'm using the xine-backend without pulseaudio, kde 4.2.3, phonon 4.3.1 on fedora 11.

The problem is the following : phonon only propose for the output "HDA Intel", which is I guess a direct access to the soundcard.

The consequences are that when I start amarok, it blocks the soundcard if no other applications using sound are running, or it plays without sound in the other case.

All my sound applications are configured to use the ALSA output.
The question is : where is the default ALSA output in phonon ?
Comment 1 Marcelo Vivan Borro 2009-07-10 21:57:39 UTC
It was hard to find this bug before posting a duplicate ;-)
I have the same exactly problem described here and in https://bugzilla.redhat.com/show_bug.cgi?id=474259.

Let's try to organize the problem:

*Symptons
KDE 4.2.4 only plays one sound at a time.  No notifications when playing amarok, or using skype.  BUT it's possible to play several sounds at same time using alsaplayer -o alsa -d plug:dmix song.mp3.

*Systems affected
Seems to happen only with hda-intel driver. The problem started when I upgraded my mobo to an Asus M3A78 (previus used usb-audio - M2N-SLI)

*Workaround
I'm using phonon-backend-gstreamer now instead of phonon-backend-xine. With gstreamer backend, the "default" device is available at multimedia configuration and when selected and configured as preferred device, everything runs fine.

*Additional info
I do not have pulse audio on my system.
The "default" device only lists on multimedia configuration when the phonon-backend-gstreamer is used.  When xine backend is used, only the HDAATI SB device is shown wich is the direct device access.  The "default" Alsa device are not shown, then I do not have access to alsa dmix.

Let me know if you need any additional info...
Comment 2 Marcelo Vivan Borro 2009-07-10 22:00:20 UTC
Oops, forget to mention:
I'm running KDE 4.2.4 (latest packages) in a Opensuse 11.1 machine.
Comment 3 kakashizilla 2009-07-22 10:57:41 UTC
I have found this method to add an alsa control (cf.  'http://phonon.kde.org/cms/1032').
Create in your home directory a file .asoundrc :

pcm.softvolPhonon {
    type softvol
    slave.pcm "default:CARD=0"
    control {
        name "Phonon"
        card 0
    }
    min_dB -51.0
    max_dB 0.0
    resolution 100
    hint {
        show on
        description "My Soundcard with extra Volume Control"
    }
}

Open alsamixer and unmute the new channel 'Phonon' until 100.
Open systemsettings->Multimedia and choose the new output (you may need to restart kde to see the new output)
Comment 4 Kevin Kofler 2009-09-12 21:49:53 UTC
Let's make it clear that this issue is with dmix. Phonon-Xine doesn't offer the "dmix" device, nor the "default" device (which is the same as "dmix" on dmix-based setups, but will be the same as "pulse" with the ALSA PulseAudio plugin and can also be an alias for a hardware device in some setups).
Comment 5 Mikko C. 2009-09-23 16:07:41 UTC
same here
Comment 6 LXj 2009-12-24 01:44:46 UTC
Thanks for work around. It works for stereo sound, but now it seems I can't have 5.1 sound from mplayer
Comment 7 Shekhar 2010-04-20 14:38:07 UTC
Comment #3 did not work for me.  I have Dell Inspiron E1705/9400 Laptop.
I am using opensuse 11.2, KDE 4.3.5 release "0".

I have HDA-Intel HD audio (ICH7) (Sigmatel 9200). I do not have pulseaudio installed.

I have two backends for Phonon: GStreamer and Xine

Gstreamer shows "default" device listed under the various devices. Xine does not have "default" device. 

The problem comes when I use xine backend.( I don't want to use gstreamer. It wont let be fast forward on songs in amarok)

As stated by the bug reporter, sound do go through the software mixer and I can control them with PCM slider while using every applications, except KDE system notifications and Amarok. The PCM slider simply do not work in these two. 

Since I have two Front speakers and also one subwoofer underneath, I have Master(front) and LFE(subwoofer) sliders along with my PCM slider in Kmix. I have my master channel set to "PCM" to control the overall volume from my laptop. But since PCM doesnot work in these case I have to manually slide two sliders to lower my volume and raise my volume. This is very annoying.

I can set my master to Front and mute my LFE but that gives me nasty sound. and it is not a good solution.

I have neither /etc/asound.conf nor .asoundrc   (I used to have them in opensuse 10.x)

I created one manually as mentioned before (comment #3), it adds one device but there is no difference. I still cannot control my PCM slider. 

Is there any workaround??? I will provide more information if needed.
Comment 8 Shekhar 2010-04-20 16:22:08 UTC
I am sorry. But that did work after 2nd try and 3rd restart. I dont know why though. I get two more sliders (Phonon and Phonon(capture)). The "Phonone" cannot be moved by itself. When I slide "Phone(capture)" up, it moves the "Phonon" slider along with it. The pcm slider controls the volume now. At last after more than 100 tries. sigh.

Well guys, I have not teseted it with skype though. Will knock again if I find something wrong.
Comment 9 Myriam Schweingruber 2010-05-09 17:34:39 UTC
Can somebody please test if this is still valid with the latest KDE SC 4.4.3 and/or Phonon 4.4.1, please?
Comment 10 LXj 2010-05-10 22:01:48 UTC
Yes, I still have this problem if I don't use a workaround from #3

And if I do use it, I don't have 5.1 sound
Comment 11 Myriam Schweingruber 2010-05-11 11:08:01 UTC
Can somebody please test if this is still valid with the latest KDE SC 4.4.3 and/or Phonon 4.4.1, please?
Comment 12 kakashizilla 2010-05-18 10:52:05 UTC
Hello,

I have just upgraded to KDE 4.4.3 and phonon 4.4.1.
I have deleted my modifications from comment #3, created a new user to test this version, and rebooted.
Result : 1) this bug is still valid;
         2) workaround in comment #3 still works.
Comment 13 Alexander 2010-08-08 11:25:09 UTC
I have these two devices in /etc/asound.conf:
pcm.dmix6ch {
    type dmix
    ipc_key 1024
    ipc_key_add_uid 1
    slave {
        pcm "hw:0,0"
        channels 6
        period_time 0
        buffer_size 4092
        period_size 1024
        rate 48000
    }
}

pcm.plugdmix6ch {
    type plug
    slave {
        pcm "dmix6ch"
        channels 6
        rate 48000
    }
}

And I need to reroute all of my system and applications sounds through plugdmix6ch, which allows me to listen the 5.1 surround concurrently with the simply stereo, without blocking the sound device. This is a workaround to which I pointed here https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4961

The problem is that I have not see anything about dmix6ch/plugdmix6ch in the system settings.
Comment 14 Martin Sandsmark 2010-08-08 13:11:01 UTC
Alexander, please set a name hint for your devices.

http://userbase.kde.org/Phonon#Devices_from_.7E.2F.asoundrc_or_.2Fetc.2Fasound.conf_are_not_listed
Comment 15 Alexander 2010-08-08 13:53:18 UTC
This helps, thank you.
Comment 16 Myriam Schweingruber 2010-11-16 09:36:16 UTC
This is most likely  problem with libxine, please report this to the xine-project bugtracker upstream.
Comment 17 Jean-Noel Rivasseau 2011-01-13 11:22:47 UTC
Opened upstream:

https://bugs.xine-project.org/show_bug.cgi?id=401