Issue with Stereo Sound from External Codec on nRF5340 DK (SDK v2.6.2)

Hello Team,

I am experiencing an issue with the sound output from an external codec connected to the nRF5340 DK. Currently, the sound is in mono, but my goal is to achieve stereo sound for both the left and right channels.

I read in an article that the configuration may need to be edited to enable stereo output from the external codec. I am using SDK v2.6.2 and would appreciate any guidance or suggestions on how to adjust the configuration to resolve this issue.

Thank you for your support!

Regards,

Abdulmohaimen Algamoudi

Parents
  • Hi,

    Could you please provide more information about your setup?

    Which external codec do you use?

    Best regards,
    Dejan

  • Hi, 

    Thank you for your swift reply.

    I am using the DA7212 evaluation board, and I can hear sound from the jacks on the DA7212 board. I followed the instructions from Nordic to enable the external codec.

    However, I am still working on achieving stereo sound, as the current output is mono. Any further guidance would be greatly appreciated.

    Best regards,

    Abdulmohaimen Algamoudi

  • Hi Abdulmohaimen,

    In your initial post you mentioned NCS v2.6.2 but you showed the log when using NCS v2.4.2. Can you provide clarification on the NCS version you currently use?

    Best regards,
    Dejan

  • Hey Dejans,

    While working with v2.6.2, I encountered some recurring errors.
    I found the mentioned code of v2.4.2 from a previous ticket , implemented it, and it worked, allowing me to achieve CIS audio, albeit with limitations, as previously mentioned.

    My approach was to continue working with the functional setup on v2.4.2 to find a concrete solution and resolve all potential problems. After that, I plan to update and attempt to achieve the same results with the newer SDK.

    Best regards 

    Abdulmohaimen

  • BTW, these are the log files from using v2.6.2 in a proper implementation:

    1-Gateway:

    2-Headset: 

  • Hi Abdulmohaimen,

    Are these logs in NCS v2.6.2 obtained after you implemented the same code changes as when you used NCS v2.4.2?

    Best regards,
    Dejan

  • Hi Abdulmohaimen,

    The error "<err> sw_codec_select: Unsupported channel mode for decoder: 0" in your NCS v2.6.2 log indicates that channel mode for decoder is not properly selected.

    You can look at m_config.decoder.channel_mode, struct sw_codec_decoder and enum sw_codec_channel_mode for the place where channel_mode is set. This is how sw_codec_channel_mode looks like in sw_codec_select.h


    You could try to check how m_config.decoder.channel_mode is set.

    Best regards,
    Dejan

Reply
  • Hi Abdulmohaimen,

    The error "<err> sw_codec_select: Unsupported channel mode for decoder: 0" in your NCS v2.6.2 log indicates that channel mode for decoder is not properly selected.

    You can look at m_config.decoder.channel_mode, struct sw_codec_decoder and enum sw_codec_channel_mode for the place where channel_mode is set. This is how sw_codec_channel_mode looks like in sw_codec_select.h


    You could try to check how m_config.decoder.channel_mode is set.

    Best regards,
    Dejan

Children
  • Good mrning Dejans, 

    I would like to express my thanks again. I was able to configure CIS Stereo mode using the v2.6.2 SDK by following this article and making some modifications to my code.

    While attempting to achieve a bidirectional configuration by enabling CONFIG_STREAM_BIDIRECTIONAL=y to get input from the microphone, I encountered the following error from the headset: (Left)

    (Right)



    The line 399 in audio_system is:


    I have tried several methods to change the number of data channels to 2, but none of them have worked. Could you please assist me with this issue?

    I would like to mention that with the current working SDK I am using, both headsets are connected and synchronized, but there is no sound coming from the right headset. the log file of the right headset with out  enabling CONFIG_STREAM_BIDIRECTIONAL=y, when the left one output sound:
    .

    For any further information, I am ready to assist or provide details as needed.

    Thanks in advance.

    Best regards 

    Abdulmohaimen 



  • Hi Abdulmohaimen,

    Have you seen my last reply in this thread

    Best regards,
    Dejan

  • Hello Dejan,

    I would like to express my heartfelt thanks for all the support you have provided throughout this ticket. With your assistance, I was able to achieve the desired configuration with the DK, and I am looking forward to testing it further with my PCB.

    Once again, thank you so much!

    Best regards 

    Abdulmohaimen