2007-01-15 19:23:47

by Robert Huitl

[permalink] [raw]
Subject: Re: [Bluez-devel] a2dpd: audio connection breaks every 300 seconds

On Monday 15 January 2007 19:29, Brad Midgley wrote:
> Robert
>
> > On the other hand, why is a scan able to interfere with communication? Is
> > this behavior by design (because the hardware can only either scan or
> > send/receive data)?
>
> a scan hijacks the radio briefly and I believe there is no way around it.
>
> there's one unrelated thing you could try. Do you have any other
> bluetooth devices? I had to force my computer to be master in hcid.conf:
>
> lm accept,master;
> lp hold,sniff,park;

I already have these lines in hcid.conf. I had an rswitch in the link policy,
but removing it does not change.

But I found the program scanning every 300 seconds. This is a feature of
kbluetoothd, disabling it results in perfectly gapless playback.

Thanks to everyone on this list helping me to get those issues sorted out. Now
I'm quite happy with my headset :)

Robert

-------------------------------------------------------------------------
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-01-15 19:01:15

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] a2dpd: audio connection breaks every 300 seconds

Andrew

> What about making the driver a little smarter? perhaps having some kind
> of "realtime" (poor choice of word perhaps) that prevents things from taking
> over the radio like this if an application is using it?

Quality of Service would be a better choice of phrase. There are
rumblings about QOS improvements but I don't know much about it.

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-01-15 18:51:03

by Andrew Kohlsmith

[permalink] [raw]
Subject: Re: [Bluez-devel] a2dpd: audio connection breaks every 300 seconds

On Monday 15 January 2007 1:29 pm, Brad Midgley wrote:
> a scan hijacks the radio briefly and I believe there is no way around it.

What about making the driver a little smarter? perhaps having some kind
of "realtime" (poor choice of word perhaps) that prevents things from taking
over the radio like this if an application is using it?

> there's one unrelated thing you could try. Do you have any other
> bluetooth devices? I had to force my computer to be master in hcid.conf:
>
> lm accept,master;
> lp hold,sniff,park;
>
> otherwise moving the bluetooth mouse or using bluetooth dun would
> interrupt a2dp.

This is interesting... I'm still going over the email that Marcel and Steven
sent about a month ago detailing the lowlevel BT radio details. Very, very
good reading.

-A.

-------------------------------------------------------------------------
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-01-15 18:29:58

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] a2dpd: audio connection breaks every 300 seconds

Robert

> On the other hand, why is a scan able to interfere with communication? Is this
> behavior by design (because the hardware can only either scan or send/receive
> data)?

a scan hijacks the radio briefly and I believe there is no way around it.

there's one unrelated thing you could try. Do you have any other
bluetooth devices? I had to force my computer to be master in hcid.conf:

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

otherwise moving the bluetooth mouse or using bluetooth dun would
interrupt a2dp.

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-01-15 18:09:38

by Robert Huitl

[permalink] [raw]
Subject: Re: [Bluez-devel] a2dpd: audio connection breaks every 300 seconds

Hi Fr=E9d=E9ric,

> Do you have another program using BlueZ?

That's it! Some program is periodically scanning for bluetooth devices. Whe=
n I =

run "hcitool scan" manually, I immediately get the choking sound and the =

write() call fails.

I will have to investigate what program is the culprit here. hcid and =

kde-bluetooth come to my mind.

On the other hand, why is a scan able to interfere with communication? Is t=
his =

behavior by design (because the hardware can only either scan or send/recei=
ve =

data)?

Regards,
Robert

-------------------------------------------------------------------------
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=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-01-15 10:24:57

by Frédéric DALLEAU

[permalink] [raw]
Subject: Re: [Bluez-devel] a2dpd: audio connection breaks every 300 seconds

Robert,

> A2DPD[155.135]: a2dp_transfer_raw: Wrote -1 not 603 bytes.

The write call returned EAGAIN, so we should resend the data after a while.

> I attached the complete logfile. It was created by a slightly =

modified version
> of a2dpd that tries to resend the data several times (with 1/10/20 us
> delay) - to no avail.

It should succeed if you wait long enough. Set the delay to 2000 and do =

more tries (like 1000). Unfortunately, waiting too much will lead to =

gaps in the sound when this happen.

I think the cause is elsewhere, could you send us the hcidump -V log?
Do you have another program using BlueZ? Another headset to try?
You could try a shorter bitpool (say 32) if your headset supports it to =

save some bandwith.

Fr=E9d=E9ric


-------------------------------------------------------------------------
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=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel