Sigmastar Audio_debugsop Manual

REVISION HISTORY

Revision No.
Description
Date
1.0
  • Initial release
  • 03/05/2024

    SW RD Required Dump Information

    1. Capture registers 1502/1503/1504/1505/1506/1034/103c/141d
    2. tinymix contents information (depends on how many sound cards, use -D to set)
    3. cat alsa information:
        cat /proc/asound/card0/pcm0p/sub0/status
        cat /proc/asound/card0/pcm0p/sub0/sw_params
        cat /proc/asound/card0/pcm0p/sub0/hw_params
        cat /proc/asound/card0/pcm0c/sub0/status
        cat /proc/asound/card0/pcm0c/sub0/sw_params
        cat /proc/asound/card0/pcm0c/sub0/hw_params
    4. Device tree information: dtsi containing sound nodes, such as arch/arm64/boot/dts/sstar/pcupid.dtsi
    5. padmux information: padmux.dtsi
    6. LOG information: whether there are abnormal error messages
    7. If dump_pcm is enabled, provide the dumped audio files (path in /tmp):
        echo dump_pcm -enable 1 > /proc/audio/debug
    8. Clock information:
        cat /sys/kernel/debug/clk/clk_summary | grep aupll
        cat /sys/kernel/debug/clk/clk_summary | grep bachpll
    

    Issue 1. Speaker Playback is Silent

    Figure 1-1 Mind Map for Locating Silent Speaker Playback

    Process Method
    Exit Condition
    Next Step
    Information to Provide to SWRD
    Related FAQ Reference
    A 1. During playback, use a multimeter to confirm AUDIO's AUDD18_AUD is 1.8V
    2. During playback, use a multimeter to measure if PAD_AUD_VAG's voltage is greater than 0.9V
    Exit Condition 1:
    1. The VDD power supply voltage of AUDIO during playback differs significantly from 1.8V,
    2. The reference voltage VAG of AUDIO during playback is not greater than 0.9V
    > Power supply issue
    Exit Condition 2:
    Power supply is normal
    > No issue
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > B
    Exit Condition 1:
    ==> Seek CAE assistance
    B 1. Confirm if the padmux configuration of AUDIO AMP PAD corresponds with the development board, and check if the pad conflicts with other modes:
    cd
    vi arch/arm64/boot/dts/sstar/pcupid_xxxx-padmux.dtsi
    Check if AMP PAD has been set to MDRV_PUSE_AIO_AMP_PWR mode, and use IO_Check Tool to verify if the mode is set successfully (./io_check_xxx PinID)
    Exit Condition 1:
    1. padmux is not configured correctly or there is a conflict with other modes
    Exit Condition 2:
    AMP PAD configuration is normal==> No issue
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > C
    Exit Condition 1:
    ==> Seek CAE to confirm the current padmux situation used by the development board, and configure the correct padmux and dts according to the actual situation
    C 1. Enable RDMA sinegen
    (echo AO_DMA_A -enable 1 > /proc/audio/sinegen)
    and play, check if the Speaker can play a sine wave
    Exit Condition 1:
    1. Can play a sine wave audio file
    > Please check if the upper software successfully writes data to the specified memory
    Exit Condition 2:
    No sound output
    > Internal Audio exception
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > Please SW RD assist in troubleshooting
    Exit Condition 1:
    > Please check the application logic, or refer to the provided MI_Demo to adjust the code
    Exit Condition 2:
    > Please provide required dump information

    Issue 2. AMIC Recording Has No Data

    Figure 2-1 Mind Map for Locating No Data in AMIC Recording

    Process Method
    Exit Condition
    Next Step
    Information to Provide to SWRD
    Related FAQ Reference
    A 1. During recording, use a multimeter to confirm AUDIO's AUDD18_AUD is 1.8V
    2. During recording, use a multimeter to measure if PAD_AUD_VAG's voltage is greater than 0.9V
    Exit Condition 1:
    1. The VDD power supply voltage of AUDIO during recording differs significantly from 1.8V,
    2. The reference voltage VAG of AUDIO during recording is not greater than 0.9V
    > Power supply issue
    Exit Condition 2:
    Power supply is normal
    > No issue
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > B
    Exit Condition 1:
    ==> Seek CAE assistance
    B 1. Check if the AMIC wiring is correct
    2. After connecting the MIC, measure the MIC PIN with an oscilloscope during recording to see if there is any level change
    Exit Condition 1:
    1. Check for incorrect AMIC wiring
    2. After connecting the MIC, the oscilloscope measures no level change on the MIC PIN during recording
    > Hardware environment issue
    Exit Condition 2:
    Configuration is normal
    > No issue
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > C
    Exit Condition 1:
    ==> Seek CAE assistance in troubleshooting
    C 1. Enable ADC sinegen
    (echo AI_DMA_A -enable 1 > /proc/audio/sinegen)
    and record, check if the audio file can record a sine wave or play back the recorded data in real-time, listen if the sound is a sine wave
    Exit Condition 1:
    1. Can record a sine wave audio file
    > AMIC external circuit or layout design does not meet the specifications of the current AMIC used
    Exit Condition 2:
    No data recorded
    > Internal Audio exception
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > Please SW RD assist in troubleshooting
    Exit Condition 1:
    > Seek CAE assistance in troubleshooting
    Exit Condition 2:
    > Please provide required dump information

    Issue 3. I2S Working Abnormally in Master Mode

    Figure 3-1 Mind Map for Locating I2S Working Abnormally in Master Mode

    Process Method
    Exit Condition
    Next Step
    Information to Provide to SWRD
    Related FAQ Reference
    A Confirm if the padmux configuration of AUDIO I2S PAD corresponds with the development board, and check if the pad conflicts with other modes
    Method:
    cd
    vim arch/arm64/boot/dts/sstar/pcupid_xxxx-padmux.dtsi
    Check if I2S PAD has been set to MDRV_PUSE_I2S0_XX_XXX mode, and use IO_Check Tool to verify if the mode is set successfully (./io_check_xxx PinID)
    Exit Condition 1: padmux is not configured correctly or there is a conflict with other modes
    Exit Condition 2: I2S PAD configuration is normal
    ==> No issue
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > B
    Exit Condition 1:
    Seek CAE to confirm the current padmux situation used by the development board, and configure the correct padmux and dts according to the actual situation
    pageId=62543124
    B Check if the I2S mode and Format parameters meet the customer application scenario:
    cat /proc/audio/tdm
    Exit Condition 1:
    1. Parameters do not meet customer application scenario
    > Parameter configuration issue
    Exit Condition 2:
    Parameters meet customer application scenario
    > No issue
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > C
    Exit Condition 1:
    ==> Set reasonable parameters according to the customer's application scenario, provide dtsi containing I2S configuration
    C Test if the clock output is present: use LA/oscilloscope to capture BCK/WCK pins to see if there is output Exit Condition 1:
    1. No clock output
    > Hardware configuration issue
    Exit Condition 2:
    Can output clock normally
    > No issue
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > D
    Exit Condition 1:
    ==> Please CAE check if there are hardware pull-up/down effects, if not, provide information to SW RD
    D Test if the clock output is correct: use LA/oscilloscope to capture BCK/WCK pins
    WCK = SampleRate
    BCK = SampleRate * channels * bits
    Exit Condition 1:
    Clock configuration output
    > Hardware configuration issue
    Exit Condition 2:
    Can output clock normally
    > No issue
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > E
    Exit Condition 1:
    ==> Please CAE check if there are hardware pull-up/down effects, if not then
    E 1. Enable I2S RX sinegen
    (echo singen 13 1 > /proc/mi_modules/mi_ai/mi_ai0)
    and record; Enable RDMA Sinegen on TX side
    (echo singen 0 1 > /proc/mi_modules/mi_ao/mi_ao0)
    and play, check if the audio file can record a sine wave; measure the waveform to see if the PAD outputs normally
    Exit Condition 1:
    1. Can record a sine wave audio file or PAD output waveform is normal
    > Please check if the I2S external circuit design is correct, disconnect the external circuit and measure if the I2S output signal near the SOC is normal
    Exit Condition 2:
    No data recorded
    > Internal Audio exception
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > Please SW RD assist in troubleshooting
    Exit Condition 1:
    > Seek CAE assistance in troubleshooting
    Exit Condition 2:
    > Please provide required dump information
    pageId=62524757


    Issue 4. DMIC Not Functioning Properly

    Figure 4-1 Mind Map for Locating DMIC Not Functioning Properly

    Process Method
    Exit Condition
    Next Step
    Information to Provide to SWRD
    Related FAQ Reference
    A 1. Confirm if the padmux configuration of AUDIO DMIC PAD corresponds with the development board, and check if the pad conflicts with other modes:
    cd
    vim arch/arm/boot/dts/iford_xxxx-padmux.dtsi
    Check if DMIC PAD has been set to MDRV_PUSE_DMIC0_XX mode, and use IO_Check Tool to verify if the mode is set successfully (./io_check_xxx PinID)
    Exit Condition 1: padmux is not configured correctly or there is a conflict with other modes
    Exit Condition 2: DMIC PAD configuration is normal
    ==> No issue
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > B
    Exit Condition 1:
    Seek CAE to confirm the current padmux situation used by the development board, and configure the correct padmux and dts
    B 1. Check if the DMIC BCK mode and PAD pin's power supply voltage meet the customer's DMIC hardware application scenario, and measure the DMIC BCK signal during DMIC recording
    Exit Condition 1:
    1. Parameters do not meet customer application scenario
    > Parameter configuration issue
    Exit Condition 2:
    Parameters meet customer application scenario
    > No issue
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > C
    Exit Condition 1:
    ==> Set reasonable parameters according to the customer's application scenario
    C 1. Enable DMIC Sinegen
    (echo singen 10 1 > /proc/mi_modules/mi_ai/mi_ai0)
    and play, check if the audio file can record a sine wave; measure the waveform to see if the PAD outputs normally
    Exit Condition 1:
    1. Can record a sine wave audio file or PAD output waveform is normal
    > Please check if the customer's DMIC external circuit design is correct, try increasing the driving energy of the DMIC PIN, and use an oscilloscope to measure if the hardware DMIC Data PIN outputs normally
    Exit Condition 2:
    No data recorded
    > Internal Audio exception
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > Please SW RD assist in troubleshooting
    Exit Condition 1:
    > Seek CAE assistance in troubleshooting
    Exit Condition 2:
    > Please provide required dump information
    pageId=62534576

    Issue 5. Speaker Playback Has Noise

    Figure 5-1 Mind Map for Locating Noise During Speaker Playback

    Process Method
    Exit Condition
    Next Step
    Information to Provide to SWRD
    Related FAQ Reference
    A Enable RDMA Sinegen
    (echo AO_DMA_A -enable 1 > /proc/audio/sinegen)
    and run the customer application, check if noise can still be heard
    Exit Condition 1: No noise > Upper software stream exception
    Exit Condition 2: Noise still exists
    > Further investigation needed
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > B
    Exit Condition 1:
    Please check the application logic, or refer to the provided MI_Demo to adjust the code
    B During playback, use an oscilloscope to measure the DAC PIN output signal, observe if the waveform is normal
    Exit Condition 1:
    1. Waveform is a sine wave and clean without noise, frequency is stable
    > External hardware interference
    Exit Condition 2:
    Waveform is distorted
    > Internal Audio state exception
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > C
    Exit Condition 1:
    ==> Please check if the external hardware circuit/reference voltage source is introducing signal interference, or if there is crosstalk introduced by a load (voltage regulator chip)
    C Enable AMIC Sinegen
    (echo AI_DMA_A -enable 1 > /proc/audio/sinegen)
    and record, check if the waveform is normal
    Exit Condition 1:
    1. Can record a sine wave audio file or PAD output waveform is normal
    > Analog clock source is stable, ruling out clock instability issues, only DAC has exceptions
    2. Waveform is abnormally distorted
    > Clock source is unstable or analog circuit is abnormal
    ==> Internal Audio exception
    Exit Condition 1:
    ==> Process ends
    Exit Condition 1:
    ==> D
    pageId=62524755
    D 1. Check if Aupll is enabled
    cat /sys/kernel/debug/clk/clk_summary to see if CLK_aupll_384M is enabled
    Exit Condition 1:
    Audio 48M clock is not turned on
    > Clock configuration issue
    Exit Condition 2:
    Audio 48M clock is normal
    > Internal Audio exception
    Exit Condition 1:
    1. Process ends
    Exit Condition 2:
    1. Process ends
    Exit Condition 1:
    Need CLK Owner to assist in troubleshooting
    Exit Condition 2:
    ==> E
    pageId=62546055
    E Check if the DUMP audio data is normal
    echo dump_pcm -enable 1 > /proc/audio/debug
    generate files in /tmp
    Exit Condition 1:
    Data is abnormal
    > Internal Audio exception
    Exit Condition 2:
    Data is normal
    > Further investigation needed
    Exit Condition: Provide dump information to SW RD for analysis Exit Condition 2:
    If processed by an algorithm, please seek assistance from algorithm colleagues to troubleshoot, check algorithm parameters; if not processed by an algorithm, please provide required dump information
    pageId=62546053
    ---

    Issue 6. Frequent Popping Noise During Playback/Recording

    Figure 6-1 Mind Map for Locating Frequent Popping Noise During Playback/Recording

    Process
    Method
    Exit Condition
    Next Step
    Information to Provide to SWRD
    Related FAQ Reference
    A Check if the Gain value configuration is reasonable, reduce the Gain value and observe if there is still popping noise
    Exit Condition 1: No popping noise > Parameter configuration issue
    Exit Condition 2: Popping noise exists
    > Further investigation needed
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > B
    Exit Condition 1:
    Adjust Gain value to a reasonable parameter, avoid excessive Gain causing audio signal to exceed limits leading to waveform distortion
    B Enable Sinegen
    (echo AO_DMA_A -enable 1 > /proc/audio/sinegen)
    conduct tests to see if there is still popping noise
    Exit Condition 1:
    1. No popping noise
    > Hardware issue
    Exit Condition 2:
    Popping noise still exists
    > Further investigation needed
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > C
    Exit Condition 1:
    ==> Please CAE assist in troubleshooting the customer's external circuit, see if external signals are affecting
    C 1. Enable Debug printing, observe if there are multiple occurrences of DMA FULL/EMPTY; Local Buffer Empty/Full abnormal prints
    echo irq -enable 1 > /proc/audio/debug
    echo dma -enable 1 > /proc/audio/debug
    Exit Condition 1:
    1. Abnormal prints exist
    > Further investigation needed
    Exit Condition 2:
    No abnormal prints
    > For playback scenarios, please CAE check if the external circuit design is correct, measure the output signal of the PIN, for recording scenarios, use DUMP PCM command for further investigation
    Exit Condition 1:
    > D
    Exit Condition 2:
    > G
    D 1. Please confirm if the time interval for sending and receiving data in the application is stable, whether there is a mismatch between the upper layer sending/receiving data rate and the lower layer hardware sending/receiving rate Exit Condition 1:
    1. Sending/receiving rates do not match
    > Rate synchronization issue
    Exit Condition 2:
    Upper layer sending/receiving data is normal
    > Internal Audio exception
    Exit Condition 1:
    > Process ends
    Exit Condition 2:
    > F
    Exit Condition 1:
    Please adjust the application sending/receiving rate to avoid frame loss or data playback issues
    pageId=62527548
    E 1. Check if the DUMP MHAL & MI layer audio data is normal
    Exit Condition 1:
    1. MHAL layer data is abnormal
    > Internal Audio exception
    Exit Condition 2:
    DUMP waveform is abnormal
    > Further investigation needed
    Exit Condition 1:
    > F
    Exit Condition 2:
    > G
    F 1. Check if Aupll is enabled
    cat /sys/kernel/debug/clk/clk_summary to see if CLK_aupll_384M is enabled
    Exit Condition 1:
    Audio 48M clock is not turned on
    > Clock configuration issue
    Exit Condition 2:
    Audio 48M clock is normal
    > Internal Audio exception
    Exit Condition 1:
    1. Process ends
    Exit Condition 2:
    1. Process ends
    Exit Condition 1:
    Need CLK Owner to assist in troubleshooting
    Exit Condition 2:
    ==> G
    pageId=62546055
    G Check if the DUMP audio data is normal
    echo dump_pcm -enable 1 > /proc/audio/debug
    generate files in /tmp
    Exit Condition 1:
    Data is abnormal
    > Internal Audio exception
    Exit Condition 2:
    Data is normal
    > Further investigation needed
    Exit Condition: Provide dump information to SW RD for analysis Exit Condition 2:
    If processed by an algorithm, please seek assistance from algorithm colleagues to troubleshoot, check algorithm parameters; if not processed by an algorithm, please provide required dump information
    pageId=62546053