* Encapsulate all the ring-specific variables into a substructure. (This will
help with some potential code sharing.)
* Don't bother with "last buffer complete" interrupts -- we should be taking an
interrupt anyway because we set IOC on every buffer.
* Likewise, ignore CELV; it's meaningless to us.
* Get rid of the FIFO error counters, since this doesn't actually happen any
more.
Also, allow any sample rate between 8000 and 48000Hz. (This range should
probably be larger, but this is what's known to work.)
Another 180 bytes shaved.
was causing some "fifo under/overrun" errors during the initial trigger.
Also fixes a ring synchronization problem introduced in the earlier changes.
This should completely fix the FIFO errors with auich.
1) Update the queue pointers any time we get a block completion interrupt,
not just when we hit the last block.
2) Set the "back-to-back enable" bit.
In addition:
3) Make sure we ack every block we transfer; there was a bug that could cause
the audio layer to get out of sync.
as a side-effect. Don't bother handling IFF_PROMISC here, because
ether_ioctl() already calls (*if_init)() to handle flags changes.
When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.
Fixes kern/27678.
ether_ioctl() will call (*if_init)() when flags change. Instead, do
what other drivers do and stop the interface in this case before
re-initializing.
- qtioctl(): Now that qtinit() does the right thing, remove the check
for IFF_PROMISC change.
When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.
Fixes kern/27678.
context. For this introduce 3 new xfer tags:
- C_WAIT, equivalent of AT_WAIT
- C_WAITACT, when there is a thread waiting on this xfer to become the active
one (that is, to be at the head of the queue)
- C_FREE, set by ata_free_xfer() when it can't free the xfer because it's
still in use. The holder should then free the xfer ASAP.
If ata_exec_xfer() is called with (C_POLL | C_WAIT), and there is already
xfers to be processed, assert C_WAITACT and sleep.
atastart() checks for C_WAITACT, and wakeup the thread waiting for this xfer
to become active if set. atastart() won't process this xfer, it's the
responsability of the thread waked up to handle it.
Fix (the right way) kern/27421 by Martin Husemann.
some special cases for the PCI-Express versions. As there is no
documentation available, all of this is inspired from Linux or taken from
FreeBSD (itself inspired from Linux). There are a lot of magic numbers.
Tested on two BCM5751 devices as found in newer Dell computers.
It is needed because automatic calibration by auich_calibrate() is not
so precise.
- Why not ioctl?
It is not good idea to add a new ioctl operation to MI audio for
a specific audio device.
- Why not mixerctl item?
AC'97 linke rate is not related to audio mixing.