<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 27, 2018 at 3:32 PM, Luiz Augusto von Dentz <span dir="ltr"><<a href="mailto:luiz.dentz@gmail.com" target="_blank">luiz.dentz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Sathish,<br>
<div><div class="m_7150987726164727526m_6306418918103474670h5"><br>
On Tue, Mar 27, 2018 at 9:39 AM, Sathish Narasimman<br>
<<a href="mailto:nsathish41@gmail.com" target="_blank">nsathish41@gmail.com</a>> wrote:<br>
> Hi Tanu,<br>
><br>
><br>
> On Sat, Mar 17, 2018 at 1:26 AM, Tanu Kaskinen <<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>> wrote:<br>
>><br>
>> On Thu, 2018-03-15 at 14:49 +0530, Sathish Narasimman wrote:<br>
>> > Hi,<br>
>> ><br>
>> > I would like to know the PulseAudio module that is responsible for<br>
>> > pushing<br>
>> > the audio for every 1 millisecond.<br>
>> ><br>
>> > For NBS the packets are pushed with 48bytes and 1milli sec interval.<br>
>><br>
>> Where does this 1 ms interval come from? The audio that pulseaudio<br>
>> writes with SCO is mono, 16-bit, 8000 Hz. With that specification 48<br>
>> bytes means 3 ms packets, not 1 ms.<br>
>><br>
>> > But for WBS the timing between 2 SCO packets needs to be *7.5 Milli<br>
>> > Sec.*<br>
>> ><br>
>> > *May I know how to change the packet interval between the 2 SCO<br>
>> > packets.*<br>
>><br>
>> The write_block_size variable in src/modules/bluetooth/module-b<wbr>luez5-<br>
>> device.c controls how big packets pulseaudio writes. That in turn is<br>
>> calculated based on write_link_mtu, and that comes from the transport<br>
>> acquire() callback. The ofono backend always returns 48 bytes. The<br>
>> native backend returns 48 bytes by default, but it can also be<br>
>> configured to ask the kernel what the real MTU is.<br>
>><br>
><br>
> I am able to set the MTU to 60 bytes in the and able to make the SCO<br>
> connection.<br>
> But still, the data rate is maintained as 1 msec.<br>
><br>
> Do we need to introduce any latency in the PA?<br>
> As per core spec 5 , Vol 4 Part B of USB transaction the HCI packet interval<br>
> need to be 7.5msec.<br>
> Do we need to maintain the rate in PA?<br>
<br>
</div></div>I suspect something in btusb.c might be the problem:<br>
<br>
<a href="https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/drivers/bluetooth/btusb.c#n1272" rel="noreferrer" target="_blank">https://git.kernel.org/pub/scm<wbr>/linux/kernel/git/bluetooth/bl<wbr>uetooth-next.git/tree/drivers/<wbr>bluetooth/btusb.c#n1272</a><br>
<br>
Either the interval of endpoint is wrong or we shouldn't set the ASAP<br>
flag since that might ignore the interval completely.<br>
<span class="m_7150987726164727526m_6306418918103474670im m_7150987726164727526m_6306418918103474670HOEnZb"><br></span></blockquote><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">bInterval is the USB polling interval which <span class="m_7150987726164727526gmail-gr_ m_7150987726164727526gmail-gr_9 m_7150987726164727526gmail-gr-alert m_7150987726164727526gmail-gr_gramm m_7150987726164727526gmail-gr_inline_cards m_7150987726164727526gmail-gr_run_anim m_7150987726164727526gmail-Punctuation m_7150987726164727526gmail-only-ins m_7150987726164727526gmail-replaceWithoutSep" id="m_7150987726164727526gmail-9" style="color:inherit;font-size:inherit;display:inline;border-bottom:2px solid transparent;background-repeat:no-repeat">shou</span>ld be 1msec.<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">It is HCI packet interval that needs to be 7.5msec.</div><div><br></div><div>Based on the bInterval the polling happens in the USB driver for every 1 msec.</div><div>As per present implementation the HCI packet of 63bytes is transfered every 1msec.</div><div>Also, I disabled the ASAP flag but it doesn't help to maintain the ALT 6 HCI packet interval of 7.5msec.</div><div><br></div><div>It looks like the from PA we need to maintain the time interval for WBS.</div><div>Please help in the right direction to proceed futher.</div>

 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="m_7150987726164727526m_6306418918103474670im m_7150987726164727526m_6306418918103474670HOEnZb">
>><br>
>> --<br>
>> Tanu<br>
>><br>
>> <a href="https://liberapay.com/tanuk" rel="noreferrer" target="_blank">https://liberapay.com/tanuk</a><br>
>> <a href="https://www.patreon.com/tanuk" rel="noreferrer" target="_blank">https://www.patreon.com/tanuk</a><br>
>> ______________________________<wbr>_________________<br>
>> pulseaudio-discuss mailing list<br>
>> <a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freed<wbr>esktop.org</a><br>
>> <a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/pulseaudio-di<wbr>scuss</a><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> pulseaudio-discuss mailing list<br>
> <a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freed<wbr>esktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/pulseaudio-di<wbr>scuss</a><br>
><br>
<br>
<br>
<br>
</span><span class="m_7150987726164727526m_6306418918103474670HOEnZb"><font color="#888888">--<br>
Luiz Augusto von Dentz<br>
</font></span><div class="m_7150987726164727526m_6306418918103474670HOEnZb"><div class="m_7150987726164727526m_6306418918103474670h5">______________________________<wbr>_________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freed<wbr>esktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/pulseaudio-di<wbr>scuss</a><br>
</div></div></blockquote></div><br></div></div>