Android Audio FastMixer 实例

移动开发 waitig 923℃ 百度已收录 0评论

关于FastMixer不错的链接:
http://grokbase.com/t/gg/android-porting/12973xgwc3/questions-of-fastmixer
http://blog.csdn.net/innost/article/details/7750715
https://github.com/hehonghui/android-tech-frontier/blob/master/issue-9/Android%2010ms%E9%97%AE%E9%A2%98%EF%BC%9A%E5%85%B3%E4%BA%8EAndroid%E9%9F%B3%E9%A2%91%E8%B7%AF%E5%BE%84%E5%BB%B6%E8%BF%9F%E7%9A%84%E8%A7%A3%E9%87%8A.md
https://android.googlesource.com/platform/frameworks/av/+/jb-release/services/audioflinger/FastMixer.cpp
https://googlesamples.github.io/android-audio-high-performance/guides/audio-output-latency.html

只有手上一个Nexus 5支持了FastMixer,难得能得到调试信息,记录之。安装audio-echo。然后运行这个命令:

$ adb shell ps | grep echo 
u0_a83    26473 211   931416 55048 sys_epoll_ 00000000 S com.google.sample.echo
$ adb shell dumpsys media.audio_flinger

Low Latency Verification

这里写图片描述

Nexus 5

Library qcom_pre_processing
  Noise Suppression / Qualcomm Fluence for Hammerhead
    UUID: 25ec95c0-1fcf-11e3-b5f8-0002a5d5c51b
    TYPE: 58b4b260-8e06-11e0-aa8e-0002a5d5c51b
    apiVersion: 00020000
    flags: 00000203
  Acoustic Echo Canceler / Qualcomm Fluence for Hammerhead
    UUID: 1e5c3ea0-1fcf-11e3-9176-0002a5d5c51b
    TYPE: 7b491460-8d4d-11e0-bd61-0002a5d5c51b
    apiVersion: 00020000
    flags: 00000203
Library offload_bundle
  (no effects)
Library loudness_enhancer
  Loudness Enhancer / The Android Open Source Project
    UUID: fa415329-2034-4bea-b5dc-5b381c8d1e2c
    TYPE: fe3199be-aed0-413f-87bb-11260eb63cf1
    apiVersion: 00020000
    flags: 00000008
Library proxy
  Visualizer / The Android Open Source Project
    UUID: ec7178ec-e5e1-4432-a3f4-4657e6795210
    TYPE: e46b26a0-dddd-11db-8afd-0002a5d5c51b
    apiVersion: 00020000
    flags: 00400008
  Insert Preset Reverb / NXP Software Ltd.
    UUID: f3e178d2-ebcb-408e-8357-0002a5d5c51b
    TYPE: 47382d60-ddd8-11db-bf3a-0002a5d5c51b
    apiVersion: 00020000
    flags: 00400048
  Auxiliary Preset Reverb / NXP Software Ltd.
    UUID: 1b78f587-6d1c-422e-8b84-0002a5d5c51b
    TYPE: 47382d60-ddd8-11db-bf3a-0002a5d5c51b
    apiVersion: 00020000
    flags: 00400001
  Insert Environmental Reverb / NXP Software Ltd.
    UUID: b707403a-a1c1-4291-9573-0002a5d5c51b
    TYPE: c2e5d5f0-94bd-4763-9cac-4e234d06839e
    apiVersion: 00020000
    flags: 00400048
  Auxiliary Environmental Reverb / NXP Software Ltd.
    UUID: 48404ac9-d202-4ccc-bf84-0002a5d5c51b
    TYPE: c2e5d5f0-94bd-4763-9cac-4e234d06839e
    apiVersion: 00020000
    flags: 00400001
  Equalizer / NXP Software Ltd.
    UUID: c8e70ecd-48ca-456e-8a4f-0002a5d5c51b
    TYPE: 0bed4300-ddd6-11db-8f34-0002a5d5c51b
    apiVersion: 00020000
    flags: 00400048
  Dynamic Bass Boost / NXP Software Ltd.
    UUID: 14804144-a5ee-4d24-aa88-0002a5d5c51b
    TYPE: 0634f220-ddd4-11db-a0fc-0002a5d5c51b
    apiVersion: 00020000
    flags: 00400248
Library fmas
  Downmixer / Fraunhofer IIS
    UUID: 36103c51-8514-11e2-9e96-0800200c9a66
    TYPE: 381e49cc-a858-4aa2-87f6-e8388e7601b2
    apiVersion: 00020000
    flags: 00000008
  Virtualizer / Fraunhofer IIS
    UUID: 36103c50-8514-11e2-9e96-0800200c9a66
    TYPE: 37cc2c00-dddd-11db-8577-0002a5d5c51b
    apiVersion: 00020000
    flags: 00000290
Library visualizer_hw
  (no effects)
Library visualizer_sw
  (no effects)
Library reverb
  (no effects)
Library bundle
  Volume / NXP Software Ltd.
    UUID: 119341a0-8469-11df-81f9-0002a5d5c51b
    TYPE: 09e8ede0-ddde-11db-b4f6-0002a5d5c51b
    apiVersion: 00020000
    flags: 00000050
