Bugzilla – Bug 16799
Squeezeplay needs MMAP-able ALSA, prevents use with pulseaudio + PATCH
Last modified: 2011-05-09 09:17:50 UTC
Created attachment 7081 [details] Patch that fixes SqueezePlay playback with pulseaudio on Ubuntu. Squeezeplay (as of SVN 9284) does not play sound on recent Ubuntu machines, due to them using pulseaudio as ALSA's default device. Jive_alsa tries to initialise the ALSA device with SND_PCM_ACCESS_MMAP_INTERLEAVED, which does not have to be provided by ALSA, and inparticular is not through pulseaudio's ALSA emulation. The attached patch detects whether things work with MMAP and an additional buffer and normal calls to snd_pcm_writei, if that is not possible. This give me audio on my ubuntu 10.10 system. I am a n00b at ALSA coding, feel free to edit this patch.
(In reply to comment #0) > The attached patch detects whether things work with MMAP and an additional > buffer and normal calls to snd_pcm_writei, if that is not possible. This give > me audio on my ubuntu 10.10 system. The patch detects whether things work with MMAP, and if not resorts to an additional buffer and calls to snd_pcm_writei. This makes audio work in squeezeplay on my Ubuntu 10.10 system. (Typos from utter "patch fixed"-excitement ;-)
Thanks! We will review.
== Auto-comment from SVN commit #9409 to the jive repo by agrundman == == http://svn.slimdevices.com/jive?view=revision&revision=9409 == Fixed bug 16799, patch from Stephan Diestelhorst to fix pulseaudio playback on Ubuntu
I still get errors with this patch on my 32 bit Ubuntu 10.10 VM: 20110401 19:55:24.275 DEBUG audio.output - decode_alsa_init:266 Playback device: default 20110401 19:55:24.275 DEBUG audio.output - decode_alsa_fork:143 fork jive_alsa -v -d default -c default -b 30000 -p 3 -s 16 -f 3 ALSA lib conf.c:3288:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so ALSA lib pcm.c:2208:(snd_pcm_open_noupdate) Unknown PCM default 20110401 19:55:24.278 ERROR pcm_test:716 Playback open error: No such file or directory 20110401 19:55:24.776 ERROR audio.output - decode_alsa_fork:178 jive_alsa failed to start 20110401 19:55:24.777 DEBUG audio.decode - decode_thread_execute:392 decode_thread_execute I sent Ben another patch which falls back from the alsa backend to portaudio if alsa failes (portaudio tries harder to start alsa and pick a device). This seems to work on my VMs - may want to consider this too. Must admit I didn't spend too long trying to work out why alsa could not be started when I realised portaudio would work though!
Created attachment 7228 [details] fallback to portaudio patch Fallback patch as mentioned in previous comment.
Desktop Squeezeplay only.