Subject: Re: Soundblaster and macppc
To: Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
From: Bill Studenmund <wrstuden@zembu.com>
List: port-macppc
Date: 08/28/2000 09:08:21
On Thu, 24 Aug 2000, Emmanuel Dreyfus wrote:

> Hi!
> 
> I want my NetBSD/macppc box to output some sound. There is no driver for
> the awacs chip I have, and it seems writing the driver myself could take
> me weeks, if not months. 
> Therefore, I purchased a PCI soundblaster (eap), which is supported as a
> platform independant driver.
> 
> I added
> eap*    at pci? dev ? function ?        # Ensoniq AudioPCI 
> to my config file, and tried to compile the kernel.
> 
> make depend did not worked because of two redefined defines. I had to
> patch /sys/dev/audio_if.h around line 156:

What version are you using? In -current (and should be in 1.5), that line
is "#if !defined(__i386__) && !defined(__arm32__) && !defined(IPL_AUDIO)"

> #if !defined(__i386__) && !defined(__arm32__)
> #define splaudio splbio    /* XXX */
> #define IPL_AUDIO IPL_BIO  /* XXX */
> #endif 
> 
> became this:
> 
> #if !defined(__i386__) && !defined(__arm32__)
> #ifndef splaudio
> #define splaudio splbio    /* XXX */
> #endif
> #ifndef IPL_AUDIO
> #define IPL_AUDIO IPL_BIO  /* XXX */
> #endif
> #endif 
> 
> The make depend worked.
> make had a link error at the final stage, because the audio_cd symbol
> was missing. I looked for audio_cd in the source tree, and the only
> definition is in /sys/dev/audio.c at line 191:
> 
> extern struct cfdriver audio_cd;  
> 
> I cannot find it anywhere else. I therfore turned the line into
> /* extern */ struct cfdriver audio_cd;  
> 
> And then the kernel compiled. 

That's not the way to do it. That structure needs to be filled in, not
just declared. It is filled in when you configure audio into your kernel.

> Install new kernel, reboot. It went sucessfully to multiuser, but I
> still have this anoying message during boot:
> 
> Ensoniq AudioPCI 97 (audio multimedia, revision 0x08) at pci0 dev 17
> function 0 not configured
> 
> Question is: how to get a soundblaster to work in a macppc? did anyone
> ever tried this?

Yes! Here are the dmesg lines from my card:

eap0 at pci0 dev 14 function 0: Ensoniq CT5880 CT5880C (rev. 0x02)
eap0: interrupting at irq 24
eap0: SigmaTel STAC9721 codec; 18 bit DAC, 18 bit ADC, Rockwell 3D
audio0 at eap0: full duplex, mmap, independent
midi0 at eap0: AudioPCI MIDI UART

The -current GENERIC kernel should contain everything needed to make this
work.

Take care,

Bill