[pulseaudio-tickets] [PulseAudio] #133: Allegro fails to initialize sound

PulseAudio trac-noreply at tango.0pointer.de
Tue Oct 2 14:54:07 PDT 2007


#133: Allegro fails to initialize sound
---------------------------+------------------------------------------------
 Reporter:  izm            |       Owner:  lennart
     Type:  defect         |      Status:  new    
 Priority:  normal         |   Milestone:         
Component:  module-alsa-*  |    Severity:  normal 
 Keywords:  allegro alsa   |  
---------------------------+------------------------------------------------
 Not sure which project this is a bug of, but I figured I'd let you guys
 know and sort it out, since you'd be much more capable than me.  :)

 I'm using Pulseaudio o.9.5, Advanced Linux Sound Architecture Driver
 Version 1.0.14rc1, and Allegro 4.2.  When Allegro (it's a cross-platform
 game development library, similar to SDL) attempts to initialize sound
 using ALSA, it fails with this message:


 {{{
 ALSA: snd_pcm_hw_params_set_format(pcm_handle, hwparams, format) : Invalid
 argument
 }}}

 If I kill the pulseaudio daemon, it works (not going through pulseaudio, I
 guess).  I'm unfamiliar with all this, but I looked at the allegro
 sources, and it looks like they're supporting alsa version 0.9 (and
 0.5)... which is backwards compatible with ALSA but not Pulseaudio?

 I've attached a simple program that performs a few tests and will generate
 the error on my system.  I'm sorry if this is the wrong place to post this
 bug, but I wasn't sure where to put it.  Suggestions?

 Thanks.

 Here's the output from the sample program when pulseaudio is running:

 {{{
 detect_digi_driver() attempts:_____________

 DIGI_AUTODETECT: num channels: 65535
 DIGI_NONE: num channels: 65535
 DIGI_OSS: not detected
 DIGI_ESD: num channels: 64
 DIGI_ARTS: num channels: 65535
 DIGI_ALSA: num channels: 64
 DIGI_JACK: num channels: 65535

 install_sound attempts:_____________

 install_sound ()
         using: DIGI/MIDI_AUTODETECT and DIGI/MIDI_AUTODETECT
 ALSA lib rawmidi_hw.c:233:(snd_rawmidi_hw_open) open /dev/snd/midiC0D0
 failed: No such file or directory
         Failed
         ALSA: snd_pcm_hw_params_set_format(pcm_handle, hwparams, format) :
 Invalid argument
 install_sound ()
         using: DIGI/MIDI_AUTODETECT and DIGI/MIDI_NONE
         Failed
         ALSA: snd_pcm_hw_params_set_format(pcm_handle, hwparams, format) :
 Invalid argument
 install_sound ()
         using: DIGI_OSS and DIGI/MIDI_NONE
         Failed
         /dev/dsp: Device or resource busy
 install_sound ()
         using: DIGI_ESD and DIGI/MIDI_NONE
         Succeeded
 install_sound ()
         using: DIGI_ARTS and DIGI/MIDI_NONE
         Failed
         ALSA: snd_pcm_hw_params_set_format(pcm_handle, hwparams, format) :
 Invalid argument
 install_sound ()
         using: DIGI_ALSA and DIGI/MIDI_NONE
         Failed
         ALSA: snd_pcm_hw_params_set_format(pcm_handle, hwparams, format) :
 Invalid argument
 install_sound ()
         using: DIGI_JACK and DIGI/MIDI_NONE
         Failed
         ALSA: snd_pcm_hw_params_set_format(pcm_handle, hwparams, format) :
 Invalid argument

 }}}

 After I kill pulseaudio, I get this output:


 {{{
 detect_digi_driver() attempts:_____________

 DIGI_AUTODETECT: num channels: 65535
 DIGI_NONE: num channels: 65535
 DIGI_OSS: num channels: 64
 DIGI_ESD: not detected
 DIGI_ARTS: num channels: 65535
 *** PULSEAUDIO: Unable to connect: Connection refused
 DIGI_ALSA: not detected
 DIGI_JACK: num channels: 65535

 install_sound attempts:_____________

 install_sound ()
         using: DIGI/MIDI_AUTODETECT and DIGI/MIDI_AUTODETECT
 *** PULSEAUDIO: Unable to connect: Connection refused
 ALSA lib rawmidi_hw.c:233:(snd_rawmidi_hw_open) open /dev/snd/midiC0D0
 failed: No such file or directory
         Failed
         No supported synth type found
 install_sound ()
         using: DIGI/MIDI_AUTODETECT and DIGI/MIDI_NONE
 *** PULSEAUDIO: Unable to connect: Connection refused
         Succeeded
 install_sound ()
         using: DIGI_OSS and DIGI/MIDI_NONE
         Succeeded
 install_sound ()
         using: DIGI_ESD and DIGI/MIDI_NONE
         Failed
         No server: can not open
 install_sound ()
         using: DIGI_ARTS and DIGI/MIDI_NONE
 *** PULSEAUDIO: Unable to connect: Connection refused
         Succeeded
 install_sound ()
         using: DIGI_ALSA and DIGI/MIDI_NONE
 *** PULSEAUDIO: Unable to connect: Connection refused
         Failed
         Can not open card/pcm device
 install_sound ()
         using: DIGI_JACK and DIGI/MIDI_NONE
 *** PULSEAUDIO: Unable to connect: Connection refused
         Succeeded

 }}}

 (not sure if that's useful...  ^.^)

-- 
Ticket URL: <http://www.pulseaudio.org/ticket/133>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server


More information about the pulseaudio-bugs mailing list