[Cbe-oss-dev] PS3 and CD playback
Geoff Levand
geoffrey.levand at am.sony.com
Thu Apr 12 03:03:49 EST 2007
Ben,
Below are some notes from Mokuno-san regarding the Linux CDDA playback bug.
This info is from last November and the 2.6.16 kernel. I don't know the
status of the 2.6.21 kernel.
-Geoff
Linux CD-ROM middle layer has a severe bug about handling READ_CD command.
If application requests more frames (i.e. audio sectors = 2352 bytes) than
the mid layer can queue in one command, the middle layer will crash
or hang the kernel.
You can reproduce this bug (even with x86 PC) as following
1) Attach USB CD drive to Linux box. Assuming
its device node is /dev/scd0 in the followings.
# ls -l /dev/scd0
brw-rw---- 1 root disk 11, 0 Nov 29 00:08 /dev/scd0
2) Change maximum sectors parameter like as following:
# find /sys -name max_sectors
/sys/devices/pci0000:00/000:00:04.2/usb1/1-1/1-1:1.0/host1/target1:0:0/1:0:0:0/max_sectors
# echo 32 >`find /sys -name max_sectors`
3) Start to extract CDDA tracks
# cdda2wav -B -D /dev/scd0
Then system will hang or crash.
With my experence, usually x86 PC will hang, ps3 will get BUG().
The default max_sectors value of ps3 storage driver is 32, so enabling
READ_CD command of ps3 driver triggers this bug without changing
max_sectors parameters. Enlarging the default value solve this issue
temporally, but if the application requests more frames in the future,
the bug will occur again.
Finally, cdparanoia apparently does not check error code when extracting
audio tracks. It continues extracting even if the driver returned
'ILLEGAL REQUEST'. That is another cause useless audio files were created.
-EOF
More information about the cbe-oss-dev
mailing list