How to use nRF53 audio dk series to play mp3 audio file

Hi,

I have worked on nRF 5340 (nRF connect SDK v1.9.1) for last few days and now able to use and modify some examples.

Recently, I have received the nRF 5340 audio DK which I need to use to develop an application which will use the audio audio files stored in an external SD card and then will play them to drive external device (Ex. speaker). I have cloned the repo, but could not yet configure the device under the Add Build Configuration as I am unable to find the board name for nrf5340 audio dk. Please let me know what I am missing here and it will be really helpful if I can get a reference for DK configuration and any example available to start with the application development.

Thanks

Parents
  • Hello,

    Please download the NCS v2.0.0 since this is the NCS version that marks the official release of the nRF5340 Audio reference application. You will need the v2.0.0 or the v1.9.99-dev1 tagged release in order to create a build configuration for the nRF5340 Audio DK.
    You can read more about the steps to get up and running with the nRF5340 Audio DK in the reference application documentation.
    Please note that usage of the SD card is not supported by the nRF5340 reference application, but there is no limitation for you to implement this in the application.

    Best regards,
    Karl

  • Hi Karl,

    Thank you for the clarification.

    In the nRF5340 Audio documentation, I found "You need at least two nRF5340 Audio development kits (one with the gateway firmware and one with headset firmware) to test the application. ". So can't I play any audio using a single standalone Audio DK i.e. not by broadcasting it from one DK to other?

    Regards,

    Shubham

  • Hello Shubham,

    ShuMan said:
    Thank you for the clarification.

    No problem at all, I am happy to help!

    ShuMan said:
    In the nRF5340 Audio documentation, I found "You need at least two nRF5340 Audio development kits (one with the gateway firmware and one with headset firmware) to test the application. ". So can't I play any audio using a single standalone Audio DK i.e. not by broadcasting it from one DK to other?

    You can perform either of the tasks with a single device - either acting as a headset or as a gateway (the audio source), but you will need 2 DKs in order to test the full end-to-end capabilities.
    If you only have a single DK you can either program it as a gateway (without a 'headset' device to play the transmitted audio) or as a headset (without a 'gateway' device to receive audio from).
    When LE Audio is fully supported by iOS or Android you will be able to use a compatible smartphone as a gateway, but this is unfortunately not the case yet, so you should therefore use at least two devices when you evaluate the nRF5340 for LE Audio products.
    I hope that clears things up - please do not hesitate to let me know if anything still should be unclear, or if you have any additional questions to this.

    Best regards,
    Karl

  • Hi Karl,

    So as far as I understand, I need a gateway either a compatible smartphone or another DK to be able to stream audio. Is this correct?

    Also, is it possible to send a command using Serial UART over BLE from a smartphone which can trigger the audio DK to play a particular audio stored into the SD card?

    Thanks and Regards,

    Shubham

  • Hello again, Shubham

    ShuMan said:
    So as far as I understand, I need a gateway either a compatible smartphone or another DK to be able to stream audio. Is this correct?

    Yes, this would be the case for almost any BLE product as well - you'd need both a sender and a receiver to properly test that the wireless communication is working as expected.

    ShuMan said:
    Also, is it possible to send a command using Serial UART over BLE from a smartphone which can trigger the audio DK to play a particular audio stored into the SD card?

    Yes, you can use regular BLE services and profiles to control the audio being transmitted.
    In the LE Audio context these services are referred to as ACLs.

    Best regards,
    Karl

  • Hello again, Shubham

    An issue was just discovered with using the SD Card reader with the NCS v2.0.0 release for the nrf5340_audio reference application.
    Please apply this patch to your SDK, if you intend to work with the SD card reader in combination with the nRF5340 Audio reference application. 
    4466.0001-applications-nrf5340_audio-fix-sdcard-module_for_NCS_200.patch

    Furthermore, you can use modules/sd_card.c as a reference for your implementation of the added SD card functionality.

    The provided patch will be applied to future releases of the NCS SDK, but I thought I should let you know here directly so that you could incorporate it already in the case that you have already begun your work.

    Best regards,
    Karl

  • Hi Karl,

    I made changes to the respctive files as per the patch and tried building the nrf5340_audio application. I initially got the warning "attempt to assign the value 'y' to the undefined symbol HW_CODEC_CIRRUS_LOGIC" and could not build the application.

    I tried to comment it but then it followed to a series of erros related to "cs47l63.h" and so on. Please find the zip file of the application here for the reference.

    Thanks

Reply
  • Hi Karl,

    I made changes to the respctive files as per the patch and tried building the nrf5340_audio application. I initially got the warning "attempt to assign the value 'y' to the undefined symbol HW_CODEC_CIRRUS_LOGIC" and could not build the application.

    I tried to comment it but then it followed to a series of erros related to "cs47l63.h" and so on. Please find the zip file of the application here for the reference.

    Thanks

Children
  • Hi,

    There is missing repository in your codebase.
    Please follow the instruction here.
    Setting up the nRF5340 Audio repositories

  • Hi Pirun,

    If you were referring to LC3 codec repository, then currently I am trying to use the SBC codec until I get the access to LC3 repository. But if you were referring to some other repository then please let me know.

    Thanks

  • Hello,

    Even if you will not be using the LC3 codec you will need to perform the steps in the link that Pirun referenced - when you perform the west update you will be prompted for your github login to the account that has the access to the LC3 repository, here it is important that you do not cancel the rest of the update, even if you are not going to use the LC3 codec.
    Just input some junk login information, so that the authentication fails, and then the west update will continue to download the other required dependencies, such as the Cirrus Logic HW Codec repository.

    Please do this, and let us know if this resolves your issue.

    Best regards,
    Karl

  • Hi Karl,

    I have followed your instructions and completed the build procedure. I got the below error which seems to be the LC3 repo access issue.

    By modifying the nrf5340_audio_dk_devices.json file, I am able to see the change in audio DK LED colour as per the "nrf5340_audio_dk_dev" value. However, for our application where I need to use a file from the SD card and play on the device itself instead of transmitting/receiving from other device. So, please let me know what modification I have to make in the existing audio application.

    Thanks

  • ShuMan said:
    I have followed your instructions and completed the build procedure. I got the below error which seems to be the LC3 repo access issue.

    It is expected to fail for this part as long as you do not have access to the LC3 repository - but it will still download all the other dependencies so that you are able to build the application, so this looks correct to me! :) 

    ShuMan said:
    By modifying the nrf5340_audio_dk_devices.json file, I am able to see the change in audio DK LED colour as per the "nrf5340_audio_dk_dev" value. However, for our application where I need to use a file from the SD card and play on the device itself instead of transmitting/receiving from other device. So, please let me know what modification I have to make in the existing audio application.

    If you are able to build the application and change the LED color then you have all the dependencies you need to work with the reference application (apart from the LC3 access).
    There is currently no support for outputting directly from the SD card in the nRF5340 audio reference application, but you can implement this yourself using the sd_card.c/.h files as a reference for this.

    Best regards,
    Karl

Related