I configured vlc to use oss. Works great. But not with phonon-vlc - it wants to load alsa. I watched the strace-output, and discovered it would like to load "~/.config/Phonon/vlc.conf". I copied over my vlcrc (renamed to vlc.conf, of course), but that still does not work; vlc tries to load alsa, which fails as there are no devices. I am using vlc-2.0.1. Problem exists with phonon-4.6.0, phonon-vlc-0.5.0 and phonon-vlc-git. Reproducible: Always
Phonon has its own sound settings. To get OSS to show there you'll need to entirely disable PulseAudio.
I don't even have pulseaudio installed. I now started with a completely fresh user. Setup phonon to use vlc-backend, logout, login, test sound -> vlc still wants to take alsa. Where should I look at?
systemsettings
:D Where? I only can chose the backend and the devices - but none of the devices listed are working: * Default * Discard all samples (playback) or generate zero samples (capture) Is there some hidden button for extended configuration, where I can explicitly say "oss, please!"?
might be that you have to remove the kde platform plugin for phonon, that most likely takes preference over the backend dependent listing. QList<QByteArray> knownSoundSystems; knownSoundSystems << "alsa" << "oss";
Tried different things: I installed vlc without alsa-support -> device list is empty. I renamed /usr/lib64/kde4/plugins/phonon_platform -> I get back a default-device - which uses phonon-gstreamer instead of vlc, although vlc is selected as preferred backend. So I uninstalled phonon-gstreamer, leaving an empty device list :( I also tried with most recent vlc from git, without success. I am using oss4 (also latest mercurial), linux-3.4.0 (with gentoo-patchset) if that matters.
Seems as if vlc does not like to be started with --aout==dummy, when running with oss. I removed the line in libvlc.cpp, and I get sound :D But still the devices list in systemsettings is empty.
simple test-programm: #include <iostream> #include <vlc/vlc.h> #include <cstdio> using namespace std; int main() { libvlc_instance_t* libvlc = libvlc_new(0,0); libvlc_audio_output_t *first = libvlc_audio_output_list_get(libvlc); for( libvlc_audio_output_t *aout = first; aout; aout = aout->p_next) { char const* ss_nm = aout->psz_name; const int dev_cnt = libvlc_audio_output_device_count(libvlc, ss_nm); cout << ss_nm << " offers devices: " << dev_cnt << endl; } libvlc_audio_output_list_release(first); } output (I reenabled alsa in vlc): alsa offers devices: 2 oss offers devices: 0 aout_file offers devices: 0 adummy offers devices: 0 amem offers devices: 0 So this is eather a problem in vlc, or in oss4.
I reported this upstream: https://trac.videolan.org/vlc/ticket/6900
Created attachment 71529 [details] Add a Default OSS-Device manually Upstream says, that device_count of 0 is valid. So populating the devices by device_count won't work (at least for oss, JACK, Pulse). The patch attached adds an OSS-Device manually. I hardcoded idName and longName to "/dev/dsp" and "Default OSS", because I don't know the vlc-API and if there is a function to determine if the user configured to use something else. But another problem remains: I need to compile vlc without alsa-support, because if phonon-vlc recognizes the availability of alsa, it seems to discard any other sound system. Is there a way to determine, which sound system the user runs? Check the existence of /dev/oss \ /dev/snd \ /dev/dsp? As there are only alsa and oss (->knownSoundSystems) to be checked, I think this won't be too difficult.
> Check the existence of /dev/oss \ /dev/snd \ /dev/dsp? As there are > only alsa and oss (->knownSoundSystems) to be checked, I think this won't be > too difficult. The attached patch checks for existence of /dev/dsp and /dev/snd/ and sets preferredSoundSystem accordingly. The debug()-statements would better be QMessageBoxes or system notifications. I tested it on two computers, one running alsa, the other one oss4, both with vlc-support for alsa and oss, both having no problem to set up working devices.
Created attachment 71531 [details] vlc-oss.patch
Thinking about the solution, emulation came in my mind. alsa can emulate oss-devices, so the existance of /dev/dsp also could mean that alsa is running with oss-emulation turned on. I did not look at alsa-emulation in oss, but I know it exists. So to see if native oss is running, a check for /proc/opensound/ is more meaningful (/proc/asound for native alsa). >>> QDir("/proc/asound").exists() False >>> QDir("/proc/opensound").exists() True The question that remains is whether to offer the user to chose those emulated devices ("OSS Emulation" if /proc/asound and /dev/dsp exist). If you like the approach, I can modify the patch. If you don't just tell me how it would be done better :)
Please verify that current pvlc master fixes the issue, we don't have setups to test that sort of stuff.
(In reply to comment #14) > Please verify that current pvlc master fixes the issue, we don't have setups > to test that sort of stuff. Yes, it works (after changing the preferred device to oss). Thanks for the fix!