⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sbpcd

📁 《嵌入式系统设计与实例开发实验教材二源码》Linux内核移植与编译实验
💻
📖 第 1 页 / 共 3 页
字号:
This README belongs to release 4.2 or newer of the SoundBlaster Pro(Matsushita, Kotobuki, Panasonic, CreativeLabs, Longshine and Teac)CD-ROM driver for Linux.sbpcd really, really is NOT for ANY IDE/ATAPI drive!Not even if you have an "original" SoundBlaster card with an IDE interface!So, you'd better have a look into README.ide if your port address is 0x1F0,0x170, 0x1E8, 0x168 or similar.I get tons of mails from IDE/ATAPI drive users - I really can't continueany more to answer them all. So, if your drive/interface information sheetsmention "IDE" (primary, secondary, tertiary, quaternary) and the DOS driverinvoking line within your CONFIG.SYS is using an address below 0x230:DON'T ROB MY LAST NERVE - jumper your interface to address 0x170 and IRQ 15(that is the "secondary IDE" configuration), set your drive to "master" anduse ide-cd as your driver. If you do not have a second IDE hard disk, use theLILO commands   hdb=noprobe hdc=cdromand get lucky.To make it fully clear to you: if you mail me about IDE/ATAPI drive problems,my answer is above, and I simply will discard your mail, hoping to stop theflood and to find time to lead my 12-year old son towards happy computing.The driver is able to drive the whole family of "traditional" AT-style (thatis NOT the new "Enhanced IDE" or "ATAPI" drive standard) Matsushita,Kotobuki, Panasonic drives, sometimes labelled as "CreativeLabs". Thewell-known drives are CR-521, CR-522, CR-523, CR-562, CR-563.CR-574 is an IDE/ATAPI drive.The Longshine LCS-7260 is a double-speed drive which uses the "old"Matsushita command set. It is supported - with help by Serge Robyns.Vertos ("Elitegroup Computer Systems", ECS) has a similar drive - supporthas started; get in contact if you have such a "Vertos 100" or "ECS-AT"drive.There exists an "IBM External ISA CD-ROM Drive" which in fact is a CR-563with a special controller board. This drive is supported (the interface isof the "LaserMate" type), and it is possibly the best buy today (cheaper thanan internal drive, and you can use it as an internal, too - e.g. plug it intoa soundcard).CreativeLabs has a new drive "CD200" and a similar drive "CD200F". The latteris made by Funai and sometimes named "E2550UA", newer models may be named"MK4015". The CD200F drives should fully work.CD200 drives without "F" are still giving problems: drive detection andplaying audio should work, data access will result in errors. I need qualifiedfeedback about the bugs within the data functions or a drive (I never saw aCD200).The quad-speed Teac CD-55A drive is supported, but still does not reach "fullspeed". The data rate already reaches 500 kB/sec if you set SBP_BUFFER_FRAMESto 64 (it is not recommended to do that for normal "file access" usage, but itcan speed up things a lot if you use something like "dd" to read from thedrive; I use it for verifying self-written CDs this way).The drive itself is able to deliver 600 kB/sec, so this needswork; with the normal setup, the performance currently is not even as good asdouble-speed.This driver is NOT for Mitsumi or Sony or Aztech or Philips or XXX drives,and again: this driver is in no way usable for any IDE/ATAPI drive. If you think your drive should work and it doesn't: send me the DOS driver for yourbeast (gzipped + uuencoded) and your CONFIG.SYS if you want to ask me for help,and include an original log message excerpt, and try to give all informationa complete idiot needs to understand your hassle already with your firstmail. And if you want to say "as I have mailed you before", be sure that Idon't remember your "case" by such remarks; at the moment, I have some hundreds of open correspondences about Linux CDROM questions (hope to reduce ifthe IDE/ATAPI user questions disappear). This driver will work with the soundcard interfaces (SB Pro, SB 16, Galaxy,SoundFX, Mozart, MAD16 ...) and with the "no-sound" cards (Panasonic CI-101P,LaserMate, WDH-7001C, Longshine LCS-6853, Teac ...).It works with the "configurable" interface "Sequoia S-1000", too, which is used on the Spea Media FX and Ensonic Soundscape sound cards. You have tospecify the type "SBPRO 2" and the true CDROM port address with it, not the"configuration port" address.If you have a sound card which needs a "configuration driver" instead ofjumpers for interface types and addresses (like Mozart cards) - thosedrivers get invoked before the DOS CDROM driver in your CONFIG.SYS, typicalnames are "cdsetup.sys" and "mztinit.sys" - let the sound driver do theCDROM port configuration (the leading comments in linux/drivers/sound/mad16.care just for you!). Hannu Savolainen's mad16.c code is able to set up myMozart card - I simply had to add   #define MAD16_CONF 0x06   #define MAD16_CDSEL 0x03to configure the CDROM interface for type "Panasonic" (LaserMate) and address0x340.The interface type has to get configured in linux/drivers/cdrom/sbpcd.h, because the register layout is different between the "SoundBlaster" and the"LaserMate" type.I got a report that the Teac interface card "I/F E117098" is of type"SoundBlaster" (i.e. you have to set SBPRO to 1) even with the addresses0x300 and above. This is unusual, and it can't get covered by the autoprobing scheme.The Teac 16-bit interface cards (like P/N E950228-00A, default address 0x2C0)need the SBPRO 3 setup.If auto-probing found the drive, the address is correct. The reported typemay be wrong. A "mount" will give success only if the interface type is setright. Playing audio should work with a wrong set interface type, too.With some Teac and some CD200 drives I have seen interface cards which seemto lack the "drive select" lines; always drive 0 gets addressed. To avoid"mirror drives" (four drives detected where you only have one) with suchinterface cards, set MAX_DRIVES to 1 and jumper your drive to ID 0 (ifpossible).Up to 4 drives per interface card, and up to 4 interface cards are supported.All supported drive families can be mixed, but the CR-521 drives are hard-wired to drive ID 0. The drives have to use different drive IDs, and eachdrive has to get a unique minor number (0...3), corresponding indirectly to its drive ID.The drive IDs may be selected freely from 0 to 3 - they do not have to be inconsecutive order.As Don Carroll, don@ds9.us.dell.com or FIDO 1:382/14, told me, it is possibleto change old drives to any ID, too. He writes in this sense:   "In order to be able to use more than one single speed drive   (they do not have the ID jumpers) you must add a DIP switch   and two resistors. The pads are already on the board next to   the power connector. You will see the silkscreen for the   switch if you remove the top cover.                    1 2 3 4             ID 0 = x F F x             O = "on"             ID 1 = x O F x             F = "off"             ID 2 = x F O x             x = "don't care"             ID 3 = x O O x   Next to the switch are the positions for R76 (7k) and R78   (12k). I had to play around with the resistor values - ID 3   did not work with other values. If the values are not good,   ID 3 behaves like ID 0."To use more than 4 drives, you simply need a second controller card at a different address and a second cable.The driver supports reading of data from the CD and playing of audio tracks.The audio part should run with WorkMan, xcdplayer, with the "non-X11" productsCDplayer and WorkBone - tell me if it is not compatible with other software.The only accepted measure for correctness with the audio functions is the"cdtester" utility (appended) - most audio player programmers seem to bebetter musicians than programmers. ;-)With the CR-56x and the CD200 drives, the reading of audio frames is possible.This is implemented by an IOCTL function which reads READ_AUDIO frames of2352 bytes at once (configurable with the "READ_AUDIO" define, default is 0).Reading the same frame a second time gives different data; the frame data start at a different position, but all read bytes are valid, and we alwaysread 98 consecutive chunks (of 24 Bytes) as a frame. Reading more than 1 frameat once possibly misses some chunks at each frame boundary. This lack has toget corrected by external, "higher level" software which reads the same frame again and tries to find and eliminate overlapping chunks (24-byte-pieces).The transfer rate with reading audio (1-frame-pieces) currently is very slow.This can be better reading bigger chunks, but the "missing" chunks possiblyoccur at the beginning of each single frame.The software interface possibly may change a bit the day the SCSI driversupports it too.With all but the CR-52x drives, MultiSession is supported.Photo CDs work (the "old" drives like CR-521 can access only the firstsession of a photoCD).At ftp.gwdg.de:/pub/linux/hpcdtoppm/ you will find Hadmut Danisch's package toconvert photo CD image files and Gerd Knorr's viewing utility.The transfer rate will reach 150 kB/sec with CR-52x drives, 300 kB/sec withCR-56x drives, and currently not more than 500 kB/sec (usually less than250 kB/sec) with the Teac quad speed drives.XA (PhotoCD) disks with "old" drives give only 50 kB/sec.This release consists of- this README file- the driver file linux/drivers/cdrom/sbpcd.c- the stub files linux/drivers/cdrom/sbpcd[234].c- the header file linux/drivers/cdrom/sbpcd.h.To install:-----------1. Setup your hardware parameters. Though the driver does "auto-probing" at a   lot of (not all possible!) addresses, this step is recommended for   everyday use. You should let sbpcd auto-probe once and use the reported   address if a drive got found. The reported type may be incorrect; it is   correct if you can mount a data CD. There is no choice for you with the   type; only one is right, the others are deadly wrong.   a. Go into /usr/src/linux/drivers/cdrom/sbpcd.h and configure it for your      hardware (near the beginning):      a1. Set it up for the appropriate type of interface board.          "Original" CreativeLabs sound cards need "SBPRO 1".          Most "compatible" sound cards (almost all "non-CreativeLabs" cards)          need "SBPRO 0".          The "no-sound" board from OmniCd needs the "SBPRO 1" setup.          The Teac 8-bit "no-sound" boards need the "SBPRO 1" setup.          The Teac 16-bit "no-sound" boards need the "SBPRO 3" setup.          All other "no-sound" boards need the "SBPRO 0" setup.          The Spea Media FX and Ensoniq SoundScape cards need "SBPRO 2".          sbpcd.c holds some examples in its auto-probe list.          If you configure "SBPRO" wrong, the playing of audio CDs will work,          but you will not be able to mount a data CD.      a2. Tell the address of your CDROM_PORT (not of the sound port).      a3. If 4 drives get found, but you have only one, set MAX_DRIVES to 1.      a4. Set DISTRIBUTION to 0.   b. Additionally for 2.a1 and 2.a2, the setup may be done during      boot time (via the "kernel command line" or "LILO option"):          sbpcd=0x320,LaserMate      or          sbpcd=0x230,SoundBlaster      or          sbpcd=0x338,SoundScape      or          sbpcd=0x2C0,Teac16bit      This is especially useful if you install a fresh distribution.      If the second parameter is a number, it gets taken as the type      setting; 0 is "LaserMate", 1 is "SoundBlaster", 2 is "SoundScape",      3 is "Teac16bit".      So, for example          sbpcd=0x230,1      is equivalent to          sbpcd=0x230,SoundBlaster2. "cd /usr/src/linux" and do a "make config" and select "y" for Matsushita   CD-ROM support and for ISO9660 FileSystem support. If you do not have a   second, third, or fourth controller installed, do not say "y" to the    secondary Matsushita CD-ROM questions.3. Then do a "make dep", then make the kernel image ("make zlilo" or similar).4. Make the device file(s). This step usually already has been done by the   MAKEDEV script.   The driver uses MAJOR 25, so, if necessary, do        mknod /dev/sbpcd  b 25 0       (if you have only one drive)   and/or        mknod /dev/sbpcd0 b 25 0        mknod /dev/sbpcd1 b 25 1        mknod /dev/sbpcd2 b 25 2        mknod /dev/sbpcd3 b 25 3   to make the node(s).   The "first found" drive gets MINOR 0 (regardless of its jumpered ID), the   "next found" (at the same cable) gets MINOR 1, ...      For a second interface board, you have to make nodes like        mknod /dev/sbpcd4 b 26 0        mknod /dev/sbpcd5 b 26 1   and so on. Use the MAJORs 26, 27, 28.   If you further make a link like        ln -s sbpcd /dev/cdrom   you can use the name /dev/cdrom, too.5. Reboot with the new kernel.You should now be able to do              mkdir /CDand               mount -rt iso9660 /dev/sbpcd /CDor              mount -rt iso9660 -o block=2048 /dev/sbpcd /CDand see the contents of your CD in the /CD directory.To use audio CDs, a mounting is not recommended (and it would fail if thefirst track is not a data track).Using sbpcd as a "loadable module":-----------------------------------If you do NOT select "Matsushita/Panasonic CDROM driver support" during the"make config" of your kernel, you can build the "loadable module" sbpcd.o.Read /usr/src/linux/Documentation/modules.txt on this.If sbpcd gets used as a module, the support of more than one interfacecard (i.e. drives 4...15) is disabled.You can specify interface address and type with the "insmod" command like: # insmod /usr/src/linux/modules/sbpcd.o sbpcd=0x340,0or # insmod /usr/src/linux/modules/sbpcd.o sbpcd=0x230,1or # insmod /usr/src/linux/modules/sbpcd.o sbpcd=0x338,2where the last number represents the SBPRO setting (no strings allowed here).Things of interest:-------------------The driver is configured to try the LaserMate type of interface at I/O port0x0340 first. If this is not appropriate, sbpcd.h should get changed(you will find the right place - just at the beginning).No DMA and no IRQ is used.To reduce or increase the amount of kernel messages, edit sbpcd.c and playwith the "DBG_xxx" switches (initialization of the variable "sbpcd_debug").Don't forget to reflect on what you do; enabling all DBG_xxx switches at oncemay crash your system, and each message line is accompanied by a delay.The driver uses the "variable BLOCK_SIZE" feature. To use it, you have tospecify "block=2048" as a mount option. Doing this will disable the directexecution of a binary from the CD; you have to copy it to a device with thestandard BLOCK_SIZE (1024) first. So, do not use this if your system isdirectly "running from the CDROM" (like some of Yggdrasil's installationvariants). There are CDs on the market (like the German "unifix" Linuxdistribution) which MUST get handled with a block_size of 1024. Generally,one can say all the CDs which hold files of the name YMTRANS.TBL are defective;do not use block=2048 with those.Within sbpcd.h, you will find some "#define"s (e.g. EJECT and JUKEBOX). Withthese, you can configure the driver for some special things.You can use the appended program "cdtester" to set the auto-eject featureduring runtime. Jeff Tranter's "eject" utility can do this, too (and more)for you.There is an ioctl CDROMMULTISESSION to obtain with a user program ifthe CD is an XA disk and - if it is - where the last session starts. The"cdtester" program illustrates how to call it.Auto-probing at boot time:--------------------------The driver does auto-probing at many well-known interface card addresses,but not all:Some probings can cause a hang if an NE2000 ethernet card gets touched, becauseSBPCD's auto-probing happens before the initialization of the net drivers.Those "hazardous" addresses are excluded from auto-probing; the "kernel command line" feature has to be used during installation if you have your drive at those addresses. The "module" version is allowed to probe at thoseaddresses, too.The auto-probing looks first at the configured address resp. the addresssubmitted by the kernel command line. With this, it is possible to use thisdriver within installation boot floppies, and for any non-standard address,too.Auto-probing will make an assumption about the interface type ("SBPRO" or not),based upon the address. That assumption may be wrong (initialization will beo.k., but you will get I/O errors during mount). In that case, use the "kernelcommand line" feature and specify address & type at boot time to find out theright setup.For everyday use, address and type should get configured within sbpcd.h. Thatwill stop the auto-probing due to success with the first try.The kernel command "sbpcd=0" suppresses each auto-probing and causesthe driver not to find any drive; it is meant for people who love sbpcdso much that they do not want to miss it, even if they miss the drives. ;-)  If you configure "#define CDROM_PORT 0" in sbpcd.h, the auto-probing isinitially disabled and needs an explicit kernel command to get activated.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -