SDL doesn't play nice with esd (tries to open /dev/dsp directly)

Bug #751 reported by Adam Lydick
4
Affects Status Importance Assigned to Milestone
libsdl1.2 (Ubuntu)
Fix Released
Medium
MOTU

Bug Description

Since the ubuntu desktop uses ESD (or another audio multiplexing daemon) by default, it would be nice if apps shipped expecting (or at least adapting to) that configuration.

For SDL applications, the easy fix is to change the default backend to libsdl1.2debian-alsa, rather than libsdl1.2debian-oss

The default SDL backend for Breezy is OSS, resulting in the following issue reported against pygame:

Since the ubuntu desktop uses ESD (or another audio multiplexing daemon) by default, it would be nice if apps shipped expecting (or at least adapting to) that configuration.

Amusingly enough, disabling the sound with "-q" results in the same exception, although the man page suggests:

       -q Begin with sound disabled.

"strace -eopen pathological" reveals:

open("/dev/dsp", O_WRONLY|O_NONBLOCK) = -1 EBUSY (Device or resource busy)
open("/dev/dsp", O_RDWR|O_NONBLOCK) = -1 EBUSY (Device or resource busy)
Traceback (most recent call last):
open("/usr/share/games/pathological/pathological.py", O_RDONLY|O_LARGEFILE) = 6
  File "/usr/share/games/pathological/pathological.py", line 2206, in ?
    setup_everything()
open("/usr/share/games/pathological/pathological.py", O_RDONLY|O_LARGEFILE) = 6
  File "/usr/share/games/pathological/pathological.py", line 2189, in setup_everything
    pygame.mixer.init()
pygame.error: No available audio device

Changed in pathological:
assignee: nobody → motu
Revision history for this message
Ante Karamatić (ivoks) wrote :

This is bug related to many many programs in Linux comunity. /dev/dsp till now hasn't been handeld very well. ALSA introduced dmix wich allows users to have esd/polyaudio/arts daemon running, but still be able to open old apps that request direct access to /dev/dsp.

Now I'm watching movie inside Xine (with ALSA backend), mp3 in totem (with polyaudio) and recording music with audacity (direct access to /dev/dsp). So, this should be fine in Breezy.

Changed in pygame:
status: New → Fixed
Revision history for this message
Emmet Hikory (persia) wrote :

The error is a result of a conflict in accessing /dev/dsp. A simple workaround is to switch to ALSA by installing the libSDL1.2debian-alsa package. For Ubuntu 5.10, this is sufficient. For Ubuntu 5.04, you may still encounter errors, in which case, you may want to copy /usr/share/doc/libasound2/examples/asound.conf_dmix to /etc/asound.conf and restart ALSA to take advantage of the dmix solution used in 5.10.

Emmet Hikory (persia)
Changed in pygame:
status: Fixed → New
Revision history for this message
Ante Karamatić (ivoks) wrote :
Emmet Hikory (persia)
description: updated
summary: Since the ubuntu desktop uses ESD (or another audio multiplexing daemon)
by default, it would be nice if apps shipped expecting (or at least
adapting to) that configuration.

- Amusingly enough, disabling the sound with "-q" results in the same
- exception, although the man page suggests:
-
- -q Begin with sound di...
+ For SDL applications, the easy fix is to change the default backend to
+ libsdl1.2debian-alsa, rather than libsdl1.2debian-oss
Emmet Hikory (persia)
Changed in libsdl1.2:
status: New → Fixed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.