Bug 255310 - phonon-vlc doesn't work with multiple soundcards
Summary: phonon-vlc doesn't work with multiple soundcards
Status: RESOLVED FIXED
Alias: None
Product: phonon-backend-vlc
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 0.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
: 282232 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-26 14:00 UTC by Timo Gurr
Modified: 2012-06-03 20:15 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.6


Attachments
Log of phonon-vlc (23.19 KB, text/x-log)
2011-08-14 03:22 UTC, Simon Yuan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Gurr 2010-10-26 14:00:48 UTC
Version:           4.4.2 (KDE 4.5) (using KDE 4.5.2) 
OS:                Linux

After plugging in usb speakers (Logitech S-150) they show up in alsamixer, KMix and the Phonon kcm in systemsettings. I can move them up in the priority list and it works just fine with the xine backend, also unplugging and re-plugging is recognised.
Switching over to the vlc backend however doesn't output any sound on the 2nd device (the usb speakers) and there seems to be no way to make it work and behave just like with the xine backend.

I also found another bugreport about this issue at the debian bugzilla:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590424

Reproducible: Always

Steps to Reproduce:
1. choose the vlc backend in phonon kcm
2. plug in the usb speakers
3. move them up in the priority list in phonon kcm

Actual Results:  
No sound output on the external speakers (2nd sound device, but first one on the phonon priority list)

Expected Results:  
Sound output on the external speakers and same (working) behaviour like with the xine backend

Phonon VLC Backend Version: 0.2.0
Linux Kernel: 2.6.36

lsusb:
Bus 008 Device 003: ID 1130:1620 Tenx Technology, Inc.

alsa info:
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: AD198x Digital [AD198x Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: default [USB  AUDIO  ], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Comment 1 Timo Gurr 2010-10-26 14:09:30 UTC
I forgot to mention that I'm using plain ALSA, no pulseaudio or jack involved.
Comment 2 Harald Sitter 2011-03-31 10:54:07 UTC
Howdy, it would be super cool if you could get us some logs: http://techbase.kde.org/Development/Tutorials/Debugging/Phonon

thanks
Comment 3 Myriam Schweingruber 2011-04-27 21:33:24 UTC
Reassigning to the new bugzilla product for better bug tracing of the various
backends. Sorry for the noise.
Comment 4 Myriam Schweingruber 2011-04-29 00:18:40 UTC
Any news on this?
Comment 5 Simon Yuan 2011-08-14 03:22:12 UTC
Created attachment 62817 [details]
Log of phonon-vlc
Comment 6 Simon Yuan 2011-08-14 03:23:25 UTC
This problem is still reproducible on Arch Linux using KDE SC 4.7.0 and
phonon-vlc 0.4.1 with vlc 1.1.11.

I plugged in a Logitech USB headset, it gets listed and set as the preferred
device at the top in phonon settings, but sound still comes out of the speaker
and no sound from the headset. Change to the gstreamer backend and repeat the
same test worked perfectly.

I've set PHONON_DEBUG=5 and PHONON_VLC_DEBUG=5 and attached the log, but I
don't think the log contains any useful information.
Comment 7 Myriam Schweingruber 2011-08-14 22:04:40 UTC
Thank you for the feedback.
Comment 8 Harald Sitter 2011-09-04 13:29:05 UTC
This might have been fixed in a recent change to the device selection system.

It would be very cool if you could try phonon-vlc git master (depends on phonon git master) and see if it fixes this issue.

TIA
Comment 9 Simon Yuan 2011-12-31 02:05:54 UTC
Sorry for the late reply. I've not had the time try the git master branch. However, since KDE SC 4.8 RC1 came out, that gave me the chance to installed the compiled packages provided by my distro. Unfortunately, the exact same problem is still there. It is still only a phonon-vlc problem, phonon-gstreamer works fine.
Comment 10 Simon Yuan 2011-12-31 02:10:17 UTC
(In reply to comment #9)
> Sorry for the late reply. I've not had the time try the git master branch.
> However, since KDE SC 4.8 RC1 came out, that gave me the chance to installed
> the compiled packages provided by my distro. Unfortunately, the exact same
> problem is still there. It is still only a phonon-vlc problem, phonon-gstreamer
> works fine.

Arg! My mistake, I thought a newer version of phonon-vlc would come with KDE SC 4.8, but no. I was still using phonon-vlc-0.4.1, of course it behaved the same. Hopefully I can find some time try the git master version.
Comment 11 Harald Sitter 2012-02-12 15:10:05 UTC
any news?
Comment 12 Simon Yuan 2012-02-12 18:25:31 UTC
Unfortunately, Arch Linux is still using phonon-vlc-0.4.1. I will test it as soon as a new version is out.
Comment 13 Simon Yuan 2012-02-18 01:28:57 UTC
I have just tested phonon-vlc-0.5.0. It still has the same problem.
Comment 14 Myriam Schweingruber 2012-02-18 22:10:46 UTC
Thank you for the feedback.
Comment 15 Casian Andrei 2012-03-01 14:00:01 UTC
I modified the way Phonon-VLC tries to set an audio output device. This might fix this bug, because before these changes, it didn't know anything about devices discovered by KDE so it ignored them. Meanwhile, due to technical reasons, it reported success on changing the device, even if that was about to fail, so Phonon didn't know something was wrong. Phonon-VLC then used the default device for playback.

This would not have happened if the Phonon-VLC implementation of the AudioOutput interface would have been more up to date.

Now Phonon-VLC should be able to handle devices that were discovered by KDE.

I hope I didn't break anything by trying to fix this :-s
Comment 16 Andreas Hartmetz 2012-03-03 13:55:03 UTC
Worksforme!
A couple of months ago I contributed to this by performing some cleanups and writing the VLC device selection calls in a way that could possibly work, but gave up when I had to deal with Phonon's internal device list (a hard problem for me).
I'm happy that you took the time to fix this for good.
Also I will buy you a beer if you come to the next Akademy.
Comment 17 Andreas Hartmetz 2012-03-03 15:13:32 UTC
*** Bug 282232 has been marked as a duplicate of this bug. ***
Comment 18 Casian Andrei 2012-03-03 20:41:16 UTC
(In reply to comment #16)
> Worksforme!
> A couple of months ago I contributed to this by performing some cleanups and
> writing the VLC device selection calls in a way that could possibly work,
> but gave up when I had to deal with Phonon's internal device list (a hard
> problem for me).
> I'm happy that you took the time to fix this for good.
> Also I will buy you a beer if you come to the next Akademy.

Yaay thanks! :D
Comment 19 Simon Yuan 2012-05-19 07:08:20 UTC
The bug indeed appears to have been fixed.

I'm a bit confused. My phonon-vlc-0.5 is still from February, what exactly has been patched?
Comment 20 Casian Andrei 2012-05-19 08:35:46 UTC
I think it was this commit:
https://projects.kde.org/projects/kdesupport/phonon/phonon-vlc/repository/revisions/bd470070e8e6a1a9b526d2c13ec458caa164c5d0

Changes to src/audio/audiooutput.{h,cpp}

Date 29 Feb.

But I don't know how to change the status of the bug :P. Help?