Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/auvia.c
RevisionDateAuthorComments
 1.87  06-Feb-2021  isaki Hold sc_intr_lock in open()/close().
vtbl->{lock,unlock} (in fact ac97_{lock,unlock}) don't seem to need
releasing an interrupt lock.
Confirmed on auich.
 1.86  19-Apr-2020  isaki branches: 1.86.2;
Fix round_blocksize not to return 0.
 1.85  28-Feb-2020  isaki branches: 1.85.4;
Drop 512 bytes limit on auvia_round_blocksize().
This fixes attach on 6 channels device.
PR kern/55017.
 1.84  08-Jun-2019  isaki branches: 1.84.2; 1.84.4;
Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.
 1.83  08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.82  16-Mar-2019  isaki branches: 1.82.2;
Use C99 style struct initializer to audio_hw_if.
 1.81  16-Mar-2019  isaki Fix (probably) typo. SLINEAR_LE -> ULINEAR_LE.
 1.80  09-Dec-2018  jdolecek use pci_intr_establish_xname() everywhere
 1.79  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.78  01-Jun-2017  chs branches: 1.78.8; 1.78.10;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.77  29-Mar-2014  christos branches: 1.77.6;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.76  16-Oct-2013  christos remove unused variables.
 1.75  24-Nov-2011  mrg branches: 1.75.8; 1.75.12;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.
 1.74  23-Nov-2011  jmcneill Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
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.
 1.73  13-Nov-2010  uebayasi branches: 1.73.8; 1.73.10;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.
 1.72  24-Feb-2010  dyoung branches: 1.72.2;
A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.71  08-Jan-2010  dyoung branches: 1.71.2;
Expand PMF_FN_* macros.
 1.70  26-Nov-2009  njoly Cleanup interrupt establish error messages. Do not mix
aprint_error/aprint_normal/printf calls for a single line.
 1.69  06-May-2009  cegger device_t/softc split
tested by jakllsch@
 1.68  05-May-2009  cegger struct cfdata * -> cfdata_t
 1.67  11-Oct-2008  dholland branches: 1.67.6; 1.67.8;
Print a message on two previously silent error paths in auvia_attach.
 1.66  01-Jul-2008  jmcneill branches: 1.66.2;
VT8233+ uses a different register base for capturing, tested by sborrill
 1.65  28-Apr-2008  martin branches: 1.65.2; 1.65.4;
Remove clause 3 and 4 from TNF licenses
 1.64  10-Apr-2008  cegger branches: 1.64.2; 1.64.4;
use aprint_*_dev and device_xname
 1.63  23-Feb-2008  dyoung Detach self and children. Use device_t and accessors. Use PMF_FN_*.
 1.62  14-Jan-2008  tsutsui branches: 1.62.2; 1.62.6;
Use htole32() to write parameters to DMA descriptors for big endian machines.
Tested on Pegasos by mrg@ on port-ofppc.
 1.61  09-Dec-2007  jmcneill branches: 1.61.2;
Merge jmcneill-pm branch.
 1.60  04-Mar-2007  christos branches: 1.60.14; 1.60.16; 1.60.22; 1.60.24; 1.60.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.59  21-Feb-2007  thorpej branches: 1.59.2;
Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.58  16-Nov-2006  christos branches: 1.58.2; 1.58.4; 1.58.6;
__unused removal on arguments; approved by core.
 1.57  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.56  24-Sep-2006  jmcneill Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
 1.55  28-Aug-2006  christos branches: 1.55.2; 1.55.4;
add missing initializer
 1.54  27-Jul-2006  kent add support for AC'97 S/PDIF
 1.53  28-Nov-2005  rpaulo branches: 1.53.4; 1.53.8;
PR 32178: Nicolas Joly: VT8233 AC'97 Audio revision 0x10 small display
fix. I just changed the comment a bit.
 1.52  28-Jun-2005  thorpej branches: 1.52.2; 1.52.8;
Use ANSI function decls and static.
 1.51  15-Jan-2005  kent ansify and KNF
 1.50  10-Jan-2005  kent merge kent-audio1 branch, which introduces audio filter pipeline to the MI
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
 1.49  16-Nov-2004  xtraeme branches: 1.49.2;
