phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.38k stars 655 forks source link

[P&Q] [Asus Zenfone 5] No microphone in VoIP apps #839

Open Conobi opened 4 years ago

Conobi commented 4 years ago

On messaging apps which provide audio calls, there is a lot of issue in GSI for the ZE620KL. On some messaging apps (Telegram, PUBG, Linphone, ...), the microphone doesn't work at all.

This issue happen both on Pie and Quack

minas1618033 commented 4 years ago

Hi Donokami I have same trouble as you with my ZE620KL (phh-treble each version). When I use VoIP apps (Messenger, Duo, Line...), I hear voice from other side but he don't. I can't solve it, but I find a alternative tip. Before phhusson repair the bug, you can try the trick.

Like Messenger, First, sent a 'voice message' (hold button 1~2s) to someone, Now the voice be available, just try to call out (voice still not working when call in ). Hope the method is valid for you.

phhusson commented 4 years ago

You don't even mention real telephony calls, why is that?

Conobi commented 4 years ago

@phhusson Real telephony calls are quite good, even if there is some high-pitched noises some times (it may be distortion, this issue is the same on Google Calls and aosp calls app)

phhusson commented 4 years ago

You don't have the headphone's mic issue described on Facebook messenger?

Conobi commented 4 years ago

You don't have the headphone's mic issue described on Facebook messenger?

Which issue do you talk about? But yes, the mic do work on headphone using Facebook Messenger, even if there is some distorsion.

emincangencer commented 4 years ago

You don't have the headphone's mic issue described on Facebook messenger?

GSI Voip calls. These are the dmesg and logcat: 9stockbip.txt 9stockdmesg.txt 10phhbip.txt 10phhdmesg.txt

If you need anything else @phhusson ask me and I will try to provide it to you. Thanks.

phhusson commented 4 years ago

Ok, please provide:

phhusson commented 4 years ago

Looking at the logs, the audio HAL tries to open a hardware-compressing audio track, but doesn't manage to do it (even though it isn't actually failing), so it tries in loop.

I think that one acceptable workaround would be to disable compress-voip-call path in audio_policy.

emincangencer commented 4 years ago

Ok, please provide:

  • your /vendor/etc/audio_policy_configuration.xml and /vendor/etc/audio/audio_policy_configuration.xml
  • the result of adb shell dumpsys media.audio_policy on GSI

policys.zip

D:\Downloads\Phone\android\platform-tools>adb shell dumpsys media.audio_policy
AudioPolicyManager: 0xeb8ef000
Command Thread: 0xeb8aa140
Tones Thread: 0xeb8aa0e0
AudioCommandThread 0xeb8aa140 Dump
- Commands:
   Command Time        Wait pParam
  Last Command
   02      000077.748  0    0xeb894978
AudioCommandThread 0xeb8aa0e0 Dump
- Commands:
   Command Time        Wait pParam
  Last Command
     none

AudioPolicyManager Dump: 0xeb8ef000
 Primary Output: 13
 Phone state: AUDIO_MODE_NORMAL
 Force use for communications 0
 Force use for media 0
 Force use for record 0
 Force use for dock 8
 Force use for system 0
 Force use for hdmi system audio 0
 Force use for encoded surround output 0
 TTS output not available
 Master mono: off
- Available output devices:
  Device 1:
  - id:  2
  - tag name: Earpiece
  - type: AUDIO_DEVICE_OUT_EARPIECE
  - Profiles:
      Profile 0:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:48000
          - channel masks:0x0010
  Device 2:
  - id:  3
  - tag name: Speaker
  - type: AUDIO_DEVICE_OUT_SPEAKER
  - Profiles:
      Profile 0:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:48000
          - channel masks:0x0003
  Device 3:
  - id:  8
  - tag name: Telephony Tx
  - type: AUDIO_DEVICE_OUT_TELEPHONY_TX
  - Profiles:
      Profile 0:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:8000, 16000
          - channel masks:0x0001, 0x0003
- Available input devices:
  Device 1:
  - id: 14
  - tag name: Built-In Mic
  - type: AUDIO_DEVICE_IN_BUILTIN_MIC
  - address: bottom
  - Profiles:
      Profile 0:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
          - channel masks:0x000c, 0x0010, 0x0030
      Profile 1:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
          - channel masks:0x000c, 0x0010, 0x0030, 0x17000c, 0x80000007, 0x8000000f, 0x8000003f
  Device 2:
  - id: 15
  - tag name: Built-In Back Mic
  - type: AUDIO_DEVICE_IN_BACK_MIC
  - address: back
  - Profiles:
      Profile 0:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
          - channel masks:0x000c, 0x0010, 0x0030
      Profile 1:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
          - channel masks:0x000c, 0x0010, 0x0030, 0x17000c, 0x80000007, 0x8000000f, 0x8000003f
  Device 3:
  - id: 11
  - tag name: FM Tuner
  - type: AUDIO_DEVICE_IN_FM_TUNER
  - Profiles:
      Profile 0:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:48000
          - channel masks:0x000c, 0x0010
      Profile 1:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
          - channel masks:0x000c, 0x0010, 0x0030
  Device 4:
  - id: 12
  - tag name: Telephony Rx
  - type: AUDIO_DEVICE_IN_TELEPHONY_RX
  - Profiles:
      Profile 0:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:8000, 16000, 48000
          - channel masks:0x0010
      Profile 1:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
          - channel masks:0x000c, 0x0010, 0x0030
  Device 5:
  - id: 18
  - tag name: Remote Submix In
  - type: AUDIO_DEVICE_IN_REMOTE_SUBMIX
  - address: 0
  - Profiles:
      Profile 0:
          - format: AUDIO_FORMAT_PCM_16_BIT
          - sampling rates:48000
          - channel masks:0x000c

