We are facing problems in USB host support in DM365 EVM and DVR boards.
Following is the description:
===================================================================
Linux kernel : 2.6.18 ( LSP 2.10) [ as provided with the EVM & DVR ]
Problem1 : USB audio does not work DMA is enabled. [ Seen in DVR & EVK]
The problem occurs while using the USB host to connect to a USB sound card and exercising alsa (aplay) to play a wav file. In the EVM board we see a hang while on DVR board same sequence of steps gives a kernel crash. If we disable USB DMA mode this problem does not occur.
The sequence of steps to reproduce the problems is as follows:
1. Compile the DM365 linux kernel with default davinci_dm365_defconfig 2. Edit .config to enable CONFIG_SND_USB_AUDIO (uncomment and set it to
CONFIG_SNG_USB_AUDIO=y)
3. Run 'make oldconfig'
4. Compile the kernel again.
5. Boot the board with built kernel
6. Connect a usb sound card to the board 7. Run 'aplay -D hw:1,0 test.wav' [48KHz, 192kbps file, 16 bit stereo wav file]
8. Ctrl-C to abort aplay before the playback finishes
9. Run aplay again. aplay hangs here and does not produce any sound.
After some time (few mins) following log is seen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BUG: time warp detected!
prev > now, 000000f226b46481 > 0000003f29dd347d:
= 768746139652 delta, on CPU#0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10. In DVR similar sequence gives a kernel crash.
Problem2 : USB reset occurs while using aplay is used in PIO mode [ seen in DVR & EVK ]
In order to work around the problem, we used USB in PIO mode. To enable PIO mode we enabled CONFIG_MUSB_PIO_ONLY in .config. On enabling PIO we don't see hang/crash as above.
In PIO mode we see another problem. We have not seen this problem with aplay but with our own application based on libasound (alsa library).
This application records data from the usb sound card and plays out the data on the same usb sound card (loopback).
The problem happens once in few 10s of runs, on starting the application we see the following log ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
musb_h_tx_flush_fifo 124: Could not flush host TX fifo: csr: 2003 musb_h_tx_flush_fifo 124: Could not flush host TX fifo: csr: 2003 musb_h_tx_flush_fifo 124: Could not flush host TX fifo: csr: 2003 musb_h_tx_flush_fifo 124: Could not flush host TX fifo: csr: 000a musb_h_ep0_irq 1221: no URB for end 0 hub 1-1:1.0: port 3 disabled by hub (EMI?), re-enabling...
usb 1-1.3: USB disconnect, address 3
usb 1-1.3: new full speed USB device using musb_hdrc and address 5 usb 1-1.3: configuration #1 chosen from 1 choice ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Workaround : To recover from the error, just close and open the audio device. USB audio starts working.
Problem3 : USB audio with USB storage both in PIO mode and DMA mode give I/O errors in DVR and enumeration and I/O errors in EVM.
Connect USB sound card with line-in and line-out. Connect USB hard drive. Now, if USB audio ( aplay + arecord) is run along with USB hard disk read or write application, USB I/O errors and reset happens.
===================================================================
Please let me know if anybody has seen similar problems and have workarounds, suggestions.
Thanks
George