Fix typo.
 1.48  13-Nov-2004  kent adopt auconv_set_converter()
 1.47  10-Nov-2004  kent remove unused variable
 1.46  10-Nov-2004  kent move IS_FIXED_RATE(), SUPPORTS_4CH(), and SUPPORTS_6CH to ac97var.h
 1.45  08-Nov-2004  kent print dmesg correctly for VT8237
 1.44  29-Oct-2004  yamt constify audio_hw_if, midi_hw_if, and radio_hw_if.
 1.43  17-Oct-2004  kent add support for suspending/resuming.
patch provided by Rhialto in PR#26432
 1.42  22-Sep-2004  kent ac97_host_if::reset() returns non-zero value if codec reset fails, and
ac97 is not attached in that case.

PR: kern/26973
 1.41  09-Jul-2004  mycroft Clean up. Attempt to make these safer against stray interrupts.
 1.40  09-Jul-2004  mycroft There's no need to halt the input and output pipes in the close routine --
audio_close() takes care of this.
 1.39  22-Apr-2004  itojun sprintf -> snprintf
 1.38  12-Apr-2004  jmmv Be consistent with other messages: output "VIA Technologies" instead of
only "VIA". Also add a missing "Audio" word to a message.
Closes PR kern/25152 by Nicolas Joly.
 1.37  31-Mar-2004  jmcneill Don't allow block sizes < 288 bytes on VT823x chips (patch from kent@).
Fixes kern/22788.
 1.36  25-Mar-2004  xtraeme branches: 1.36.2;
err fix previous (return -> break) in case statement.
 1.35  25-Mar-2004  xtraeme There are two revisions of the VT8235 audio chipset (0x50 and 0x60), so
print any of them as VT8235, approved by martin@.
 1.34  25-Mar-2004  martin Better identify some revisions of via 823* audio chips.
From PR kern/24906.
 1.33  30-Oct-2003  simonb Remove some assigned-to but otherwise unused variables.
 1.32  14-Sep-2003  jmmv Enable auvia_reset_codec's code and wait until the card is available.
Fixes 'invalid codec' problems (at least with AD1980). Ok'ed by tsarna@.
 1.31  03-May-2003  wiz branches: 1.31.2;
DMA, not dma nor Dma.
 1.30  01-Feb-2003  thorpej Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant. Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
 1.29  31-Jan-2003  thorpej Use aprint_*().
 1.28  04-Nov-2002  kent auvia_set_params:
For a fixed-rate codec, when AUMODE_RECORD and AUDIO_ENCODING_MULAW or
AUDIO_ENCODING_ALAW, use AUDIO_ENCODING_SLINEAR_LE/16bit for native encoding
instead of AUDIO_ENCODING_ULINEAR/8bit because aurateconv does not support
sampling rate conversion for 8 bit PCM.
This change fixes PR kern/18834.
 1.27  16-Oct-2002  kent Support for 4ch/6ch audio playback with VT8233/VT8235.
 1.26  08-Oct-2002  kent - Enable in-kernel sampling rate conversion for fixed-rate codec
- Remove VRA/VRM enabling in auvia_attach()
- Use ac97_codec_if::set_rate()
- Return no AUDIO_PROPS_MMAP for fixed-rate codec
- Remove unused variables in auvia_softc
 1.25  07-Oct-2002  kent Revive VIA8233_RP_DXS_[LR]VOL in auvia_trigger_*().
 1.24  06-Oct-2002  kent - auvia_trigger_output(): correct register;
AUVIA_RP_CONTROL -> AUVIA_RP_MODE
- auvia_trigger_output(), auvia_trigger_input(): Remove DXS_[LR]VOL setting.
- whitespace
 1.23  06-Oct-2002  kent Add some constant symbols for AC97 registers and values based on OpenBSD.
Rename some symbols to sync with OpenBSD:
AC97_REG_EXTENDED_ID
-> AC97_REG_EXT_AUDIO_ID
AC97_REG_EXTENDED_STATUS
-> AC97_REG_EXT_AUDIO_CTRL
AC97_CODEC_DOES_VRA/AC97_ENAB_VRA
-> AC97_EXT_AUDIO_VRA
AC97_CODEC_DOES_MICVRA/AC97_ENAB_MICVRA
-> AC97_EXT_AUDIO_VRM