HW Modules dump:
- HW Module 1:
  - name: primary
  - handle: 10
  - version: 2.0
  - outputs:
    output 0:
    - name: primary output
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x0003
    - flags: 0x0006 (AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST)
    - Supported devices:
      Device 1:
      - id:  2
      - tag name: Earpiece
      - type: AUDIO_DEVICE_OUT_EARPIECE
      Device 2:
      - id:  3
      - tag name: Speaker
      - type: AUDIO_DEVICE_OUT_SPEAKER
      Device 3:
      - tag name: Wired Headset
      - type: AUDIO_DEVICE_OUT_WIRED_HEADSET
      Device 4:
      - tag name: Wired Headphones
      - type: AUDIO_DEVICE_OUT_WIRED_HEADPHONE
      Device 5:
      - tag name: Line
      - type: AUDIO_DEVICE_OUT_LINE
      Device 6:
      - tag name: BT SCO All
      - type: AUDIO_DEVICE_OUT_ALL_SCO
      Device 7:
      - tag name: HDMI
      - type: AUDIO_DEVICE_OUT_AUX_DIGITAL
      Device 8:
      - tag name: Proxy
      - type: AUDIO_DEVICE_OUT_PROXY
      Device 9:
      - tag name: FM
      - type: AUDIO_DEVICE_OUT_FM
      Device 10:
      - tag name: USB Device Out
      - type: AUDIO_DEVICE_OUT_USB_DEVICE
      Device 11:
      - tag name: USB Headset Out
      - type: AUDIO_DEVICE_OUT_USB_HEADSET

    - maxOpenCount: 1 - curOpenCount: 1
    - maxActiveCount: 1 - curActiveCount: 0
    output 1:
    - name: deep_buffer
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_32_BIT
            - sampling rates:48000
            - channel masks:0x0003
    - flags: 0x0008 (AUDIO_OUTPUT_FLAG_DEEP_BUFFER)
    - Supported devices:
      Device 1:
      - id:  2
      - tag name: Earpiece
      - type: AUDIO_DEVICE_OUT_EARPIECE
      Device 2:
      - id:  3
      - tag name: Speaker
      - type: AUDIO_DEVICE_OUT_SPEAKER
      Device 3:
      - tag name: Wired Headset
      - type: AUDIO_DEVICE_OUT_WIRED_HEADSET
      Device 4:
      - tag name: Wired Headphones
      - type: AUDIO_DEVICE_OUT_WIRED_HEADPHONE
      Device 5:
      - tag name: Line
      - type: AUDIO_DEVICE_OUT_LINE
      Device 6:
      - tag name: BT SCO All
      - type: AUDIO_DEVICE_OUT_ALL_SCO
      Device 7:
      - tag name: HDMI
      - type: AUDIO_DEVICE_OUT_AUX_DIGITAL
      Device 8:
      - tag name: Proxy
      - type: AUDIO_DEVICE_OUT_PROXY
      Device 9:
      - tag name: USB Device Out
      - type: AUDIO_DEVICE_OUT_USB_DEVICE
      Device 10:
      - tag name: USB Headset Out
      - type: AUDIO_DEVICE_OUT_USB_HEADSET

    - maxOpenCount: 1 - curOpenCount: 1
    - maxActiveCount: 1 - curActiveCount: 0
    output 2:
    - name: hifi_playback
    - Profiles:
        Profile 0:[dynamic format][dynamic channels][dynamic rates]
    - flags: 0x0000 (AUDIO_OUTPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - tag name: USB Device Out
      - type: AUDIO_DEVICE_OUT_USB_DEVICE
      Device 2:
      - tag name: USB Headset Out
      - type: AUDIO_DEVICE_OUT_USB_HEADSET

    - maxOpenCount: 1 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
    output 3:
    - name: compress_passthrough
    - Profiles:
        Profile 0:[dynamic channels][dynamic rates]
    - flags: 0x0031 (AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING)
    - Supported devices:
      Device 1:
      - tag name: HDMI
      - type: AUDIO_DEVICE_OUT_AUX_DIGITAL

    - maxOpenCount: 1 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
    output 4:
    - name: direct_pcm
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f, 0x013f, 0x063f
        Profile 1:
            - format: AUDIO_FORMAT_PCM_8_24_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000, 352800, 384000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f, 0x013f, 0x063f
        Profile 2:
            - format: AUDIO_FORMAT_PCM_24_BIT_PACKED
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000, 352800, 384000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f, 0x013f, 0x063f
        Profile 3:
            - format: AUDIO_FORMAT_PCM_32_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000, 352800, 384000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f, 0x013f, 0x063f
    - flags: 0x0001 (AUDIO_OUTPUT_FLAG_DIRECT)
    - Supported devices:
      Device 1:
      - id:  2
      - tag name: Earpiece
      - type: AUDIO_DEVICE_OUT_EARPIECE
      Device 2:
      - id:  3
      - tag name: Speaker
      - type: AUDIO_DEVICE_OUT_SPEAKER
      Device 3:
      - tag name: Wired Headset
      - type: AUDIO_DEVICE_OUT_WIRED_HEADSET
      Device 4:
      - tag name: Wired Headphones
      - type: AUDIO_DEVICE_OUT_WIRED_HEADPHONE
      Device 5:
      - tag name: Line
      - type: AUDIO_DEVICE_OUT_LINE
      Device 6:
      - tag name: BT SCO All
      - type: AUDIO_DEVICE_OUT_ALL_SCO
      Device 7:
      - tag name: HDMI
      - type: AUDIO_DEVICE_OUT_AUX_DIGITAL
      Device 8:
      - tag name: Proxy
      - type: AUDIO_DEVICE_OUT_PROXY
      Device 9:
      - tag name: USB Device Out
      - type: AUDIO_DEVICE_OUT_USB_DEVICE
      Device 10:
      - tag name: USB Headset Out
      - type: AUDIO_DEVICE_OUT_USB_HEADSET

    - maxOpenCount: 1 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
    output 5:
    - name: compressed_offload
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_MP3
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
            - channel masks:0x0001, 0x0003
        Profile 1:
            - format: AUDIO_FORMAT_FLAC
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003
        Profile 2:
            - format: AUDIO_FORMAT_ALAC
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f, 0x013f, 0x063f
        Profile 3:
            - format: AUDIO_FORMAT_APE
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003
        Profile 4:
            - format: AUDIO_FORMAT_AAC_LC
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000
            - channel masks:0x0001, 0x0003
        Profile 5:
            - format: AUDIO_FORMAT_AAC_HE_V1
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000
            - channel masks:0x0001, 0x0003
        Profile 6:
            - format: AUDIO_FORMAT_AAC_HE_V2
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000
            - channel masks:0x0001, 0x0003
        Profile 7:
            - format: AUDIO_FORMAT_AC3
            - sampling rates:32000, 44100, 48000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f
        Profile 8:
            - format: AUDIO_FORMAT_E_AC3
            - sampling rates:32000, 44100, 48000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f, 0x013f, 0x063f
        Profile 9:
            - format: AUDIO_FORMAT_E_AC3_JOC
            - sampling rates:32000, 44100, 48000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f, 0x013f, 0x063f
        Profile 10:
            - format: AUDIO_FORMAT_DTS
            - sampling rates:32000, 44100, 48000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f
        Profile 11:
            - format: AUDIO_FORMAT_DTS_HD
            - sampling rates:32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f, 0x013f, 0x063f
        Profile 12:
            - format: AUDIO_FORMAT_WMA
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f, 0x013f, 0x063f
        Profile 13:
            - format: AUDIO_FORMAT_WMA_PRO
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000
            - channel masks:0x0001, 0x0003, 0x000b, 0x0033, 0x0037, 0x003f, 0x013f, 0x063f
        Profile 14:
            - format: AUDIO_FORMAT_VORBIS
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003
        Profile 15:
            - format: AUDIO_FORMAT_AAC_ADTS_LC
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000
            - channel masks:0x0001, 0x0003
        Profile 16:
            - format: AUDIO_FORMAT_AAC_ADTS_HE_V1
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000
            - channel masks:0x0001, 0x0003
        Profile 17:
            - format: AUDIO_FORMAT_AAC_ADTS_HE_V2
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000
            - channel masks:0x0001, 0x0003
    - flags: 0x0031 (AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING)
    - Supported devices:
      Device 1:
      - id:  2
      - tag name: Earpiece
      - type: AUDIO_DEVICE_OUT_EARPIECE
      Device 2:
      - id:  3
      - tag name: Speaker
      - type: AUDIO_DEVICE_OUT_SPEAKER
      Device 3:
      - tag name: Wired Headset
      - type: AUDIO_DEVICE_OUT_WIRED_HEADSET
      Device 4:
      - tag name: Wired Headphones
      - type: AUDIO_DEVICE_OUT_WIRED_HEADPHONE
      Device 5:
      - tag name: Line
      - type: AUDIO_DEVICE_OUT_LINE
      Device 6:
      - tag name: BT SCO All
      - type: AUDIO_DEVICE_OUT_ALL_SCO
      Device 7:
      - tag name: HDMI
      - type: AUDIO_DEVICE_OUT_AUX_DIGITAL
      Device 8:
      - tag name: Proxy
      - type: AUDIO_DEVICE_OUT_PROXY
      Device 9:
      - tag name: USB Device Out
      - type: AUDIO_DEVICE_OUT_USB_DEVICE
      Device 10:
      - tag name: USB Headset Out
      - type: AUDIO_DEVICE_OUT_USB_HEADSET

    - maxOpenCount: 1 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
    output 6:
    - name: dsd_compress_passthrough
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_DSD
            - sampling rates:2822400, 5644800
            - channel masks:0x0001, 0x0003
    - flags: 0x0031 (AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING)
    - Supported devices:
      Device 1:
      - tag name: Wired Headset
      - type: AUDIO_DEVICE_OUT_WIRED_HEADSET
      Device 2:
      - tag name: Wired Headphones
      - type: AUDIO_DEVICE_OUT_WIRED_HEADPHONE
      Device 3:
      - tag name: Line
      - type: AUDIO_DEVICE_OUT_LINE

    - maxOpenCount: 1 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
    output 7:
    - name: voice_tx
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 16000, 48000
            - channel masks:0x0001, 0x0003
    - flags: 0x0000 (AUDIO_OUTPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - id:  8
      - tag name: Telephony Tx
      - type: AUDIO_DEVICE_OUT_TELEPHONY_TX

    - maxOpenCount: 1 - curOpenCount: 1
    - maxActiveCount: 1 - curActiveCount: 0
    output 8:
    - name: voip_rx
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 16000, 32000, 48000
            - channel masks:0x0001
    - flags: 0x8001 (AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX)
    - Supported devices:
      Device 1:
      - id:  2
      - tag name: Earpiece
      - type: AUDIO_DEVICE_OUT_EARPIECE
      Device 2:
      - id:  3
      - tag name: Speaker
      - type: AUDIO_DEVICE_OUT_SPEAKER
      Device 3:
      - tag name: Wired Headset
      - type: AUDIO_DEVICE_OUT_WIRED_HEADSET
      Device 4:
      - tag name: Wired Headphones
      - type: AUDIO_DEVICE_OUT_WIRED_HEADPHONE
      Device 5:
      - tag name: Line
      - type: AUDIO_DEVICE_OUT_LINE
      Device 6:
      - tag name: BT SCO All
      - type: AUDIO_DEVICE_OUT_ALL_SCO
      Device 7:
      - tag name: USB Device Out
      - type: AUDIO_DEVICE_OUT_USB_DEVICE
      Device 8:
      - tag name: USB Headset Out
      - type: AUDIO_DEVICE_OUT_USB_HEADSET

    - maxOpenCount: 1 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
  - inputs:
    input 0:
    - name: primary input
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
            - channel masks:0x000c, 0x0010, 0x0030
    - flags: 0x0000 (AUDIO_INPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - id: 11
      - tag name: FM Tuner
      - type: AUDIO_DEVICE_IN_FM_TUNER
      Device 2:
      - tag name: Wired Headset Mic
      - type: AUDIO_DEVICE_IN_WIRED_HEADSET
      Device 3:
      - tag name: BT SCO Headset Mic
      - type: AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET
      Device 4:
      - id: 12
      - tag name: Telephony Rx
      - type: AUDIO_DEVICE_IN_TELEPHONY_RX
      Device 5:
      - tag name: USB Device In
      - type: AUDIO_DEVICE_IN_USB_DEVICE
      Device 6:
      - tag name: USB Headset In
      - type: AUDIO_DEVICE_IN_USB_HEADSET

    - maxOpenCount: 2 - curOpenCount: 0
    - maxActiveCount: 2 - curActiveCount: 0
    input 1:
    - name: surround_sound
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
            - channel masks:0x000c, 0x0010, 0x0030, 0x17000c, 0x80000007, 0x8000000f, 0x8000003f
    - flags: 0x0000 (AUDIO_INPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - id: 14
      - tag name: Built-In Mic
      - type: AUDIO_DEVICE_IN_BUILTIN_MIC
      - address: bottom
      Device 2:
      - id: 15
      - tag name: Built-In Back Mic
      - type: AUDIO_DEVICE_IN_BACK_MIC
      - address: back

    - maxOpenCount: 0 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
    input 2:
    - name: record_24
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_8_24_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 96000, 192000
            - channel masks:0x000c, 0x0010, 0x0030, 0x80000007, 0x8000000f
        Profile 1:
            - format: AUDIO_FORMAT_PCM_24_BIT_PACKED
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 96000, 192000
            - channel masks:0x000c, 0x0010, 0x0030, 0x80000007, 0x8000000f
        Profile 2:
            - format: AUDIO_FORMAT_PCM_FLOAT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 96000, 192000
            - channel masks:0x000c, 0x0010, 0x0030, 0x80000007, 0x8000000f
    - flags: 0x0000 (AUDIO_INPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - id: 14
      - tag name: Built-In Mic
      - type: AUDIO_DEVICE_IN_BUILTIN_MIC
      - address: bottom
      Device 2:
      - id: 15
      - tag name: Built-In Back Mic
      - type: AUDIO_DEVICE_IN_BACK_MIC
      - address: back
      Device 3:
      - tag name: Wired Headset Mic
      - type: AUDIO_DEVICE_IN_WIRED_HEADSET

    - maxOpenCount: 0 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
    input 3:
    - name: voice_rx
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 16000, 48000
            - channel masks:0x000c, 0x0010
    - flags: 0x0000 (AUDIO_INPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - id: 12
      - tag name: Telephony Rx
      - type: AUDIO_DEVICE_IN_TELEPHONY_RX

    - maxOpenCount: 0 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
    input 4:
    - name: hifi_input
    - Profiles:
        Profile 0:[dynamic format][dynamic channels][dynamic rates]
    - flags: 0x0000 (AUDIO_INPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - tag name: USB Device In
      - type: AUDIO_DEVICE_IN_USB_DEVICE
      Device 2:
      - tag name: USB Headset In
      - type: AUDIO_DEVICE_IN_USB_HEADSET

    - maxOpenCount: 0 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
  - Declared devices:
    Device 1:
    - id:  2
    - tag name: Earpiece
    - type: AUDIO_DEVICE_OUT_EARPIECE
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x0010
    Device 2:
    - id:  3
    - tag name: Speaker
    - type: AUDIO_DEVICE_OUT_SPEAKER
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x0003
    Device 3:
    - tag name: Wired Headset
    - type: AUDIO_DEVICE_OUT_WIRED_HEADSET
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x0003
    Device 4:
    - tag name: Wired Headphones
    - type: AUDIO_DEVICE_OUT_WIRED_HEADPHONE
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x0003
    Device 5:
    - tag name: Line
    - type: AUDIO_DEVICE_OUT_LINE
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x0003
    Device 6:
    - tag name: BT SCO
    - type: AUDIO_DEVICE_OUT_BLUETOOTH_SCO
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 16000
            - channel masks:0x0001
    Device 7:
    - tag name: BT SCO Headset
    - type: AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 16000
            - channel masks:0x0001
    Device 8:
    - tag name: BT SCO Car Kit
    - type: AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 16000
            - channel masks:0x0001
    Device 9:
    - tag name: BT SCO All
    - type: AUDIO_DEVICE_OUT_ALL_SCO
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 16000
            - channel masks:0x0001
    Device 10:
    - id:  8
    - tag name: Telephony Tx
    - type: AUDIO_DEVICE_OUT_TELEPHONY_TX
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 16000
            - channel masks:0x0001, 0x0003
    Device 11:
    - tag name: HDMI
    - type: AUDIO_DEVICE_OUT_AUX_DIGITAL
    - Profiles:
        Profile 0:[dynamic channels]
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000    Device 12:
    - tag name: Proxy
    - type: AUDIO_DEVICE_OUT_PROXY
    - Profiles:
        Profile 0:[dynamic channels]
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000    Device 13:
    - tag name: FM
    - type: AUDIO_DEVICE_OUT_FM
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x0001, 0x0003
    Device 14:
    - tag name: USB Device Out
    - type: AUDIO_DEVICE_OUT_USB_DEVICE
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003
    Device 15:
    - tag name: USB Headset Out
    - type: AUDIO_DEVICE_OUT_USB_HEADSET
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003
    Device 16:
    - id: 14
    - tag name: Built-In Mic
    - type: AUDIO_DEVICE_IN_BUILTIN_MIC
    - address: bottom
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
            - channel masks:0x000c, 0x0010, 0x0030
        Profile 1:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
            - channel masks:0x000c, 0x0010, 0x0030, 0x17000c, 0x80000007, 0x8000000f, 0x8000003f
    Device 17:
    - id: 15
    - tag name: Built-In Back Mic
    - type: AUDIO_DEVICE_IN_BACK_MIC
    - address: back
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
            - channel masks:0x000c, 0x0010, 0x0030
        Profile 1:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
            - channel masks:0x000c, 0x0010, 0x0030, 0x17000c, 0x80000007, 0x8000000f, 0x8000003f
    Device 18:
    - id: 11
    - tag name: FM Tuner
    - type: AUDIO_DEVICE_IN_FM_TUNER
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x000c, 0x0010
        Profile 1:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
            - channel masks:0x000c, 0x0010, 0x0030
    Device 19:
    - tag name: Wired Headset Mic
    - type: AUDIO_DEVICE_IN_WIRED_HEADSET
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
            - channel masks:0x000c, 0x0010, 0x0030
    Device 20:
    - tag name: BT SCO Headset Mic
    - type: AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 16000
            - channel masks:0x0010
    Device 21:
    - id: 12
    - tag name: Telephony Rx
    - type: AUDIO_DEVICE_IN_TELEPHONY_RX
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 16000, 48000
            - channel masks:0x0010
        Profile 1:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
            - channel masks:0x000c, 0x0010, 0x0030
    Device 22:
    - tag name: USB Device In
    - type: AUDIO_DEVICE_IN_USB_DEVICE
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003
        Profile 1:
            - format: AUDIO_FORMAT_PCM_8_24_BIT
            - sampling rates:44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003
    Device 23:
    - tag name: USB Headset In
    - type: AUDIO_DEVICE_IN_USB_HEADSET
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003
        Profile 1:
            - format: AUDIO_FORMAT_PCM_8_24_BIT
            - sampling rates:44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
            - channel masks:0x0001, 0x0003

  Audio Routes (17):
  - Route 1:
    - Type: Mix
    - Sink: Earpiece
    - Sources:
        primary output
        deep_buffer
        direct_pcm
        compressed_offload
        voip_rx

  - Route 2:
    - Type: Mix
    - Sink: Speaker
    - Sources:
        primary output
        deep_buffer
        direct_pcm
        compressed_offload
        voip_rx

  - Route 3:
    - Type: Mix
    - Sink: Wired Headset
    - Sources:
        primary output
        deep_buffer
        direct_pcm
        compressed_offload
        dsd_compress_passthrough
        voip_rx

  - Route 4:
    - Type: Mix
    - Sink: Wired Headphones
    - Sources:
        primary output
        deep_buffer
        direct_pcm
        compressed_offload
        dsd_compress_passthrough
        voip_rx

  - Route 5:
    - Type: Mix
    - Sink: Line
    - Sources:
        primary output
        deep_buffer
        direct_pcm
        compressed_offload
        dsd_compress_passthrough
        voip_rx

  - Route 6:
    - Type: Mix
    - Sink: HDMI
    - Sources:
        primary output
        deep_buffer
        direct_pcm
        compressed_offload
        compress_passthrough

  - Route 7:
    - Type: Mix
    - Sink: Proxy
    - Sources:
        primary output
        deep_buffer
        direct_pcm
        compressed_offload

  - Route 8:
    - Type: Mix
    - Sink: FM
    - Sources:
        primary output

  - Route 9:
    - Type: Mix
    - Sink: BT SCO All
    - Sources:
        primary output
        deep_buffer
        direct_pcm
        compressed_offload
        voip_rx

  - Route 10:
    - Type: Mix
    - Sink: USB Device Out
    - Sources:
        primary output
        deep_buffer
        direct_pcm
        compressed_offload
        voip_rx
        hifi_playback

  - Route 11:
    - Type: Mix
    - Sink: USB Headset Out
    - Sources:
        primary output
        deep_buffer
        direct_pcm
        compressed_offload
        voip_rx
        hifi_playback

  - Route 12:
    - Type: Mix
    - Sink: Telephony Tx
    - Sources:
        voice_tx

  - Route 13:
    - Type: Mix
    - Sink: voice_rx
    - Sources:
        Telephony Rx

  - Route 14:
    - Type: Mix
    - Sink: primary input
    - Sources:
        Wired Headset Mic
        BT SCO Headset Mic
        FM Tuner
        USB Device In
        USB Headset In
        Telephony Rx

  - Route 15:
    - Type: Mix
    - Sink: surround_sound
    - Sources:
        Built-In Mic
        Built-In Back Mic

  - Route 16:
    - Type: Mix
    - Sink: record_24
    - Sources:
        Built-In Mic
        Built-In Back Mic
        Wired Headset Mic

  - Route 17:
    - Type: Mix
    - Sink: hifi_input
    - Sources:
        USB Device In
        USB Headset In

- HW Module 2:
  - name: a2dp
  - handle: 18
  - version: 2.0
  - outputs:
    output 0:
    - name: a2dp output
    - Profiles:
        Profile 0:[dynamic format][dynamic channels][dynamic rates]
    - flags: 0x0000 (AUDIO_OUTPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - tag name: BT A2DP Out
      - type: AUDIO_DEVICE_OUT_BLUETOOTH_A2DP
      Device 2:
      - tag name: BT A2DP Headphones
      - type: AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES
      Device 3:
      - tag name: BT A2DP Speaker
      - type: AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER

    - maxOpenCount: 1 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
  - inputs:
    input 0:
    - name: a2dp input
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:44100, 48000
            - channel masks:0x000c, 0x0010
    - flags: 0x0000 (AUDIO_INPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - tag name: BT A2DP In
      - type: AUDIO_DEVICE_IN_BLUETOOTH_A2DP

    - maxOpenCount: 0 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
  - Declared devices:
    Device 1:
    - tag name: BT A2DP Out
    - type: AUDIO_DEVICE_OUT_BLUETOOTH_A2DP
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:44100
            - channel masks:0x0003
    Device 2:
    - tag name: BT A2DP Headphones
    - type: AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:44100
            - channel masks:0x0003
    Device 3:
    - tag name: BT A2DP Speaker
    - type: AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:44100
            - channel masks:0x0003
    Device 4:
    - tag name: BT A2DP In
    - type: AUDIO_DEVICE_IN_BLUETOOTH_A2DP
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:44100, 48000
            - channel masks:0x000c, 0x0010

  Audio Routes (4):
  - Route 1:
    - Type: Mix
    - Sink: BT A2DP Out
    - Sources:
        a2dp output

  - Route 2:
    - Type: Mix
    - Sink: BT A2DP Headphones
    - Sources:
        a2dp output

  - Route 3:
    - Type: Mix
    - Sink: BT A2DP Speaker
    - Sources:
        a2dp output

  - Route 4:
    - Type: Mix
    - Sink: a2dp input
    - Sources:
        BT A2DP In

- HW Module 3:
  - name: usb
  - handle: 26
  - version: 2.0
  - outputs:
    output 0:
    - name: usb_accessory output
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:44100
            - channel masks:0x0003
    - flags: 0x0000 (AUDIO_OUTPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - tag name: USB Host Out
      - type: AUDIO_DEVICE_OUT_USB_ACCESSORY

    - maxOpenCount: 1 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
  - Declared devices:
    Device 1:
    - tag name: USB Host Out
    - type: AUDIO_DEVICE_OUT_USB_ACCESSORY
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:44100
            - channel masks:0x0003

  Audio Routes (1):
  - Route 1:
    - Type: Mix
    - Sink: USB Host Out
    - Sources:
        usb_accessory output

- HW Module 4:
  - name: r_submix
  - handle: 34
  - version: 2.0
  - outputs:
    output 0:
    - name: r_submix output
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x0003
    - flags: 0x0000 (AUDIO_OUTPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - tag name: Remote Submix Out
      - type: AUDIO_DEVICE_OUT_REMOTE_SUBMIX
      - address: 0

    - maxOpenCount: 1 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
  - inputs:
    input 0:
    - name: r_submix input
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x000c
    - flags: 0x0000 (AUDIO_INPUT_FLAG_NONE)
    - Supported devices:
      Device 1:
      - id: 18
      - tag name: Remote Submix In
      - type: AUDIO_DEVICE_IN_REMOTE_SUBMIX
      - address: 0

    - maxOpenCount: 0 - curOpenCount: 0
    - maxActiveCount: 1 - curActiveCount: 0
  - Declared devices:
    Device 1:
    - tag name: Remote Submix Out
    - type: AUDIO_DEVICE_OUT_REMOTE_SUBMIX
    - address: 0
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x0003
    Device 2:
    - id: 18
    - tag name: Remote Submix In
    - type: AUDIO_DEVICE_IN_REMOTE_SUBMIX
    - address: 0
    - Profiles:
        Profile 0:
            - format: AUDIO_FORMAT_PCM_16_BIT
            - sampling rates:48000
            - channel masks:0x000c

  Audio Routes (2):
  - Route 1:
    - Type: Mix
    - Sink: Remote Submix Out
    - Sources:
        r_submix output

  - Route 2:
    - Type: Mix
    - Sink: r_submix input
    - Sources:
        Remote Submix In

Outputs dump:
- Output 13 dump:
 Latency: 48
 Flags 00000006
 ID: 1
 Sampling rate: 48000
 Format: 00000001
 Channels: 00000003
 Devices 00000002
 Stream volume refCount muteCount
 00     -36.000     00       00
 01     -758.000     00       00
 02     -758.000     00       00
 03     -758.000     00       00
 04     -758.000     00       00
 05     -758.000     00       00
 06     -1.000     00       00
 07     -758.000     00       00
 08     -758.000     00       00
 09     0.000     00       00
 10     -758.000     00       00
 11     0.000     00       00
 12     -1.000     00       00
- Output 21 dump:
 Latency: 80
 Flags 00000008
 ID: 5
 Sampling rate: 48000
 Format: 00000003
 Channels: 00000003
 Devices 00000002
 Stream volume refCount muteCount
 00     -8.824     00       00
 01     -758.000     00       00
 02     -758.000     00       00
 03     -18.900     00       00
 04     -758.000     00       00
 05     -758.000     00       00
 06     -1.000     00       00
 07     -6.000     00       00
 08     -758.000     00       00
 09     0.000     00       00
 10     -758.000     00       00
 11     0.000     00       00
 12     -1.000     00       00
- Output 29 dump:
 Latency: 112
 Flags 00000000
 ID: 7
 Sampling rate: 48000
 Format: 00000001
 Channels: 00000003
 Devices 00010000
 Stream volume refCount muteCount
 00     0.000     00       00
 01     0.000     00       00
 02     0.000     00       00
 03     0.000     00       00
 04     0.000     00       00
 05     0.000     00       00
 06     -1.000     00       00
 07     0.000     00       00
 08     0.000     00       00
 09     0.000     00       00
 10     0.000     00       00
 11     0.000     00       00
 12     -1.000     00       00

Inputs dump:

Streams dump:
 Stream  Can be muted  Index Min  Index Max  Index Cur [device : index]...
 00      true          01         05         0001 : 05, 40000000 : 04,
 01      true          00         07         0001 : 00, 0002 : 00, 40000000 : 00,
 02      true          00         07         0001 : 00, 0002 : 00, 40000000 : 00,
 03      true          00         15         0002 : 11, 0004 : 05, 0008 : 08, 4000000 : 05, 40000000 : 09,
 04      true          01         07         0002 : 01, 40000000 : 06,
 05      true          00         07         0001 : 00, 0002 : 00, 40000000 : 00,
 06      true          00         15         40000000 : 07,
 07      true          00         07         0001 : 07, 0002 : 07, 40000000 : 07,
 08      true          00         15         0001 : 00, 0002 : 00, 40000000 : 00,
 09      true          00         15         0002 : 11, 0004 : 05, 0008 : 08, 4000000 : 05, 40000000 : 09,
 10      true          01         15         0002 : 11, 0004 : 05, 0008 : 08, 4000000 : 05, 40000000 : 09,
 11      true          00         01         40000000 : 00,
 12      true          00         01         40000000 : 00,

Volume Curves for Use Cases (aka Stream types) dump:
 AUDIO_STREAM_VOICE_CALL (00): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  0, -4200), ( 33, -2800), ( 66, -1400), (100,     0) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  0, -4200), ( 33, -2800), ( 66, -1400), (100,     0) }
   DEVICE_CATEGORY_SPEAKER : {(  0, -3600), ( 33, -2400), ( 66, -1200), (100,     0) }
   DEVICE_CATEGORY_EARPIECE : {(  0, -3600), ( 33, -2400), ( 66, -1200), (100,     0) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  1, -7130), ( 33, -4800), ( 66, -2420), (100,     0) }
   DEVICE_CATEGORY_HEARING_AID : {(  1, -12700), ( 20, -8000), ( 60, -4000), (100,     0) }

 AUDIO_STREAM_SYSTEM (01): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  1, -3000), ( 33, -2600), ( 66, -2200), (100, -1800) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  1, -3000), ( 33, -2600), ( 66, -2200), (100, -1800) }
   DEVICE_CATEGORY_SPEAKER : {(  1, -2400), ( 33, -1800), ( 66, -1200), (100,  -600) }
   DEVICE_CATEGORY_EARPIECE : {(  1, -2400), ( 33, -1800), ( 66, -1200), (100,  -600) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  1, -5800), ( 20, -4000), ( 60, -2100), (100, -1000) }
   DEVICE_CATEGORY_HEARING_AID : {(  1, -12700), ( 20, -8000), ( 60, -4000), (100,     0) }

 AUDIO_STREAM_RING (02): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  1, -4950), ( 33, -3350), ( 66, -1700), (100,     0) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  1, -4950), ( 33, -3350), ( 66, -1700), (100,     0) }
   DEVICE_CATEGORY_SPEAKER : {(  1, -4200), ( 33, -2800), ( 66, -1400), (100,     0) }
   DEVICE_CATEGORY_EARPIECE : {(  1, -4950), ( 33, -3350), ( 66, -1700), (100,     0) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  1, -5800), ( 20, -4000), ( 60, -2100), (100, -1000) }
   DEVICE_CATEGORY_HEARING_AID : {(  1, -12700), ( 20, -8000), ( 60, -4000), (100,     0) }

 AUDIO_STREAM_MUSIC (03): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  1, -5660), ( 33, -3830), ( 66, -1940), (100,     0) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  1, -7130), ( 33, -4800), ( 66, -2420), (100,     0) }
   DEVICE_CATEGORY_SPEAKER : {(  1, -6800), ( 26, -4400), ( 60, -2800), (100,     0) }
   DEVICE_CATEGORY_EARPIECE : {(  1, -7130), ( 33, -4800), ( 66, -2420), (100,     0) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  1, -7130), ( 33, -4800), ( 66, -2420), (100,     0) }
   DEVICE_CATEGORY_HEARING_AID : {(  1, -12700), ( 20, -8000), ( 60, -4000), (100,     0) }

 AUDIO_STREAM_ALARM (04): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  1, -4950), ( 33, -3350), ( 66, -1700), (100,     0) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  1, -4950), ( 33, -3350), ( 66, -1700), (100,     0) }
   DEVICE_CATEGORY_SPEAKER : {(  1, -4200), ( 33, -2800), ( 66, -1400), (100,     0) }
   DEVICE_CATEGORY_EARPIECE : {(  1, -4950), ( 33, -3350), ( 66, -1700), (100,     0) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  1, -5800), ( 20, -4000), ( 60, -2100), (100, -1000) }
   DEVICE_CATEGORY_HEARING_AID : {(  0, -12700), ( 20, -8000), ( 60, -4000), (100,     0) }

 AUDIO_STREAM_NOTIFICATION (05): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  1, -4950), ( 33, -3350), ( 66, -1700), (100,     0) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  1, -4950), ( 33, -3350), ( 66, -1700), (100,     0) }
   DEVICE_CATEGORY_SPEAKER : {(  1, -4200), ( 33, -2800), ( 66, -1400), (100,     0) }
   DEVICE_CATEGORY_EARPIECE : {(  1, -4950), ( 33, -3350), ( 66, -1700), (100,     0) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  1, -5800), ( 20, -4000), ( 60, -2100), (100, -1000) }
   DEVICE_CATEGORY_HEARING_AID : {(  1, -4950), ( 33, -3350), ( 66, -1700), (100,     0) }

 AUDIO_STREAM_BLUETOOTH_SCO (06): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  0, -4200), ( 33, -2800), ( 66, -1400), (100,     0) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  0, -4200), ( 33, -2800), ( 66, -1400), (100,     0) }
   DEVICE_CATEGORY_SPEAKER : {(  0, -2400), ( 33, -1600), ( 66,  -800), (100,     0) }
   DEVICE_CATEGORY_EARPIECE : {(  0, -4200), ( 33, -2800), ( 66, -1400), (100,     0) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  1, -7130), ( 33, -4800), ( 66, -2420), (100,     0) }
   DEVICE_CATEGORY_HEARING_AID : {(  1, -12700), ( 20, -8000), ( 60, -4000), (100,     0) }

 AUDIO_STREAM_ENFORCED_AUDIBLE (07): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  1, -3000), ( 33, -2600), ( 66, -2200), (100, -1800) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  1, -3000), ( 33, -2600), ( 66, -2200), (100, -1800) }
   DEVICE_CATEGORY_SPEAKER : {(  1, -2400), ( 33, -1800), ( 66, -1200), (100,  -600) }
   DEVICE_CATEGORY_EARPIECE : {(  1, -2400), ( 33, -1800), ( 66, -1200), (100,  -600) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  1, -5800), ( 20, -4000), ( 60, -2100), (100, -1000) }
   DEVICE_CATEGORY_HEARING_AID : {(  1, -12700), ( 20, -8000), ( 60, -4000), (100,     0) }

 AUDIO_STREAM_DTMF (08): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  1, -3000), ( 33, -2600), ( 66, -2200), (100, -1800) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  1, -3000), ( 33, -2600), ( 66, -2200), (100, -1800) }
   DEVICE_CATEGORY_SPEAKER : {(  1, -2400), ( 33, -1800), ( 66, -1200), (100,  -600) }
   DEVICE_CATEGORY_EARPIECE : {(  1, -2400), ( 33, -1800), ( 66, -1200), (100,  -600) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  1, -5800), ( 20, -4000), ( 60, -2100), (100, -1000) }
   DEVICE_CATEGORY_HEARING_AID : {(  1, -12700), ( 20, -8000), ( 60, -4000), (100,     0) }

 AUDIO_STREAM_TTS (09): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  0, -9600), (100, -9600) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  0, -9600), (100, -9600) }
   DEVICE_CATEGORY_SPEAKER : {(  0,     0), (100,     0) }
   DEVICE_CATEGORY_EARPIECE : {(  0, -9600), (100, -9600) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  0, -9600), (100, -9600) }
   DEVICE_CATEGORY_HEARING_AID : {(  0, -9600), (100, -9600) }

 AUDIO_STREAM_ACCESSIBILITY (10): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  1, -7130), ( 33, -4800), ( 66, -2420), (100,     0) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  1, -7130), ( 33, -4800), ( 66, -2420), (100,     0) }
   DEVICE_CATEGORY_SPEAKER : {(  1, -6800), ( 26, -4400), ( 60, -2800), (100,     0) }
   DEVICE_CATEGORY_EARPIECE : {(  1, -7130), ( 33, -4800), ( 66, -2420), (100,     0) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  1, -7130), ( 33, -4800), ( 66, -2420), (100,     0) }
   DEVICE_CATEGORY_HEARING_AID : {(  0, -12700), ( 20, -8000), ( 60, -4000), (100,     0) }

 AUDIO_STREAM_REROUTING (11): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  0,     0), (100,     0) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  0,     0), (100,     0) }
   DEVICE_CATEGORY_SPEAKER : {(  0,     0), (100,     0) }
   DEVICE_CATEGORY_EARPIECE : {(  0,     0), (100,     0) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  0,     0), (100,     0) }
   DEVICE_CATEGORY_HEARING_AID : {(  0,     0), (100,     0) }

 AUDIO_STREAM_PATCH (12): Curve points for device category (index, attenuation in millibel)
   DEVICE_CATEGORY_HEADSET : {(  0,     0), (100,     0) }
   DEVICE_CATEGORY_HEADSET_nonEU : {(  0,     0), (100,     0) }
   DEVICE_CATEGORY_SPEAKER : {(  0,     0), (100,     0) }
   DEVICE_CATEGORY_EARPIECE : {(  0,     0), (100,     0) }
   DEVICE_CATEGORY_EXT_MEDIA : {(  0,     0), (100,     0) }
   DEVICE_CATEGORY_HEARING_AID : {(  0,     0), (100,     0) }