Clients:
  pid: 795
  pid: 1239
  pid: 26473
Notification Clients:
  pid: 200
  pid: 795
  pid: 1239
  pid: 1607
  pid: 2375
  pid: 26473
Global session refs:
  session   pid count
       16   795     1
       44   795     1
      359  1239     1
      435 26473     1
      437 26473     1
Hardware status: 0
Standby Time mSec: 3000

Output thread 0xb4180000 type 0 (MIXER):
  Thread name: AudioOut_2
  I/O handle: 2
  TID: 786
  Standby: no
  Sample rate: 48000 Hz
  HAL frame count: 240
  HAL format: 0x1 (pcm16)
  HAL buffer size: 960 bytes
  Channel count: 2
  Channel mask: 0x00000003 (front-left, front-right)
  Format: 0x5 (pcmfloat)
  Frame size: 8 bytes
  Pending config events: none
  Output device: 0x4 (WIRED_HEADSET)
  Input device: 0 (NONE)
  Audio source: 0 (default)
  Normal frame count: 960
  Last write occurred (msecs): 6
  Total writes: 30043
  Delayed writes: 0
  Blocked in write: yes
  Suspend count: 0
  Sink buffer : 0xb48d9000
  Mixer buffer: 0xb48d7000
  Effect buffer: 0xb48d0000
  Fast track availMask=0xd0
  AudioStreamOut: 0xb60a41f8 flags 0x2 (PRIMARY)
  Thread throttle time (msecs): 591
  AudioMixer tracks: 0x00000017
  FastMixer command=MIX_WRITE writeSequence=241133 framesWritten=28935840
            numTracks=2 writeErrors=0 underruns=0 overruns=42
            sampleRate=48000 frameCount=240 measuredWarmup=20.6 ms, warmupCycles=6
            mixPeriod=5.00 ms
  Simple moving statistics over last 71.7 seconds:
    wall clock time in ms per mix cycle:
      mean=5.00 min=2.08 max=7.83 stddev=0.05
    raw CPU load in us per mix cycle:
      mean=448 min=0 max=917 stddev=157
  Distribution of mix cycle times in ms for the tails (> ~3 stddev outliers):
    left tail: mean=4.41 min=2.08 max=4.70 stddev=0.69
    right tail: mean=5.55 min=5.28 max=7.83 stddev=0.67
  Fast tracks: kMaxFastTracks=8 activeMask=0x5
  Index Active Full Partial Empty  Recent Ready
      0    yes  357       0     3    full  2880
      1     no  486      31   306   empty     0
      2    yes  375     198   996    full   240
      3     no  509      10   101   empty     0
      4     no  107       2    21   empty     0
      5     no  204      13   120   empty     0
      6     no  110       2    18   empty     0
      7     no    0       0     0    full     0
  Stream volumes in dB: 0:-17, 1:-27, 2:-20, 3:0, 4:-13, 5:-20, 6:0, 7:-27, 8:-21, 9:0, 10:0, 11:0, 12:0
  Normal mixer raw underrun counters: partial=0 empty=3
  4 Tracks of which 1 are active
    Name Active Client Type      Fmt Chn mask Session fCount S F SRate  L dB  R dB    Server Main buf  Aux Buf Flags UndFrmCnt
    F  1     no   1239    1 00000001 00000001     359  13248 S 1 48000  -inf  -inf  000033C0 0xb48d9000 0x0 0x600         0 
    F  3     no    795    1 00000001 00000001      16   3596 S 1 48000  -inf  -inf  00000E0C 0xb48d9000 0x0 0x600         0 
    F  5     no    795    1 00000001 00000001      44   3596 S 1 48000  -inf  -inf  00009A84 0xb48d9000 0x0 0x604         0 
    F  2    yes  26473    3 00000001 00000001     435    240 A 1 48000     0     0  0033D470 0xb48d9000 0x0 0x000         0 
  0 Effect Chains

Output thread 0xb3e00000 type 0 (MIXER):
  Thread name: AudioOut_4
  I/O handle: 4
  TID: 787
  Standby: yes
  Sample rate: 48000 Hz
  HAL frame count: 1920
  HAL format: 0x1 (pcm16)
  HAL buffer size: 7680 bytes
  Channel count: 2
  Channel mask: 0x00000003 (front-left, front-right)
  Format: 0x1 (pcm16)
  Frame size: 4 bytes
  Pending config events: none
  Output device: 0 (NONE)
  Input device: 0 (NONE)
  Audio source: 0 (default)
  Normal frame count: 1920
  Last write occurred (msecs): 15363290
  Total writes: 0
  Delayed writes: 0
  Blocked in write: no
  Suspend count: 0
  Sink buffer : 0xb48db000
  Mixer buffer: 0xb42f9000
  Effect buffer: 0xb48dd000
  Fast track availMask=0xfe
  AudioStreamOut: 0xb60a4230 flags 0x8 (DEEP_BUFFER)
  Thread throttle time (msecs): 0
  AudioMixer tracks: 0x00000000
  FastMixer not initialized
  Stream volumes in dB: 0:-9.5, 1:-14, 2:-11, 3:-18, 4:-5.8, 5:-11, 6:0, 7:-11, 8:-11, 9:0, 10:-18, 11:0, 12:0
  Normal mixer raw underrun counters: partial=0 empty=0
  0 Tracks
  0 Effect Chains

