Dear Developers, I am working on a Xen HVM platform and trying to add AUDIO CD support to Qemu. I modified ide_atapi_cmd function to handle audio media. This includes changing cdrom_read_toc to set ADR/Control bits to 0x10 if media is CDS_AUDIO. Changed GPCMD_MODE_SENSE_10 case to include cdda bit. I also modified READ_CD to do a ide_atapi_cmd_read for case 0xf0 and have added GPCMD_READ_SUBCHANNEL command too.
Beacuse of the above changes, now when i load audio cd and do 'xm block-configure ...' Windows Media Player now gets launched but it is still unable to play the track. Dom0 Dmesg shows the following error: [ 1296.401294] sr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08 [ 1296.401483] sr 1:0:0:0: [sr0] Sense Key : 0x5 [current] [ 1296.401772] sr 1:0:0:0: [sr0] ASC=0x64 ASCQ=0x0 [ 1296.402028] end_request: I/O error, dev sr0, sector 0 [ 1296.402129] Buffer I/O error on device sr0, logical block 0 [ 1296.402232] Buffer I/O error on device sr0, logical block 1 [ 1296.402345] Buffer I/O error on device sr0, logical block 2 [ 1296.402450] Buffer I/O error on device sr0, logical block 3 [ 1296.405520] sr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08 [ 1296.405712] sr 1:0:0:0: [sr0] Sense Key : 0x5 [current] [ 1296.406023] sr 1:0:0:0: [sr0] ASC=0x64 ASCQ=0x0 [ 1296.406253] end_request: I/O error, dev sr0, sector 0 [ 1296.406353] Buffer I/O error on device sr0, logical block 0 Tracing qemu i get the following call chain from READ CD handler: [ide_atapi_cmd](lba=0x200 nb_sec=10 trnsfr=f0) ATAPI Packet= be 04 00 00 02 00 00 00 10 f0 00 00 [ide_atapi_cmd_read_dma]read dma: LBA=512 nb_sectors=16 [[ide_atapi_cmd_read_dma_cb]]aio_read_cd: lba=512 n=16 [bdrv_aio_read] [bdrv_check_request] ret=0 [bdrv_aio_read] [ide_atapi_cmd_read_dma_cb] ret<0 goto eot [dma_bdrv_cb](dbs->sg_cur_index == dbs->sg->nsg || ret < 0) Frankly, from this point i do not understand what is happening. Can any one of you please help me out understanding what is the reason that READ CD command is failing and what is the reason of the Buffer I/O error in dmesg. It will be great if someone can give me some pointers to understand the root cause or suggest someways to further debug this. Thanks & Regards, Shubham