nRF5340 Audio DK: Walkie Talkie Demo - LINE IN instead of MIC

Hello,

I am working with the Demo application for the Walkie Talkies using LE Audio. It works great with the onboard Microphone. I use only 2 boards. One is flashed as GATEWAY and the other is HEADSET (HS).

I now want to change the demo to get the audio input from the LINE IN socket instead of the Microphone.


What I tried I added the following to the prj.conf file as per recommendation from the SDK documents:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/nrf5340_audio/README.html#enabling-the-walkie-talkie-demo

CONFIG_AUDIO_SOURCE_I2S=y

But the audio still comes from the Microphone instead of the LINE IN input.

How can I change the demo to work from the LINE IN input instead of the microphone?

Thanks

Parents

  • Hi Amanda,

    Many thanks your reply was very helpful.  Your post did not show up in my search because of the "_" in the name "WALKIE_TALKIE_DEMO".

    I did change it now so that the Walkie Talkie config is removed from the proj.conf file and I added:

    CONFIG_STREAM_BIDIRECTIONAL=y
    This one was already there:
    CONFIG_AUDIO_SOURCE_I2S=y
    The Line In on the Gateway is working now but the Headset side is still on PDM Mic
     
    In the Headset side of the code I found the problem, the compiler directives are still enabling the MIC.
    In .../src/modules/hw_codec.c:
    #if ((CONFIG_AUDIO_DEV == HEADSET) && CONFIG_STREAM_BIDIRECTIONAL)
        ret = cs47l63_comm_reg_conf_write(pdm_mic_enable_configure,
                          ARRAY_SIZE(pdm_mic_enable_configure));
        if (ret) {
            return ret;
        }
    #endif /* ((CONFIG_AUDIO_DEV == HEADSET) && CONFIG_STREAM_BIDIRECTIONAL) */
    After code was changed to this on the Headset section, the Line In worked on both sides:
    #if ((CONFIG_AUDIO_DEV == HEADSET) && (CONFIG_AUDIO_SOURCE_I2S))
        if (IS_ENABLED(CONFIG_WALKIE_TALKIE_DEMO))
        {
            ret = cs47l63_comm_reg_conf_write(pdm_mic_enable_configure,
                                              ARRAY_SIZE(pdm_mic_enable_configure));
            if (ret)
            {
                return ret;
            }
        }
        else
        {
            ret = cs47l63_comm_reg_conf_write(line_in_enable, ARRAY_SIZE(line_in_enable));
            if (ret)
            {
                return ret;
            }
        }
    #endif /* ((CONFIG_AUDIO_DEV == HEADSET) && CONFIG_STREAM_BIDIRECTIONAL) */

    EDIT: Using NCS 2.2.0 but 2.3.0 was fixed already.
    Regards
    Fritz
Reply

  • Hi Amanda,

    Many thanks your reply was very helpful.  Your post did not show up in my search because of the "_" in the name "WALKIE_TALKIE_DEMO".

    I did change it now so that the Walkie Talkie config is removed from the proj.conf file and I added:

    CONFIG_STREAM_BIDIRECTIONAL=y
    This one was already there:
    CONFIG_AUDIO_SOURCE_I2S=y
    The Line In on the Gateway is working now but the Headset side is still on PDM Mic
     
    In the Headset side of the code I found the problem, the compiler directives are still enabling the MIC.
    In .../src/modules/hw_codec.c:
    #if ((CONFIG_AUDIO_DEV == HEADSET) && CONFIG_STREAM_BIDIRECTIONAL)
        ret = cs47l63_comm_reg_conf_write(pdm_mic_enable_configure,
                          ARRAY_SIZE(pdm_mic_enable_configure));
        if (ret) {
            return ret;
        }
    #endif /* ((CONFIG_AUDIO_DEV == HEADSET) && CONFIG_STREAM_BIDIRECTIONAL) */
    After code was changed to this on the Headset section, the Line In worked on both sides:
    #if ((CONFIG_AUDIO_DEV == HEADSET) && (CONFIG_AUDIO_SOURCE_I2S))
        if (IS_ENABLED(CONFIG_WALKIE_TALKIE_DEMO))
        {
            ret = cs47l63_comm_reg_conf_write(pdm_mic_enable_configure,
                                              ARRAY_SIZE(pdm_mic_enable_configure));
            if (ret)
            {
                return ret;
            }
        }
        else
        {
            ret = cs47l63_comm_reg_conf_write(line_in_enable, ARRAY_SIZE(line_in_enable));
            if (ret)
            {
                return ret;
            }
        }
    #endif /* ((CONFIG_AUDIO_DEV == HEADSET) && CONFIG_STREAM_BIDIRECTIONAL) */

    EDIT: Using NCS 2.2.0 but 2.3.0 was fixed already.
    Regards
    Fritz
Children
No Data
Related