Output thread 0xb3c40000 type 0 (MIXER):
  Thread name: AudioOut_6
  I/O handle: 6
  TID: 789
  Standby: yes
  Sample rate: 48000 Hz
  HAL frame count: 768
  HAL format: 0x1 (pcm16)
  HAL buffer size: 3072 bytes
  Channel count: 2
  Channel mask: 0x00000003 (front-left, front-right)
  Format: 0x5 (pcmfloat)
  Frame size: 8 bytes
  Pending config events: none
  Output device: 0 (NONE)
  Input device: 0 (NONE)
  Audio source: 0 (default)
  Normal frame count: 1152
  Last write occurred (msecs): 15363293
  Total writes: 0
  Delayed writes: 0
  Blocked in write: no
  Suspend count: 0
  Sink buffer : 0xb48f2800
  Mixer buffer: 0xb48f0000
  Effect buffer: 0xb4891400
  Fast track availMask=0xfe
  AudioStreamOut: 0xb60a4268 flags 0 (NONE)
  Thread throttle time (msecs): 0
  AudioMixer tracks: 0x00000000
  FastMixer command=COLD_IDLE writeSequence=0 framesWritten=0
            numTracks=0 writeErrors=0 underruns=0 overruns=0
            sampleRate=0 frameCount=0 measuredWarmup=0 ms, warmupCycles=0
            mixPeriod=nan ms
  No FastMixer statistics available currently
  Fast tracks: kMaxFastTracks=8 activeMask=0
  Index Active Full Partial Empty  Recent Ready
      0     no    0       0     0    full     0
      1     no    0       0     0    full     0
      2     no    0       0     0    full     0
      3     no    0       0     0    full     0
      4     no    0       0     0    full     0
      5     no    0       0     0    full     0
      6     no    0       0     0    full     0
      7     no    0       0     0    full     0
  Stream volumes in dB: 0:-9.5, 1:-14, 2:-11, 3:-18, 4:-5.8, 5:-11, 6:0, 7:-11, 8:-11, 9:0, 10:-18, 11:0, 12:0
  Normal mixer raw underrun counters: partial=0 empty=0
  0 Tracks
  0 Effect Chains

Input thread 0xb26c0000:
  Thread name: AudioIn_1B6
  I/O handle: 438
  TID: 26754
  Standby: no
  Sample rate: 48000 Hz
  HAL frame count: 240
  HAL format: 0x1 (pcm16)
  HAL buffer size: 480 bytes
  Channel count: 1
  Channel mask: 0x00000010 (front)
  Format: 0x1 (pcm16)
  Frame size: 2 bytes
  Pending config events: none
  Output device: 0x4 (WIRED_HEADSET)
  Input device: 0x80000010 (WIRED_HEADSET)
  Audio source: 6 (voice recognition)
  Fast capture thread: yes
  Fast track available: no
  FastCapture command=READ_WRITE readSequence=28287 framesRead=3394320
              readErrors=0 sampleRate=48000 frameCount=240
              measuredWarmup=73.1 ms, warmupCycles=3 period=5.00 ms
  1 Tracks of which 1 are active
    Active Client Fmt Chn mask Session S   Server fCount SRate
       yes  26473   1 00000010     437 6 0033CB10   2048 48000
  0 Effect Chains

Reroute submix audio module:
 route[0] rate in=0 out=0, addr=[]
 route[1] rate in=0 out=0, addr=[]
 route[2] rate in=0 out=0, addr=[]
 route[3] rate in=0 out=0, addr=[]
 route[4] rate in=0 out=0, addr=[]
 route[5] rate in=0 out=0, addr=[]
 route[6] rate in=0 out=0, addr=[]
 route[7] rate in=0 out=0, addr=[]
 route[8] rate in=0 out=0, addr=[]
 route[9] rate in=48000 out=48000, addr=[]

在其它Android设备上基本上都是FastMixer not initialized,如下实例:

坚果P2 FastMixer not initialized

Clients:
  pid: 2160
  pid: 2823
Notification Clients:
  pid: 1109
  pid: 1575
  pid: 1819
  pid: 2160
  pid: 2823
Global session refs:
 session pid count
       8 2160   1
       9 1819   1
      10 2823   1
Hardware status: 0
Standby Time mSec: 3000

Output thread 0x4165d008 internals
Normal frame count: 1024
last write occurred (msecs): 0
total writes: 30437
delayed writes: 0
blocked in write: 1
suspend count: 0
mix buffer : 0x4001b008
Fast track availMask=0xfe
io handle: 2
TID: 1368
standby: 0
Sample rate: 44100
HAL frame count: 1024
Channel Count: 2
Channel Mask: 0x00000003
Format: 1
Frame size: 4

Pending setParameters commands: 
 Index Command

Pending config events: 

AudioMixer tracks: 00000003
FastMixer not initialized
Output thread 0x4165d008 stream volumes in dB:
    0:-4.7, 1:-6, 2:-8.7, 3:0, 4:-4.5, 5:-8.7, 6:0, 7:-6, 8:-6, 9:0, 10:0
