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-AM62B-P1: Sound does not play when running the PLAYBACK sample code

Part Number: SK-AM62B-P1

Tool/software:

Question:
How can I enable audio input and output for the "Playback" sample code?

Environment:
Hardware: SK-AM62B-P1
OS:FreeRTOS
SDK: AM62x
Link: https://www.ti.com/tool/ja-jp/download/MCU-PLUS-SDK-AM62X

Expectation:
Audio should be output through a headset connected to the 3.5mm jack.
Current Situation: The execution log is output normally, but there is no audio output.

[MCASP] Audio playback example started.
Enter your response on UART terminal
Stop the demo? (y/n) : y

Link: https://dev.ti.com/tirex/explore/content/mcu_plus_sdk_am62x_10_01_00_33/docs/api_guide_am62x/EXAMPLES_DRIVERS_MCASP_PLAYBACK.html

Steps:

  1. Connect the headset to the 3.5mm jack.
  2. Build the "Playback" sample code using the same steps as the "Hello World" sample (link).
  3. Continuously input audio into the microphone.
  4. Execute the code.
  5. The log is output normally.
  6. ★ No audio input from the speaker.


Additional Information:
I have embedded logs at the beginning of the callback functions (mcasp_txcb(), mcasp_rxcb()) that receive from mcasp, but they are not output.
Therefore, I suspect that one of the reasons is that the callback is not being returned.

  • Hi,

    I will have it run this tomorrow on my setup and get back to you. 

    Best Regards,

    Suren

  • Hi Satoshi-san,

    My colleague was able to run the example using CCS and was able to hear the audio.


    I tested the example using CCS. It is working fine on AM62x.

    Here are the logs -
    SYSFW Firmware revision 0xa
    SYSFW ABI revision 4.0

    INFO: Bootloader_runCpu:176: CPU m4f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_runCpu:176: CPU a530-0 is initialized to 1400000000 Hz !!!
    INFO: Bootloader_runCpu:176: CPU a530-1 is initialized to 1400000000 Hz !!!
    INFO: Bootloader_runCpu:176: CPU a531-0 is initialized to 1400000000 Hz !!!
    INFO: Bootloader_runCpu:176: CPU a531-1 is initialized to 1400000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:229: CPU r5f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_JumpSelfCpu:248: All done, jumping self ...

    [MCASP] Audio playback example started.
    Enter your response on UART terminal
    Stop the demo? (y/n) : 

    Best Regards,

    Suren

  • Hi Suren, 

    If possible could you show us the picture you tested. I would like to know the speaker and mic connection. 

    And are you useing pre-build binary?

    Best regards,

    Ito

  • Hi Ito-san,

    I have assigned the query to my Colleague (Ritapravo) who is based in India to comment as he tested it.

    Best Regards,

    Suren

  • Hi, Suren, 

    Thanks for sharing the log.
    The exact same log is output in this environment, but there is no sound.

    I have used the project “aic31” to check the operation, because the project “aic32” does not exist in the SDK of am62x.
    (mcasp_playback_codec_
    aic31 _am62x-sk_a53ss0-0_freertos_gcc-aarch64)

    Share “Compiler” and “Products” settings.


    Best regards,

    Satoshi

  • Hi Satoshi,

    Just wanted to confirm if your earphone has a built-in working microphone? 
    This example takes input from the microphone and outputs it to the speakers of the earphone.

    Regards,
    Ritapravo

  • Hi Ritapravo,

    No, it is not.
    I understand that sound input/output is only valid if the headset is connected to a 3.5mm jack.

    Connect the headset to the 3.5mm jack.


    I have followed the steps below and there is still no sound. 
    Is there any cause that you can think of?

    Steps:

    In the sample code embedded in the SDK, the callback functions (mcasp_txcb(), mcasp_rxcb()) appear to be defined but not used.
    Also, the implementation differs from the usage example.
    Example Usage

    Regards,
    Satoshi

  • Hi Ritapravo,

    Some errors were made in the answers.

    No, it is not.

    I use headphones with a built-in microphone.

    Regards,
    Satoshi

  • Hi Satoshi,

    In the sample code embedded in the SDK, the callback functions (mcasp_txcb(), mcasp_rxcb()) appear to be defined but not used.

    These two functions are Callback functions. After a MCASP transaction is completed, these functions are called. You can put a breakpoint in these functions to see them working. 

    Your setup looks correct to me. One thing you can try is to use a different earphone with mic. Other than that things look correct to me.

    Regards,
    Ritapravo

  • Hi Ritapravo,

    Thanks for the answer.

    You can put a breakpoint in these functions to see them working. 

    We have already tried this one.
    The log is embedded in the Callback function, but it is not logged output.
    We share videos of debugging runs.

    Also, I will share the project file I am using, can you please check if there are any differences?
    mcasp_playback_codec_aic31.zip

    Regards,
    Satoshi

  • Hi Satoshi,

    The log is embedded in the Callback function, but it is not logged output.

    mcasp_txcb(), mcasp_rxcb() are part of ISR which is called after MCASP transaction is complete. If you look inside the definition/implementation of debugP_log(), you will be able to see that it cannot be used in ISR.



    Regards,
    Ritapravo

  • Hi Ritapravo,

    Thanks for the lecture.
    I was able to confirm that it stops at breakpoints.

    And, when the audio output was checked again, it was confirmed that the output was normal, although the volume was low.

    Thank you for your time.

    Refards,
    Satoshi