SK-AM62P-LP: Audio routing through 3.5 mm audio jack is not working properly.

Part Number: SK-AM62P-LP

Tool/software:

Environment:

Board: SK-AM62P-LP

OS: AOSP 14 (10.0.0) (https://software-dl.ti.com/processor-sdk-android/esd/AM62PX/10_00_00/docs/android/Overview.html)

Setup:

Speaker and microphone connected through 3.5 mm audio jack using an audio splitter.

Issue:

The speaker alone plays audio and microphone alone records audio. And both of these work pretty well when used alone. But when both are in use, either of the one stops working. i.e. If I use microphone when audio is playing no audio is captured and vice versa.

It throws pcm_open(out) failed or pcm_open(in) failed

This was reproducible on the prebuilt AM62Px_userdebug_10.00.00_emmc as well

Steps to reproduce:

1. Connect a speaker and microphone to 3.5 mm audio jack through an audio splitter.

2. Play some audio.

3. Try to record through microphone.

4. Observe that no audio is recorded through the microphone.

Requesting support to resolve this.

  • Hi,

    it's difficult for me to reproduce your issue because i don't know what is exactly your audio splitter , how it's working, i have no audio splitter etc.

    please share more details if you want some help.

    Thanks
    Guillaume

  • Hi ,

    I can give you some more info. I'm attaching the log captured during the issue scenario.

    audio_routing_issue.txt

    And below is its analysis:


    1. Started audio playback:
    Line 143: 12-10 10:25:12.654 324 3353 V tinyhal : -out_pcm_write(0xb4000075998efe50)

    2. Opened easy voice recorder app for input audio recording:
    Line 5243: 12-10 10:25:18.429 558 1244 I ActivityTaskManager: START u10 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.coffeebeanventures.easyvoicerecorder cmp=com.coffeebeanventures.easyvoicerecorder/com.digipom.easyvoicerecorder.ui.activity.EasyVoiceRecorderActivity} with LAUNCH_MULTIPLE from uid 1010064 (BAL_ALLOW_ALLOWLISTED_COMPONENT) result code=2

    3. Started audio recording:
    Line 6675: 12-10 10:25:20.064 558 977 I ActivityManager: Background started FGS: Allowed [callingPackage: com.coffeebeanventures.easyvoicerecorder; callingUid: 1010115; uidState: TOP ; uidBFSL: [BFSL]; intent: Intent { act=com.coffeebeanventures.easyvoicerecorder.APP_REQUESTS_START_RECORD_ACTION cmp=com.coffeebeanventures.easyvoicerecorder/com.digipom.easyvoicerecorder.service.RecorderService (has extras) }; code:PROC_STATE_TOP; tempAllowListReason:<null>; targetSdkVersion:34; callerTargetSdkVersion:34; startForegroundCount:1; bindFromPackage:null: isBindService:false]

    4. No audio recorded with continous pcm_open in failed error:
    Line 7260: 12-10 10:25:20.570 324 3812 E tinyhal : pcm_open(in) failed:

    Below are the tinypcminfo results captured during the scenarios:

    1. With no audio playing or recording:

    am62p:/ # 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

    2. Audio only with no recording:

    am62p:/ # tinypcminfo -d 0 -D 0                                                                                                                                                                                   
    Info for card 0, device 0:
    
    PCM out:
    cannot open device 0 for card 0
    pcm_hw_open: cannot open device '/dev/snd/pcmC0D0p'Device does not exist.
    
    PCM in:
          Access:	0x000009
       Format[0]:	0x000400
       Format[1]:	00000000
     Format Name:	S32_LE
       Subformat:	0x000001
            Rate:	min=44100Hz	max=44100Hz
        Channels:	min=2		max=2
     Sample bits:	min=32		max=32
     Period size:	min=4		max=8192
    Period count:	min=2		max=16384

    3. During recording while playing audio:

    am62p:/ # tinypcminfo -d 0 -D 0
    Info for card 0, device 0:
    
    PCM out:
    cannot open device 0 for card 0
    pcm_hw_open: cannot open device '/dev/snd/pcmC0D0p'Device does not exist.
    
    PCM in:
    Access: 0x000009
    Format[0]: 0x000400
    Format[1]: 00000000
    Format Name: S32_LE
    Subformat: 0x000001
    Rate: min=44100Hz max=44100Hz
    Channels: min=2 max=2
    Sample bits: min=32 max=32
    Period size: min=4 max=8192
    Period count: min=2 max=16384

    4. With only recording and no audio playing:

    am62p:/ # tinypcminfo -d 0 -D 0                                                                                                                                                                                   
    Info for card 0, device 0:
    
    PCM out:
          Access:	0x000009
       Format[0]:	0x000004
       Format[1]:	00000000
     Format Name:	S16_LE
       Subformat:	0x000001
            Rate:	min=44100Hz	max=44100Hz
        Channels:	min=2		max=2
     Sample bits:	min=16		max=16
     Period size:	min=8		max=16384
    Period count:	min=2		max=16384
    
    PCM in:
    cannot open device 0 for card 0
    pcm_hw_open: cannot open device '/dev/snd/pcmC0D0c'Device does not exist.

    It is noticed that when recording while playing audio, PCM in channel is not consumed as in (3). But it is consumed when recorded alone as in (4).