Output thread 0x4165d008 tracks
   Name Client Type      Fmt Chn mask Session fCount S F SRate  L dB  R dB    Server Main buf  Aux Buf Flags UndFrmCnt
      0   2160    0 00000001 00000001       8   2048 I 0 44100   -10   -10  00000000 4001B008 00000000 0x000         0 
      1   2823    3 00000001 00000003      10   2048 S 3 44100     0     0  01DB8400 4001B008 00000000 0x600     14336 
Output thread 0x4165d008 active tracks
   Name Client Type      Fmt Chn mask Session fCount S F SRate  L dB  R dB    Server Main buf  Aux Buf Flags UndFrmCnt
      1   2823    3 00000001 00000003      10   2048 S 3 44100     0     0  01DB8400 4001B008 00000000 0x600     14336 
Normal mixer raw underrun counters: partial=0 empty=0

- 0 Effect Chains:

Output thread 0x416bb008 internals
Normal frame count: 1024
last write occurred (msecs): 1831937
total writes: 0
delayed writes: 0
blocked in write: 0
suspend count: 0
mix buffer : 0x4003c008
Fast track availMask=0xfe
io handle: 3
TID: 1373
standby: 1
Sample rate: 44100
HAL frame count: 1024
Channel Count: 2
Channel Mask: 0x00000003
Format: 1
Frame size: 4

Pending setParameters commands: 
 Index Command

Pending config events: 

AudioMixer tracks: 00000000
FastMixer not initialized
Output thread 0x416bb008 stream volumes in dB:
    0:-4.7, 1:-12, 2:-15, 3:0, 4:-11, 5:-15, 6:0, 7:-12, 8:-6, 9:0, 10:-Inf
Output thread 0x416bb008 tracks
   Name Client Type      Fmt Chn mask Session fCount S F SRate  L dB  R dB    Server Main buf  Aux Buf Flags UndFrmCnt
Output thread 0x416bb008 active tracks
   Name Client Type      Fmt Chn mask Session fCount S F SRate  L dB  R dB    Server Main buf  Aux Buf Flags UndFrmCnt
Normal mixer raw underrun counters: partial=0 empty=0

- 0 Effect Chains:

华为P8 FastMixer not initialized

Library huawei_processing
  Huawei Audio Preprocessing Effect / Terminal Multimedia Technology Department
    UUID: e707d040-6b79-11e2-b16a-0002a5d5c51b
    TYPE: d030a540-6b79-11e2-a305-0002a5d5c51b
    apiVersion: 00020000
    flags: 00140283
Library loudness_enhancer
  Loudness Enhancer / The Android Open Source Project
    UUID: fa415329-2034-4bea-b5dc-5b381c8d1e2c
    TYPE: fe3199be-aed0-413f-87bb-11260eb63cf1
    apiVersion: 00020000
    flags: 00000008
Library downmix
  Multichannel Downmix To Stereo / The Android Open Source Project
    UUID: 93f04452-e4fe-41cc-91f9-e475b6d1d69f
    TYPE: 381e49cc-a858-4aa2-87f6-e8388e7601b2
    apiVersion: 00020000
    flags: 00000008
Library visualizer
  Visualizer / The Android Open Source Project
    UUID: d069d9e0-8329-11df-9168-0002a5d5c51b
    TYPE: e46b26a0-dddd-11db-8afd-0002a5d5c51b
    apiVersion: 00020000
    flags: 00000008
Library reverb
  Insert Preset Reverb / NXP Software Ltd.
    UUID: 172cdf00-a3bc-11df-a72f-0002a5d5c51b
    TYPE: 47382d60-ddd8-11db-bf3a-0002a5d5c51b
    apiVersion: 00020000
    flags: 00000048
  Auxiliary Preset Reverb / NXP Software Ltd.
    UUID: f29a1400-a3bb-11df-8ddc-0002a5d5c51b
    TYPE: 47382d60-ddd8-11db-bf3a-0002a5d5c51b
    apiVersion: 00020000
    flags: 00000001
  Insert Environmental Reverb / NXP Software Ltd.
    UUID: c7a511a0-a3bb-11df-860e-0002a5d5c51b
    TYPE: c2e5d5f0-94bd-4763-9cac-4e234d06839e
    apiVersion: 00020000
    flags: 00000048
  Auxiliary Environmental Reverb / NXP Software Ltd.
    UUID: 4a387fc0-8ab3-11df-8bad-0002a5d5c51b
    TYPE: c2e5d5f0-94bd-4763-9cac-4e234d06839e
    apiVersion: 00020000
    flags: 00000001
Library bundle
  Volume / NXP Software Ltd.
    UUID: 119341a0-8469-11df-81f9-0002a5d5c51b
    TYPE: 09e8ede0-ddde-11db-b4f6-0002a5d5c51b
    apiVersion: 00020000
    flags: 00000050
  Equalizer / NXP Software Ltd.
    UUID: ce772f20-847d-11df-bb17-0002a5d5c51b
    TYPE: 0bed4300-ddd6-11db-8f34-0002a5d5c51b
    apiVersion: 00020000
    flags: 00000048
  Virtualizer / NXP Software Ltd.
    UUID: 1d4033c0-8557-11df-9f2d-0002a5d5c51b
    TYPE: 37cc2c00-dddd-11db-8577-0002a5d5c51b
    apiVersion: 00020000
    flags: 00000250
  Dynamic Bass Boost / NXP Software Ltd.
    UUID: 8631f300-72e2-11df-b57e-0002a5d5c51b
    TYPE: 0634f220-ddd4-11db-a0fc-0002a5d5c51b
    apiVersion: 00020000
    flags: 00000248
