2007-02-13 01:56:33

by Mike Hodson

[permalink] [raw]
Subject: [Bluez-devel] Successes and failures with btsco/bluez respectively

Hi there. I'm posting this to the -devel list, as I think this has
more to do with the current state of the software, rather than how I'm
using it.

I just got my gentoo box working with the newest bluez package (3.9)
and it works wonderfully for scanning bluetooth devices and whatnot.
However, I also own an a2dp headset (BlueSpoon Spider) that I am
aching to use around my house while doing chores, and not bug family
members.

Now, I went and did what your page suggested first off: I downloaded
the CVS for the source of plugz. I then went about compiling it,
getting a2dpd running, getting my bdaddr right and everything. Then i
went about trying to get it to play back. Your reports said "xmms
works" so i ofcourse tried xmms. What happened, that bugged me for
the longest time was it would just sit, at 0:00 like its trying to
open the sound device, a2dpd shows no connection info or anything.

So, i went on about my day reading more list archives.

After a while, i decided to try mplayer, vlc, and even audacious. Of
the 4, only vlc and mplayer worked at all (produced any connection to
a2dpd whatsoever) but i noticed a somewhat random pausing of the sound
into my headset. The bluetooth dongle i have, a Belkin F8T001v2 will
normally show full-time blue light for sending, but during the
interrupted sound, the blue light went to blink a few times, then
continued full blue when i heard sound again.
This puzzled me to no end, because I had been reading reports of
success with similar CSR dongles and xmms with the alsa a2dpd pcm
plugin.

Then i read that there was a newer plugin, a2dpd2. So i edited my
.asoundrc to that, and tried all 4 again, to much different results,
in every respect.
All 4 now caused a2dpd to connect and start transferring audio. Then,
a2dpd disconnected, tried to reconnect, disconnected, connected
reconnected without disconnecting ... needless to say it was worse
than even when the audio paused every few seconds.

Finally, I decided to try the 'last known fallback that should work
fine', btsco-0.5 from sf.net.
I had read someone mention that audio would sometimes jitter because
of the nvidia closed source video drivers, and as I am using that
driver, i feared the worst. But, to my surprise, a2play was completely
successful at sending uninterrupted sound to my headset for an entire
4 minute song! I also edited a2play.c to edit the bitpool from 32
(sounds craptacular) to 53 (sounds perfect with my input, no pops, no
clicks no overamping nothing).

What do you think is happening with plugz / alsa plugins that cause
the errors I have listed?
Do you need any sort of logs from hcidump when the a2dpd2 plugin
causes disconnects?

Also, one thing I have noticed about my headset: The avrcp controls
seem to be sent twice when I press the joystick buttons. Hitting the
playpause button exactly 2 times produces:

A2DPD[218.721]: a2dpd_signal_command: avrcp_play
A2DPD[218.827]: a2dpd_signal_command: avrcp_play
A2DPD[219.215]: a2dpd_signal_command: avrcp_pause
A2DPD[219.300]: a2dpd_signal_command: avrcp_pause

However, stopping the playback (ctrl-c on say, mplayer) only causes
the headset to emit 1 avrcp_stop command.

The info for this device is:

hci0: Type: USB
BD Address: 00:0A:3A:59:90:77 ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:636236 acl:135 sco:0 events:90176 errors:0
TX bytes:22854468 acl:131804 sco:0 commands:69 errors:0
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: HOLD SNIFF PARK
Link mode: ACCEPT MASTER
Name: 'thor'
Class: 0x3e0104
Service Classes: Networking, Rendering, Capturing, Object
Transfer, Audio
Device Class: Computer, Desktop workstation
HCI Ver: 1.1 (0x1) HCI Rev: 0x33c LMP Ver: 1.1 (0x1) LMP Subver: 0x33c
Manufacturer: Cambridge Silicon Radio (10)

Headset info:

