mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jonathan Campbell" <jmc@tocatta.com>
To: <linux-kernel@vger.kernel.org>
Cc: <alan@redhat.com>, <torvalds@transmeta.com>
Subject: Patch for 2.4.21 kernels to allow Reveal SC400 sound cards to function
Date: Wed, 6 Aug 2003 16:44:59 -0700	[thread overview]
Message-ID: <000001c35c74$c0087f90$6101a8c0@area51> (raw)

[-- Attachment #1: Type: text/plain, Size: 1767 bytes --]

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.


[-- Attachment #2: sc400_sb_diff-2.4.21.tar.gz --]
[-- Type: application/x-gzip, Size: 18173 bytes --]

             reply	other threads:[~2003-08-06 23:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-06 23:44 Jonathan Campbell [this message]
2003-08-07  0:01 Jonathan Campbell

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='000001c35c74$c0087f90$6101a8c0@area51' \
    --to=jmc@tocatta.com \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®