Clients:
  pid: 2354
  pid: 3063
  pid: 4029
Notification Clients:
  pid: 2354
  pid: 3063
  pid: 3429
  pid: 4008
  pid: 4029
  pid: 4548
  pid: 4557
  pid: 4736
Global session refs:
  session   pid count
        1  3063     1
        2  3063     1
        3  3063     1
        4  3063     1
     1946  3429     1
     2728  4008     2
     2732  3429     2
     2734  4029     1
     2741  2354     1
     2742  2354     1
Hardware status: 0
Standby Time mSec: 3000

Output thread 0xaaea2ef8 type 0 (MIXER):
  Thread name: AudioOut_6
  I/O handle: 6
  TID: 3459
  Standby: no
  Sample rate: 48000 Hz
  HAL frame count: 960
  HAL format: 0x1 (pcm16)
  HAL buffer size: 3840 bytes
  Channel count: 2
  Channel mask: 0x00000003 (front-left, front-right)
  Format: 0x1 (pcm16)
  Frame size: 4 bytes
  Pending config events: none
  Output device: 0x4 (WIRED_HEADSET)
  Input device: 0 (NONE)
  Audio source: 0 (default)
  Normal frame count: 960
  Last write occurred (msecs): 9
  Total writes: 1478050
  Delayed writes: 0
  Blocked in write: yes
  Suspend count: 0
  Sink buffer : 0xaae8dfa0
  Mixer buffer: 0xaaee4d00
  Effect buffer: 0xaaee6b20
  Fast track availMask=0xfe
  AudioStreamOut: 0xaae8de60 flags 0x2 (PRIMARY)
  Thread throttle time (msecs): 96684
  AudioMixer tracks: 0x0000000f
  FastMixer not initialized
  Stream volumes in dB: 0:-21, 1:-17, 2:-20, 3:-21, 4:-20, 5:-20, 6:0, 7:-18, 8:-11, 9:-96, 10:-21, 11:0, 12:0
  Normal mixer raw underrun counters: partial=0 empty=0
  4 Tracks of which 1 are active
    Name Active Client Type      Fmt Chn mask Session fCount S F SRate  L dB  R dB    Server Main buf  Aux Buf Flags UndFrmCnt
       0     no   3063    5 00000001 00000003    2728  22050 S 1 44100     0     0  0000B87F 0xaae8dfa0 0x0 0x601       882 
       1    yes   2354    3 00000001 00000001    2741   1924 A 3 48000     0     0  00135600 0xaae8dfa0 0x0 0x000         0 
       3     no   4029    1 00000001 00000003    2734  10081 S 1 44100  -inf  -inf  00002761 0xaae8dfa0 0x0 0x600         0 
       2     no   3063    1 00000001 00000003    2732  24000 S 1 48000     0     0  00008BAB 0xaae8dfa0 0x0 0x601       725 
  0 Effect Chains

Input thread 0xab24a530:
  Thread name: AudioIn_AB7
  I/O handle: 2743
  TID: 2443
  Standby: no
  Sample rate: 48000 Hz
  HAL frame count: 960
  HAL format: 0x1 (pcm16)
  HAL buffer size: 3840 bytes
  Channel count: 2
  Channel mask: 0x0000000c (left, right)
  Format: 0x1 (pcm16)
  Frame size: 4 bytes
  Pending config events: none
  Output device: 0x4 (WIRED_HEADSET)
  Input device: 0x80000010 (WIRED_HEADSET)
  Audio source: 6 (voice recognition)
  Fast capture thread: no
  Fast track available: no
  FastCapture not initialized
  1 Tracks of which 1 are active
    Active Client Fmt Chn mask Session S   Server fCount SRate
       yes   2354   1 00000010    2742 6 00133BC0   2880 48000
  0 Effect Chains