BD Address: 00:14:CF:03:37:DC
Device Name: Bluespoon SPIDER
LMP Version: 2.0 (0x3) LMP Subversion: 0xbf1
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xff 0xff 0x8f 0x78 0x18 0x18 0x00 0x80
<3-slot packets> <5-slot packets> <encryption> <slot offset>
<timing accuracy> <role switch> <hold mode> <sniff mode>
<park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
<HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
<power control> <transparent SCO> <broadcast encrypt>
<enhanced iscan> <interlaced iscan> <interlaced pscan>
<inquiry with RSSI> <AFH cap. slave> <AFH class. slave>
<AFH cap. master> <AFH class. master> <extended features>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2007-02-14 08:30:43

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Successes and failures with btsco/bluez respectively

Mike

fwiw, it may be that something somewhere has regressed. I can't get
totally smooth audio through btsco-0.5 or cvs plugz (a2dpd or a2dpd2).
It doesn't have to be in our driver, especially since my previously
working btsco-0.5 plugin doesn't work right. It could be in the kernel
or bluez or my config. I haven't held things constant with a control
configuration unfortunately :(

My best result is in using my spider set, plugz from cvs, a2dpd plugin,
totem and a .asoundrc with

pcm.!default {
type a2dpd
}

but I'm still getting occasional pauses in the stream. totem using
a2dpd2 resulted in audio playing too fast with gaps of silence.

Brad

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-02-13 09:06:10

by Mike Hodson

[permalink] [raw]
Subject: Re: [Bluez-devel] Successes and failures with btsco/bluez respectively

On 2/13/07, Brad Midgley <[email protected]> wrote:
> Mike
> hmm. maybe you should also try the a2dp plugin from btsco-0.5. that was
> before some pretty massive changes. We should have been tagging plugz
> but I haven't known when to tag it.
Ok, I did see that in there, but I was not sure if it was "usable" as
the ./configure/make did not build it.

> I'm not sure on hcidump logs, but one thing that causes similar problems
> with my spider set is having my cellphone on. The spider is connected to
> both the computer and the cellphone, so it wants to be the master
> device. The computer also typically wants to be master and if you have a
> smartphone it will too. The result is a big scatternet (possibly with
> roles switching around) and extremely poor quality of delivery.

I have specifically tried this with my phone turned off, as I read
that this could cause issues as well. Literally, with no configuration
changes, no phone changes, no headset powering on/off, basically
nothing changed except a2dpd vs a2dpd2 it starts going from pausing
every few seconds to completely disconnecting. Also, in my bluez
configuration I have explicitly denied role-switching:

lm accept,master;
lp hold,sniff,park;

> it's possible we somehow have the outbound and inbound avrcp connections
> going simultaneously. also, in early avrcp testing I remember seeing
> doubled-up messages from some sets that were subtly different and I
> thought I had added code to throw out the fake message.

Noted. I shall wait for progress on this.

I have tested older a2dpd and pcm.a2dpd plugins from btsco-0.5, works
flawlessly from what I can tell.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-02-13 08:24:02

by Mitja Pufic

[permalink] [raw]
Subject: Re: [Bluez-devel] Successes and failures with btsco/bluez respectively

Hello Brad,

somehow my mails to the list bounce from this week on. Well I have the
best experience with plugz from 2007-01-26 to 2007-01-29. I use it with SE
HBH-DS970 and i.Tech Clip R35 without a problem in vlc and amarok. With
xmms there are still problems with both headsets, the sound is really
speedy when mmap is on, if I disable it, the speed is fine, but then it
sound chopps on every 20 to 25 seconds. The results are the same with
CSR BC4-external based Toshiba and Level 1 and with both Broadcom based
dongles I have lying around, Anycom USB-250 and Belkin F8T013. I was
runing this on Centrino 1500 Laptop, Pentium 4HT workstation and on 64 bit
Opteron 252 SMP.

With latest plugz I get louder sound, compared to plugz from end of
January but it chopps constantly.

br,
Mitja

On Mon, 12 Feb 2007, Brad Midgley wrote:

> hmm. maybe you should also try the a2dp plugin from btsco-0.5. that was
> before some pretty massive changes. We should have been tagging plugz
> but I haven't known when to tag it.
>
> brad

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-02-13 04:03:59

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Successes and failures with btsco/bluez respectively

Mike

> Finally, I decided to try the 'last known fallback that should work
> fine', btsco-0.5 from sf.net.
> I had read someone mention that audio would sometimes jitter because
> of the nvidia closed source video drivers, and as I am using that
> driver, i feared the worst. But, to my surprise, a2play was completely
> successful at sending uninterrupted sound to my headset for an entire
> 4 minute song! I also edited a2play.c to edit the bitpool from 32
> (sounds craptacular) to 53 (sounds perfect with my input, no pops, no
> clicks no overamping nothing).

hmm. maybe you should also try the a2dp plugin from btsco-0.5. that was
before some pretty massive changes. We should have been tagging plugz
but I haven't known when to tag it.

> What do you think is happening with plugz / alsa plugins that cause
> the errors I have listed?
> Do you need any sort of logs from hcidump when the a2dpd2 plugin
> causes disconnects?

I'm not sure on hcidump logs, but one thing that causes similar problems
with my spider set is having my cellphone on. The spider is connected to
both the computer and the cellphone, so it wants to be the master
device. The computer also typically wants to be master and if you have a
smartphone it will too. The result is a big scatternet (possibly with
roles switching around) and extremely poor quality of delivery.

> Also, one thing I have noticed about my headset: The avrcp controls
> seem to be sent twice when I press the joystick buttons. Hitting the
> playpause button exactly 2 times produces:
>
> A2DPD[218.721]: a2dpd_signal_command: avrcp_play
> A2DPD[218.827]: a2dpd_signal_command: avrcp_play
> A2DPD[219.215]: a2dpd_signal_command: avrcp_pause
> A2DPD[219.300]: a2dpd_signal_command: avrcp_pause
>
> However, stopping the playback (ctrl-c on say, mplayer) only causes
> the headset to emit 1 avrcp_stop command.

it's possible we somehow have the outbound and inbound avrcp connections
going simultaneously. also, in early avrcp testing I remember seeing
doubled-up messages from some sets that were subtly different and I
thought I had added code to throw out the fake message.

brad

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-03-06 04:34:44

by Mike Hodson

[permalink] [raw]
Subject: Re: [Bluez-devel] Successes and failures with btsco/bluez respectively

On 2/14/07, Brad Midgley <[email protected]> wrote:
> Mike
>
> fwiw, it may be that something somewhere has regressed. I can't get
> totally smooth audio through btsco-0.5 or cvs plugz (a2dpd or a2dpd2).
> It doesn't have to be in our driver, especially since my previously
> working btsco-0.5 plugin doesn't work right. It could be in the kernel
> or bluez or my config. I haven't held things constant with a control
> configuration unfortunately :(
>
> My best result is in using my spider set, plugz from cvs, a2dpd plugin,
> totem and a .asoundrc with
>
> pcm.!default {
> type a2dpd
> }
>
> but I'm still getting occasional pauses in the stream. totem using
> a2dpd2 resulted in audio playing too fast with gaps of silence.
>
> Brad


Well, I finally had time/money to get a better bluetooth dongle, a
bluespoon (CSR) 2.0/EDR. My old one's lack of adaptive frequency
hopping limited my range quite a lot compared to what i was able to
get with my BT 1.2 phone. The new dongle improves that immensely.
Also: current plugz cvs works perfectly well, no skipping/weird audio
pitch/dropouts when using mplayer to play back mp3 files. I am still
getting no sound when using a2dpd as a plugin for xmms.

One thing of note, I am no longer able to run a2dpd as a user, and im
wondering what I need to change... i know i got it working once, but
now i get:

A2DPD[21:23:25.748]: a2dp_make_listen_socket: (errno=13:Permission
denied)Cannot bind socket 6 for psm 25

Other than these problems, it works fine when i run a2dpd as root.

Mike

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel