[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Audio cd's in guest OS
From: |
Jens Axboe |
Subject: |
Re: [Qemu-devel] Audio cd's in guest OS |
Date: |
Mon, 7 Nov 2005 09:15:56 +0100 |
On Sat, Nov 05 2005, Oliver Gerlich wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Lars Roland schrieb:
> > On 11/4/05, Mike Swanson <address@hidden> wrote:
> >
> >>I've found on systems where traditional rippers don't work (eg,
> >>cdparanoia), CDFS has a greater chance of ripping the CDs (by default
> >>into WAV, but you can enable an option to rip it in the pure CDDA
> >>format if you want).
> >
> >
> > Thanks - I should have known that someone had made a file system for
> > this. However I still think it would be great to be able to pass the
> > actual /dev/cdrom on to the guest OS, but I must admit that I have not
> > grasped the complexity yet on doing this, so I am going to do some
> > Qemu code reading before continuing - I am not even sure if it can be
> > done in VMWare although I seam to remember that Windows as a host OS
> > running VMWare allows the guest access to a audio cdrom.
> >
>
> Not sure how VMware does that; but actually I didn't even succeed
> accessing /dev/cdrom on the host when an audio cd is inserted:
>
> dd if=/dev/hdc of=/dev/null bs=2352 count=1
> dd: reading `/dev/hdc': Input/output error
> 0+0 records in
> 0+0 records out
> 0 bytes transferred in 0.077570 seconds (0 bytes/sec)
>
> I used a blocksize of 2352 because I've read that's the size for audio
> cds... It didn't work with bs=1 either.
While the block size you gave is correct for cdda frames, you cannot
read them this way. The commands you use for reading data from a data
track varies, and the CDROM driver will always use the READ_10 command
for io originating from the file system layer. You would also need to
put some effort into the page cache to allow non-power-of-2 block sizes
for this to work. So it's not trivial :-)
For reading audio tracks, you can use either some pass through command
mechanism like CDROM_SEND_PACKET or SG_IO. Or the CDROMREADAUDIO ioctl,
which is the easiest to use since it doesn't require an understanding of
the command set.
--
Jens Axboe