[stream status]
primary standby:false 
low-power standby:true 
fm standby:true 
modem0-call standby:true disabled:true 
modem1-call standby:true disabled:false 
[device status]
output device:0x4 
input source:0x6 
input deivce:0x10 
forced output:0x0 
[maxim status]
enable:false 
cur_sence:0 
if8_inout_use:false 
smart_pa_stereo:false 
[mad status]
mad_test:false 
Number of controls: 194
ctl type    num name                                     value
0   INT 1   S1 WORDLEN SEL                           3
1   INT 1   S3 WORDLEN SEL                           0
2   BOOL    1   S1 IF CLK EN                             On
3   INT 1   S1 IF FS CFG                             4
4   INT 1   S1 IF IN SRC CFG                         4
5   INT 1   S1 IF OUT SRC CFG                        1
6   BOOL    1   S2 IF CLK EN                             Off
7   INT 1   S2 IF FS CFG                             4
8   INT 1   S2 DSP IF IN FS                          0
9   INT 1   S2 DSP IF OUT FS                         0
10  INT 1   S2 IF FUNC MODE CFG                      0
11  BOOL    1   S2 MST SLV CFG                           Off
12  BOOL    1   S2 LRCLK CFG                             Off
13  BOOL    1   S2 IF FRAME MODE CFG                     Off
14  INT 1   S2 IF WORD LENGTH CFG                    0
15  BOOL    1   S2 IF CHNNL MODE CFG                     Off
16  BOOL    1   S2 RX CLK SEL                            Off
17  BOOL    1   S2 TX CLK SEL                            On
18  BOOL    1   S3 IF CLK EN                             Off
19  INT 1   S3 IF FS CFG                             0
20  INT 1   S3 IF IN SRC CFG                         1
21  INT 1   S3 IF OUT SRC CFG                        1
22  BOOL    1   S4 IF CLK EN                             Off
23  INT 1   S4 IF FS CFG                             4
24  INT 1   S1 IL PGA GAIN                           0
25  INT 1   S1 IR PGA GAIN                           0
26  INT 1   S2 IL PGA GAIN                           136
27  INT 1   S2 IR PGA GAIN                           136
28  INT 1   S3 IL PGA GAIN                           0
29  INT 1   S3 IR PGA GAIN                           0
30  INT 1   S4 IL PGA GAIN                           0
31  INT 1   S4 IR PGA GAIN                           0
32  INT 1   S1 OL PGA GAIN                           0
33  INT 1   S1 OR PGA GAIN                           0
34  INT 1   S2 OL PGA GAIN                           0
35  INT 1   S2 OR PGA GAIN                           0
36  INT 1   S3 OL PGA GAIN                           0
37  INT 1   S3 OR PGA GAIN                           0
38  INT 1   S4 OL PGA GAIN                           0
39  INT 1   S4 OR PGA GAIN                           0
40  INT 1   SIDE PGA GAIN                            0
41  INT 1   DACL PGA GAIN                            251
42  INT 1   DACR PGA GAIN                            251
43  INT 1   LINEL PGA GAIN                           28
44  INT 1   LINER PGA GAIN                           0
45  INT 1   AUX PGA GAIN                             17
46  INT 1   MAIN PGA GAIN                            14
47  INT 1   LOL PGA GAIN                             14
48  BOOL    1   LOL PGA MUTE                             Off
49  INT 1   LOR PGA GAIN                             14
50  BOOL    1   LOR PGA MUTE                             Off
51  INT 1   HPL PGA GAIN                             18
52  BOOL    1   HPL PGA MUTE                             On
53  INT 1   HPR PGA GAIN                             18
54  BOOL    1   HPR PGA MUTE                             On
55  INT 1   EP PGA GAIN                              22
56  BOOL    1   EP PGA MUTE                              Off
57  BOOL    1   S1 IL SRC EN                             Off
58  INT 1   S1 IL SRC MODE                           0
59  BOOL    1   S1 IR SRC EN                             Off
60  INT 1   S1 IR SRC MODE                           0
61  BOOL    1   S1 OL SRC EN                             Off
62  INT 1   S1 OL SRC MODE                           2
63  BOOL    1   S1 OR SRC EN                             Off
64  INT 1   S1 OR SRC MODE                           0
65  BOOL    1   S2 IL SRC EN                             Off
66  INT 1   S2 IL SRC MODE                           0
67  BOOL    1   S2 IR SRC EN                             Off
68  INT 1   S2 IR SRC MODE                           0
69  BOOL    1   S2 OL SRC EN                             Off
70  INT 1   S2 OL SRC MODE                           0
71  BOOL    1   S2 OR SRC EN                             Off
72  INT 1   S2 OR SRC MODE                           0
73  BOOL    1   S3 IL SRC EN                             Off
74  INT 1   S3 IL SRC MODE                           1
75  BOOL    1   S3 IR SRC EN                             Off
76  INT 1   S3 IR SRC MODE                           1
77  BOOL    1   S3 OL SRC EN                             Off
78  INT 1   S3 OL SRC MODE                           0
79  BOOL    1   S3 OR SRC EN                             Off
80  INT 1   S3 OR SRC MODE                           0
81  BOOL    1   S4 IL SRC EN                             Off
82  INT 1   S4 IL SRC MODE                           0
83  BOOL    1   S4 IR SRC EN                             Off
84  INT 1   S4 IR SRC MODE                           0
85  BOOL    1   S4 OL SRC EN                             Off
86  INT 1   S4 OL SRC MODE                           0
87  BOOL    1   S4 OR SRC EN                             Off
88  INT 1   S4 OR SRC MODE                           0
89  BOOL    1   SIDETONE SRC EN                          Off
90  INT 1   SIDETONE SRC MODE                        3
91  BOOL    1   MDM SRC EN                               Off
92  INT 1   MDM SRC MODE                             0
93  BOOL    1   DACL SRC EN                              On
94  INT 1   DACL SRC MODE                            4
95  BOOL    1   DACR SRC EN                              On
96  INT 1   DACR SRC MODE                            4
97  BOOL    1   DACL SRC UP16 EN                         On
98  INT 1   DACL SRC UP16 MODE                       0
99  BOOL    1   DACR SRC UP16 EN                         On
100 INT 1   DACR SRC UP16 MODE                       0
101 BOOL    1   HP DACL MUTE                             On
102 BOOL    1   HP DACR MUTE                             On
103 BOOL    1   MAINPGA MUTE1                            On
104 BOOL    1   MAINPGA MUTE2                            On
105 BOOL    1   AUXPGA MUTE1                             Off
106 BOOL    1   AUXPGA MUTE2                             Off
107 BOOL    1   LINELPGA MUTE1                           Off
108 BOOL    1   LINELPGA MUTE2                           Off
109 BOOL    1   LINERPGA MUTE1                           Off
110 BOOL    1   LINERPGA MUTE2                           Off
111 INT 1   DACL MIXER GAIN0                         3
112 INT 1   DACL MIXER GAIN1                         3
113 INT 1   DACR MIXER GAIN0                         3
114 INT 1   DACR MIXER GAIN1                         3
115 INT 1   SHARE MIXER GAIN1                        3
116 INT 1   SHARE MIXER GAIN2                        3
117 INT 1   SHARE MIXER GAIN3                        0
118 INT 1   SHARE MIXER GAIN4                        0
119 INT 1   MIXERL GAIN1                             3
120 INT 1   MIXERL GAIN2                             3
121 INT 1   MIXERL GAIN3                             3
122 INT 1   MIXERL GAIN4                             3
123 INT 1   MIXERR GAIN1                             3
124 INT 1   MIXERR GAIN2                             3
125 INT 1   MIXERR GAIN3                             3
126 INT 1   MIXERR GAIN4                             3
127 BOOL    1   MAIN MIC BOOST                           On
128 BOOL    1   AUX MIC BOOST                            Off
129 BOOL    1   LINEINL BOOST                            Off
130 BOOL    1   LINEINR BOOST                            Off
131 BOOL    1   DACSR MIXER S1R MUX SWITCH               Off
132 BOOL    1   DACSR MIXER L SWITCH                     Off
133 BOOL    1   DACSR MIXER R SWITCH                     Off
134 BOOL    1   DACSR MIXER SIDETONE SWITCH              Off
135 BOOL    1   DACSL MIXER S1L MUX SWITCH               Off
136 BOOL    1   DACSL MIXER L SWITCH                     Off
137 BOOL    1   DACSL MIXER R SWITCH                     Off
138 BOOL    1   DACSL MIXER SIDETONE SWITCH              Off
139 BOOL    1   DACR MIXER DSP IF8 SWITCH                On
140 BOOL    1   DACR MIXER SIDETONE SWITCH               Off
141 BOOL    1   DACL MIXER DSP IF8 SWITCH                On
142 BOOL    1   DACL MIXER SIDETONE SWITCH               Off
143 BOOL    1   SHARE MIXER S1L SWITCH                   Off
144 BOOL    1   SHARE MIXER S1R SWITCH                   Off
145 BOOL    1   MIXERR S1R MUX SWITCH                    On
146 BOOL    1   MIXERR S2R SWITCH                        Off
147 BOOL    1   MIXERR MDM SWITCH                        Off
148 BOOL    1   MIXERR SIDETONE SWITCH                   Off
149 BOOL    1   MIXERL S1L MUX SWITCH                    On
150 BOOL    1   MIXERL S2L SWITCH                        Off
151 BOOL    1   MIXERL MDM SWITCH                        Off
152 BOOL    1   MIXERL SIDETONE SWITCH                   Off
153 ENUM    1   MIC MUX                                  HS MIC
154 ENUM    1   LIR MUX                                  LINEIN1
155 ENUM    1   LIL MUX                                  LINEIN1
156 ENUM    1   ADC1R MUX                                LINEINR
157 ENUM    1   ADC1L MUX                                LINEINL
158 ENUM    1   ADC0R MUX                                MAINMIC
159 ENUM    1   ADC0L MUX                                MAINMIC
160 ENUM    1   LOR MUX                                  Off
161 ENUM    1   LOL MUX                                  Off
162 ENUM    1   EP MUX                                   DACL
163 ENUM    1   HPR MUX                                  DACR
164 ENUM    1   HPL MUX                                  DACL
165 ENUM    1   DACR MUX                                 DSP IF8 IN
166 ENUM    1   DACL MUX                                 DSP IF8 IN
167 ENUM    1   DACSR S1R MUX                            S1 R
168 ENUM    1   DACSL S1L MUX                            S1 L
169 ENUM    1   SIDETONE MUX                             S1 IL
170 ENUM    1   MDM MUX                                  S1 IL
171 ENUM    1   MIXERR S1 MUX                            S1 IR
172 ENUM    1   MIXERL S1 MUX                            S1 IL
173 ENUM    1   M1R MUX                                  ADC0R
174 ENUM    1   M1L MUX                                  ADC0L
175 ENUM    1   M0R MUX                                  ADC0R
176 ENUM    1   M0L MUX                                  ADC0L
177 ENUM    1   BTR MUX                                  ADC0R
178 ENUM    1   BTL MUX                                  ADC0L
179 ENUM    1   APR MUX                                  ADC0R
180 ENUM    1   APL MUX                                  ADC0L
181 BOOL    1   EP SWITCH SWITCH                         Off
182 BOOL    1   SP IR SWITCH SWITCH                      Off
183 BOOL    1   SP IL SWITCH SWITCH                      Off
184 BOOL    1   HPDAC_I2V SWITCH                         On
185 BOOL    1   S4 OR SWITCH SWITCH                      Off
186 BOOL    1   S4 OL SWITCH SWITCH                      Off
187 BOOL    1   S3 OR SWITCH SWITCH                      Off
188 BOOL    1   S3 OL SWITCH SWITCH                      Off
189 BOOL    1   S2 OR SWITCH SWITCH                      Off
190 BOOL    1   S2 OL SWITCH SWITCH                      Off
191 BOOL    1   S1 OR SWITCH SWITCH                      On
192 BOOL    1   S1 OL SWITCH SWITCH                      On
193 BOOL    1   MAD SWITCH SWITCH                        Off
\00
Reroute submix audio module:
 route[0] rate in=0 out=0, addr=[]
 route[1] rate in=0 out=0, addr=[]
 route[2] rate in=0 out=0, addr=[]
 route[3] rate in=0 out=0, addr=[]
 route[4] rate in=0 out=0, addr=[]
 route[5] rate in=0 out=0, addr=[]
 route[6] rate in=0 out=0, addr=[]
 route[7] rate in=0 out=0, addr=[]
 route[8] rate in=0 out=0, addr=[]
 route[9] rate in=48000 out=48000, addr=[]

NanoPC T2 FastMixer not initialized

Clients:
  pid: 404
  pid: 489
  pid: 2866
Notification Clients:
  pid: 123
  pid: 404
  pid: 489
  pid: 2415
  pid: 2866
Global session refs:
  session   pid count
       19   489     1
       31   404     1
       32  2866     1
       33  2866     1
Hardware status: 0
Standby Time mSec: 3000

Output thread 0xb58ef000:
  Normal frame count: 1024
  Last write occurred (msecs): 6015
  Total writes: 2023
  Delayed writes: 0
  Blocked in write: no
  Suspend count: 0
  Sink buffer : 0xb58ee000
  Mixer buffer: 0xb5930000
  Effect buffer: 0xb5932000
  Fast track availMask=0xfe
  I/O handle: 2
  TID: 400
  Standby: yes
  Sample rate: 48000
  HAL frame count: 1024
  HAL buffer size: 4096 bytes
  Channel Count: 2
  Channel Mask: 0x00000003 (front-left, front-right)
  Format: 0x1 (pcm16)
  Frame size: 4
  Pending config events: none
  AudioMixer tracks: 0x00000007
  FastMixer not initialized
  Stream volumes in dB: 0:-8.2, 1:-27, 2:-21, 3:-11, 4:-14, 5:-21, 6:0, 7:-27, 8:-21, 9:-96, 10:-11, 11:-11, 12:0, 13:0
  Normal mixer raw underrun counters: partial=0 empty=0
  3 Tracks of which 0 are active
    Name Active Client Type      Fmt Chn mask Session fCount S F SRate  L dB  R dB    Server Main buf  Aux Buf Flags UndFrmCnt
       2     no   2866    3 00000001 00000001      32   4096 S 1 48000     0     0  00007C00 0xb58ee000 0x0 0x600         0 
       1     no    404    1 00000001 00000003      31   4512 S 1 48000  -inf  -inf  000011A0 0xb58ee000 0x0 0x600         0 
       0     no    489    1 00000001 00000003      19   8329 S 1 44100  -inf  -inf  00002089 0xb58ee000 0x0 0x600         0 
  0 Effect Chains

