[pulseaudio-discuss] Audio output on Bluetooth headset is choppy - PulseAudio at fault?

Colin Guthrie gmane at colin.guthr.ie
Fri Sep 9 06:35:04 PDT 2011


'Twas brillig, and Alexander Skwar at 09/09/11 11:18 did gyre and gimble:
> Hello!
> 
> 123456789 123456789 123456789 123456789 123456789 123456789 123456789
> 
> I managed to get my Bluetooth headset going (for the setup, please see
> http://wp.m/pA8p6-66), more or less in openSUSE 11.4 & KDE. However,
> it doesn't work well…
> 
> At first, after I established the BT connection, output is quite well.
> Then I repeatedly use Amarok (and also other apps?) to play MP3s; ie. I
> (fully) stop & start Amarok. Then, after some time, sound output starts
> to "stutter". Ie. it plays for a fraction of a second, then it pauses
> and plays again. It's not only Amarok which is then showing this bad
> behaviour, but everything, ie. also the Phonon sound settings dialog in
> the control center and also "simple" commands like this:
> 
>   env PULSE_SINK=bluez_sink.00_1A_7D_60_67_1F \
>     padsp \
>     sox /usr/share/sounds/linphone/rings/oldphone.wav -t ossdsp /dev/dsp
> 
> Or even this!
> 
>   paplay -d bluez_sink.00_1A_7D_60_67_1F \
>     /usr/share/sounds/linphone/rings/oldphone.wav
> 
> So it's (maybe?) not really Amaroks fault which causes these problems.
> It's also not related to oldphone.wav - I've double checked this *G*

hehe, I would potentially blame the Phonon backend (which you don't
mention - but I'll assume GStreamer which I think the default on
OpenSuse) but if paplay is being weird too, then I'll concede it's not
necessarily to blame!


> When I re-connect the Bluetooth device, it works. At least most of the
> times. Right now, when I build the connection, right afterwards the
> sound was right away distorted :(
> 
> Well… What to do?
> 
> On Identi.ca, I had a brief chat with @afiestas, the guy behind the KDE
> bluedevil bluetooth stack, see [1] & [2] on Identi.ca. He made it quite
> clear, that these sound problems aren't (strictly) related to Bluetooth
> and/or Bluedevil, but instead to PulseAudio. I assume he knows
> Bluetooth rather well.

Yeah, bluedevil will only handle the initial pairing and connection.
After that it basically does very little.

> Going to attach the output of "pacmd ls", while paply ... .wav was
> running/stuttering. Also amixer and getfacl /dev/snd output attached.
> And also "grep pulseaudio /var/log/messages". In the "excerpt-from..."
> file, there are a *LOT* of messages like this:
> 
> […]
> Sep  9 11:37:40 ewzw032 pulseaudio[2984]: module-bluetooth-device.c:
> Skipping 752010 us (= 132652 bytes) in audio stream
> Sep  9 11:37:40 ewzw032 pulseaudio[2984]: module-bluetooth-device.c:
> Skipping 296850 us (= 52364 bytes) in audio stream
> […]
> 
> Why is it skipping?

Good question!

> ask at ewzw032:/tmp> id
> uid=1000(ask) gid=100(users)
> Gruppen=100(users),3(sys),7(lp),10(wheel),17(audio),33(video),40(games),115(vboxusers)

It's off topic here (these don't really matter for bluetooth), but why
is your user in the lp, audio and video groups? None of this is
necessary on a vaguely modern system. I don't know what sys or games
groups relate to but I can't think what they would acheive.

In any modern system, ACLs are written for the active user to allow
access to e.g. audio and video devices. This is processed currently by
console kit but soon it will be systemd. By putting your user in these
groups you will be breaking multi-user logins (this might not be
important if you only have one user on your machine, but it's worth
sharing this info with you all the same so you're aware of the
consequences).




Back on topic, the issue can often be down to a broken bluetooth
receiver - they are a bit funny overall.

But I'll let our resident BT export answer when he gets a chance as
he'll know much better than me! Over to you Luiz!! :)

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


More information about the pulseaudio-discuss mailing list