Pulseaudio crash with A2DP, Bug #641

This is just a milemarker for those who may also be having an issue similar to what I experienced lately.  Hopefully the below summary is useful to somebody.

Problem #1: Bluetooth speakers connect to Ubuntu Linux just fine, but audio quality is crap.

Solution #1: Some BT speakers somehow get auto-identified as bluetooth headsets (aka for making phone calls) instead of speakers (primarily for music), and thus use a lower quality bluetooth profile.   Pulseaudio (On ubuntu in the sound settings -> hardware tab) allows you to easily toggle between profiles.

Problem #2: Switching between the standard profile and the A2DP higher quality profile causes pulseaudio to crash.  The crash output is something along the lines of:

E: sink.c: Assertion 'pa_frame_aligned(length, &s->sample_spec)' failed at
 pulsecore/sink.c:939, function pa_sink_render_full(). Aborting.

Semi-Solution #2: I don’t know of any proper solutions to the problem as of yet.  Googling gets you to to places like this,  http://comments.gmane.org/gmane.comp.audio.pulseaudio.bugs/2317 which only suggest a workaround of changing the default-sample-channel setting in daemon.conf to 2 instead of the default of 6.  This fix worked for me (I only have 2 BT speakers), but obviously may be problematic for more complicated setups.

I haven’t tried using a more modern build of Pulseaudio/Pulseaudio modules yet, totally plausible that its fixed in trunk.  It’s not exactly trivial to get a fully updated version of Pulse in a 12.04 Ubuntu LTS release, however.  For now, it’s working so I’ll save poking that bear for another time.

1 comment

  1. This reminds me that I disabled Pulse on my desktop because loading its shim module was causing the ALSA libraries to get into an infinite loop in the runtime dynamic linker. I should really take a look at what’s actually causing that.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>