Input thread 0xb59c1000:
  No active record clients
  Fast capture thread: no
  Fast track available: no
  I/O handle: 34
  TID: 2895
  Standby: yes
  Sample rate: 48000
  HAL frame count: 1024
  HAL buffer size: 2048 bytes
  Channel Count: 1
  Channel Mask: 0x00000010 (front)
  Format: 0x1 (pcm16)
  Frame size: 2
  Pending config events: none
  1 Tracks of which 0 are active
    Active Client Fmt Chn mask Session S   Server fCount SRate
        no   2866   1 00000010      33 7 00006C00   3072 48000
  0 Effect Chains

Reroute submix audio module:
 route[0] rate in=0 out=0, addr=[]
 route[1] rate in=0 out=0, addr=[]
 route[2] rate in=0 out=0, addr=[]
 route[3] rate in=0 out=0, addr=[]
 route[4] rate in=0 out=0, addr=[]
 route[5] rate in=0 out=0, addr=[]
 route[6] rate in=0 out=0, addr=[]
 route[7] rate in=0 out=0, addr=[]
 route[8] rate in=0 out=0, addr=[]
 route[9] rate in=48000 out=48000, addr=[]

本文由【waitig】发表在等英博客
本文固定链接:Android Audio FastMixer 实例
欢迎关注本站官方公众号,每日都有干货分享!
等英博客官方公众号
点赞 (0)分享 (0)