diff options
author | ache <ache@FreeBSD.org> | 1994-05-08 17:11:39 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-05-08 17:11:39 +0000 |
commit | 252cdc7400e409a529ad7ead820ceb0b81b343fd (patch) | |
tree | fbd7af2cb2e92a269ddb2eb49183e16a75bfc485 /sys | |
parent | e7465d2aba027817d5b0c5bbece838ff6ee28dfc (diff) | |
download | FreeBSD-src-252cdc7400e409a529ad7ead820ceb0b81b343fd.zip FreeBSD-src-252cdc7400e409a529ad7ead820ceb0b81b343fd.tar.gz |
Localize RevD mixer changes for board revisions >= 127
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/isa/sound/pas2_card.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/i386/isa/sound/pas2_card.c b/sys/i386/isa/sound/pas2_card.c index ee1bf77..cc99a9e 100644 --- a/sys/i386/isa/sound/pas2_card.c +++ b/sys/i386/isa/sound/pas2_card.c @@ -46,6 +46,8 @@ static int pas_intr_mask = 0; static int pas_irq = 0; static char pas_model; +static unsigned char board_rev_id; +#define PAS_REVD_BOARD_ID 127 static char *pas_model_names[] = {"", "Pro AudioSpectrum+", "CDPC", "Pro AudioSpectrum 16", "Pro AudioSpectrum 16D"}; @@ -75,8 +77,11 @@ pas_write (unsigned char data, int ioaddr) void mix_write (unsigned char data, int ioaddr) { - outw ((ioaddr ^ translat_code) - 1, data | (data << 8)); - outb (0, 0x80); + if (board_rev_id >= PAS_REVD_BOARD_ID) { + outw ((ioaddr ^ translat_code) - 1, data | (data << 8)); + outb (0, 0x80); + } else + OUTB (data, ioaddr ^ translat_code); } void @@ -329,12 +334,13 @@ attach_pas_card (long mem_start, struct address_info *hw_config) if (detect_pas_hw (hw_config)) { - if ((pas_model = O_M_1_to_card[pas_read (OPERATION_MODE_1) & 0x0f])) + board_rev_id = pas_read (BOARD_REV_ID); + if ((pas_model = O_M_1_to_card[pas_read (OPERATION_MODE_1) & 0x0f])) { #ifdef __FreeBSD__ - printk ("snd3: <%s rev %d>", pas_model_names[(int) pas_model], pas_read (BOARD_REV_ID)); + printk ("snd3: <%s rev %d>", pas_model_names[(int) pas_model], board_rev_id); #else - printk (" <%s rev %d>", pas_model_names[(int) pas_model], pas_read (BOARD_REV_ID)); + printk (" <%s rev %d>", pas_model_names[(int) pas_model], board_rev_id); #endif } |