Developing with Nrf5340 audio dk

Hi, I'm here again with few questions, and it will be great if anyone can answer. Firstly, in my job, we are going to improve some product with BLE audio, so we buy a Nrf5340 audio DK (only 1 because we have an earphone with BLE audio and LC3 codec)  to start this development.

I have been testing with some samples present's in the NRF SDK and zephyr samples to understand how it works. We that information several questions have come to my mind, here they are:

1. First I want to use the input present in the board to input audio, but I can't see any sample about it, if I'm not wrong it's using with the I2S drivers, no?

2. The earphones (for the time being it is not contemplated to use and stereo audio) they haven't and interface with the smartphone. So I tested to connect to the board with the level of RSSI, and it's work, but I think it's not paired so how I can do that?

3. With the above question, my requirements require me to be CIS I think, because I need to connect the headphones and avoid connecting other devices. It's that correct?

3. It is clear to me that need to create a new program with my requirements, how I should start or is it better to use the audio application and change It as I need?

Parents
  • Hi Aissa

    1. First I want to use the input present in the board to input audio, but I can't see any sample about it, if I'm not wrong it's using with the I2S drivers, no?

    Sounds like you need to enable CONFIG_AUDIO_SOURCE_I2S then, as described here. Then the audio will be sourced from the audio codec over I2S, rather than USB which is default. 

    2. The earphones (for the time being it is not contemplated to use and stereo audio) they haven't and interface with the smartphone. So I tested to connect to the board with the level of RSSI, and it's work, but I think it's not paired so how I can do that?

    You mean you are using the Audio DK as a gateway and you have been able to connect to your earphones from the Audio DK? 

    I believe pairing and bonding is enabled by default, but I need to confirm this with the developers.

    Do you have logging enabled on the DK so you can get log output when the application is running? 
    Then you should see whether pairing is performed or not. 

    Out of interest, what is the brand and model of your earphones?

    3. With the above question, my requirements require me to be CIS I think, because I need to connect the headphones and avoid connecting other devices. It's that correct?

    That is correct. If what you want is a direct connection between two devices then CIS is the way to go. 

    BIS makes sense when you want to broadcast audio to a large number of devices. 

    3. It is clear to me that need to create a new program with my requirements, how I should start or is it better to use the audio application and change It as I need?

    It's a bit hard to give a general answer to this question. I would start by trying to configure the default application to do what you want, since it sounds like a gateway in I2S mode will get you pretty close, but the LE Audio application is quite complex and for some use cases it will make more sense to implement a stripped down optimized application. 

    It is also important to note that the codec chip used on the Audio DK only supports mono sound. If you want to input stereo sound you would need to use a different codec chip. 

    Best regards
    Torbjørn

Reply
  • Hi Aissa

    1. First I want to use the input present in the board to input audio, but I can't see any sample about it, if I'm not wrong it's using with the I2S drivers, no?

    Sounds like you need to enable CONFIG_AUDIO_SOURCE_I2S then, as described here. Then the audio will be sourced from the audio codec over I2S, rather than USB which is default. 

    2. The earphones (for the time being it is not contemplated to use and stereo audio) they haven't and interface with the smartphone. So I tested to connect to the board with the level of RSSI, and it's work, but I think it's not paired so how I can do that?

    You mean you are using the Audio DK as a gateway and you have been able to connect to your earphones from the Audio DK? 

    I believe pairing and bonding is enabled by default, but I need to confirm this with the developers.

    Do you have logging enabled on the DK so you can get log output when the application is running? 
    Then you should see whether pairing is performed or not. 

    Out of interest, what is the brand and model of your earphones?

    3. With the above question, my requirements require me to be CIS I think, because I need to connect the headphones and avoid connecting other devices. It's that correct?

    That is correct. If what you want is a direct connection between two devices then CIS is the way to go. 

    BIS makes sense when you want to broadcast audio to a large number of devices. 

    3. It is clear to me that need to create a new program with my requirements, how I should start or is it better to use the audio application and change It as I need?

    It's a bit hard to give a general answer to this question. I would start by trying to configure the default application to do what you want, since it sounds like a gateway in I2S mode will get you pretty close, but the LE Audio application is quite complex and for some use cases it will make more sense to implement a stripped down optimized application. 

    It is also important to note that the codec chip used on the Audio DK only supports mono sound. If you want to input stereo sound you would need to use a different codec chip. 

    Best regards
    Torbjørn

Children
  • Hi Ovrebekk, first thank for answering me. 

    Sounds like you need to enable CONFIG_AUDIO_SOURCE_I2S then, as described here. Then the audio will be sourced from the audio codec over I2S, rather than USB which is default. 

    I'm using that option so great, one thing less to spending time thinking about it.

    You mean you are using the Audio DK as a gateway and you have been able to connect to your earphones from the Audio DK? 

    I believe pairing and bonding is enabled by default, but I need to confirm this with the developers.

    Do you have logging enabled on the DK so you can get log output when the application is running? 
    Then you should see whether pairing is performed or not. 

    Yes, my idea is to use DK audio as a gateway and with the input send audio through a private broadcast.

    I will enable the log output to see that information.

    One thing I was thinking about is that connecting and pairing is not the same thing, is that correct?

    Because I have only been able to connect with the sample central present in zephyr resources, with the audio app, I can't connect.

    Out of interest, what is the brand and model of your earphones?

    It's the new earphones Creative zen hybrid pro.

    That is correct. If what you want is a direct connection between two devices then CIS is the way to go. 

    BIS makes sense when you want to broadcast audio to a large number of devices. 

    Okey, thanks.

    It's a bit hard to give a general answer to this question. I would start by trying to configure the default application to do what you want, since it sounds like a gateway in I2S mode will get you pretty close, but the LE Audio application is quite complex and for some use cases it will make more sense to implement a stripped down optimized application. 

    It is also important to note that the codec chip used on the Audio DK only supports mono sound. If you want to input stereo sound you would need to use a different codec chip. 

    I know it's a difficult question but as you said I think the audio application is very complete and I have the feeling that it has a lot of options, and I only need a few of them. I am going to learn with this app and later on I will try to create my app with my options.

  • Hi Aissa

    Aissa_akrikez said:
    One thing I was thinking about is that connecting and pairing is not the same thing, is that correct?

    That is correct. Connecting in Bluetooth is the act of establishing a link between two devices. You don't need to connect to receive a broadcast, but in order to receive a CIS stream you need to establish a connection. 

    Pairing happens after you connect, and is an optional stage used to establish an encrypted link between the two devices in the connection. 

    After that you can also go through the bonding stage, which allows you to store the encryption information from the pairing stage in flash so that you can re-enable encryption again later without having to redo pairing. 

    Aissa_akrikez said:
    I know it's a difficult question but as you said I think the audio application is very complete and I have the feeling that it has a lot of options, and I only need a few of them. I am going to learn with this app and later on I will try to create my app with my options.

    Sounds like a good strategy Slight smile

    Best regards
    Torbjørn

  • Thank you very much,

    I finally have audio in my headphones, now I'm going to simplify or create a new application with the basic code to make it easier to work with.

    I am also testing the BIS function, so far I have not been able to send this audio but this is not important for now.

  • Good luck Aissa!

    Just let me know if you have more questions later on. 

    Best regards
    Torbjørn

Related