AlisterH/gwc

No sound on Mageia 8

Closed this issue · 14 comments

I have installed Mageia 8 on a different PC for testing.
Sound is working for firefox etc, and I have installed ossp and osspd is running.

Any attempt to playback on gtk-wave-cleaner 0.22-04 gives the message:

Failed to open OSS audio output device /dev/dsp, check settings->miscellaneous...

Have you verified that the other applications are actually playing via /dev/dsp?

Note: I compiled the version "allow_select_during_playback_v2"
which is what I am using on my main machine (Mageia 7)
configured with --disable-alsa --enable-pa

Have you verified that the other applications are actually playing via
/dev/dsp?
I know that they are not, since they were working before /dev/dsp
existed (it is created when /usr/sbin/osspd is running).

On the Mageia 7 machine I can test pulseaudio, oss and alsa using "play"
(part of the "sox" package) by setting environment variable
AUDIODRIVER to pulseaudio, oss or alsa and get these results
from play -V9 file.wav:

Output File : 'default' (pulseaudio)

Output File : 'default' (ossdsp)

Output File : 'default' (alsa)

On the Magia 8 machine, setting AUDIODRIVER to pulseaudio works:

Output File : 'default' (pulseaudio)

oss gives:

play INFO oss: Using default OSS device name: /dev/dsp
play FAIL formats: can't open output file `default': open failed for device: /dev/dsp

alsa works:

Output File : 'default' (alsa)

Setting AUDIODEV to /dev/dsp gives:

play DBUG sox: Looking for a default device: trying format pulseaudio' play DBUG sox: Looking for a default device: trying format alsa' ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM /dev/dsp play DBUG sox: Looking for a default device: trying format sndio' play DBUG sox: Looking for a default device: trying format oss' play INFO oss: Using user-specified device name: /dev/dsp play FAIL sox: Sorry, there is no default audio device configured

If I ssh from Mageia 8 to Mageia 7 and set AUDIODRIVER to oss
I get the same error (open failed for device: /dev/dsp)

However:

aoss ./gtk-wave-cleaner file.wav

does work!

I could have my wires crossed, but if I remember correctly, alsa has at least two different ways of providing OSS compatibility. One way provides /dev/snd, and in the past distributions commonly shipped it, but many of them have stopped doing so. Aoss is a completely different way, which doesn't involve an actual /dev/snd
Perhaps there is another package you need to install on Mageia 8 to get /dev/snd.

I have a /dev/snd directory, as well as /dev/dsp on both machines.

Does gwc only work with oss, or some emulation of oss?

I had assumed that the configure option "--enable-pa" means that gwc would be using pulseaudio directly: have I misunderstood, or is there some setting to tell it to use pulseaudio?

Given that alsa is working on the Mageia 8 machine, that would explain why aoss works: if gwc is using oss then aoss will capture the oss calls and translate to alsa calls, which will then get played by the pulseaudio system.

If it is compiled with the oss backend it works with oss or an emulation of oss.
If it is compiled with the pulseaudio backend it works with pulseaudio.
If it is compiled with the default alsa backend it works with alsa.
Before recompiling with a different backend you need to run make clean, otherwise you will get something broken.

Sorry, I didn't notice in your previous post that you are now trying to use the pulseaudio backend. If you get an error message relating to the wrong backend it is because you recompiled without running make clean. This is one problem with the build system that I haven't been able to fix. Jeff was also looking at it earlier in the year, but I guess like me he found it harder than he expected.

I just noticed that when I run ./configure --enable-pa it says:

checking for PULSEAUDIO... no

but still completes without any error messages. The compiled code does not use pulseaudio.

After installing lib64pulseaudio-devel, ./configure --enable-pa it says:

checking for PULSEAUDIO... yes

and gives the message:

The Pulseaudio libraries were found and you have chosen to use the
Pulseaudio driver....

Similarly for ALSA: I had to install lib64alsa2-devel

So, I could only use oss because the other drivers were not being loaded, despite being specifically requested. Can I suggest that ./configure fails with an error message if the requested driver is not available?

It is now working with ALSA (which I am guessing is the preferred driver?).

Thanks for your help!

Can I suggest that ./configure fails with an error message if the requested driver is not available?

Good suggestion and I will accept a patch or pull request, but I'm so extremely time poor I'm not likely to do it myself any time soon. When I next find time to work on GWC there are plenty of other things I want to focus on first.

BTW have you tried running gwc master on Mageia 8 - does it have the same playback issue as you had on Mageia 7 (#24)?

gwc master works on Mageia 8 with ALSA and pulseaudio.
(It does not allow selecting while playing).

Oops. That commit didn't fix this issue, it fixed #28. But I think we can leave this closed now anyway.

gwc master works on Mageia 8 with ALSA and pulseaudio.
(It does not allow selecting while playing).

Great thanks.

I think rather than the gwc-allow_select_during_playback_v2 branch you should be using stable, as it also implemented your request #26, as well as other bugfixing I was doing around that time

I have switched to stable on both machines and it seems to be working fine.