Bug #174

Alsa driver doesn't work

Added by IR4T4 over 6 years ago. Updated over 5 years ago.

Status:Fixed% Done:

100%

Priority:Normal
Assignee:IR4T4
Category:Client
Target version:2.71rc1
OS:Linux Arch:

Description

Reported by lottin http://www.etlegacy.com/boards/3/topics/217

"...
Starting ET:L with

SDL_AUDIODRIVER='alsa’ etl

I get no sound:

—— Initializing Sound ——
SDL_Init( SDL_INIT_AUDIO )... OK
SDL audio driver is "(UNKNOWN)".
SDL_OpenAudio() failed: No available audio device
Sound initialization failed.
——————————–

In order to get the sound to work I must use the 'dsp’ driver but this means that sound won’t work if another program is already using the sound card at the same time.

My SDL install seems correct because the plaympeg binary (from the smpeg package) can use both the alsa and dsp drivers without problem.

I’m using ET:L 2.70rc1 and libsdl 1.2.15 on Debian.
"


Can anyone confirm this bug?

easybuild.sh (libasound2/libasound2-dev are installed) generates this output on my Debian

checking for ALSA LDFLAGS...  -lasound -lm -ldl -lpthread
checking for libasound headers version >= 0.9.0... found.
checking for snd_ctl_open in -lasound... no

History

#1 Updated by IR4T4 over 6 years ago

  • Category set to 3
  • Target version set to 2.71rc1

#2 Updated by IR4T4 over 6 years ago

  • Description updated (diff)

#3 Updated by IR4T4 over 6 years ago

  • Description updated (diff)

#4 Updated by IR4T4 about 6 years ago

lottin, is OSS also installed on your system?

#5 Updated by lottin about 6 years ago

IR4T4 wrote:

lottin, is OSS also installed on your system?

I have OSS emulation via Alsa.

#6 Updated by IR4T4 about 6 years ago

It seems OSS causes all the trouble. Several people in IRC have no issues with ALSA (OSS is not installed).

#7 Updated by lottin about 6 years ago

IR4T4 wrote:

It seems OSS causes all the trouble. Several people in IRC have no issues with ALSA (OSS is not installed).

I will investigate further and will post the findings here.

#8 Updated by lottin about 6 years ago

Ok, this is what I’ve found.

1. ldd indicates that the etl binary is not dynamically linked to libSDL, so this means that it uses its own version of libSDL.

2. I’ve run the command "SDL_AUDIODRIVER='alsa’ etl +quit" with ltrace and it seems that the SDL library that etl uses doesn’t have Alsa support:

vsnprintf("SDL_Init( SDL_INIT_AUDIO )... ", 4096, "SDL_Init( SDL_INIT_AUDIO )... ", 0xfffed3c4) = 30
strlen("SDL_Init( SDL_INIT_AUDIO )... ") = 30
memcpy(0x08e3bbd7, "SDL_Init( SDL_INIT_AUDIO )... ", 30) = 0x08e3bbd7
memcpy(0x08e3a300, "", 0) = 0x08e3a300
fputs("SDL_Init( SDL_INIT_AUDIO )... ", 0xf744b580) = 1
getenv("SDL_AUDIODRIVER") = "alsa"
strcasecmp("pulse", "alsa") = 15
strcasecmp("dsp", "alsa") = 3
strcasecmp("dma", "alsa") = 3
strcasecmp("arts", "alsa") = 6
strcasecmp("esd", "alsa") = 4
strcasecmp("nas", "alsa") = 13
strcasecmp("disk", "alsa") = 3
strcasecmp("dummy", "alsa") = 3
strlen("No available audio device") = 25

To me this looks like a compilation problem, maybe Alsa library missing at compile time. (Note that I’m using the binaries that I downladed from the ET:L project.) If I’m right, just recompile with Alsa support and should be fine.

#9 Updated by IR4T4 about 6 years ago

Good catch & will be fixed with next RC. TU!
RC1 was done with bundled libs and unfortunately lib32asound2 was not installed ... I wonder which versions the guys in IRC did use for testing ALSA

checking for libasound headers version >= 0.9.0... found.
checking for snd_ctl_open in -lasound... yes
-- dynamic libasound -> libasound.so.2

#10 Updated by IR4T4 about 6 years ago

  • Assignee set to IR4T4
  • % Done changed from 0 to 90

#11 Updated by IR4T4 about 6 years ago

  • Status changed from New to Feedback

#12 Updated by IR4T4 about 6 years ago

  • Status changed from Feedback to Fixed

#13 Updated by IR4T4 about 6 years ago

  • % Done changed from 90 to 100

#14 Updated by Radegast over 5 years ago

  • OS set to Linux

Also available in: Atom PDF