nRF5340 Multiple errors when adjusting USB Audio volume

Hello,

I’m developing a composite USB device on nRF5340 (NCS v2.6.0) that exposes USB CDC + MIDI + Audio.
When using the USB Audio interface, volume control works correctly on all operative systems but sometimes I see error logs from the USB stack:

<err> usb_audio: Device data not found for entity 73
<err> usb_audio: Volume out of range: 16128
<err> usb_device: Request buffer too small

The Request buffer too small message sometimes reports requested sizes up to ~65,282 bytes, which seems unusually large for a control transfer.

This same behavior can be reproduced using the stock sample USB Audio headset.

In some cases, these errors lead to noticeable lag in volume response, as if the control requests queue up before taking effect. You can notice this in the video below.

Steps to reproduce:

  1. Flash the USB audio headset sample to an nRF5340DK
  2. Connect the USB cable and start any audio stream from the host.
  3. Move the system volume slider.
  4. Observe the logs

Could you please confirm if this is a known issue in the SDK or Zephyr, and if there’s any workaround or fix available?

Thank you!

Tomas

Parents
  • Hi,

     

    with the following sequence

    • Flash the USB audio headset sample to an nRF5340DK
    • Connect the USB cable and start any audio stream from the host.
    • Move the system volume slider.
    • Observe the logs

    I was able to reproduce the log entry, but only if I changed the volume slider often (ie. held it down and moved it vigorously) with NCS v2.6.0:

    [00:09:24.974,670] <err> usb_device: Request buffer too small
    ...
    [00:09:26.124,328] <err> usb_audio: Volume out of range: 17152
    [00:09:26.226,226] <err> usb_audio: Volume out of range: 17152
    [00:09:26.328,094] <err> usb_audio: Volume out of range: 17152
    [00:09:26.430,145] <err> usb_audio: Volume out of range: 17152
    ...

     

    The "Request buffer too small" looks to be addressed in newer zephyr versions, I suspect that this commit addresses that: 

    https://github.com/zephyrproject-rtos/zephyr/pull/36694

     

    The "Volume out of range" is not something I am able to reproduce on other operating systems. Could this be a macos specific issue?

    I would recommend checking with the zephyr community on the usb audio class:

    https://www.zephyrproject.org/community/

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    with the following sequence

    • Flash the USB audio headset sample to an nRF5340DK
    • Connect the USB cable and start any audio stream from the host.
    • Move the system volume slider.
    • Observe the logs

    I was able to reproduce the log entry, but only if I changed the volume slider often (ie. held it down and moved it vigorously) with NCS v2.6.0:

    [00:09:24.974,670] <err> usb_device: Request buffer too small
    ...
    [00:09:26.124,328] <err> usb_audio: Volume out of range: 17152
    [00:09:26.226,226] <err> usb_audio: Volume out of range: 17152
    [00:09:26.328,094] <err> usb_audio: Volume out of range: 17152
    [00:09:26.430,145] <err> usb_audio: Volume out of range: 17152
    ...

     

    The "Request buffer too small" looks to be addressed in newer zephyr versions, I suspect that this commit addresses that: 

    https://github.com/zephyrproject-rtos/zephyr/pull/36694

     

    The "Volume out of range" is not something I am able to reproduce on other operating systems. Could this be a macos specific issue?

    I would recommend checking with the zephyr community on the usb audio class:

    https://www.zephyrproject.org/community/

     

    Kind regards,

    Håkon

Children
No Data
Related