Again, I am having trouble with a NetBSD driver I am trying to write. I don't
know why I even started to write a driver for a card whose vendor is dead, with nothing but
reverse-engineering notes left as
documentation, or partial drivers for Solaris or FreeBSD or FreeBSD again (!).
Thankfully the ALSA project seems to have
gotten it quite right, even if I am not a big fan of the project in the first
place, and don't really like the way they wrote the driver. I cannot base my
effort on this code though, for obvious licensing issues.
So there I was with the FreeBSD code as a base, which I did not realize soon
enough that it did not support playback in the first place. Duh!
Anyway, I cannot resist to post here the result of what I have achieved so
far:
vortex0 at pci0 dev 12 function 0: Aureal Semiconductor AU8830 Vortex 3D Digital Audio Processor (audio multimedia, revision 0xfe)
vortex0: interrupting at irq 11
vortex0: ac97: SigmaTel STAC9704 codec; 18 bit DAC, 18 bit ADC, SigmaTel 3D
vortex0: ac97: ext id ffff<SECONDARY10,SECONDARY01,AC97_23,AC97_22,AMAP,LDAC,SDAC,CDAC,VRM,SPDIF,DRA,VRA>
vortex0: ac97: Slot assignment: 10&11, 3&4, 7&8.
vortex0: Ignore these capabilities.
vortex0: attaching audio
audio0 at vortex0: full duplex, mmap, independent
And the mixer says:
outputs.master=127,127 volume delta=8
outputs.master.mute=off [ off on ]
outputs.mono=255 volume delta=8
outputs.mono.mute=on [ off on ]
outputs.mono.source=mixerout [ mixerout mic ]
inputs.speaker=255 volume delta=16
inputs.speaker.mute=off [ off on ]
inputs.phone=191 volume delta=8
inputs.phone.mute=on [ off on ]
inputs.mic=191 volume delta=8
inputs.mic.mute=on [ off on ]
inputs.mic.preamp=off [ off on ]
inputs.mic.source=mic0 [ mic0 mic1 ]
inputs.line=191,191 volume delta=8
inputs.line.mute=off [ off on ]
inputs.cd=191,191 volume delta=8
inputs.cd.mute=off [ off on ]
inputs.video=191,191 volume delta=8
inputs.video.mute=off [ off on ]
inputs.aux=191,191 volume delta=8
inputs.aux.mute=off [ off on ]
inputs.dac=191,191 volume delta=8
inputs.dac.mute=off [ off on ]
record.source=mic [ mic cd video aux line mixerout mixeroutmono phone ]
record.volume=0,0 volume delta=16
record.volume.mute=off [ off on ]
outputs.spatial=off [ off on ]
outputs.spatial.center=0 volume delta=16
outputs.spatial.depth=0 volume delta=16
...but the sound output is still quiet, the network interrupt clicks
apart.
Well now, who cares if it does not work, right? Well well, I am currently
documenting my effort. It takes a hell of a lot of time, but for now it's better
than a non-working driver. So yeah, here it is, the writing an audio
device driver for NetBSD tutorial.