From owner-freebsd-questions Thu Mar 4 22:47:33 1999 Delivered-To: freebsd-questions@freebsd.org Received: from walnut.readington.com (walnut.readington.com [207.207.198.10]) by hub.freebsd.org (Postfix) with ESMTP id 38FDA1502C for ; Thu, 4 Mar 1999 22:47:30 -0800 (PST) (envelope-from chrismar@readington.com) Received: from localhost (chrismar@localhost) by walnut.readington.com (8.8.8/8.8.8) with ESMTP id BAA20309; Fri, 5 Mar 1999 01:42:33 -0500 (EST) (envelope-from chrismar@readington.com) Date: Fri, 5 Mar 1999 01:42:33 -0500 (EST) From: Chris To: Ken Marx Cc: freebsd-questions@FreeBSD.ORG Subject: Re: yamaha opl-3 soundcard problem (2.2.8) In-Reply-To: <36DF6E53.7ADBC613@bigshed.com> Message-ID: Webpage: http://www.weirdo.net/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have this same card, and I have been able to use it successfully under 2.2.6, 2.2.8 and now 3.1-stable. I will try and go step by step here as far as what is in my knerel conf file and what you have to do at the boot prompt.. This is what I have in my kernel config file: controller pnp0 device pcm0 at isa? port ? tty irq 10 drq 1 flags 0x0 vector pcmintr device pcm1 at isa? port ? tty irq 10 drq 1 flags 0x0 vector pcmintr I have the 2 in there because the pnp stuff is kinda weird. When I first started mucking with it and I just had pcm0 in there it wouldn't work. Then I added pcm1 in there, and now it gets detected as pcm2.. go figure. Anyways, add try adding that to the kernel config file and re-build the kernel, then reboot. Once you reboot you will need to go into the comand line configuration thing-a-magig by doing -c at the boot prompt. At the config> prompt, type the following, word for word, space for space pnp 1 0 os enable irq0 5 drq0 1 drq1 3 pnp 1 0 port0 0x220 port1 0x530 port2 0x388 port3 0x330 port4 0x370 pnp 1 1 os enable port I'm not too sure about the last line there, but all I know is typing that works. Of course hit return at the end of each line. Then type 'exit' and watch the screen. If everything works you should see something similar to this: Probing for PnP devices: CSN 1 Vendor ID: YMH0800 [0x0008a865] Serial 0xffffffff Comp ID: PNPb02f [0x2fb0x2fb0d041] mss_attach 2 at 0x530 irq 5 dma 1:3 flags 0x13 setting up yamaha registers set yamaha master volume to max pcm2 (CS423x/Yamaha/AD1816 sn 0xffffffff) at 0x530-0x537 irq 5 drq 1 flags 0x13 on isa Now, let the machine boot up, and login or su to root. Then issue a 'cat /dev/sndstat', if it's set up correctly you should get something like this: FreeBSD Audio Driver (981002) Feb 25 1999 03:02:08 Installed devices: pcm2: at 0x530 irq 5 dma 1:3 Now, go into the /dev directory, we have to set up the links to point to pcm0, pcm1 or pcm2 depending on what it got probed as. Since mine is pcm2, I will use that as an example, yours may differ of course.. Ok, now 'cd /dev', 'ls -al | grep audio'. You will see audio through audio9, since mine was found at pcm2, I have to link /dev/audio to /dev/audio2, 'ln -s audio2 audio'. You have to do the same for dsp, and dspW and then you have to link dspdefault to the same thing you linked to for dsp. Here is what my audio, dsp, dspW and dspdefault look like: lrwxr-xr-x 1 root wheel 6 Feb 25 01:38 audio -> audio2 lrwxr-xr-x 1 root wheel 4 Feb 25 03:23 dsp -> dsp2 lrwxr-xr-x 1 root wheel 5 Feb 25 03:23 dspW -> dspW2 lrwxr-xr-x 1 root wheel 4 Feb 25 03:23 dspdefault -> dsp2 Of course you will do yours according to what your card was detected as. Now it's time for the test! Find or download an .au file and issue 'cat file.au > /dev/audio', if everything was done right you'll hear some beautiful music to your ears! I hope this helps, Chris On Thu, 4 Mar 1999, Ken Marx wrote: > Hi, > > I've been trying to get things to work using a yamaha/opl-3 > soundcard on 2.2.8. > > (Note: I *have* done MAKEDEV snd0) > > If I build the kernel using the recomended: > > ############### > controller snd0 > device opl0 at isa? port 0x38a > ############### > > Things build/boot fine, but operations apps/operations fail when > using the device(s). E.g., cat test.au > /dev/audio yields: > > Operation not supported by device > > I saw a suggestion in the mail archives to use the Luigi way instead: > > ################ > controller pnp0 > device pcm0 at isa? port ? tty irq 10 drq 1 flags 0x0 vector pcmintr > ################ > > (I copied the 2nd line verbatim from the conf/LINT file.) > > But when I do this, the build fails: > -------------------- > ../../i386/isa/snd/ad1848.c: In function `cs423x_attach': > ../../i386/isa/snd/ad1848.c:1519: `pcmintr' undeclared (first use this > function) > ../../i386/isa/snd/ad1848.c:1519: (Each undeclared identifier is reported only > once > ../../i386/isa/snd/ad1848.c:1519: for each function it appears in.) > ../../i386/isa/snd/ad1848.c: In function `opti931_attach': > ../../i386/isa/snd/ad1848.c:1625: `pcmintr' undeclared (first use this > function) > ../../i386/isa/snd/ad1848.c: In function `opti925_attach': > ../../i386/isa/snd/ad1848.c:1690: `pcmintr' undeclared (first use this > function) > ../../i386/isa/snd/ad1848.c: In function `guspnp_attach': > ../../i386/isa/snd/ad1848.c:1740: warning: implicit declaration of function > `pnp_write' > ../../i386/isa/snd/ad1848.c:1751: `pcmintr' undeclared (first use this > function) > *** Error code 1 > ---------------------- > > Can someone tell me what I'm missing/doing wrong? And/or what to do > in order to make it work using either/both method? > > I'm obviously flying a bit blind here, so a pointer to *complete* > instructions would really be appreciated. (E.g., if I'm to use pnp, > are there MAKEDEV or -c boot steps that I need to perform?) > > Thanks in advance, > k. > -- > Ken Marx, kmarx@bigshed.com > Seediously. What I mean by zat is ze following. I want to capture mindshare and > keep the faith regarding the technology plan. > - http://cgi.bigshed.com/~kmarx/cgi-bin/speak.cgi > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message