2007-08-13 16:37:43

by Fabien Chevalier

[permalink] [raw]
Subject: [Bluez-devel] New A2DP support : HOWTO ?

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


Attachments:
fchevalier.vcf (253.00 B)
(No filename) (315.00 B)
(No filename) (164.00 B)
Download all attachments

2007-08-18 14:10:31

by Fabien Chevalier

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Hi All,

>
> it is a little scary to think that the pulse daemon which takes up to
> 8% of my laptop's cycles when *idle* might be embedded. Fortunately
> they did just change their threading model in a devel branch.
> Hopefully the change completely removes the need for them to be
> polling from a single mainloop.
>
> I do still like the idea of a native pulse plugin. I think they will
> get it right.

Like the idea too. :-)

Fabien

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-18 14:02:33

by Fabien Chevalier

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Hi Johan,
> To me this sounds like a bug in your headset.

I agree.. however interop experience shows that most a2dp headsets are
buggy, but all in different ways :-(

However we should of
> course strive to be interoperable with as many as possible
> implementations.
>
> The reason why the audio service rejects the start command is that
> STREAMING state should only be entered by request of alsa, since if
> we have no app to provide audio it's unnecessary to have the headset
> think it will receive some audio when in fact it wont.
>
> Do you have any ideas how to solve this?

Right now : no. But i knwo a guy who knows :-)
I'm gonna check what is the most interoperable way of handling this
behaviour.

I was thinking that we could
> accept the start command but immediately afterwards send a suspend
> command. OTOH this feels a little "hackish". The headsets that I have
> which are capable of acting in initiator role will simply disconnect
> when their start command is rejected, so I have not been very happy
> with the current behavior either.

I'm gonna ask a work colleague to know how he solved this issue. Might
take a week or so, as he's in hollidays :-(

Fabien

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-17 14:29:06

by Frédéric Dalleau

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?


> > > Oh I see, then there is no need to write a pulseaudio specific plugin.
> >
> > we might have to do this for latency purposes.
> I do still like the idea of a native pulse plugin.

The guy of pulse audio had a great idea for their alsa plugin :
They put all the code in the pulse library, and the plugin only wrap the
interface.
Then the pulse library can be reused, for example in the xmms plugin
which has a different interface but similar functions...

You might consider this if you plan to write a pulse specific plugin.

Frederic

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-17 14:15:33

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Marcel

> > Oh I see, then there is no need to write a pulseaudio specific plugin.
>
> we might have to do this for latency purposes. We don't wanna copy our
> audio data around. While it would work on the desktop, on an embedded
> device it would be overkill.

it is a little scary to think that the pulse daemon which takes up to
8% of my laptop's cycles when *idle* might be embedded. Fortunately
they did just change their threading model in a devel branch.
Hopefully the change completely removes the need for them to be
polling from a single mainloop.

I do still like the idea of a native pulse plugin. I think they will
get it right.

Brad

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-17 14:02:59

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Hi Frederic,

> > >> Maybe the start command could be used to launch the
> > >> audio player and start playback. Then rejecting should only occur if
> > >> launching failed.
> > >
> > > Won't happen. It's just not how the architecture is. User
> > > applications initiate access to the system wide audio service, not
> > > the other way around.
> >
> > Just a little clarification to this so you don't think we loose all
> > usefulness of doing stuff automatically when a headset connects to
> > us: The audio service sends (D-Bus) signals when devices connect and
> > disconnect and the plan is to also integrate with HAL (a patch is
> > already in the works) to provide a object which HAL aware
> > applications (e.g. pulseaudio) could automatically use. This way the
> > applications or a sound server can automatically recognize the
> > connected headset and switch their audio routing accordingly.
>
> Oh I see, then there is no need to write a pulseaudio specific plugin.

we might have to do this for latency purposes. We don't wanna copy our
audio data around. While it would work on the desktop, on an embedded
device it would be overkill.

