This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Noise occurs when playback via USB 2.0 and USB Audio 1.0 devices with BeagleBone Black and SDK 7.00.00.00

I meet the problem when BeagleBone Black is connected with USB audio device which specification is USB 2.0 and USB Audio 1.0.

I want to know how to avoid the situation.
If there are any patches or workarounds, please let me know.

Condition:
- TI SDK 07.00.00.00
- kernel is configured with Disable DMA (always use PIO) for MSUB DMA mode.

USB audio device connection:
- USB 2.0 and USB Audio 1.0 devices are connected to USB port directory or via USB-2.0 HUB.
"USB 2.0 and USB Audio 1.0 device" uses USB High-Speed, but audio profile is USB Audio 1.0, so these devices works without vendor-specified driver on Windows OS.
e.g. Yamaha YVC-1000
- http://www.yamaha.com/products/en/communication/usb_conference_speakerphones/yvc-1000/

Steps for reproduction:
- Play audio using aplay.

Result:
- Playback sound is noisy. Waveform has periodical 20 msecs gap within every 100 to 200 msec.

Additional information:
- When USB 1.1 HUB is inserted between BBB and the device, noise does not occur.
- No noise observed on capture (recording) side.
- By observing USB packets by USB analyzer, normally the interval of render packets is 1 msec. But once in 6 to 8 packets, the interval becomes 1.25 msecs, one additional sub frame duration.
- For capture side, the interval is always 1 msec.

Consideration:
- I think some problem on packet scheduling.

  • Hi,

    I want to try the situation BBB build-in USB hub as USB 1.1 hub.

    Are there any kernel configuration or boot option?

    I already tried uncheck xHCI HCD (USB 3.0) support / EHCI HCD (USB 2.0) support, but the result is the same.

    I find that Raspberry Pi can do by inserting line "dwc_otg.speed=1" to /boot/cmdline.txt

    TOMINAGA 'Tommy' Satoshi

  • SDK7.0 kernel does not have an option for that, but the following patch will force the AM335x USB controller to work in full-speed mode.

    diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
    index b841ee0..202615c 100644
    --- a/drivers/usb/musb/musb_core.c
    +++ b/drivers/usb/musb/musb_core.c
    @@ -948,7 +948,6 @@ void musb_start(struct musb *musb)
     
            /* put into basic highspeed mode and start session */
            musb_writeb(regs, MUSB_POWER, MUSB_POWER_ISOUPDATE
    -                       | MUSB_POWER_HSENAB
                            /* ENSUSPEND wedges tusb */
                            /* | MUSB_POWER_ENSUSPEND */
                       );
    
    
  • HI Bin,

    Thank you for your information.

    The patch works for my issue!

    The sound from YVC-1000 is clear with the patch.

    Regards,

    Tommy

  • For original questing,

    The situation does not occur with Raspberry Pi, and the implementation already solved the problem.

    http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=39175

    https://github.com/ghollingworth/linux/commit/cc68e81acc17773029333dd3a0201ef347ab0b38

    But this patch is just for Raspberry PI depended OTG driver.

    Are there any hints to apply this patch for BBB?

    Regards,

    Tommy