Date: Thu, 02 Dec 2010 17:23:14 +0200 From: Andriy Gapon <avg@freebsd.org> To: freebsd-arch@freebsd.org Subject: accessing data on audio cd Message-ID: <4CF7B9E2.40106@freebsd.org>
next in thread | raw e-mail | index | archive | help
This is a pretty minor issue in the grand scheme of things, but still seems to be an architectural one. Currently we do not have a uniform way between cd(4) and acd(4) to extract data from Audio CDs. There are shared ioctls to query table of contents, start analog playback of a given track and whatnot. But no common way to digitally extract the audio data. acd(4) allows read(2) with block size of 2352 bytes. With cd(4) the only was is to use pass(4). I see a few options: 1. do nothing 1a. use of audio CDs on PCs is going to go away eventually; 1b. acd(4) is going to be replaced by cd(4) eventually, via ahci, ATA_CAM, atapicam, etc; 1c. userland programs should take care of the differences or use some form of pass-through interface and use only MMC command; 2. add support for 2352-reading to cd(4); 3. add a new shared ioctl to read a given 2352-byte block of an audio CD. I am personally torn between #1 and #3. #2 is not bad, but it's an extra complexity. The reason I am raising this issue at all is a result of my frustration with some userland libraries/programs. Some libraries handle both cd and acd but have quite a bit of duplicate code, others (correctly) handle only one of the interfaces. What do you think? Thanks! -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CF7B9E2.40106>