Hi Tanu,<br><br>Thanks for the detailed analysis and for pointing out the reincarnation of the pulseaudio process. In the meantime, I succeeded in running scenario with pulseaudio v0.9.21. The result is exactly the same. It fails on the same assertion, pulseaudio dies and restarts after about 30 seconds. It looks very much like a bug report.<br>
<br>I had a closer look at the log just before the failed assertion (some lines before tag ###1). Pulseaudio tells bluetoothd to set the configuration as follows:<br><br>Dec 31 16:01:11 beee pulseaudio[1518]: module-bluetooth-device.c: Sending BT_REQUEST -&gt; BT_SET_CONFIGURATION<br>
Dec 31 16:01:11 beee pulseaudio[1518]: module-bluetooth-device.c: Trying to receive message from audio service...<br>Dec 31 16:01:11 beee bluetoothd[956]: Audio API: BT_REQUEST &lt;- BT_SET_CONFIGURATION<br>Dec 31 16:01:11 beee bluetoothd[956]: Media Codec: SBC Channel Modes: JointStereo Frequencies: 48Khz <b> Subbands: 8  Blocks: 16</b>  Bitpool: 2-51<br>
<br>Immediately before tag ###1, pulseaudio shows the configuration it has actually set:<br>Dec 31 16:01:11 beee pulseaudio[1518]: module-bluetooth-device.c: SBC parameters:<br>Dec 31 16:01:11 beee bluetoothd[956]: setup_free(0x2a8f010)<br>
Dec 31 16:01:11 beee pulseaudio[1518]: module-bluetooth-device.c: #011allocation=0<br>Dec 31 16:01:11 beee bluetoothd[956]: avdtp_unref(0x2a84940): ref=3<br>Dec 31 16:01:11 beee pulseaudio[1518]: module-bluetooth-device.c: #011<b>subbands=1</b><br>
Dec 31 16:01:11 beee pulseaudio[1518]: module-bluetooth-device.c: #011<b>blocks=3</b><br>Dec 31 16:01:11 beee pulseaudio[1518]: module-bluetooth-device.c: #011bitpool=51<br>Dec 31 16:01:11 beee pulseaudio[1518]: module-bluetooth-device.c: Connection to the device configured<br>
Dec 31 16:01:11 beee pulseaudio[1518]: module-bluetooth-device.c: Got the stream socket<br><br>This looks very suspicious to me. Bluetoothd sends &quot;8 subbands&quot; and &quot;16 blocks&quot; back to pulseaudio, but pulseaudio receives &quot;1 subband&quot; and &quot;3 blocks&quot;. That looks wrong, doesn&#39;t it?<br>
<br>Thanks,<br>Burkhard<br><br><br><br><br><div class="gmail_quote">2010/1/2 Tanu Kaskinen <span dir="ltr">&lt;<a href="mailto:tanuk@iki.fi">tanuk@iki.fi</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
pe, 2010-01-01 kello 16:02 +0100, Burkhard Stubert kirjoitti:<br>
<div class="im">&gt; Hi chaps,<br>
&gt;<br>
&gt; A happy new year to you all.<br>
&gt;<br>
&gt; I want to turn my Ubuntu-Karmic-based eee-PC into a Bluetooth stereo<br>
&gt; headset (eventually, the eee will be replaced by a car infotainment<br>
&gt; system). The eee connects via Bluetooth to a mobile phone, which acts<br>
&gt; as an audio source for the eee. The music played on the mobile is<br>
&gt; transported via Bluetooth to the eee and comes out of the eee&#39;s<br>
&gt; speakers. That&#39;s the theory. In practise, the streaming stops after<br>
&gt; 3-5 seconds and there is no sound any way.<br>
&gt;<br>
&gt; From the syslog messages (see attachment playmusic3.syslog), I see the<br>
&gt; following:<br>
&gt;       * At tag &quot;###1&quot;, pulseaudio has successfully created an audio<br>
&gt;         source &quot;bluez_source.00_25_48_F5_D8_15&quot;.<br>
&gt;       * At tag &quot;###2&quot;, the audio stream seems to be set up correctly.<br>
&gt;         The message is &quot;module-bluetooth-device.c: Stream properly set<br>
&gt;         up, we&#39;re ready to roll!&quot;.<br>
&gt;       * At tag &quot;###3&quot;, there are some problems setting rlimit&#39;s. I<br>
&gt;         guess because pulseaudio runs in a per-user session and does<br>
&gt;         not have the access privileges to change the rlimit&#39;s. I<br>
&gt;         assume that the problem isn&#39;t really important.<br>
<br>
</div>Correctly assumed.<br>
<br>
&gt;       * From tag &quot;###4&quot; to tag &quot;###5&quot;, pulseaudio tells alsa-mixer to<br>
<div class="im">&gt;         look at profiles. It actually finds three supported profiles:<br>
&gt;         ###4a - output:analog-stereo, ###4b - output:analog-stereo<br>
&gt;         +input:analog-stereo, ###4c - input:analog-stereo. Question:<br>
&gt;         What are these ALSA profiles used for?<br>
<br>
</div>They are for switching the mode in which the sound card is used. Your<br>
card can be used in three modes: analog stereo out, analog stereo in,<br>
and a combination of them. There could be more on some other sound card;<br>
I think the main motivation for the profiles came from the desire to<br>
switch between stereo and surround modes.<br>
<br>
&gt;       * At tag &quot;###6&quot;, things seem to go wrong with the message<br>
<div class="im">&gt;         &quot;alsa-mixer.c: Unable to attach to mixer front:0: No such file<br>
&gt;         or directory&quot;. But maybe this problem can be ignored, because<br>
&gt;         the next line says &quot;alsa-mixer.c: Successfully attached to<br>
&gt;         mixer &#39;hw:0&#39;&quot;.<br>
<br>
</div>Yes, it can be ignored. The alsa mixer apparently can&#39;t be opened using<br>
the &quot;front&quot; device. I&#39;m not sure if this is a bug in the driver, but we<br>
can use &quot;hw&quot; as well.<br>
<br>
&gt;       * At tag &quot;###7&quot;, pulseaudio seems to fall back to some default<br>
<div class="im">&gt;         sinks and sources (module-device-restore.c comes into play).<br>
&gt;         That doesn&#39;t look good. Question: What&#39;s going wrong here?<br>
<br>
</div>Nothing is wrong. When sinks and sources are loaded,<br>
module-device-restore restores them to the same state that they had when<br>
pulseaudio was previously running.<br>
<br>
&gt;       * At tag &quot;###8&quot;, things start to repeat and it is the same steps<br>
<div class="im">&gt;         and message as from tag &quot;###1&quot;.<br>
&gt; Any ideas what is going wrong in my setup?<br>
<br>
</div>There are crashes, so apparently nothing is wrong in the setup. The a2dp<br>
source is just buggy. Here are notes about each pulseaudio pid change:<br>
<br>
The log sample starts with some bluetooth activity, apparently the a2dp<br>
source is being loaded. Pulseaudio has pid 1518.<br>
<br>
After ###2 the bluetooth device module fails an assertion:<br>
<br>
    Dec 31 16:01:11 beee pulseaudio[1518]: module-bluetooth-device.c: Assertion &#39;(size_t) decoded == a2dp-&gt;frame_length&#39; failed at modules/bluetooth/module-bluetooth-device.c:1367, function a2dp_process_push(). Aborting.<br>

<br>
A new pulseaudio process is spawned with pid 1772.<br>
<br>
Here&#39;s a mystery:<br>
<br>
    Dec 31 16:01:12 beee pulseaudio[1772]: card.c: Created 1 &quot;bluez_card.00_25_48_F5_D8_15&quot;<br>
    Dec 31 16:01:43 beee pulseaudio[2030]: module-bluetooth-device.c: Connected to the bluetooth audio service<br>
<br>
What&#39;s happening here? During 31 seconds pulseaudio pid changes from<br>
1772 to 2030, but nothing is logged during this change. Then the same<br>
assertion failure occurs again:<br>
<br>
    Dec 31 16:01:43 beee pulseaudio[2030]: module-bluetooth-device.c: Assertion &#39;(size_t) decoded == a2dp-&gt;frame_length&#39; failed at modules/bluetooth/module-bluetooth-device.c:1367, function a2dp_process_push(). Aborting.<br>

<br>
After that a new pulseaudio instance is spawned with pid 2060. That<br>
stays running until the end of the log sample.<br>
<br>
You seem to be running pulseaudio 0.9.19. There were some bluetooth<br>
fixes in 0.9.20; I recommend updating to 0.9.21. If the bugs are still<br>
there, file a new ticket.<br>
<font color="#888888"><br>
--<br>
Tanu Kaskinen<br>
<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@mail.0pointer.de">pulseaudio-discuss@mail.0pointer.de</a><br>
<a href="https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss" target="_blank">https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss</a><br>
</font></blockquote></div><br>