> However, A2DP Test Suite check SNK initiated stream start.
>
> 4.2.4.1 TP/SET/BV-04-I [Start Stream. - SNK]
> To verify that SNK can start audio streaming.
>
> A reject would probably make the test fail.

In the long run we need to accept it and then suspend the stream if no
client is attached. However in the long run we also have to tell the
plugin to simply discard data (if no A2DP connection is open) and not
fail with various stupid reasons. In that case the start command would
tell the plugin that a connection is now present and has to use it. It
is a really complex system and needs a lots of testing to get the right
and expected behavior for the end user.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-17 13:53:59

by Frédéric Dalleau

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

On Fri, 2007-08-17 at 16:43 +0300, Johan Hedberg wrote:
> On Aug 17, 2007, at 16:18, Johan Hedberg wrote:
> >> Maybe the start command could be used to launch the
> >> audio player and start playback. Then rejecting should only occur if
> >> launching failed.
> >
> > Won't happen. It's just not how the architecture is. User
> > applications initiate access to the system wide audio service, not
> > the other way around.
>
> Just a little clarification to this so you don't think we loose all
> usefulness of doing stuff automatically when a headset connects to
> us: The audio service sends (D-Bus) signals when devices connect and
> disconnect and the plan is to also integrate with HAL (a patch is
> already in the works) to provide a object which HAL aware
> applications (e.g. pulseaudio) could automatically use. This way the
> applications or a sound server can automatically recognize the
> connected headset and switch their audio routing accordingly.

Oh I see, then there is no need to write a pulseaudio specific plugin.

However, A2DP Test Suite check SNK initiated stream start.

4.2.4.1 TP/SET/BV-04-I [Start Stream. - SNK]
To verify that SNK can start audio streaming.

A reject would probably make the test fail.

Frederic


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-17 13:43:50

by Johan Hedberg

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

On Aug 17, 2007, at 16:18, Johan Hedberg wrote:
>> Maybe the start command could be used to launch the
>> audio player and start playback. Then rejecting should only occur if
>> launching failed.
>
> Won't happen. It's just not how the architecture is. User
> applications initiate access to the system wide audio service, not
> the other way around.

Just a little clarification to this so you don't think we loose all
usefulness of doing stuff automatically when a headset connects to
us: The audio service sends (D-Bus) signals when devices connect and
disconnect and the plan is to also integrate with HAL (a patch is
already in the works) to provide a object which HAL aware
applications (e.g. pulseaudio) could automatically use. This way the
applications or a sound server can automatically recognize the
connected headset and switch their audio routing accordingly.

Johan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-17 13:18:04

by Johan Hedberg

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

On Aug 17, 2007, at 15:44, Frederic Dalleau wrote:
> I had the feeling that start suspend and stop were some basic audio
> player controls...

That's what AVRCP is for. Start and Suspend in AVDTP are only used to
change between OPEN and STREAMING states. The "simultaneous use of
HFP, A2DP and AVRCP profiles" white-paper (available on
bluetooth.org) also has this as a recommendation in section 3:
"The A2DP profile should be seen as a way to setup and configure the
actual transport of a
streaming audio link, the A2DP profile should not be used to control
the applications streaming
data. To control the applications the AVRCP profile should be used."

> Maybe the start command could be used to launch the
> audio player and start playback. Then rejecting should only occur if
> launching failed.

Won't happen. It's just not how the architecture is. User
applications initiate access to the system wide audio service, not
the other way around.

> And acceptor role is mandatory.

Yes, and we of course support it.

Johan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-17 12:44:14

by Frédéric Dalleau

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

> The reason why the audio service rejects the start command is that
> STREAMING state should only be entered by request of alsa, since if
> we have no app to provide audio it's unnecessary to have the headset
> think it will receive some audio when in fact it wont.
>
> Do you have any ideas how to solve this? I was thinking that we could
> accept the start command but immediately afterwards send a suspend
> command. OTOH this feels a little "hackish". The headsets that I have
> which are capable of acting in initiator role will simply disconnect
> when their start command is rejected, so I have not been very happy
> with the current behavior either.

