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.

AM335x Conflicting USB audio.

Dear Community,

I have a custom board with AM335x processor on it. The board implements 2 USBs: OTG + Host.

The host usb has usb-stick plugged in and it is used to boot linux kernel and filesystem from it.

The usb OTG is used for USB Audio streaming using linux Audio Gadget as USB audio class 2 driver.

Moreover I use McAsp0 and McAsp1 as a playback soundcard to play some contect over I2S.

The USB driver perfectly appears on the computer sound devices when I plug usb to it. Even though I can easily record content streamed from my computer using arecord API. 

The problem occurs when open USB capture pcm device and it has some content streaming and if after that if I open playback device of my soundcard the whole system freezes until I unplug the USB from my computer. In dmesg I get following messages:

agdev_iso_complete: iso_complete (-75)

Sometimes everything starts to work if I plug usb back again, but the quality becomes bad and I get lots of overruns.

On the contrary, when I boot from SD card, I cannot see this kind of problem, so I guess there is something conflicting in my configuration.

If there is any thoughts or suggestions where to look in, you are more than welcome to comment here.

Looking forward to your comments,

King regards,

Ilja.

  • Hi Ilja,

    Could you share which software release you are using and which kernel version?

    BR
    Tsvetolin Shulev
  • Hello Tsvetolin.

    The kernel version is 4.1.6. from TI mainline.
    I have actually found a workaround for now, but not the solution:
    Inside f_uac2.c driver I have just commented lines in function agdev_iso_complete :
    // if (status)
    // pr_debug("%s: iso_complete status(%d) %d/%d\n",
    // __func__, status, req->actual, req->length);

    As I can see that the system printouts were overloading the system a lot, so the whole system was freezing.
    With this workaround it doesn't happen.

    However in my aaplication I still get some underruns for playback, and I am not sure yet, if it is my implementation, or drivers.

    Best regards,
    Ilja.