ac97feature: "mic channel" -> "dedicated mic channel"
ac97_attach(): print extended capabilities; VRA, DRA, SPDIF, VRM, CDAC,
SDAC, LDAC.
 1.22  05-Oct-2002  kent Add support for VIA VT8233/VT8235. The patch was provided by Ola Eriksson
<ola at mreriksson dot net> in PR kern/18375. It is based on auvia of
OpenBSD.
 1.21  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.20  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.19  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.18  27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.17  02-Apr-2002  fvdl Return 0 when no interrupt was handled.
 1.16  16-Mar-2002  jmcneill Backout addition of the VIA VT8233.
 1.15  16-Mar-2002  jmcneill Add support for the VT8233 AC'97.
 1.14  13-Nov-2001  lukem add RCSID
 1.13  03-Oct-2001  augustss Add a new optional method, dev_ioctl, to the audio hardware driver interface.
It is called when an unrecognized ioctl() is performed on a device,
thus allowing ioctl()s that frob the hardware driver (like loading
microcode).
 1.12  04-Aug-2001  jdolecek branches: 1.12.2;
It seems the fixed rate versions are actually fixed at 48 kHz, not 44.1 kHz.
 1.11  19-Feb-2001  fvdl branches: 1.11.2; 1.11.4;
Switch line in mute off by default.
 1.10  05-Jan-2001  augustss Don't make local defines for stuff that's already in ac97reg.h.
 1.9  28-Dec-2000  sommerfeld Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
 1.8  10-Dec-2000  jdolecek do not try to get/set sample rate on codecs which don't support variable
rate audio - always report/use fixed rate of 44100 for them, so that the
other audio code DTRT
 1.7  15-Nov-2000  jdolecek branches: 1.7.2;
if AC97_CODEC_DOES_VRA is not supported, only print warning than
hw Variable Rate Audio is not supported and continue attaching the driver.
This is I believe more correct than what was done in rev 1.5
 1.6  14-Nov-2000  thorpej NBPG -> PAGE_SIZE
 1.5  01-Sep-2000  jdolecek even through the integrated audio on my MSI 694D Pro
does not set AC97_CODEC_DOES_VRA in AC97_REG_EXT_AUDIO_ID request, it
works okay; only require the bit set for revision < 'H'
 1.4  26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.3  15-May-2000  thorpej branches: 1.3.4;
ac97.h -> ac97var.h
 1.2  08-Apr-2000  tsarna Fix auvia_free, clean up more on close, and be more careful in interrupt
handler.
 1.1  31-Mar-2000  tsarna Add auvia, a driver for the integrated AC'97 audio on the VIA VT82C686A
southbridge.

Tested on a ASUS K7M (w/ AD1881 codec). Please report any problems.
 1.3.4.2  01-Sep-2000  jdolecek pullup rev. 1.5 (approved by thorpej):
rev. H apparently doesn't set AC97_CODEC_DOES_VRA bit but works ok with
this driver, so only require the bit set for revisions < H
 1.3.4.1  30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.7.2.6  12-Mar-2001  bouyer Sync with HEAD.
 1.7.2.5  05-Jan-2001  bouyer Sync with HEAD
 1.7.2.4  13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.7.2.3  22-Nov-2000  bouyer Sync with HEAD.
 1.7.2.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.2.1  15-Nov-2000  bouyer file auvia.c was added on branch thorpej_scsipi on 2000-11-20 11:42:14 +0000
 1.11.4.4  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.11.4.3  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.4.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.4.1  25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.11.2.7  11-Nov-2002  nathanw Catch up to -current
 1.11.2.6  18-Oct-2002  nathanw Catch up to -current.
 1.11.2.5  17-Apr-2002  nathanw Catch up to -current.
 1.11.2.4  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.2.3  14-Nov-2001  nathanw Catch up to -current.
 1.11.2.2  08-Oct-2001  nathanw Catch up to -current.
 1.11.2.1  24-Aug-2001  nathanw Catch up with -current.
 1.12.2.1  11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.31.2.11  11-Dec-2005  christos Sync with head.
 1.31.2.10  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.31.2.9  17-Jan-2005  skrll Sync with HEAD.
 1.31.2.8  29-Nov-2004  skrll Sync with HEAD.
 1.31.2.7  14-Nov-2004  skrll Sync with HEAD.
 1.31.2.6  02-Nov-2004  skrll Sync with HEAD.
 1.31.2.5  19-Oct-2004  skrll Sync with HEAD
 1.31.2.4  24-Sep-2004  skrll Sync with HEAD.
 1.31.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.31.2.1  03-Aug-2004  skrll Sync with HEAD
 1.36.2.2  22-Sep-2004  jmc branches: 1.36.2.2.2;
