From jeff@storm.ee.ryerson.ca Tue Oct 4 22:33:27 EDT 1994 Article: 27424 of comp.os.linux.misc Path: bigblue.oit.unc.edu!concert!inxs.ncren.net!taco.cc.ncsu.edu!lll-winken.llnl.gov!sol.ctr.columbia.edu!howland.reston.ans.net!spool.mu.edu!torn!hermes.acs.ryerson.ca!storm.ee.ryerson.ca!jeff From: jeff@storm.ee.ryerson.ca (Donald Jeff Dionne) Newsgroups: comp.os.linux.misc Subject: Patch to make MSS work on PSS sndcards Date: 1 Oct 1994 16:30:25 GMT Organization: Ryerson Polytechnic University Lines: 94 Message-ID: <36k2r1$1hem@hermes.acs.ryerson.ca> NNTP-Posting-Host: storm.ee.ryerson.ca X-Newsreader: TIN [version 1.2 PL2] Hi all. Here is a small patch to make a PSS soundcard (like the Cardinal DSP-16 that I have) initalize properly so one can use the MSS chipset on it in Linux without booting MesSy-DOG first. I've used it for a few days now without problem, and I sent it to Hannu so that hopefully the next release will be fixed if his new PSS driver is not ready by then. When you configure your sound support, make sure to add BOTH PSS and MSS support. There is a file in the sound dir that will tell you how to do that (I don't remember which one). The PSS card's MSS support will be initalized to what you specify for MSS I/O address, DMA and IRQ. When you boot the new kernel, you should see something like... Init PSS/WSS addr 530 IRQ 1 DMA 7 snd11 at 0x220 irq 10 drq 3 snd10 at 0x530 irq 7 drq 1 Have fun! Jeff@EE.Ryerson.Ca -------Patch starts here--------- *** sound/pss.c Fri Jul 15 07:22:11 1994 --- linux/drivers/sound/pss.c Thu Sep 29 11:50:21 1994 *************** *** 46 **** --- 47,48 ---- + Changes by Jeff Dionne, Jeff@EE.Ryerson.Ca for MSS/WSS init support + *************** *** 53 **** ! #define PSS_MSS_BASE 0 --- 55 ---- ! #define PSS_MSS_BASE MSS_BASE *************** pss_setwssdma (int dmaNum) *** 415 **** --- 418,455 ---- + /*____ pss_setwssint + This function sets the correct bits in the + Windows Sound System configuration PSS register to + enable the chosen interrupt. + It takes a interrupt button as its argument. + */ + static void + pss_setwssint (int intNum) + { + int val; + int wssConfigAddress; + + wssConfigAddress = pss_base + PSS_WSS_CONFIG; + switch (intNum) + { + case 3: + val = pss_inpw (wssConfigAddress); + val &= INT_MASK; + val |= INT_3_BITS; + pss_outpw (wssConfigAddress, val); + break; + case 5: + val = pss_inpw (wssConfigAddress); + val &= INT_MASK; + val |= INT_5_BITS; + pss_outpw (wssConfigAddress, val); + break; + case 7: + val = pss_inpw (wssConfigAddress); + val &= INT_MASK; + val |= INT_7_BITS; + pss_outpw (wssConfigAddress, val); + break; + default: + printk ("pss_setwssint: unknown_int\n"); + } + } + *************** attach_pss (long mem_start, struct addre *** 583 **** --- 624,625 ---- + #ifndef EXCLUDE_SB + *************** attach_pss (long mem_start, struct addre *** 596 **** --- 639,650 ---- + + #endif /* EXCLUDE_SB */ + + #ifndef EXCLUDE_MSS + + pss_setaddr (wssAddr, pss_base + PSS_WSS_CONFIG); + pss_setwssdma(MSS_DMA); + pss_setwssint(MSS_IRQ); + + printk("Init PSS/WSS addr %x IRQ %d DMA %d\n",wssAddr,MSS_DMA,MSS_IRQ); + + #endif /* EXCLUDE_MSS */