OSDN Git Service

Add A2DP codec-specific information to dumpsys output
authorPavlin Radoslavov <pavlin@google.com>
Thu, 6 Apr 2017 22:13:16 +0000 (15:13 -0700)
committerPavlin Radoslavov <pavlin@google.com>
Mon, 10 Apr 2017 21:55:46 +0000 (21:55 +0000)
commit302113d4e44f06e90f90a5903e33ae830edb58a3
treeb2d9285477b8af3e0624483421369fa4730e9a22
parentb0aca861fee4f0fbab809b5a1ef75c31d10055bd
Add A2DP codec-specific information to dumpsys output

Now we print the following information:
 * Current codec name
 * Info for each supported codec:
   - Priority
   - Encoder interval (ms)
   - Codec Config: Sampling rate, Bits per sample, Channel mode (MONO/STEREO)
   - Selectable codec configuration
   - Codec's local capability
   - Packet counts (expected/dropped)
   - PCM read counts (expected/actual)
   - PCM read bytes (expected/actual)
 * LDAC codec-specific info:
   - LDAC quality mode: HIGH/MID/LOW/ABR
   - LDAC saved transmit queue length [used in ABR mode]
 * SBC codec-specific info:
   - Frames counts (expected/dropped)

Sample of the new format is below:

---
A2DP Codecs State:
  Current Codec: LDAC

A2DP LDAC State:
  Priority: 1000000
  Encoder interval (ms): 20
  Config: Rate=96000 Bits=32 Mode=STEREO
  Selectable: Rate=44100|48000|88200|96000 Bits=16|24|32 Mode=MONO|STEREO
  Local capability: Rate=44100|48000|88200|96000 Bits=16|24|32 Mode=MONO|STEREO
  Packet counts (expected/dropped)                        : 596 / 161
  PCM read counts (expected/actual)                       : 2488 / 2488
  PCM read bytes (expected/actual)                        : 2547712 / 2547712
  LDAC quality mode                                       : ABR
  LDAC saved transmit queue length                        : 0

A2DP aptX-HD State:
  Priority: 4001
  Encoder interval (ms): 0
  Config: Invalid
  Selectable: Invalid
  Local capability: Rate=44100|48000 Bits=24 Mode=STEREO
  Packet counts (expected/dropped)                        : 0 / 0
  PCM read counts (expected/actual)                       : 0 / 0
  PCM read bytes (expected/actual)                        : 0 / 0

A2DP aptX State:
  Priority: 3001
  Encoder interval (ms): 0
  Config: Rate=44100 Bits=16 Mode=STEREO
  Selectable: Rate=44100|48000 Bits=16 Mode=STEREO
  Local capability: Rate=44100|48000 Bits=16 Mode=STEREO
  Packet counts (expected/dropped)                        : 0 / 0
  PCM read counts (expected/actual)                       : 0 / 0
  PCM read bytes (expected/actual)                        : 0 / 0

A2DP AAC State:
  Priority: 2001
  Encoder interval (ms): 20
  Config: Rate=44100 Bits=16 Mode=STEREO
  Selectable: Rate=44100|48000 Bits=16 Mode=STEREO
  Local capability: Rate=44100|48000|88200|96000 Bits=16 Mode=STEREO
  Packet counts (expected/dropped)                        : 0 / 0
  PCM read counts (expected/actual)                       : 0 / 0
  PCM read bytes (expected/actual)                        : 0 / 0

A2DP SBC State:
  Priority: 1001
  Encoder interval (ms): 20
  Config: Rate=44100 Bits=16 Mode=STEREO
  Selectable: Rate=44100 Bits=16 Mode=STEREO
  Local capability: Rate=44100 Bits=16 Mode=STEREO
  Packet counts (expected/dropped)                        : 580 / 0
  PCM read counts (expected/actual)                       : 2900 / 2900
  PCM read bytes (expected/actual)                        : 1484800 / 1484800
  Frames counts (expected/dropped)                        : 3724 / 0
---

Bug: 36567128
Test: Stream A2DP and "adb shell dumpsys bluetooth_manager"
Change-Id: Idd86005b842a4e569b7df91b8bbaf0632ed7f7c9
23 files changed:
btif/src/btif_a2dp_source.cc
stack/a2dp/a2dp_aac.cc
stack/a2dp/a2dp_aac_encoder.cc
stack/a2dp/a2dp_codec_config.cc
stack/a2dp/a2dp_sbc.cc
stack/a2dp/a2dp_sbc_encoder.cc
stack/a2dp/a2dp_vendor_aptx.cc
stack/a2dp/a2dp_vendor_aptx_encoder.cc
stack/a2dp/a2dp_vendor_aptx_hd.cc
stack/a2dp/a2dp_vendor_aptx_hd_encoder.cc
stack/a2dp/a2dp_vendor_ldac.cc
stack/a2dp/a2dp_vendor_ldac_encoder.cc
stack/include/a2dp_aac.h
stack/include/a2dp_aac_encoder.h
stack/include/a2dp_codec_api.h
stack/include/a2dp_sbc.h
stack/include/a2dp_sbc_encoder.h
stack/include/a2dp_vendor_aptx.h
stack/include/a2dp_vendor_aptx_encoder.h
stack/include/a2dp_vendor_aptx_hd.h
stack/include/a2dp_vendor_aptx_hd_encoder.h
stack/include/a2dp_vendor_ldac.h
stack/include/a2dp_vendor_ldac_encoder.h