summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2004-03-11 15:56:51 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-03-11 15:56:51 -0800
commitf644f1667358af42f05c81fa32a4bb96781377fa (patch)
treef85fb4813d79ce4fae0dcde611715edf4fa1ceb2 /include/linux
parent637b48c8306137e805970b07f7dec37eea9d6bb8 (diff)
[PATCH] CDROMREADAUDIO dma support
This small patch builds on top of the blk_rq_map_user() patch just sent, and enables us to easily support DMA for CDROMREADAUDIO cdda extraction. It's quite amazing how much cool stuff you can with the new block layer :-) Patch has intelligent fall back from multi frame dma to single frame dma, and further to old-style pio ripping in case of hardware problems.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cdrom.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index 513ac8f4e9a2..a4e851d4a335 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -877,10 +877,18 @@ struct mode_page_header {
#include <linux/fs.h> /* not really needed, later.. */
#include <linux/device.h>
+/*
+ * _OLD will use PIO transfer on atapi devices, _BPC_* will use DMA
+ */
+#define CDDA_OLD 0 /* old style */
+#define CDDA_BPC_SINGLE 1 /* single frame block pc */
+#define CDDA_BPC_FULL 2 /* multi frame block pc */
+
/* Uniform cdrom data structures for cdrom.c */
struct cdrom_device_info {
struct cdrom_device_ops *ops; /* link to device_ops */
struct cdrom_device_info *next; /* next device_info for this major */
+ struct gendisk *disk; /* matching block layer disk */
void *handle; /* driver-dependent data */
/* specifications */
int mask; /* mask of capability: disables them */
@@ -894,6 +902,8 @@ struct cdrom_device_info {
/* per-device flags */
__u8 sanyo_slot : 2; /* Sanyo 3 CD changer support */
__u8 reserved : 6; /* not used yet */
+ int cdda_method; /* see flags */
+ __u8 last_sense;
int for_data;
int (*exit)(struct cdrom_device_info *);
int mrw_mode_page;