I had the feeling that start suspend and stop were some basic audio
player controls... Maybe the start command could be used to launch the
audio player and start playback. Then rejecting should only occur if
launching failed.

And acceptor role is mandatory.

Frederic

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-17 11:42:53

by Johan Hedberg

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Hi Fabien,

On Aug 17, 2007, at 14:28, Fabien Chevalier wrote:
> The issue seems to be that my headset doesn't seem to like very
> much the
> rejection of the start cmd that the daemon sends to him.
> After a while when xmms starts the daemon sends a start cmd, to which
> the headset answers with a start rsp, which should indicate that
> everything is ok... however i hear no sound in the headset
> whatsoever :-(

To me this sounds like a bug in your headset. However we should of
course strive to be interoperable with as many as possible
implementations.

The reason why the audio service rejects the start command is that
STREAMING state should only be entered by request of alsa, since if
we have no app to provide audio it's unnecessary to have the headset
think it will receive some audio when in fact it wont.

Do you have any ideas how to solve this? I was thinking that we could
accept the start command but immediately afterwards send a suspend
command. OTOH this feels a little "hackish". The headsets that I have
which are capable of acting in initiator role will simply disconnect
when their start command is rejected, so I have not been very happy
with the current behavior either.

Johan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-17 11:28:51

by Fabien Chevalier

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Hi Marcel

> I got the SonyEricsson MBR-100 A2DP receiver dongle. That one is CSR
> based. Never seen a TI based before.

Me neither :-(

> Check again. There were a lot of changes.

Just did that. In fact it used to work a few days ago, when the acceptor
side was paradoxally still broken. Not it has been fixed it doesn't work
anymore : funny, isn't it ?

The issue seems to be that my headset doesn't seem to like very much the
rejection of the start cmd that the daemon sends to him.
After a while when xmms starts the daemon sends a start cmd, to which
the headset answers with a start rsp, which should indicate that
everything is ok... however i hear no sound in the headset whatsoever :-(


Relevant hcidump log below:
> ACL data: handle 6 flags 0x02 dlen 7
L2CAP(d): cid 0x0041 len 3 [psm 25]
AVDTP(s): Start cmd: transaction 4
ACP SEID 1
< ACL data: handle 6 flags 0x02 dlen 8
L2CAP(d): cid 0x0054 len 4 [psm 25]
AVDTP(s): Start rej: transaction 4
ACP SEID 1
Error code 25
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 06 00 01 00 .....
< ACL data: handle 6 flags 0x02 dlen 7
L2CAP(d): cid 0x0054 len 3 [psm 25]
AVDTP(s): Start cmd: transaction 0
ACP SEID 1
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 06 00 01 00 .....
> ACL data: handle 6 flags 0x02 dlen 6
L2CAP(d): cid 0x0041 len 2 [psm 25]
AVDTP(s): Start rsp: transaction 0
< ACL data: handle 6 flags 0x02 dlen 377
< ACL data: handle 6 flags 0x01 dlen 153
L2CAP(d): cid 0x0056 len 526 [psm 25]
AVDTP(m): ver 2 cc 0 pt 1 seqn 0 time 128 ssrc 1
0000: 01 9c bf fa 20 00 00 00 00 00 00 00 00 00 7f ff ....
...........
0010: 7f ff 7f ff 7f ff 7f ff 7f fe ff fd ff fb ff fb
................
0020: ff fb ff fb ff fb ff fb ff f7 ff ef ff df ff df
................
0030: ff df ff df ff df ff df ff bf ff 7f fe ff fe ff
................
0040: fe ff fe ff fe ff fe ff fd ff fb ff f7 ff f7 ff
................
:


Cheers,

Fabien

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-17 11:00:39

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Hi Fabien,

> >> For some reason my headset tries to start the A2DP stream, connects to
> >> RFCOMM channel, and then stops the a2dp stream, while it stays connected
> >> to rfcomm (hs profile).
> >>
> >> To force the use of a2dp i had to reload the audio daemon, and then
> >> launch the multimedia player. It then tries to start a2dp stream, and it
> >> works.
> >
> > which headset is this. What about hcitool info output from it.
>
> Sony Ericsson HBH-DS970
>
> /home/fchevalier/bluez-cvs# hcitool info 00:18:13:E7:6D:4F
> Requesting information ...
> BD Address: 00:18:13:E7:6D:4F
> Device Name: HBH-DS970
> /home/fchevalier/bluez-cvs# hcitool info 00:18:13:E7:6D:4F
> Requesting information ...
> BD Address: 00:18:13:E7:6D:4F
> LMP Version: 2.0 (0x3) LMP Subversion: 0xe1b
> Manufacturer: Texas Instruments Inc. (13)
> Features: 0xff 0xfd 0x29 0x78 0x18 0x18 0x00 0x80

I got the SonyEricsson MBR-100 A2DP receiver dongle. That one is CSR
based. Never seen a TI based before.

> >> Btw i got perfect sound quality compared to a2dpd. No small glitches
> >> from time to time, just *perfect* sound. :-)
> >
> > Check the latest CVS. Johan fixed some issues with the AVDTP state
> > machine and the plugin interaction.
>
> I just did it. However a2dp streaming dooesn't work anymore : i'm gonna
> try to have a look to it...

Check again. There were a lot of changes.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-17 10:42:45

by Fabien Chevalier

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Marcel Holtmann wrote:
> Hi Fabien,
>
>> For some reason my headset tries to start the A2DP stream, connects to
>> RFCOMM channel, and then stops the a2dp stream, while it stays connected
>> to rfcomm (hs profile).
>>
>> To force the use of a2dp i had to reload the audio daemon, and then
>> launch the multimedia player. It then tries to start a2dp stream, and it
>> works.
>
> which headset is this. What about hcitool info output from it.

Sony Ericsson HBH-DS970

/home/fchevalier/bluez-cvs# hcitool info 00:18:13:E7:6D:4F
Requesting information ...
BD Address: 00:18:13:E7:6D:4F
Device Name: HBH-DS970
/home/fchevalier/bluez-cvs# hcitool info 00:18:13:E7:6D:4F
Requesting information ...
BD Address: 00:18:13:E7:6D:4F
LMP Version: 2.0 (0x3) LMP Subversion: 0xe1b
Manufacturer: Texas Instruments Inc. (13)
Features: 0xff 0xfd 0x29 0x78 0x18 0x18 0x00 0x80
<3-slot packets> <5-slot packets> <encryption> <slot
offset>
<timing accuracy> <role switch> <hold mode> <sniff mode>
<park state> <channel quality> <SCO link> <HV2 packets>
<HV3 packets> <u-law log> <A-law log> <CVSD>
<transparent SCO>
<enhanced iscan> <interlaced iscan> <interlaced pscan>
<inquiry with RSSI> <AFH cap. slave> <AFH class. slave>
<AFH cap. master> <AFH class. master> <extended features>

>
>> Btw i got perfect sound quality compared to a2dpd. No small glitches
>> from time to time, just *perfect* sound. :-)
>
> Check the latest CVS. Johan fixed some issues with the AVDTP state
> machine and the plugin interaction.

I just did it. However a2dp streaming dooesn't work anymore : i'm gonna
try to have a look to it...

Fabien


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-14 16:30:44

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Hi Fabien,

> For some reason my headset tries to start the A2DP stream, connects to
> RFCOMM channel, and then stops the a2dp stream, while it stays connected
> to rfcomm (hs profile).
>
> To force the use of a2dp i had to reload the audio daemon, and then
> launch the multimedia player. It then tries to start a2dp stream, and it
> works.

which headset is this. What about hcitool info output from it.

> Btw i got perfect sound quality compared to a2dpd. No small glitches
> from time to time, just *perfect* sound. :-)

