Re: A2DP quality (bluetooth-alsa)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 14, 2012 at 2:53 PM, qduaty <qduaty@xxxxxxxxx> wrote:
> 2012/3/13 Siarhei Siamashka <siarhei.siamashka@xxxxxxxxx>:
>> Are you now comparing streaming of A2DP audio from your phone to your
>> PC (using bluez A2DP sink) and to your bluetooth headset?
>
> I assume that the phone streams data to the headset (whose session is
> hard to dump on Windows mobile) with bitpool = 112, ie. the same it
> fails to set in Bluez and I'm saying it gives good results in terms of
> perceiveable quality, from which Bluez cannot take advantage due to
> its inherent bitpool=53 limitation.
>
> Anyway, I did some additional listening tests (by listening to Bluez
> SBC on an A2DP headset). SBC_HIGH_PRECISION alone (without your hack)
> only slightly improves quality. Also I finally managed to force higher
> bitpool in ALSA (patch attached). This makes further improvement in
> quality, at least on headsets that do not choke on higher bitpools.

Do you have a hcidump log before and after patching bluez for the part
where A2DP settings are negotiated? For normal bluez 4.99, this is
what I get with Logitech FreePulse headset:

> ACL data: handle 11 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 25]
      AVDTP(s): Discover rsp: transaction 11 nsp 0x00
        ACP SEID 1 - Audio Sink
        ACP SEID 2 - Audio Sink
        ACP SEID 3 - Audio Sink
< ACL data: handle 11 flags 0x00 dlen 7
    L2CAP(d): cid 0x0200 len 3 [psm 25]
      AVDTP(s): Capabilities cmd: transaction 12 nsp 0x00
        ACP SEID 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 11 packets 1
> ACL data: handle 11 flags 0x02 dlen 20
    L2CAP(d): cid 0x0040 len 16 [psm 25]
      AVDTP(s): Capabilities rsp: transaction 12 nsp 0x00
        Media Transport
        Media Codec - SBC
          16kHz 32kHz 44.1kHz 48kHz
          Mono DualChannel Stereo JointStereo
          8 12 16 Blocks
          4 8 Subbands
          SNR Loudness
          Bitpool Range 2-64
        Content Protection
          02 00
< ACL data: handle 11 flags 0x00 dlen 7
    L2CAP(d): cid 0x0200 len 3 [psm 25]
      AVDTP(s): Capabilities cmd: transaction 13 nsp 0x00
        ACP SEID 2
> ACL data: handle 11 flags 0x02 dlen 20
    L2CAP(d): cid 0x0040 len 16 [psm 25]
      AVDTP(s): Capabilities rsp: transaction 13 nsp 0x00
        Media Transport
        Media Codec - SBC
          16kHz 32kHz 44.1kHz 48kHz
          Mono DualChannel Stereo JointStereo
          4 Blocks
          4 8 Subbands
          SNR Loudness
          Bitpool Range 2-32
        Content Protection
          02 00
< ACL data: handle 11 flags 0x00 dlen 7
    L2CAP(d): cid 0x0200 len 3 [psm 25]
      AVDTP(s): Capabilities cmd: transaction 14 nsp 0x00
        ACP SEID 3
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 11 packets 2
> ACL data: handle 11 flags 0x02 dlen 24
    L2CAP(d): cid 0x0040 len 20 [psm 25]
      AVDTP(s): Capabilities rsp: transaction 14 nsp 0x00
        Media Transport
        Media Codec - non-A2DP
          27 00 00 00 01 00 F7 77 02 56 00 FA
< ACL data: handle 11 flags 0x00 dlen 18
    L2CAP(d): cid 0x0200 len 14 [psm 25]
      AVDTP(s): Set config cmd: transaction 15 nsp 0x00
        ACP SEID 1 - INT SEID 1
        Media Transport
        Media Codec - SBC
          44.1kHz
          JointStereo
          16 Blocks
          8 Subbands
          Loudness
          Bitpool Range 2-53

The headset reports 2-64 bitpool capabilities, but bluez sets bitpool
to 53 because it does not use anything higher than suggested by
'default_bitpool' function (actually in two places):
    "max_bitpool = MIN(default_bitpool(cap->frequency,
cap->channel_mode), supported->max_bitpool);"
If I change this code, bitpool 64 can be used, however my ears are not
trained enough to hear any differences between 53 and 64. By the way,
high bitpool settings are causing problems for some users, so not
everything is so clear:
    https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/424215

Would it be a good idea if you come up with a clean patch, making
bitpool selection strategy tunable via a configuration file? Or
implement some kind of heuristics based on whether EDR is supported or
not?

-- 
Best regards,
Siarhei Siamashka
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux