passed to sysctl_createv() actually matches the declared type for
the item itself.
In the places where the caller specifies a function and a structure
address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
the original ad-audiomp branch notes:
Add MP locking to the audio drivers.
Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.
The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.
Welcome to 5.99.57.
If a codec supports for AC'97 S/PDIF, it will have an mixer "spdif.enable."
However, we can't change the value of the mixer without AC'97 host
driver's support.
The __UNCONST macro is now used only where necessary and the RW macros
are gone. Most of the changes here are consumers of the
sysctl_createv(9) interface that now takes a pair of const pointers
which used not to be.
the AC97_POWER_ANL bit.
The heuristic simply checks if AC97_REG_POWER's AC97_POWER_MIXER bit can
be set, implying the CODEC can control power to its mixer. If the bit
reads back as zero after we set it, assume ANL is reserved.
Without this patch, some CODECs (e.g. Philips UCB1400) will experience long
delays during attach and resume while the driver waits for a bit which will
never set.
Thanks to jmcneill@ for reviewing this WRT AC97 modem power control.
* Return ENXIO from ac97_attach_type if the modem codec fails to power-on.
This will prevent broken AC97 modems *cough*Conexant*cough* from giving
the impression that they will actually work.
AC97_REG_EXT_MODEM_ID instead). Also set the default audio rate to 8000;
12000 was a stupid choice since we don't actually support it in the driver
yet.
via host_flags: AC97_HOST_SKIP_AUDIO, AC97_HOST_SKIP_MODEM
* If we're dealing with a modem codec, print the extended modem
capabilities.
* Add basic AC'97 modem initialization support.
* Add some (but not all) AC'97 modem registers. More will be added later.
audio framework
Summary of changes:
* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.
* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()
* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t
* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.
* add `struct device *' parameter to ac97_attach()
* all of audio HW drivers follow audio_hw_if and ac97 changes
fit in the number of bits used for the port still does something.
This fixes PR pkg/18741 for ac97-based hardware. Other audio drivers
might need a similar fix.
controls. As it was before, the master volume control in all mixer programs
did nothing. It seems that this codec is not correctly wired in (almost?)
all motherboards.
Patch by Quentin Garnier. Fixes first part of PR kern/22548.