This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62P-LP: Enable USB Audio MIC in android

Part Number: SK-AM62P-LP

Tool/software:

Dear Team,

We are not yet able to make audio capture via 3.5mm jack. However, we need to have audio recording function soon.

Could you kindly guide us in enabling USB Audio MIC? We will parallely work on fixing analog audio mic.

We tried with both tinycap and soundrecorder app

1|console:/ # tinypcminfo -D 0 -d 0
Info for card 0, device 0:

PCM out:
Access: 0x000009
Format[0]: 0x000444
Format[1]: 0x000001
Format Name: S16_LE, S24_LE, S32_LE, S24_3LE
Subformat: 0x000001
Rate: min=8000Hz max=96000Hz
Channels: min=2 max=2
Sample bits: min=16 max=32
Period size: min=4 max=16384
Period count: min=2 max=32768

PCM in:
Access: 0x000009
Format[0]: 0x000444
Format[1]: 0x000001
Format Name: S16_LE, S24_LE, S32_LE, S24_3LE
Subformat: 0x000001
Rate: min=8000Hz max=96000Hz
Channels: min=2 max=2
Sample bits: min=16 max=32
Period size: min=4 max=16384
Period count: min=2 max=32768

Best regards

Biju 

  • Modified audio_hal_configuration.xml & audio_policy_configuration.xml, adding mixer card and device. And we were able to record through tinycap by specifying card and device:

    adb shell tinycap /sdcard/file.wav -D 1 -d 0

    But still USB microphone is not the default input audio source and cannot record through voice recorder applications.

    audio_hal_configuration.xml
    <!--
    On the target device this file must be located in /vendor/etc and named
    audio_hal_configuration.xml
    
    Syntax is based on TinyHAL:
      https://github.com/CirrusLogic/tinyhal/blob/master/audio.example.xml
    
    Note: not xml elements from TinyHAL are supported.
    -->
    <audiohal>
        <!-- mixer element _must_ appear before any of the other definitions.
        The 'card' attribute is optional and sets the ALSA card number of the mixer
        device - if not given it defaults to 0 -->
            <mixer card="0">
            <!-- init element lists control settings required to initialize the
            hardware and driver. These settings are applied only once when primary HAL
            is first loaded during boot -->
            <init>
                <ctl name="HP Playback Switch" val="1" />
                <ctl name="PCM Playback Volume" val="127" />
                <ctl name="HP DAC Playback Volume" val="118" />
    
                <ctl name="Left PGA Mixer Mic3L Switch" val="1" />
                <ctl name="Left PGA Mixer Mic3R Switch" val="1" />
                <ctl name="Right PGA Mixer Mic3L Switch" val="1" />
                <ctl name="Right PGA Mixer Mic3R Switch" val="1" />
                <ctl name="PGA Capture Volume" val="100" />
    
            </init>
            </mixer>
    
            <mixer card="1">
            <init>
                <ctl name="Mic Capture Volume" val="100" />
                <ctl name="Mic Capture Switch" val="1" />
                <ctl name="Extension Unit Switch" val="1" />
            </init>
            </mixer>
    
            <!-- jack out -->
            <device name="headphone">
                <path name="on">
                    <ctl name="HP Playback Switch" val="1" />
                </path>
                <path name="off">
                    <ctl name="HP Playback Switch" val="0" />
                </path>
            </device>
    
            <!-- jack in -->
            <device name="headset_in">
                <path name="on">
                    <ctl name="Left PGA Mixer Mic3L Switch" val="1" />
                    <ctl name="Left PGA Mixer Mic3R Switch" val="1" />
                    <ctl name="Right PGA Mixer Mic3L Switch" val="1" />
                    <ctl name="Right PGA Mixer Mic3R Switch" val="1" />
                </path>
                <path name="off">
                    <ctl name="Left PGA Mixer Mic3L Switch" val="0" />
                    <ctl name="Left PGA Mixer Mic3R Switch" val="0" />
                    <ctl name="Right PGA Mixer Mic3L Switch" val="0" />
                    <ctl name="Right PGA Mixer Mic3R Switch" val="0" />
                </path>
            </device>
    
            <device name="usb">
                <path name="on">
                    <ctl name="Mic Capture Switch" val="1" />
                    <ctl name="Extension Unit Switch" val="1" />
                </path>
                <path name="off">
                    <ctl name="Mic Capture Switch" val="0" />
                    <ctl name="Extension Unit Switch" val="0" />
                </path>
            </device>
    
            <stream type="pcm" dir="out" card="0" device="0" rate="32000">
            </stream>
    
            <stream type="pcm" dir="in" card="1" device="0" rate="44100">
            </stream>
    
    </audiohal>
    
    audio_policy_configuration.xml
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!-- Copyright (C) 2015 The Android Open Source Project
    
         Licensed under the Apache License, Version 2.0 (the "License");
         you may not use this file except in compliance with the License.
         You may obtain a copy of the License at
    
              http://www.apache.org/licenses/LICENSE-2.0
    
         Unless required by applicable law or agreed to in writing, software
         distributed under the License is distributed on an "AS IS" BASIS,
         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         See the License for the specific language governing permissions and
         limitations under the License.
    -->
    
    <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
        <!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
    
        <!-- Global configuration Declaration -->
        <globalConfiguration speaker_drc_enabled="true"/>
    
        <!-- Modules section:
            There is one section per audio HW module present on the platform.
            Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”.
            The module names are the same as in current .conf file:
                    “primary”, “A2DP”, “remote_submix”, “USB”
            Each module will contain the following sections:
            “devicePorts”: a list of device descriptors for all input and output devices accessible via this
            module.
            This contains both permanently attached devices and removable devices.
            “mixPorts”: listing all output and input streams exposed by the audio HAL
            “routes”: list of possible connections between input and output devices or between stream and
            devices.
                "route": is defined by an attribute:
                    -"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
                    -"sink": the sink involved in this route
                    -"sources": all the sources than can be connected to the sink via vis route
            “attachedDevices”: permanently attached devices.
            The attachedDevices section is a list of devices names. The names correspond to device names
            defined in <devicePorts> section.
            “defaultOutputDevice”: device to be used by default when no policy rule applies
        -->
        <modules>
            <!-- Primary Audio HAL -->
            <module name="primary" halVersion="3.0">
                <attachedDevices>
                    <item>Wired Headphones</item>
                    <item>Builtin Mic</item>
                </attachedDevices>
                <defaultOutputDevice>Wired Headphones</defaultOutputDevice>
                <mixPorts>
                    <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
                        <profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
                                 samplingRates="32000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                    </mixPort>
                    <mixPort name="primary input" role="sink">
                        <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
    			    samplingRates="44100" 
    			    channelMasks="AUDIO_CHANNEL_IN_MONO"/>
                    </mixPort>
                </mixPorts>
                <devicePorts>
                    <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
                    <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
                        <profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
                                 samplingRates="32000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                    </devicePort>
                    <devicePort tagName="Builtin Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
                    </devicePort>
                </devicePorts>
                <!-- route declaration, i.e. list all available sources for a given sink -->
                <routes>
                    <route type="mix" sink="Wired Headphones"
                           sources="primary output"/>
                    <route type="mix" sink="primary input" sources="Builtin Mic"/>
                </routes>
    
            </module>
    
            <!-- Usb Audio HAL -->
            <xi:include href="usb_audio_policy_configuration.xml"/>
    
            <!-- Remote Submix Audio HAL -->
            <xi:include href="r_submix_audio_policy_configuration.xml"/>
    
        </modules>
        <!-- End of Modules section -->
    
        <!-- Volume section -->
    
        <xi:include href="audio_policy_volumes.xml"/>
        <xi:include href="default_volume_tables.xml"/>
    
        <!-- End of Volume section -->
    
    </audioPolicyConfiguration>
    

  • Did a dumpsys audio and attaching its dump here. I was concerned whether the microphone is muted and then observed a line in the dump stating:

    mic mute FromSwitch=false FromRestrictions=false FromApi=false from system=false  No accessibility service Uids.

    Any idea what this mean in terms of microphone mute state? 

    audio_dump.txt
    Events log: audio services lifecycle
    09-10 14:27:14:934 AudioService()
    
    Message handler (watch for unhandled messages):
      Handler (com.android.server.audio.AudioService$AudioHandler) {a6d7999} @ 1122087
        Looper (AudioService, tid 119) {b7e3565}
          (Total messages: 0, polling=true, quitting=false)
    
    MediaFocusControl dump time: 3:14:12 PM
    
    Audio Focus stack entries (last is top of stack):
    
    
    No external focus policy
    
    
    
     Notify on duck:  true
    
     In ring or call: false
    
    
    
    Events log: focus commands as seen by MediaFocusControl
    Multi Audio Focus enabled :false
    
    Stream volumes (device: index)
    - STREAM_VOICE_CALL:
       Muted: false
       Muted Internally: false
       Min: 1
       Max: 5
       streamVolume:3
       Current: 8 (headphone): 3, 40000000 (default): 3
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_VOICE_CALL
    
    - STREAM_SYSTEM (aliased to: STREAM_RING):
       Muted: false
       Muted Internally: false
       Min: 0
       Max: 7
       streamVolume:5
       Current: 8 (headphone): 5, 40000000 (default): 5
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_SYSTEM
    
    - STREAM_RING:
       Muted: false
       Muted Internally: false
       Min: 0
       Max: 7
       streamVolume:5
       Current: 8 (headphone): 5, 40000000 (default): 5
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_RING
    
    - STREAM_MUSIC:
       Muted: false
       Muted Internally: false
       Min: 0
       Max: 15
       streamVolume:5
       Current: 8 (headphone): 5, 80 (bt_a2dp): 2, 100 (bt_a2dp_hp): 2, 4000000 (usb_headset): 3, 20000000 (ble_headset): 2, 20000002 (ble_broadcast): 2, 40000000 (default): 5
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_MUSIC
    
    - STREAM_ALARM:
       Muted: false
       Muted Internally: false
       Min: 1
       Max: 7
       streamVolume:6
       Current: 8 (headphone): 6, 40000000 (default): 6
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_ALARM
    
    - STREAM_NOTIFICATION:
       Muted: false
       Muted Internally: false
       Min: 0
       Max: 7
       streamVolume:5
       Current: 8 (headphone): 5, 40000000 (default): 5
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_NOTIFICATION
    
    - STREAM_BLUETOOTH_SCO:
       Muted: false
       Muted Internally: false
       Min: 0
       Max: 15
       streamVolume:7
       Current: 8 (headphone): 7, 40000000 (default): 7
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_BLUETOOTH_SCO
    
    - STREAM_SYSTEM_ENFORCED (aliased to: STREAM_RING):
       Muted: false
       Muted Internally: false
       Min: 0
       Max: 7
       streamVolume:5
       Current: 8 (headphone): 5, 40000000 (default): 5
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_ENFORCED_AUDIBLE
    
    - STREAM_DTMF (aliased to: STREAM_MUSIC):
       Muted: false
       Muted Internally: false
       Min: 0
       Max: 15
       streamVolume:5
       Current: 8 (headphone): 5, 80 (bt_a2dp): 2, 100 (bt_a2dp_hp): 2, 4000000 (usb_headset): 3, 20000000 (ble_headset): 2, 20000002 (ble_broadcast): 2, 40000000 (default): 5
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_DTMF
    
    - STREAM_TTS (aliased to: STREAM_MUSIC):
       Muted: false
       Muted Internally: false
       Min: 0
       Max: 15
       streamVolume:5
       Current: 8 (headphone): 5, 80 (bt_a2dp): 2, 100 (bt_a2dp_hp): 2, 4000000 (usb_headset): 3, 20000000 (ble_headset): 2, 20000002 (ble_broadcast): 2, 40000000 (default): 5
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_TTS
    
    - STREAM_ACCESSIBILITY (aliased to: STREAM_MUSIC):
       Muted: false
       Muted Internally: false
       Min: 1
       Max: 15
       streamVolume:6
       Current: 8 (headphone): 6, 80 (bt_a2dp): 2, 100 (bt_a2dp_hp): 2, 4000000 (usb_headset): 4, 20000000 (ble_headset): 2, 20000002 (ble_broadcast): 2, 40000000 (default): 6
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_ACCESSIBILITY
    
    - STREAM_ASSISTANT (aliased to: STREAM_MUSIC):
       Muted: false
       Muted Internally: false
       Min: 0
       Max: 15
       streamVolume:5
       Current: 8 (headphone): 5, 80 (bt_a2dp): 2, 100 (bt_a2dp_hp): 2, 4000000 (usb_headset): 3, 20000000 (ble_headset): 2, 20000002 (ble_broadcast): 2, 40000000 (default): 5
       Devices: headphone(8)
       Volume Group: AUDIO_STREAM_ASSISTANT
    
    
    - mute affected streams = 0x6f
    
    Volume Groups (device: index)
    - VOLUME GROUP AUDIO_STREAM_ACCESSIBILITY:
       Muted: false
       Min: 1
       Max: 15
       Current: 8 (headphone): 6, 80 (bt_a2dp): 2, 100 (bt_a2dp_hp): 2, 4000000 (usb_headset): 4, 20000000 (ble_headset): 2, 20000002 (ble_broadcast): 2, 40000000 (default): 6
       Devices: headphone
       Streams: STREAM_ACCESSIBILITY 
    - VOLUME GROUP AUDIO_STREAM_ALARM:
       Muted: false
       Min: 1
       Max: 7
       Current: 40000000 (default): 6
       Devices: headphone
       Streams: STREAM_ALARM 
    - VOLUME GROUP AUDIO_STREAM_ASSISTANT:
       Muted: false
       Min: 0
       Max: 15
       Current: 80 (bt_a2dp): 2, 100 (bt_a2dp_hp): 2, 4000000 (usb_headset): 3, 20000000 (ble_headset): 2, 20000002 (ble_broadcast): 2, 40000000 (default): 5
       Devices: headphone
       Streams: STREAM_ASSISTANT 
    - VOLUME GROUP AUDIO_STREAM_BLUETOOTH_SCO:
       Muted: false
       Min: 0
       Max: 15
       Current: 40000000 (default): 7
       Devices: headphone
       Streams: STREAM_BLUETOOTH_SCO 
    - VOLUME GROUP AUDIO_STREAM_DTMF:
       Muted: false
       Min: 0
       Max: 15
       Current: 80 (bt_a2dp): 2, 100 (bt_a2dp_hp): 2, 4000000 (usb_headset): 3, 20000000 (ble_headset): 2, 20000002 (ble_broadcast): 2, 40000000 (default): 5
       Devices: headphone
       Streams: STREAM_DTMF 
    - VOLUME GROUP AUDIO_STREAM_ENFORCED_AUDIBLE:
       Muted: false
       Min: 0
       Max: 7
       Current: 40000000 (default): 5
       Devices: headphone
       Streams: STREAM_SYSTEM_ENFORCED 
    - VOLUME GROUP AUDIO_STREAM_MUSIC:
       Muted: false
       Min: 0
       Max: 15
       Current: 80 (bt_a2dp): 2, 100 (bt_a2dp_hp): 2, 4000000 (usb_headset): 3, 20000000 (ble_headset): 2, 20000002 (ble_broadcast): 2, 40000000 (default): 5
       Devices: headphone
       Streams: STREAM_MUSIC 
    - VOLUME GROUP AUDIO_STREAM_NOTIFICATION:
       Muted: false
       Min: 0
       Max: 7
       Current: 40000000 (default): 5
       Devices: headphone
       Streams: STREAM_NOTIFICATION 
    - VOLUME GROUP AUDIO_STREAM_PATCH:
       Muted: false
       Min: 0
       Max: 15
       Current: 40000000 (default): 5
       Devices: headphone
       Streams: UNKNOWN_STREAM_13 
    - VOLUME GROUP AUDIO_STREAM_REROUTING:
       Muted: false
       Min: 0
       Max: 15
       Current: 40000000 (default): 5
       Devices: headphone
       Streams: UNKNOWN_STREAM_12 
    - VOLUME GROUP AUDIO_STREAM_RING:
       Muted: false
       Min: 0
       Max: 7
       Current: 40000000 (default): 5
       Devices: headphone
       Streams: STREAM_RING 
    - VOLUME GROUP AUDIO_STREAM_SYSTEM:
       Muted: false
       Min: 0
       Max: 7
       Current: 40000000 (default): 5
       Devices: headphone
       Streams: STREAM_SYSTEM 
    - VOLUME GROUP AUDIO_STREAM_TTS:
       Muted: false
       Min: 0
       Max: 15
       Current: 80 (bt_a2dp): 2, 100 (bt_a2dp_hp): 2, 4000000 (usb_headset): 3, 20000000 (ble_headset): 2, 20000002 (ble_broadcast): 2, 40000000 (default): 5
       Devices: headphone
       Streams: STREAM_TTS 
    - VOLUME GROUP AUDIO_STREAM_VOICE_CALL:
       Muted: false
       Min: 1
       Max: 5
       Current: 40000000 (default): 3
       Devices: headphone
       Streams: STREAM_VOICE_CALL 
    - VOLUME GROUP AUDIO_STREAM_CALL_ASSISTANT:
       Muted: false
       Min: 0
       Max: 15
       Current: 40000000 (default): 5
       Devices: headphone
       Streams: UNKNOWN_STREAM_14 
    
    Ringer mode: 
    - mode (internal) = NORMAL
    - mode (external) = NORMAL
    - zen mode:ZEN_MODE_OFF
    - ringer mode affected streams = 0xa6 (STREAM_SYSTEM,STREAM_RING,STREAM_NOTIFICATION,STREAM_SYSTEM_ENFORCED)
    - ringer mode muted streams = 0x0
    - delegate = ZenModeHelper
    
    Audio mode: 
    - Requested mode = MODE_NORMAL
    - Actual mode = MODE_NORMAL
    - Mode owner: 
       None
    - Mode owner stack: 
       Empty
    
    Audio routes:
      mMainType=0x0
      mBluetoothName=null
    
    Other state:
      mUseVolumeGroupAliases=false
      mVolumeController=VolumeController(null,mVisible=false)
      mEnableCsd=false
      mSafeMediaVolumeState=SAFE_MEDIA_VOLUME_ACTIVE
      mSafeMediaVolumeIndex=100
      mSafeMediaVolumeIndex[4]=100
      mSafeMediaVolumeIndex[8]=100
      mSafeMediaVolumeIndex[128]=-1
      mSafeMediaVolumeIndex[256]=-1
      mSafeMediaVolumeIndex[67108864]=30
      mSafeMediaVolumeIndex[536870912]=-1
      mSafeMediaVolumeIndex[536870914]=-1
      mSafeMediaVolumeDbfs=-37.0
      mMusicActiveMs=0
      mMcc=0
      mPendingVolumeCommand=null
    
    Events log: CSD updates
    
      sIndependentA11yVolume=false
      mCameraSoundForced=false
      mHasVibrator=false
      mVolumePolicy=VolumePolicy[volumeDownToEnterSilent=false,volumeUpToExitSilent=false,doNotDisturbWhenSilent=false,vibrateToSilentDebounce=400]
      mAvrcpAbsVolSupported=false
      mBtScoOnByApp=false
      mIsSingleVolume=false
      mUseFixedVolume=false
      mNotifAliasRing=false
      mFixedVolumeDevices=0x800,0x200000
      mFullVolumeDevices=0x40000,0x40001
      absolute volume devices=
      adjust-only absolute volume devices=
      mExtVolumeController=null
      mHdmiAudioSystemClient=null
      mHdmiPlaybackClient=null
      mHdmiTvClient=null
      mHdmiSystemAudioSupported=false
      mHdmiCecVolumeControlEnabled=false
      mIsCallScreeningModeSupported=false
      mic mute FromSwitch=false FromRestrictions=false FromApi=false from system=false  No accessibility service Uids.
      No Assistant service Uids.
      supportsBluetoothVariableLatency=false
      isBluetoothVariableLatencyEnabled=true
    
    Audio policies:
    Events log: dynamic policy events (logged when command received by AudioService)
    
    PlaybackActivityMonitor dump time: 3:14:12 PM
    
      playback listeners:
     (S)com.android.server.audio.PlaybackActivityMonitor$PlayMonitorClient@a46f410 (S)com.android.server.audio.PlaybackActivityMonitor$PlayMonitorClient@2f2fb09
    
    
      players:
    (not logged)  AudioPlaybackConfiguration piid:103 deviceId:0 type:android.media.SoundPool u/pid:1000/654 state:idle attr:AudioAttributes: usage=USAGE_ASSISTANCE_SONIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null sessionId:0 mutedState:none  FormatInfo{isSpatialized=false, channelMask=0x0, sampleRate=0}
      AudioPlaybackConfiguration piid:111 deviceId:0 type:android.media.SoundPool u/pid:10100/1141 state:idle attr:AudioAttributes: usage=USAGE_ASSISTANCE_SONIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null sessionId:0 mutedState:none  FormatInfo{isSpatialized=false, channelMask=0x0, sampleRate=0}
    
      ducked players piids:
    
      faded out players piids:
    
      muted player piids due to call/ring:
    
      banned uids:
    
    
      muted players (piids) awaiting device connection:
    
    
      current portId to piid map:
      portId: 8 piid: 111
    
    
    Events log: playback activity as reported through PlayerBase
    09-10 14:27:17:253 new player piid:103 uid/pid:1000/654 type:android.media.SoundPool attr:AudioAttributes: usage=USAGE_ASSISTANCE_SONIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null session:0
    09-10 14:56:12:752 new player piid:111 uid/pid:10100/1141 type:android.media.SoundPool attr:AudioAttributes: usage=USAGE_ASSISTANCE_SONIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null session:0
    09-10 14:56:19:246 player piid:111 event:started
    09-10 14:56:19:341 port updated portId:8 mapped to player piid:111
    09-10 14:59:54:371 new player piid:127 uid/pid:1010122/3123 type:android.media.MediaPlayer attr:AudioAttributes: usage=USAGE_UNKNOWN content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null session:113
    09-10 14:59:54:467 player piid:127 event:started
    09-10 14:59:54:606 port updated portId:12 mapped to player piid:127
    09-10 14:59:54:625 player piid:127 format update:FormatInfo{isSpatialized=false, channelMask=0x1, sampleRate=8000}
    09-10 14:59:54:673 player piid:127 event:device updated deviceId:2
    09-10 15:00:01:012 releasing player piid:127
    09-10 15:00:07:821 new player piid:143 uid/pid:1010122/3123 type:android.media.MediaPlayer attr:AudioAttributes: usage=USAGE_UNKNOWN content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null session:129
    09-10 15:00:07:872 player piid:143 event:started
    09-10 15:00:07:992 port updated portId:16 mapped to player piid:143
    09-10 15:00:08:007 player piid:143 format update:FormatInfo{isSpatialized=false, channelMask=0x1, sampleRate=8000}
    09-10 15:00:08:072 player piid:143 event:device updated deviceId:2
    09-10 15:00:12:380 player piid:143 event:stopped
    09-10 15:10:30:364 releasing player piid:143
    
      allowed capture policies:
    
    RecordActivityMonitor dump time: 3:14:12 PM
    
    
    Events log: recording activity received by AudioService
    09-10 14:59:44:548 rec update riid:119 uid:1010122 session:105 src:MIC not silenced pack:com.vecv.app.simplevoicerecorder
    09-10 14:59:52:663 rec stop riid:119 uid:1010122 session:105 src:MIC not silenced pack:com.vecv.app.simplevoicerecorder
    09-10 15:00:02:216 rec start riid:135 uid:1010122 session:121 src:MIC not silenced pack:com.vecv.app.simplevoicerecorder
    09-10 15:00:06:587 rec stop riid:135 uid:1010122 session:121 src:MIC not silenced pack:com.vecv.app.simplevoicerecorder
    
    AudioDeviceBroker:
      Message handler (watch for unhandled messages):
        Handler (com.android.server.audio.AudioDeviceBroker$BrokerHandler) {44e6335} @ 1122095
          Looper (AudioDeviceBroker, tid 116) {7628118}
            (Total messages: 0, polling=true, quitting=false)
    
      BECOMING_NOISY_INTENT_DEVICES_SET=
     0x400 0x800 0x8000000 0x20000000 0x80 0x100 0x200 0x2000 0x4000 0x4000000 0x20000001 0x20000 0x20000002 0x4 0x8
      Preferred devices for strategy:
    
      Non-default devices for strategy:
    
      Connected devices:
    
      APM Connected device (A2DP sink only):
    
      Preferred devices for capture preset:
    
      Applied devices roles for strategies (from API):
    
      Applied devices roles for strategies (internal):
    
      Applied devices roles for presets (from API):
    
      Applied devices roles for presets (internal:
    
    devices:
    
    
      Communication route clients:
    
      Computed Preferred communication device: null
    
      Applied Preferred communication device: null
      Active communication device: AudioDeviceAttributes: role:output type:headphone addr: name:AOSP Car on AM62P EVM profiles:[{ENCODING_PCM_32BIT, sampling rates=[32000], channel masks=0x0C, encapsulation type=0}, {ENCODING_PCM_FLOAT, sampling rates=[32000], channel masks=0x0C, encapsulation type=0}] descriptors:[]
      mCommunicationStrategyId: 15
      mAccessibilityStrategyId: 18
    
      mAudioModeOwner: AudioModeInfo: mMode=MODE_NORMAL, mPid=0, mUid=0
    
      mBluetoothHeadset: null
      mBluetoothHeadsetDevice: null
      mScoAudioState: SCO_STATE_INACTIVE
      mScoAudioMode: SCO_MODE_VIRTUAL_CALL
    
      mHearingAid: null
    
      mLeAudio: null
      mA2dp: null
      mAvrcpAbsVolSupported: false
    
    SoundEffects:
      Message handler (watch for unhandled messages):
      Handler (com.android.server.audio.SoundEffectsHelper$SfxHandler) {ad6b1e9} @ 1122096
        Looper (AS.SfxWorker, tid 118) {ad4ee6e}
          (Total messages: 0, polling=true, quitting=false)
      Default attenuation (dB): -6
    Events log: Sound Effects Loading
    09-10 14:27:17:250 effects loading started
    09-10 14:27:18:465 effect Effect_Tick.ogg loaded
    09-10 14:27:18:479 effect KeypressStandard.ogg loaded
    09-10 14:27:18:802 effect KeypressSpacebar.ogg loaded
    09-10 14:27:18:818 effect KeypressDelete.ogg loaded
    09-10 14:27:19:225 effect KeypressReturn.ogg loaded
    09-10 14:27:19:304 effect KeypressInvalid.ogg loaded
    09-10 14:27:19:305 effects loading completed
    
    
    
    Event logs:
    Events log: phone state (logged after successful call to AudioSystem.setPhoneState(int, int))
    
    
    Events log: wired/A2DP/hearing aid device connection
    09-10 14:27:17:235 updateCommunicationRoute, preferredCommunicationDevice: null eventSource: resetBluetoothSco
    09-10 14:27:20:216 updateCommunicationRoute, preferredCommunicationDevice: null eventSource: resetBluetoothSco
    
    
    Events log: force use (logged before setForceUse() is executed)
    09-10 14:27:15:010 setForceUse(FOR_ENCODED_SURROUND, FORCE_NONE) due to readPersistedSettings
    09-10 14:27:15:012 setForceUse(FOR_DOCK, FORCE_DIGITAL_DOCK) due to readDockAudioSettings
    09-10 14:27:15:199 setForceUse(FOR_SYSTEM, FORCE_NONE) due to AudioService ctor
    09-10 14:27:15:502 setForceUse(FOR_VIBRATE_RINGING, FORCE_NONE) due to muteRingerModeStreams() from u/pid:1000/654
    09-10 14:27:17:251 setForceUse(FOR_VIBRATE_RINGING, FORCE_NONE) due to muteRingerModeStreams() from u/pid:1000/654
    09-10 14:27:20:238 setForceUse(FOR_VIBRATE_RINGING, FORCE_NONE) due to muteRingerModeStreams() from u/pid:1000/654
    09-10 14:27:21:966 setForceUse(FOR_DOCK, FORCE_DIGITAL_DOCK) due to readDockAudioSettings
    09-10 14:27:22:023 setForceUse(FOR_DOCK, FORCE_DIGITAL_DOCK) due to readDockAudioSettings
    09-10 14:56:10:045 setForceUse(FOR_ENCODED_SURROUND, FORCE_NONE) due to readPersistedSettings
    09-10 14:56:10:045 setForceUse(FOR_DOCK, FORCE_DIGITAL_DOCK) due to readDockAudioSettings
    09-10 14:56:10:561 setForceUse(FOR_VIBRATE_RINGING, FORCE_NONE) due to muteRingerModeStreams() from u/pid:1000/654
    09-10 14:56:11:114 setForceUse(FOR_DOCK, FORCE_DIGITAL_DOCK) due to readDockAudioSettings
    09-10 14:56:11:143 setForceUse(FOR_DOCK, FORCE_DIGITAL_DOCK) due to readDockAudioSettings
    09-10 14:56:20:989 setForceUse(FOR_DOCK, FORCE_DIGITAL_DOCK) due to readDockAudioSettings
    09-10 14:56:21:059 setForceUse(FOR_DOCK, FORCE_DIGITAL_DOCK) due to readDockAudioSettings
    09-10 14:56:22:480 setForceUse(FOR_DOCK, FORCE_DIGITAL_DOCK) due to readDockAudioSettings
    09-10 14:56:22:485 setForceUse(FOR_DOCK, FORCE_DIGITAL_DOCK) due to readDockAudioSettings
    
    
    Events log: volume changes (logged when command received by AudioService)
    09-10 14:27:23:127 adjustStreamVolume(stream:STREAM_VOICE_CALL dir:ADJUST_SAME flags:0x0) from null
    
    
    Events log: mute commands
    09-10 14:27:15:169 RingerZenMutedStreams 0x0 from onInitStreamsAndVolumes
    
    
    Supported System Usages:
    	USAGE_CALL_ASSISTANT
    	USAGE_EMERGENCY
    	USAGE_SAFETY
    	USAGE_VEHICLE_STATUS
    	USAGE_ANNOUNCEMENT
    
    
    
    Spatial audio:
    mHasSpatializerEffect:false (effect present)
    isSpatializerEnabled:false (routing dependent)
    SpatializerHelper:
    	mState:1
    	mSpatLevel:0
    	mCapableSpatLevel:0
    	mIsHeadTrackingSupported:false
    	supported head tracking modes:
    	mDesiredHeadTrackingMode:HEAD_TRACKING_MODE_RELATIVE_WORLD
    	mActualHeadTrackingMode:HEAD_TRACKING_MODE_UNSUPPORTED
    	headtracker available:false
    	supports binaural:false / transaural:false
    	mSpatOutput:0
    Events log: spatial audio
    09-10 14:27:15:195 init effectExpected=false
    09-10 14:27:15:197 init(): setting state to STATE_NOT_SUPPORTED due to effect not expected
    09-10 14:27:15:197 setFeatureEnabled(false) was featureEnabled:false
    
    AudioSystemAdapter:
     last cache clear time: 09-10 14:56:22:485
     mDevicesForAttrCache:
    	AudioAttributes: usage=USAGE_ASSISTANCE_SONIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null forVolume: true stream: STREAM_SYSTEM(1)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    	AudioAttributes: usage=USAGE_UNKNOWN content=CONTENT_TYPE_UNKNOWN flags=0x801 tags= bundle=null forVolume: true stream: STREAM_SYSTEM(1)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    	AudioAttributes: usage=USAGE_ASSISTANCE_ACCESSIBILITY content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null forVolume: true stream: STREAM_ACCESSIBILITY(10)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    	AudioAttributes: usage=USAGE_NOTIFICATION_RINGTONE content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null forVolume: true stream: STREAM_RING(2)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    	AudioAttributes: usage=USAGE_ALARM content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null forVolume: true stream: STREAM_ALARM(4)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    	AudioAttributes: usage=USAGE_ASSISTANT content=CONTENT_TYPE_SPEECH flags=0x800 tags= bundle=null forVolume: true stream: STREAM_ASSISTANT(11)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    	AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null forVolume: true stream: STREAM_NOTIFICATION(5)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    	AudioAttributes: usage=USAGE_VOICE_COMMUNICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null forVolume: true stream: STREAM_VOICE_CALL(0)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    	AudioAttributes: usage=USAGE_VOICE_COMMUNICATION_SIGNALLING content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null forVolume: true stream: STREAM_DTMF(8)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    	AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null forVolume: true stream: STREAM_MUSIC(3)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    	AudioAttributes: usage=USAGE_UNKNOWN content=CONTENT_TYPE_UNKNOWN flags=0x804 tags= bundle=null forVolume: true stream: STREAM_VOICE_CALL(0)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    	AudioAttributes: usage=USAGE_UNKNOWN content=CONTENT_TYPE_UNKNOWN flags=0x808 tags= bundle=null forVolume: true stream: STREAM_MUSIC(3)
    		AudioDeviceAttributes: role:output type:headphone addr: name: profiles:[] descriptors:[]
    

  • Hi,

    we will do some test and check and i come back to you.

    Thanks

  • Hi,

    i just find a fix mostly based on your changes , it's under review internaly , but you can check commit details here : 
    https://gitlab.baylibre.com/baylibre/ti/android/aosp/device/ti/am62x/-/commit/ad7e963da4ee57baa0a150f77fbec29a9b7b2e33
    With this commit i'm able to play audio on jack and capture too. Same with a jabra headset on USB.

    to validate jack mic and ouput and USB headset capture and play too i use Easy voice recorder apps.
    you can find it if you search ' apk easy voice recoder" on google.

    Guillaume