[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#428353: timidity: ALSA lib pcm.c:2105:(snd_pcm_open_conf) Cannot open shared library...



On Friday 22 June 2007 23:52:08 A. Costa wrote:
> On Fri, 22 Jun 2007 19:49:41 +0200
>
> Joost Yervante Damad <andete@debian.org> wrote:
> > does it now work fine always or does it still require fiddling by you?
>
> What exactly do you want me to test here?  I'll try to answer anyway,
> by guesswork:
>
> "Always", as in every way, no.  My prior messages described how
> after upgrading 'timidity', it failed, and thereafter can be made to
> fail depending on some lines in '/etc/alsa.conf'.
>
> "Always" works -- yes, if 'alsa.conf' is empty, which it wasn't before
> upgrading.

On my system there is no /etc/alsa.conf or /etc/asound.conf. I think it is the 
combination of pulseaudio and alsa that is causing the problems.

I reproduced your setup here, with alsa using pulseaudio.

The real problem is this: timitidy as system service runs as the "root" user 
and the "root" user doesn't have a proper configuration for using the alsa 
pulseaudio plugin as default alsa device.

I solved it like this:

add this to /etc/asound.conf:

pcm.pulse {
            type pulse
}

ctl.pulse {
             type pulse
}

pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

Then add the root user to the pulse-access group:

useradd root pulse-access

If you now start the systemwide timidity daemon it will work fine:
# /etc/init.d/timidity start
Starting: timidity.


As you can see it is using pulseaudio as underlying alsa plugin:

# ps -ef | grep timi
root     14303     1  0 09:02 pts/1    
00:00:00 /usr/bin/timidity -B2,8 -Os -iAD
root     14328 11901  0 09:06 pts/1    00:00:00 grep timi
# lsof -p 14303 | grep pulse
timidity 14303 root  mem    REG    8,5  229444 
1088680 /usr/lib/libpulse.so.0.2.0
timidity 14303 root  mem    REG    8,5   18992 
3050413 /usr/lib/alsa-lib/libasound_module_pcm_pulse.so

I hope this helps.

As you can see this is not a bug in timidity. Maybe I should provide a hint in 
the README.Debian about this?

Joost



Reply to: