From: Jens Axboe <qemu@kernel.dk>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Audio cd's in guest OS
Date: Mon, 7 Nov 2005 09:15:56 +0100 [thread overview]
Message-ID: <20051107081555.GA3699@suse.de> (raw)
In-Reply-To: <436C98F0.7030307@gmx.de>
On Sat, Nov 05 2005, Oliver Gerlich wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Lars Roland schrieb:
> > On 11/4/05, Mike Swanson <mikeonthecomputer@gmail.com> 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
next prev parent reply other threads:[~2005-11-07 8:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-04 12:47 [Qemu-devel] Audio cd's in guest OS Lars Roland
2005-11-04 17:40 ` Mike Swanson
2005-11-05 10:08 ` Lars Roland
2005-11-05 11:35 ` Oliver Gerlich
2005-11-05 14:55 ` Jim C. Brown
2005-11-07 8:15 ` Jens Axboe [this message]
2005-11-05 11:55 ` Fabrice Bellard
2005-11-07 8:16 ` Jens Axboe
2005-11-07 10:57 ` Lars Roland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051107081555.GA3699@suse.de \
--to=qemu@kernel.dk \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.