Hi,
our dm365 based board uses the TI Burr-Brown pcm2901 codec as the sound interface. The application, which uses the audio, needs to be restarted from time to time, and we started to notice that after some random number of restarts the audio capture stops working. After investigation, we found the simple way to reproduce the failure, and also found that it happens with an external USBcard (Edirol UA-25 sound interface) too. So we decided to check if we could reproduce it on the DM36X EVM board we have. And we got the same failure, so we concluded that it is not specific for our board.
Here is how to reproduce it:
The hardware: DM36X EVM, rev E
The software: ti-dvsdk_dm365-evm_4_01_00_09, kernel
linux-2.6.32.17-psp03.01.01.38
1) install the standard dvsdk rootfs and kernel on a SD card
2) reconfigure and compile the kernel to enable snd-usb-audio as a module
make linux_myconfig, Device Drivers --> Sound card support -->
Advanced Linux Sound Architecture --> [*] USB sound devices --> <M>
USB Audio/MIDI driver
3) install the new kernel and modules on the SD card.
4) Boot the system, depmod -a, and insert an USB sound card, the
driver will be loaded:
root@dm365-evm:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0582:0073 Roland Corp. EDIROL UA-25
root@dm365-evm:~# ls -l /proc/asound/
lrwxrwxrwx 1 root root 5 Jan 12 23:01 EVM -> card0
lrwxrwxrwx 1 root root 5 Jan 12 23:01 UA25 -> card1
dr-xr-xr-x 4 root root 0 Jan 12 23:01 card0
dr-xr-xr-x 4 root root 0 Jan 12 23:01 card1
-r--r--r-- 1 root root 0 Jan 12 23:01 cards
-r--r--r-- 1 root root 0 Jan 12 23:01 devices
-r--r--r-- 1 root root 0 Jan 12 23:01 hwdep
-r--r--r-- 1 root root 0 Jan 12 23:01 pcm
-r--r--r-- 1 root root 0 Jan 12 23:01 timers
-r--r--r-- 1 root root 0 Jan 12 23:01 version
5) capture from the card 1, until a failure:
root@dm365-evm:~# while arecord -d 1 -f cd -D hw:1,0 test.wav; do date; done
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Wed Jan 12 20:42:35 UTC 2011
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Wed Jan 12 20:42:37 UTC 2011
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Wed Jan 12 20:42:38 UTC 2011
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Wed Jan 12 20:42:39 UTC 2011
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Wed Jan 12 20:42:40 UTC 2011
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Wed Jan 12 20:42:42 UTC 2011
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Wed Jan 12 20:42:43 UTC 2011
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: pcm_read:1617: read error: Input/output error
6) After that, the system still detects the sound card plug/unplug events (the kernel reports usb plug/unplug and the driver detects the card), but the card doesn't work anymore, arecord fails immediately. Reloading snd-usb-audio module doesn't help either. What helps is to reload musb_hdrc driver (needs to be compiled as a module).
I also inserted a USB memory stick when the system is in that state, and the system completely locked-up.
Memory stick inserted BEFORE the sound card failure (normal):
root@dm365-evm:~# usb 1-1: new high speed USB device using musb_hdrc
and address 3
usb 1-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
root@dm365-evm:~# scsi 0:0:0:0: Direct-Access Kingston
DataTraveler G3 1.00 PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] 7827392 512-byte logical blocks: (4.00 GB/3.73 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
FAT: invalid media value (0x00)
VFS: Can't find a valid FAT filesystem on dev sda.
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with writeback data mode.
Memory stick inserted AFTER the failure:
root@dm365-evm:~# usb 1-1: new high speed USB device using musb_hdrc
and address 5
usb 1-1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
... and locked-up in a couple of seconds after the last message
Could it be that the DM36x usb host controller (or musb_hdrc driver)
has problems with ISO transfer?
Thank you
---
Roma