Pullup rev 1.42 (requested by kent in ticket #867)

ac97_host_if::reset() returns non-zero value if codec reset fails, and
ac97 is not attached in that case. PR#26973
 1.36.2.1  01-Apr-2004  jmc Pullup rev 1.37 (requested by jmcneill in ticket #36)

Don't allow block sizes < 288 bytes on VT823x chips. PR#22788
 1.36.2.2.2.1  30-Jan-2005  he Pull up revision 1.43 (requested by kent in ticket #949):
Add support for suspending/resuming. Fixes PR#26432.
 1.49.2.2  09-Jan-2005  kent audio_hw_if change
* make open() and close() optional
* add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()
 1.49.2.1  02-Jan-2005  kent * adopt the filter pipeline framework
* follow ac97_attach() change
 1.52.8.1  29-Nov-2005  yamt sync with head.
 1.52.2.6  27-Feb-2008  yamt sync with head.
 1.52.2.5  21-Jan-2008  yamt sync with head
 1.52.2.4  03-Sep-2007  yamt sync with head.
 1.52.2.3  26-Feb-2007  yamt sync with head.
 1.52.2.2  30-Dec-2006  yamt sync with head.
 1.52.2.1  21-Jun-2006  yamt sync with head.
 1.53.8.2  03-Sep-2006  yamt sync with head.
 1.53.8.1  11-Aug-2006  yamt sync with head
 1.53.4.1  09-Sep-2006  rpaulo sync with head
 1.55.4.2  10-Dec-2006  yamt sync with head.
 1.55.4.1  22-Oct-2006  yamt sync with head
 1.55.2.1  18-Nov-2006  ad Sync with head.
 1.58.6.1  04-Sep-2008  skrll Sync with netbsd-4.
 1.58.4.2  12-Mar-2007  rmind Sync with HEAD.
 1.58.4.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.58.2.1  06-Jul-2008  bouyer Pull up following revision(s) (requested by sborrill in ticket #1161):
sys/dev/pci/auvia.c: revision 1.66
VT8233+ uses a different register base for capturing, tested by sborrill
 1.59.2.1  27-Feb-2007  ad Add MP locking for audio drivers.
 1.60.26.1  11-Dec-2007  yamt sync with head.
 1.60.24.1  26-Dec-2007  ad Sync with head.
 1.60.22.1  18-Feb-2008  mjf Sync with HEAD.
 1.60.16.2  23-Mar-2008  matt sync with HEAD
 1.60.16.1  09-Jan-2008  matt sync with HEAD
 1.60.14.3  08-Dec-2007  jmcneill Rename pnp(9) -> pmf(9), as requested by many.
 1.60.14.2  06-Nov-2007  joerg Refactor PNP API:
- Make suspend/resume directly a device functionality. It consists of
three layers (class logic, device logic, bus logic), all of them being
optional. This replaces D0/D3 transitions.
- device_is_active returns true if the device was not disabled and was
not suspended (even partially), device_is_enabled returns true if the
device was enabled.
- Change pnp_global_transition into pnp_system_suspend and
pnp_system_resume. Before running any suspend/resume handlers, check
that all currently attached devices support power management and bail
out otherwise. The latter is not done for the shutdown/panic case.
- Make the former bus-specific generic network handlers a class handler.
- Make PNP message like volume up/down/toogle PNP events. Each device
can register what events they are interested in and whether the handler
should be global or not.
- Introduce device_active API for devices to mark themselve in use from
either the system or the device. Use this to implement the idle handling
for audio and input devices. This is intended to replace most ad-hoc
watchdogs as well.
- Fix somes situations in which audio resume would lose mixer settings.
- Make USB host controllers better deal with suspend in the light of
shared interrupts.
- Flush filesystem cache on suspend.
- Flush disk caches on suspend. Put ATA disks into standby on suspend as
well.
- Adopt drivers to use the new PNP API.
- Fix a critical bug in the generic cardbus layer that made D0->D3
break.
- Fix ral(4) to set if_stop.
- Convert cbb(4) to the new PNP API.
- Apply the PCI Express SCI fix on resume again.
 1.60.14.1  04-Oct-2007  joerg Convert auvia(4) to PNP power management.
 1.61.2.1  19-Jan-2008  bouyer Sync with HEAD
 1.62.6.4  17-Jan-2009  mjf Sync with HEAD.
 1.62.6.3  02-Jul-2008  mjf Sync with HEAD.
 1.62.6.2  02-Jun-2008  mjf Sync with HEAD.
 1.62.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.62.2.1  24-Mar-2008  keiichi sync with head.
 1.64.4.4  11-Mar-2010  yamt sync with head
 1.64.4.3  16-May-2009  yamt sync with head
 1.64.4.2  04-May-2009  yamt sync with head.
 1.64.4.1  16-May-2008  yamt sync with head.
 1.64.2.1  18-May-2008  yamt sync with head.
 1.65.4.1  03-Jul-2008  simonb Sync with head.
 1.65.2.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.66.2.1  19-Oct-2008  haad Sync with HEAD.
 1.67.8.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.67.6.3  13-Dec-2008  ad Fix locking for ac97.
 1.67.6.2  11-Dec-2008  ad Checkpoint work in progress.
 1.67.6.1  08-Dec-2008  ad Convert some more drivers.
 1.71.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.72.2.1  05-Mar-2011  rmind sync with head
 1.73.10.2  22-Nov-2011  jmcneill get rid of unused 'powerstate' callback in audio_hw_if
 1.73.10.1  19-Nov-2011  jmcneill port ad-audiomp2 branch changes to 5.99.56
todo:
- port ad-audiomp2 pcppi changes
- these drivers need to be fixed:
- emuxki
- gcscaudio
- hdafg
- uaudio
- umidi
- MD audio drivers
 1.73.8.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.73.8.1  17-Apr-2012  yamt sync with head
 1.75.12.1  18-May-2014  rmind sync with head
 1.75.8.2  03-Dec-2017  jdolecek update from HEAD
 1.75.8.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.77.6.1  28-Aug-2017  skrll Sync with HEAD
 1.78.10.3  21-Apr-2020  martin Sync with HEAD
 1.78.10.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.78.10.1  10-Jun-2019  christos Sync with HEAD
 1.78.8.2  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.78.8.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.82.2.4  04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.82.2.3  03-May-2019  isaki Remove unnecessary header file.
 1.82.2.2  27-Apr-2019  isaki Adapt to audio2.
- auvia_set_params_sub is also renamed because caller auvia_set_params
is renamed to auvia_set_format.
 1.82.2.1  21-Apr-2019  isaki Use C99 style struct initializer to audio_format.
 1.84.4.1  29-Feb-2020  ad Sync with head.
 1.84.2.1  21-Mar-2020  martin Pull up following revision(s) (requested by isaki in ticket #792):

sys/arch/amiga/dev/aucc.c: revision 1.48
sys/dev/pci/auixp.c: revision 1.49
sys/dev/pci/gcscaudio.c: revision 1.19
sys/dev/pci/auich.c: revision 1.159
sys/dev/sbus/dbri.c: revision 1.42
sys/dev/pci/auvia.c: revision 1.85
sys/dev/pci/auacer.c: revision 1.39

Drop 512 bytes limit on auvia_round_blocksize().

This fixes attach on 6 channels device.
PR kern/55017.

round_blocksize must return a multiple of the framesize.
aucc(4) supports 3 channels mode.

round_blocksize must return a multiple of the framesize
even if passed blocksize is greater than the upper limit.

round_blocksize must return a multiple of the framesize.

It's not divisible when blk=GCSCAUDI_PRD_SIZE_MAX and channels=4.
round_blocksize must return a multiple of the framesize
even if 6 channels mode.

I believe that keeping "good alignment" is just a wish, not constraint.
 1.85.4.1  20-Apr-2020  bouyer Sync with HEAD
 1.86.2.1  03-Apr-2021  thorpej Sync with HEAD.

RSS XML Feed