Check the latest CVS. Johan fixed some issues with the AVDTP state
machine and the plugin interaction.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-14 12:50:55

by Fabien Chevalier

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?


Thanks frederic !

For some reason my headset tries to start the A2DP stream, connects to
RFCOMM channel, and then stops the a2dp stream, while it stays connected
to rfcomm (hs profile).

To force the use of a2dp i had to reload the audio daemon, and then
launch the multimedia player. It then tries to start a2dp stream, and it
works.

Btw i got perfect sound quality compared to a2dpd. No small glitches
from time to time, just *perfect* sound. :-)


Fabien


> Hi,
>
>> Certainly a very stupid question : but how do we get started using
>> the
>> brand new A2DP support ? - for me it seems that it still favors sco over
>> a2dp :-(
>
> I modified the test-audio python script to get something like this:
> Look at your syslog to see what happen.
> I then got my headset connected and could hear something ;)
>
> #!/usr/bin/python
> import dbus
> bus = dbus.SystemBus()
> manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'),
> 'org.bluez.Manager')
>
> conn = manager.ActivateService('audio')
> audio = dbus.Interface(bus.get_object(conn, '/org/bluez/audio'),
> 'org.bluez.audio.Manager')
>
> # Create device
> path = audio.CreateDevice("00:03:89:AA:BD:64")
>
> # Get org.bluez.audio.Sink interface
> sink = dbus.Interface(bus.get_object(conn, path),
> 'org.bluez.audio.Sink')
>
> try:
> sink.Connect()
> except:
> pass
>
> #sink.Disconnect()
>
>
> Hope this helps
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-13 17:50:32

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Hi Frederic,

