[pulseaudio-discuss] PulseAudio+Bluez acting as Bluetooth stereo headset - no sound yet
Tanu Kaskinen
tanuk at iki.fi
Fri Jan 1 17:12:44 PST 2010
pe, 2010-01-01 kello 16:02 +0100, Burkhard Stubert kirjoitti:
> Hi chaps,
>
> A happy new year to you all.
>
> I want to turn my Ubuntu-Karmic-based eee-PC into a Bluetooth stereo
> headset (eventually, the eee will be replaced by a car infotainment
> system). The eee connects via Bluetooth to a mobile phone, which acts
> as an audio source for the eee. The music played on the mobile is
> transported via Bluetooth to the eee and comes out of the eee's
> speakers. That's the theory. In practise, the streaming stops after
> 3-5 seconds and there is no sound any way.
>
> From the syslog messages (see attachment playmusic3.syslog), I see the
> following:
> * At tag "###1", pulseaudio has successfully created an audio
> source "bluez_source.00_25_48_F5_D8_15".
> * At tag "###2", the audio stream seems to be set up correctly.
> The message is "module-bluetooth-device.c: Stream properly set
> up, we're ready to roll!".
> * At tag "###3", there are some problems setting rlimit's. I
> guess because pulseaudio runs in a per-user session and does
> not have the access privileges to change the rlimit's. I
> assume that the problem isn't really important.
Correctly assumed.
> * From tag "###4" to tag "###5", pulseaudio tells alsa-mixer to
> look at profiles. It actually finds three supported profiles:
> ###4a - output:analog-stereo, ###4b - output:analog-stereo
> +input:analog-stereo, ###4c - input:analog-stereo. Question:
> What are these ALSA profiles used for?
They are for switching the mode in which the sound card is used. Your
card can be used in three modes: analog stereo out, analog stereo in,
and a combination of them. There could be more on some other sound card;
I think the main motivation for the profiles came from the desire to
switch between stereo and surround modes.
> * At tag "###6", things seem to go wrong with the message
> "alsa-mixer.c: Unable to attach to mixer front:0: No such file
> or directory". But maybe this problem can be ignored, because
> the next line says "alsa-mixer.c: Successfully attached to
> mixer 'hw:0'".
Yes, it can be ignored. The alsa mixer apparently can't be opened using
the "front" device. I'm not sure if this is a bug in the driver, but we
can use "hw" as well.
> * At tag "###7", pulseaudio seems to fall back to some default
> sinks and sources (module-device-restore.c comes into play).
> That doesn't look good. Question: What's going wrong here?
Nothing is wrong. When sinks and sources are loaded,
module-device-restore restores them to the same state that they had when
pulseaudio was previously running.
> * At tag "###8", things start to repeat and it is the same steps
> and message as from tag "###1".
> Any ideas what is going wrong in my setup?
There are crashes, so apparently nothing is wrong in the setup. The a2dp
source is just buggy. Here are notes about each pulseaudio pid change:
The log sample starts with some bluetooth activity, apparently the a2dp
source is being loaded. Pulseaudio has pid 1518.
After ###2 the bluetooth device module fails an assertion:
Dec 31 16:01:11 beee pulseaudio[1518]: module-bluetooth-device.c: Assertion '(size_t) decoded == a2dp->frame_length' failed at modules/bluetooth/module-bluetooth-device.c:1367, function a2dp_process_push(). Aborting.
A new pulseaudio process is spawned with pid 1772.
Here's a mystery:
Dec 31 16:01:12 beee pulseaudio[1772]: card.c: Created 1 "bluez_card.00_25_48_F5_D8_15"
Dec 31 16:01:43 beee pulseaudio[2030]: module-bluetooth-device.c: Connected to the bluetooth audio service
What's happening here? During 31 seconds pulseaudio pid changes from
1772 to 2030, but nothing is logged during this change. Then the same
assertion failure occurs again:
Dec 31 16:01:43 beee pulseaudio[2030]: module-bluetooth-device.c: Assertion '(size_t) decoded == a2dp->frame_length' failed at modules/bluetooth/module-bluetooth-device.c:1367, function a2dp_process_push(). Aborting.
After that a new pulseaudio instance is spawned with pid 2060. That
stays running until the end of the log sample.
You seem to be running pulseaudio 0.9.19. There were some bluetooth
fixes in 0.9.20; I recommend updating to 0.9.21. If the bugs are still
there, file a new ticket.
--
Tanu Kaskinen
More information about the pulseaudio-discuss
mailing list