2010-01-17 12:50:42

by Anil Sasidharan

[permalink] [raw]
Subject: A2DP multiple sink support

Hi,



??????????????? We are trying to use Bluecore BT module (from CSR) for
A2DP profile support. In the present use case, our device acts as a
A2DP SRC. We are able to stream 44.1kHz stereo audio to a A2DP
headset. Now the next use case scenarios that we would like to try out
in A2DP context are the following:



1.?????? A2DP multicast; where single SRC streams audio to multiple
SNKs (all of them paired and connected with the SRC at the same time)

2.?????? Send 2 different audio streams (from the same device) to 2
different A2DP SINK devices (2 headsets).



SRC1 -> SNK1 ????(music stream ? 1)

SRC2 -> SNK2 ????(music stream ? 2)



Here SRC1 and SRC2 are two logical A2DP sources using the same BT HW
module ?(same physical BT module)



Both the A2DP headsets are paired and connected to the BT module on
our device at the same time.



It would be really helpful if someone can throw more light on this (If
the use cases mentioned above are viable, then how?)



Warm Regards,

Anil


2010-01-23 15:45:18

by Iain Hibbert

[permalink] [raw]
Subject: Re: A2DP multiple sink support

On Mon, 18 Jan 2010, Anil Sasidharan wrote:

> However I did not get the last point mentioned in your mail i.e. "So
> expect some cracks in the audio until both connections are setup
> properly".....
>
> Could you please elaborate on this.

Anil you should be aware that Marcel will rarely respond to top posting..

> On Mon, Jan 18, 2010 at 2:11 AM, Marcel Holtmann <[email protected]> wrote:
> > This whole thing with one source adapter works, but during inquiry and
> > page it is almost impossible for a Bluetooth chip to transmit any data.
> > So expect some cracks in the audio until both connections are setup
> > properly.

This means that when a Bluetooth device is performing a device inquiry, or
setting up a connection (paging) to another device, it will usually pause
data transfer over other baseband connections that it already holds.

This means that if you set up an audio stream, then try to start another
stream or perform a device inquiry at the same time the first stream may
become broken (cracks) as no data is being transferred.

Actually, since A2DP is not necessarily low-latency, you may find that
forward buffering is adequate to cover small temporary lapses in data
transfer.

regards,
iain



2010-01-18 05:39:04

by Anil Sasidharan

[permalink] [raw]
Subject: Re: A2DP multiple sink support

Hi Marcel,

Thank you so much for the prompt reply. The following are
the conclusions made from your reply.
1. It is possible to support multiple sources and multiple sinks in A2DP co=
ntext
2. There can be 2 separate streams of audio between 2 sets of sources and s=
inks
3. However there might be bandwidth issues and other paging related issues

However I did not get the last point mentioned in your mail i.e. "So
expect some cracks in the audio until both connections are setup
properly".....

Could you please elaborate on this.

Once again, thanks for your time...

Warm Regards,
Anil

On Mon, Jan 18, 2010 at 2:11 AM, Marcel Holtmann <[email protected]> wrot=
e:
> Hi Anil,
>
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 We are trying to use Bluecore BT module =
(from CSR) for
>> A2DP profile support. In the present use case, our device acts as a
>> A2DP SRC. We are able to stream 44.1kHz stereo audio to a A2DP
>> headset. Now the next use case scenarios that we would like to try out
>> in A2DP context are the following:
>
> look at /etc/bluetooth/audio.conf for settings. You can configure it for
> multiple sources.
>
> The difference between same audio stream and different audio stream is
> not really for bluetoothd itself to make. If it goes to a different
> remote it has to transmit it separately anyway.
>
> If you wanna optimize this, then using GStreamer and some kind of
> mulitplexing magic of the stream could for same stream on different
> targets to reduce the SBC encoding. Otherwise you have to encode the
> stream twice.
>
> This whole thing with one source adapter works, but during inquiry and
> page it is almost impossible for a Bluetooth chip to transmit any data.
> So expect some cracks in the audio until both connections are setup
> properly.
>
> Regards
>
> Marcel
>
>
>

2010-01-17 20:41:03

by Marcel Holtmann

[permalink] [raw]
Subject: Re: A2DP multiple sink support

Hi Anil,

> We are trying to use Bluecore BT module (from CSR) for
> A2DP profile support. In the present use case, our device acts as a
> A2DP SRC. We are able to stream 44.1kHz stereo audio to a A2DP
> headset. Now the next use case scenarios that we would like to try out
> in A2DP context are the following:

look at /etc/bluetooth/audio.conf for settings. You can configure it for
multiple sources.

The difference between same audio stream and different audio stream is
not really for bluetoothd itself to make. If it goes to a different
remote it has to transmit it separately anyway.

If you wanna optimize this, then using GStreamer and some kind of
mulitplexing magic of the stream could for same stream on different
targets to reduce the SBC encoding. Otherwise you have to encode the
stream twice.

This whole thing with one source adapter works, but during inquiry and
page it is almost impossible for a Bluetooth chip to transmit any data.
So expect some cracks in the audio until both connections are setup
properly.

Regards

Marcel



2010-02-27 19:42:27

by Anil Sasidharan

[permalink] [raw]
Subject: Re: A2DP multiple sink support

On Sat, Feb 6, 2010 at 12:30 AM, Iain Hibbert <[email protected]> wrote:
> On Fri, 5 Feb 2010, Anil Sasidharan wrote:
>
>> Thanks a lot for the inputs. Based on this I've tried some experiments.
>> 1. A2DP src has been paired and connected to the A2DP sink
>> 2. While the connection with first SINK is active, I've tried to pair
>> and connect to another A2DP sink
>> 3. Pairing with the second SINK gets done, however while trying to
>> connect I'm encountering an error from D-Bus "Stream Setup Failed".
>> What could be wrong
>>
>> It would be really great if you could throw some light on this. BTW
>> I'm using Bluez v3.36
>
> Anil I can throw no more light on that as I don't use BlueZ at all. And, I
> think the only advice you will get on that list is to try the latest BlueZ
> version.. ?they don't really provide support for outdated versions.
>
> regards,
> iain
>
>
>

Hi Iain,

Thanks for the inputs. I was able to resolve the "Stream
Setup" error and got the connection established with 2 SNKs. However
while trying stream audio to the second SNK, I'm not getting any
audio-output though the debug messages shows that the AVDTP sends out
"audio chunks". Any thoughts?

Warm Regards,
Anil

2010-02-05 15:59:42

by Anil Sasidharan

[permalink] [raw]
Subject: Re: A2DP multiple sink support

On Sat, Jan 23, 2010 at 9:15 PM, Iain Hibbert <[email protected]> wrote:
>
> This means that when a Bluetooth device is performing a device inquiry, or
> setting up a connection (paging) to another device, it will usually pause
> data transfer over other baseband connections that it already holds.
>
> This means that if you set up an audio stream, then try to start another
> stream or perform a device inquiry at the same time the first stream may
> become broken (cracks) as no data is being transferred.
>
> Actually, since A2DP is not necessarily low-latency, you may find that
> forward buffering is adequate to cover small temporary lapses in data
> transfer.
>

Hi Iain,

Thanks a lot for the inputs. Based on this I've tried some experiments.
1. A2DP src has been paired and connected to the A2DP sink
2. While the connection with first SINK is active, I've tried to pair
and connect to another A2DP sink
3. Pairing with the second SINK gets done, however while trying to
connect I'm encountering an error from D-Bus "Stream Setup Failed".
What could be wrong

It would be really great if you could throw some light on this. BTW
I'm using Bluez v3.36

Warm Regards,
Anil