> > once you called CreateDevice (which is needed only once), you can
> > actually press a button on the headset and it should re-connect and you
> > can play music.
>
> I have a few question too :
>
> I have not setup any asoundrc and alsa found the bluetooth plugin. Any
> ideas?

no idea how that works. You normally need something like:

pcm.bluetooth {
type bluetooth
}

In the future we might add some parameters to pick the right device.
This entry will select the currently connected headset or will connect
to the default one.

> What if I start the media player with headset not connected?

It will try to connect to the default headset.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-13 17:25:05

by Frédéric Dalleau

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

On Mon, 2007-08-13 at 19:06 +0200, Marcel Holtmann wrote:
> once you called CreateDevice (which is needed only once), you can
> actually press a button on the headset and it should re-connect and you
> can play music.

I have a few question too :

I have not setup any asoundrc and alsa found the bluetooth plugin. Any
ideas?

What if I start the media player with headset not connected?

Frederic


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-13 17:06:13

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Hi Frederic,

> > Certainly a very stupid question : but how do we get started using
> > the
> > brand new A2DP support ? - for me it seems that it still favors sco over
> > a2dp :-(
>
> I modified the test-audio python script to get something like this:
> Look at your syslog to see what happen.
> I then got my headset connected and could hear something ;)

once you called CreateDevice (which is needed only once), you can
actually press a button on the headset and it should re-connect and you
can play music.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-08-13 16:46:31

by Frédéric Dalleau

[permalink] [raw]
Subject: Re: [Bluez-devel] New A2DP support : HOWTO ?

Hi,

> Certainly a very stupid question : but how do we get started using
> the
> brand new A2DP support ? - for me it seems that it still favors sco over
> a2dp :-(

I modified the test-audio python script to get something like this:
Look at your syslog to see what happen.
I then got my headset connected and could hear something ;)

#!/usr/bin/python
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'),
'org.bluez.Manager')

conn = manager.ActivateService('audio')
audio = dbus.Interface(bus.get_object(conn, '/org/bluez/audio'),
'org.bluez.audio.Manager')

# Create device
path = audio.CreateDevice("00:03:89:AA:BD:64")

# Get org.bluez.audio.Sink interface
sink = dbus.Interface(bus.get_object(conn, path),
'org.bluez.audio.Sink')

try:
sink.Connect()
except:
pass

#sink.Disconnect()


Hope this helps

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel