[pulseaudio-discuss] Arduino Tian issue changing card profile to A2DP with bluetooth headset

Tanu Kaskinen tanuk at iki.fi
Wed Sep 30 02:21:09 PDT 2015


On Wed, 2015-09-30 at 10:20 +0200, Mimmo wrote:
> Arduino Tian (an evolution of Arduino Yun) is a board that has a MIPS 
> processor where Linux is runinng. The distribution used is Linino, 
> derived from openWRT.
> 
> On this board Wifi from Qualcomm and Bluetooth from CSR are embedded.
> 
> Software version details:
> - kernel 3.18.11
> - bluez5 version 5.23
> - pulseaudio 6.0
> - dbus 1.9
> 
> The Headset device is properly connected but using paplay:
> 
> root at linino:~# paplay -v -d bluez_sink.5D_43_5A_03_31_EA /root/sample.wav
> Opening a playback stream with sample specification 's16be 2ch 44100Hz' 
> and channel map 'front-left,front-right'.
> Connection established.
> Stream successfully created.
> Buffer metrics: maxlength=4194304, tlength=352800, prebuf=349276, 
> minreq=3528
> Using sample spec 's16be 2ch 44100Hz', channel map 'front-left,front-right'.
> Connected to device bluez_sink.5D_43_5A_03_31_EA (index: 1, suspended: no).
> 
> it start to play the music but without any sound. Trying to change the 
> card profile from HSP to A2DP with the command:
> 
> pactl set-card-profile 0, a2dp_sink
> 
> hangs the board and exit with connection failure: Timeout

Hangs the board? What does that mean? If pactl prints something after
the hang, apparently not the whole board gets hung (unless pactl runs
on a different machine).

> trying to trace the code, I noticed that it stops on the call 
> stop_thread on module-bluez5-device.c

How did you trace the code? Can you check with gdb where it's stopping?

> Can you help me to understand why is hanging changing the profile?
> 
> Is it possible to force the default to A2DP instead of HSP?

"pactl set-card-profile" should save the chosen profile so that later
on a2dp would get activated automatically. However, the code hangs
before the new profile preference gets written to the disk... You could
in theory hack the card-database file in ~/.config/pulse, but it's
binary data, so not exactly easy.

-- 
Tanu


More information about the pulseaudio-discuss mailing list