Total Effects CPU: 0.000000 MIPS, Total Effects memory: 0 KB, Max memory used: 0 KB
Registered effects:
- Effect 11 dump:
 I/O: 13
 Strategy: 0
 Session: -2
 Name: DTS Audio
 Disabled

Audio Patches:
  Audio patch 1:
  - handle:  4
  - audio flinger handle: 12
  - owner uid: 1041
  - 1 sources:
    - Mix ID 1 I/O handle 13
  - 1 sinks:
    - Device ID 3 AUDIO_DEVICE_OUT_SPEAKER
  Audio patch 2:
  - handle:  6
  - audio flinger handle: 36
  - owner uid: 1041
  - 1 sources:
    - Mix ID 5 I/O handle 21
  - 1 sinks:
    - Device ID 3 AUDIO_DEVICE_OUT_SPEAKER
  Audio patch 3:
  - handle:  9
  - audio flinger handle: 28
  - owner uid: 1041
  - 1 sources:
    - Mix ID 7 I/O handle 29
  - 1 sinks:
    - Device ID 8 AUDIO_DEVICE_OUT_TELEPHONY_TX

Audio Policy Mix:

D:\Downloads\Phone\android\platform-tools>
phhusson commented 4 years ago

Please dump the properties (with getprop ) on both stock ROM and GSI.

