Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Junior Member
    Join Date
    Oct 2009

    Unhappy squeezeplay + ubuntu 9.04 / Alsa / Pulseaudio


    I build squeezeplay from SVN (version 7947) on my Ubuntu 8.04 installation with Alsa and PulseAudio sound server.

    It took a lot of tries to understand that it was better to run in bin directory (not in parent) otherwise I got some execve failed...

    Without being root, I took a:
    audio.codec - decode_alsa_init:218 shmget error Permission denied

    When being root, I got:
    20091028 21:01:41.147 DEBUG pcm_test:676 max sample rate 192000
    20091028 21:01:41.147 DEBUG audio_thread_execute:702 audio_thread_execute
    20091028 21:01:41.149 ERROR _pcm_open:517 Access type not available: Invalid argument
    20091028 21:01:41.149 ERROR audio_thread_execute:718 Playback open failed: Invalid argument
    20091028 21:01:41.149 ERROR audio_thread_execute:916 Audio thread exited

    After looking at the code and searching on Internet, it appears that using Pulse Audio, it is not possible to assert that sound card pcm access is done through MMAP (SND_PCM_ACCESS_MMAP_INTERLEAVED). More information on this here: www . pulseaudio.org / ticket / 94
    and here: svn.mythtv.org/trac/ticket/3598 (MythTV had the same issue)
    (I remove the http part because it is my first post...)

    To be honest, I'm quite motivated to find a solution. It looks like SVN activity is low... Hope I will get an answer.


  2. #2
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    You need to update the portaudio_v19_1360 directory under src with a newer snapshot of libportaudio.
    The current svn revision 1420 supports the pulseaudio MMAP audio devices.

    Grab a current snapshot from here.

    # Extract the tarball in the src directory
    tar -xzf pa_snapshot.tgz

    # Rename the directories
    mv portaudio_v19_1360 portaudio_v19_1360.old
    mv portaudio portaudio_v19_1360

    # Build
    make -f Makefile.linux

  3. #3
    Junior Member
    Join Date
    Oct 2009

    Smile it goes further but sound is still not working

    Compared to my initial post, my ubuntu distribution is now Karmy Koala (9.10).
    I need to recompile everything. I encountered some issues:
    - need gcc-4.2 otherwise there is an error during SDL compilation
    - compared to requirement package list found on http://wiki.slimdevices.com/index.ph...On_Ubuntu_7.10, I need further packet, otherwise it doesn't compile (libasound2-dev, xlibmesa-glu-dev, libesd0-dev if my bash history is correct).

    Thanks to Ralphy, the error messages disappeared but sound is still not working:

    If I run it as a simple user, I got:
    ERROR audio.codec - decode_alsa_init:216 shmget error Permission denied

    If I run it as root, I got:
    ALSA lib pcm_dmix.c:1008: (snd_pcm_dmix_open) unable to open slave
    20091107 16:32:15.440 ERROR audio.output - decode_alsa_fork:184 jive_alsa failed to start

    A little research on Internet, (link in french: http://memoire-grise-liberee.fr.eu.o...pcm/dmix_open/) gives me the solution:
    add a line ipc_key_add_uid true to /usr/share/alsa/alsa.conf

    After that, no more message in shell.
    And I'm able to listen at music on my PC using squeezeserver

    Thanks, that is a bit complicated to build but the application is wonderful.


    PS: the last update to squeezeserver 4.1 makes little hangs at start of songs but that is an another story.

  4. #4
    Junior Member
    Join Date
    Nov 2009

    Not quite working

    Thanks for that. Unfortunately, even as root, it doesn't work for me and I get the error:

    ALSA lib conf.c:2700snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so
    ALSA lib pcm.c:2211snd_pcm_open_noupdate) Unknown PCM default
    20091123 00:25:35.731 ERROR audio.output - decode_alsa_fork:180 jive_alsa failed to start

    I have looked on the net and tried fixing it in many ways but without success yet Perhaps somebody else has an idea? This is on Ubuntu 9.10 Karmic Koala.


  5. #5
    The above fix looks like it just allows direct access to alsa, when it should be using pulse audio?

    Does sound play with cd /opt/squeezeplay/bin; pasuspender -- ./squeezeplay.sh ?

    Doesn't for me. I tried using padsp as well, with no luck.

    I also tried with the latest version of portaudio statically compiled -- no luck. Then I read that portmixer and portaudio need to come from the same source, so grabbed them from the latest audacity CVS, with the same result.

    I wonder if getting an updated version of libasound2-plugins (which provides libasound_module_conf_pulse.so) from somewhere would solve the problem (assuming we compile squeezeplay with the latest portaudio)?

    I feel I'm getting close. It's irritating as all google searches about libasound_module_conf_pulse.so return problems with Skype on amd64, which seems to be a completely different error. (I get the same error with squeezeplay on both i386 and amd64).

    Once we solve this, then we have to figure out why it has to run as root -- but one thing at a time I guess.
    Last edited by Jhong; 2009-11-22 at 20:16.

  6. #6
    Senior Member
    Join Date
    Oct 2005
    For the WaveInput plugin to work on a PulseAudio system without root access - Pulse had to be setup as system wide and user had to be added to some pulse groups. It's possible these changes may work for this problem see http://forums.slimdevices.com/showpo...3&postcount=43

    The command line version to run Pulse system wide is 'sudo pulseaudio --system'

    If google searches have too many hits - get it to exclude certain words using "-" so add "-Skype" to your google search string.

  7. #7
    Junior Member
    Join Date
    Nov 2009
    @JHong: I left a comment on your blog yesterday [twice], which seems not to have showed up for some reason.

    I basically said that I have the same problem when running-non root. That seems to be addressed on


    though the suggested fix did not work for me.

    Suspending the pulseaudio as you have suggested unfortunately doesn't work either for me.

  8. #8
    Yes, I'm aware of that. Unfortunately we still need to track down the issue with the pulse alsa plugin first.

  9. #9
    Junior Member
    Join Date
    Nov 2009
    I got it working... What I did was wipe libFLAC.so.8.2.0 in the /opt/squeezeplay/lib (and the lib directory in the original build). That library is available in karmic anyway. It's now working as root, still need to figure out how to run it as an ordinary user.

  10. #10

    I think I managed to solve the root problem last night... lemme check when I get home.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts