Date: Sun, 12 Dec 1999 12:13:57 -0800 (PST) From: The Utz Family <utz@serv.net> To: Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE> Cc: multimedia@FreeBSD.ORG Subject: Re: pcm0 Message-ID: <Pine.BSF.4.02.9912121157120.77427-100000@itchy.serv.net> In-Reply-To: <199912121115.MAA20474@gil.physik.rwth-aachen.de>
next in thread | previous in thread | raw e-mail | index | archive | help
this one is easy to solve! i ran into this last nite when i was busy
trying to hack luigi-sound to add my CMedia CMI8330 sound chip.
On Sun, 12 Dec 1999, Christoph Kukulies wrote:
> FreeBSD-3.3R, Luigi's sound driver:
>
> I tinkered with sound drivers a bit (have an Opti931 sound card
> which NT didn't recognize but was hoping that I could get
> it working under FreeBSD):
> This is an OPTi931, but LDN 1 is disabled
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is strange, isn't it?
this is a string that gets emitted at the end of a case statement that
tries to decide what card you have based on the vendor id. it's in
cs423x_attach() in ad1848.c btw.....
whats happened is that the sound code went and read the configuration
struct and checked value to see if the card has been inited., obviously it
hasnt :-)
now we get to a very silly and deficient portion of freebsd.
you have to init the card in your /boot/kernel.conf file.it's documented
that you need to do it, and the strings are given in the CARDS file, but
the way it works in 3.3-RELEASE is almost completely undocumented.
it would take 15 minutes to document it and if somebody tells me who is
the current handbook/FAQ maintainer i will send it in ASAP.
here is my /boot/kernel.conf( the only part u care about is the first
line, i just added the rest to provide some context ).
spaz@john$ more /boot/kernel.conf
pnp 1 0 os enable port0 0x530 irq0 11 drq0 0 port3 0x220 irq3 5 drq3 5
en ie0
po ie0 0x210
ir ie0 10
iom ie0 0xd0000
f ie0 0
q
the pnp line will be different for your card based. but pnpinfo supplies
everything u need. pnpinfo is way cool.
however, u may not get much joy. here is what luigi has to say about the
OPTi931:
COMMENTS:
The data sheets of this chip are very cryptic and do not match
what the cards I have seem to do. I have it working
in WSS emulation, in full duplex and all modes.
In SB emulation mode the driver does not work yet (maybe I do
not initialize it the right way). It is not a major concern
anyways.
I am strongly convinced of a couple of bugs in the chip. I have
sent email to OPTI but got no reply so far. The bugs are:
- you cannot set both playback and capture format to use
a companded mode (ULAW, ALAW). If you do, the card will screw
up on the capture section.
The driver has a partial fix in software: when using ULAW, it
programs ULAW on the playback section, U8 on the capture, and
does a conversion in software (much like the SBPro). Of course
you lose 4-5 bits of dynamic range in the process.
- in full duplex (and single DMA mode), the card occasionally
misses interrupts, or generates spurious ones, or generates
interrupts before setting the status bits in the registers.
Spurious ints are not problematic since they can be easily
ignored, but missing interrupts are a nightmare to handle...
The only way to have this card work semi-reliably is to use
auto-dma mode (which is the default mode of operation in the
driver).
In any case, these cards are very cheap and widely available and
are a reasonable solution if you cannot find some other decent WSS
device.
so your mileage may vary.
if you get farther and it barfs up on you then post back to the list, i
may be able to help out a bit more since i am playing in there these days.
johnu
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02.9912121157120.77427-100000>
