ladspa plugins in .asoundrc and pulseaudio don't play nice

Bug #514902 reported by gergnz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alsa-lib (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

when using ladspa plugins in a custom .asoundrc when using pulseaudio applications fail to work with the following output:

~$ aplay tmp/foo.wav
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM amp
aplay: main:608: audio open error: File exists

example .asoundrc:

pcm.!default {
  type plug
  slave.pcm amp
}

pcm.amp {
  type ladspa
  slave.pcm "plughw:0,0";
  path "/usr/lib/ladspa";
  plugins [
    {
      label amp
      input {
        controls [ 6 ]
      }
    }
  ]
}

If I remove pulseaudio binary from /usr/bin and reboot (to start a fresh) the ladspa plugin works perfectly.

~$ lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10

~$ apt-cache policy libasound2
libasound2:
  Installed: 1.0.20-3ubuntu6.1
  Candidate: 1.0.20-3ubuntu6.1
  Version table:
 *** 1.0.20-3ubuntu6.1 0
        500 http://mirror.aarnet.edu.au karmic-updates/main Packages
        100 /var/lib/dpkg/status
     1.0.20-3ubuntu6 0
        500 http://mirror.aarnet.edu.au karmic/main Packages

ProblemType: Bug
Architecture: amd64
Date: Sun Jan 31 08:53:17 2010
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: vmnet vsock vmci vmmon
Package: libasound2 1.0.20-3ubuntu6.1
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: alsa-lib
Uname: Linux 2.6.31-17-generic x86_64
XsessionErrors: (polkit-gnome-authentication-agent-1:3653): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

Revision history for this message
gergnz (gergnz) wrote :
Revision history for this message
Daniel T Chen (crimsun) wrote :

Your asoundrc is invalid (incorrect syntax).

Changed in alsa-lib (Ubuntu):
status: New → Invalid
Revision history for this message
gergnz (gergnz) wrote :

Daniel,

please explain why the .asoundrc is invalid. This works OK without pulseaudio.

Greg.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 514902] Re: ladspa plugins in .asoundrc and pulseaudio don't play nice

It only "works" because the parser wasn't strict enough to reject the
plughw pcm syntax.

However, let's look at the PA end: which device did you specify in
your ~/.pulse/default.pa ?

Revision history for this message
gergnz (gergnz) wrote :

I don't have a default.pa.

So some more digging and googling has returned some documentation, I can now make alsa work with pulseaudio. Though, reading further it would seem a smarter thing to potentially use pulseaudio to load the ladspa plugins.

so the plughw pcm syntax should just be 'slave.pcm "plughw";'?

I can now specify a device in my default.pa as such:
load-module module-alsa-sink device=ampd

have slightly changed the .asoundrc

# was !default
pcm.ampd {
  type plug
  slave.pcm amp
}

Thanks Daniel, it is very difficult to find appropriate documentation that is correct for your system.

Please close this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.