[pulseaudio-discuss] PulseAudio <-> ALSA issues

Wolfgang Rosenauer wolfgang at rosenauer.org
Tue Jul 8 11:37:45 PDT 2008


Hi Nick,

Nick Thompson wrote:

> Does aplay make sound?  if not then you may have a config issue.  I'm  
> assuming that aplay is working.

Yes, (almost) every other sound output on the desktop is working 
including aplay.

> You could try starting the damon from a command line with logging to  
> see if there are any logging messages that might explain the issue.
> 
> Kill the existing pa with
> 
> % pulseaudio -k
> 
> Then launch pulseaudio with logging on:
> 
> % pulseaudio --log-level=3

Did that:
I: client.c: Created 1 "Native client (UNIX socket client)"
I: protocol-native.c: Got credentials: uid=1000 gid=100 success=1
I: protocol-native.c: Enabled SHM for new connection
I: client.c: Client 1 changed name from "Native client (UNIX socket 
client)" to "ALSA plug-in [jptest]"
I: module-volume-restore.c: Restoring sink for 
<pulsecore/protocol-native.c$ALSA plug-in [jptest]>
I: module-volume-restore.c: Restoring volume for 
<pulsecore/protocol-native.c$ALSA plug-in [jptest]>
I: module-alsa-sink.c: Trying resume...
I: module-alsa-sink.c: Resumed successfully...
I: module-alsa-sink.c: Starting playback.
I: resampler.c: Using resampler 'speex-float-3'
I: resampler.c: Using float32le as working format.
I: resampler.c: Choosing speex quality setting 3.
I: sink-input.c: Created input 1 "ALSA Playback" on 
alsa_output.pci_8086_266e_sound_card_0_alsa_playback_0 with sample spec 
s16le 2ch 48000Hz and channel map front-left,front-right

That looks fine to me (given there is no error) but still the stream 
doesn't start :-(

> You say in your bug that your app is pretty basic in terms of the alsa  
> functionality that it uses.  It's quite possible to write alsa  
> applications that pulse does not like, but pulse is usually pretty  
> good about throwing assertions in this case.  One thing you might want  
> to do is to look at the alsa initialization code in the aplay alsa  
> application and crib the app setup code from there, or at least  
> compare it with yours.
> 
> Some alsa tutorial code (IIRC the linux journal examples) on the web  
> does not work with pulse in the chain, stuff that pulse expects to be  
> set up is not, but in this case pulse asserts.  The code in aplay is a  
> good starting point for alsa setup that works well with pulse.

Hmm, could I expect that I would see something in the above debug output 
if the initialization in the app is wrong?

What else could I try to find the issue?

Thanks,
  Wolfgang



More information about the pulseaudio-discuss mailing list