Messages in this thread | | | From | "Jonathan Campbell" <> | Subject | Patch for 2.4.21 kernels to allow Reveal SC400 sound cards to function | Date | Wed, 6 Aug 2003 16:44:59 -0700 |
| |
Hi. This is a patch (more of a hack, really) that allows you to use a Reveal SC400 sound card using the sb.o driver. The SC400 emulates a SB16 but a) needs a proprietary PnP protocol to tell it DMA and IRQ settings and b) has an SBPRO mixer chip. It also has something like a Windows Sound System interface at 0x534 but it doesn't seem to work like one (so this patch doesn't use it).
The PnP protocol is very simple. The card maintains a "configuration byte" that is initially set to 0x00 on h/w reset. This byte can be accessed by sending DSP command 0x58 then reading three bytes. All SC400 cards (at least mine) return the sequence 0x2E 0xC3 [cfg-byte].
CFG-BYTE: bit 7 6 5 4 3 2 1 0 | | | | | | | +----------|__________ | | | | | | +------------|__________ DMA select (bits 0-1) | | | | | +------------------------- (don't know) | | | | +----------------|__________ | | | +------------------|__________ | | +--------------------|__________ IRQ select (bits 3-5) | +--------------------------------- (don't know) +----------------------------------- (don't know)
DMA select can be one of four values: 0: No DMA 1: DMA channel 0 2: DMA channel 1 3: DMA channel 3
IRQ select can be one of eight values: 0: No IRQ 1: IRQ 7 2: IRQ 9 3: IRQ 10 4: IRQ 11 5: IRQ 5 6: No IRQ 7: No IRQ
To set IRQ 5, DMA 1, change the byte to 0x2A = (5<<3)+2. The byte can be written by sending DSP commands 0x50, [cfg-byte], 0xF2, 0x50, [cfg-byte], 0xE6. At least this is the sequence used by their TESTSC.EXE DOS utility. The configuration takes effect on DSP software reset.
This patch was made from the full release of the 2.4.21 kernel.
[unhandled content-type:application/x-gzip] | |