Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

usb audio mic send data

Nordic DevZone
Nordic DevZone

hi ,

I'm testing this example     sdk17.1\examples\peripheral\usbd_audio\pca10056\blank\arm5_no_packs.

I tested the microphone and the headphone separately.

For microphone devices, I found that data could only be sent successfully if the recorder on the computer side was turned on .If the recorder on the PC side is not turned on and the USB microphone is not used, the data on the 52840 chip will fail to be sent.

If the local end of the chip can know when the microphone is turned on, then I can control the transmission of this data.

But my test code did not find such an event, what should I do, how do I know if the USB microphone is on or off.

I used DK PCA10056, SDK17.1.

Thanks.

Parents
  • Hi 

    I tested the sample myself and came to the same conclusion. It doesn't seem like any event is forwarded to the application when recording is enabled on the host side, the only difference is whether or not you receive the INVALID_STATE error (8) when trying to send microphone data. 

    I will check with the USB developer if he has some input on this, but possibly this was an oversight on the driver side. 

    A possible workaround is to attempt to send microphone data at regular intervals using an app_timer callback, and open up for continuous transmission once you don't get the INVALID_STATE error. 

    Best regards
    Torbjørn

  • Hi again

    The USB developer didn't have any more input on this unfortunately. Were you able to find a workaround?

    For future projects I would recommend having a look at the nRF Connect SDK rather than then nRF5 SDK. The nRF5 SDK is more or less deprecated at this point, and any new features or improvements will be added to the nRF Connect SDK. 

    Best regards
    Torbjørn

Reply Children
Related