My guess is that you have vendor.voice.path.for.pcm.voip=true, and setting it to false should help the issue.

onurceylaner34 commented 4 years ago

havoc gsi 2.9 getprop:

[gsm.operator.alpha]: [vodafone TR]

[gsm.version.ril-impl]: [Qualcomm RIL 1.0]

[persist.np.asus.agps.injecttime]: [2020-01-03 15:26:35]

[ro.bootimage.build.date]: [Sat Sep 14 08:52:22 CEST 2019]

[ro.build.date]: [Sat Sep 14 08:52:22 CEST 2019]

[ro.gpu.available_frequencies]: [430000000 370000000 266000000 160000000 ]

[ro.havoc.maintainer]: [Vincent Vidal]

[ro.keymaster.mod]: [AOSP on ARM64]

[ro.vendor.build.date]: [Tue Nov 19 19:08:12 CST 2019]

[vendor.peripheral.shutdown_critical_list]: [modem ]

onurceylaner34 commented 4 years ago

Stock Rom getprop:

[gsm.operator.alpha]: [Turk Telekom]

[gsm.sim.operator.alpha]: [Turk Telekom]

[gsm.version.ril-impl]: [Qualcomm RIL 1.0]

[ro.bootimage.build.date]: [Tue Nov 19 19:08:12 CST 2019]

[ro.build.date]: [Tue Nov 19 19:08:12 CST 2019]

[ro.build.description]: [WW_Phone-user 9 PPR1.180610.009 16.0615.1912.115-0 release-keys]

[ro.vendor.build.date]: [Tue Nov 19 19:08:12 CST 2019]

phhusson commented 4 years ago

K. try setting audio.deep_buffer.media to false and audio.offload.disable to 1

Conobi commented 4 years ago

Tried on Havoc 3.1 (based on phh v209) and didn't worked :/