From owner-freebsd-multimedia Wed Jan 22 19:32:15 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA23384 for multimedia-outgoing; Wed, 22 Jan 1997 19:32:15 -0800 (PST) Received: from scam.XCF.Berkeley.EDU (scam.XCF.Berkeley.EDU [128.32.43.201]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA23377 for ; Wed, 22 Jan 1997 19:32:12 -0800 (PST) Received: from scam.XCF.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by scam.XCF.Berkeley.EDU (8.7.5/8.7.3) with ESMTP id TAA11239 for ; Wed, 22 Jan 1997 19:27:22 -0800 From: Steven Grady Message-Id: <199701230327.TAA11239@scam.XCF.Berkeley.EDU> To: freebsd-multimedia@freebsd.org Subject: I got a Sound blaster AWE 32 PnP to work MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11235.853990041.1@scam.XCF.Berkeley.EDU> Date: Wed, 22 Jan 1997 19:27:22 -0800 Sender: owner-multimedia@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I just spent the last 6 hours getting my card to work. In the process, I probably did every wrong thing you can do, and also discovered the multimedia archives (to which I'm now subscribed). Others have had the same problems, so I thought I would fill people in. You need to do the following things: First, grab Sujel Patel's pnp stuff (at http://www.freebsd.org/~smpatel). Extract it, and compile and run pnpinfo (as root), saving the result in a file. If you look at the output, you'll find it tells you a few things. Firstly, there is information about your PnP cards. In my system, I only have the SB card, so that's the only one that showed up. Next, it shows information about different _logical devices_ for the card. For simplicity's sake, I decided to only worry about the "Audio" logical device (the one that says "Audio" as the Device Description). The others on my card are "IDE", "WaveTable", and "Game". Sometime I'll learn how to set those up as well. For each logical device, it lists the _supported_ configurations for the card -- you're going to need to choose _one_ of them (I chose the "Good Configuration", which is presumably the one the card _wants_ to have. I assume you can choose a different, "Acceptable Configuration" of the good one conflicts with something else on your system. Now, based on the information from pnpinfo, you'll need to create an entry in isa/pnp.c. Read Sujal's README file, which tells how to patch the kernel, and describes the pnp.c modifications. A shortcut is to look at the sample/sb16.pnp file in the pnpinfo directory. In my case, only two entries differed: the serial number, and the Primary IRQ number. The existing value for the IRQ is 10, I changed mine to 5 because that is what the "Good Configuration" had. Also, note that the "DRQ" entries in pnp.c correspond to the possible "DMA" values (the sound blaster uses 2, one for 8-bit and one for 16-bit). If you have more trouble, look at the pnpinfo README file. Once you've made those changes, you'll need to update the kernel configuration. You need to do two things; first, put "controller pnp0" in place. Second, update all sb values as appropriate. My entries are: controller snd0 device sb0 at isa? port 0x220 irq 5 drq 1 vector sbintr device sbxvi0 at isa? drq 5 device sbmidi0 at isa? port 0x330 device opl0 at isa? port 0x388 Next, as LINT says, make sure the corresponding values in i386/isa/sound/sound_config.h are correct. OK, recompile and install, then reboot. At this point, you should make sure that your BIOS is configured correctly -- I got hung up because during my experimentation, I had changed the BIOS to treat certain IRQ and DMA lines as ISA, not PnP. So, in summary, _four_ things need to be in sync: the pnp.c struct, the kernel configuration file, sound_config.h, and the BIOS settings. Oh, also make sure that you have the devices in /dev: # cd /dev # ./MAKEDEV snd Some things to check: the devices should be recognized on boot-up. My dmesg output includes: sb0 at 0x220 irq 5 drq 1 on isa sb0: sbxvi0 at 0x0 drq 5 on isa sbxvo0: sbmidi0 at 0x330 on isa opl0 at 0x388 on isa opl0: If anything is not found, it may indicate an error. Also, the pnp driver should work. My dmesg output: Checking for Plug-n-Play devices... Board Vendor ID: CTL0039 Board Serial Number: 0001d455 Configuring (Logical Device 0) The end result should be that you can cat a .au file to /dev/audio, and it will play, and then exit (no hangs). Good luck. Steven