Home | History | Annotate | Download | only in hpc
History log of /src/sys/arch/sgimips/hpc/haltwo.c
RevisionDateAuthorComments
 1.26  25-May-2019  isaki Make it compilable even with debug option.
 1.25  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.24  16-Mar-2019  isaki branches: 1.24.2;
Use C99 style struct initializer to audio_hw_if.
 1.23  01-Jun-2017  chs branches: 1.23.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.22  24-Nov-2011  mrg branches: 1.22.8; 1.22.26;
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.21  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.20  01-Jul-2011  dyoung branches: 1.20.2; 1.20.4;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.19  25-Jan-2011  tsutsui Split device_t/softc. Tested on Indy.
 1.18  25-Jan-2011  tsutsui u_intNN_t -> uintNN_t
 1.17  24-Sep-2009  tsutsui branches: 1.17.4; 1.17.6; 1.17.8;
Replace shutdownhook_establish(9) (which was added by me)
with pmf_device_register1(9).
 1.16  14-May-2009  macallan set delta value for the mixer's master channel
 1.15  24-Aug-2008  tsutsui branches: 1.15.4; 1.15.12;
Pacify haltwo audio on shutdown hook to avoid noise on poweroff.
 1.14  17-Oct-2007  garbled branches: 1.14.16; 1.14.20; 1.14.22; 1.14.26;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.13  23-Jul-2007  he branches: 1.13.6;
After move to 64-bit paddr_t, cast via vaddr_t before casting to void*.
OK'ed by macallan@.
 1.12  04-Mar-2007  christos branches: 1.12.2; 1.12.10; 1.12.12; 1.12.14;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11  29-Dec-2006  rumble branches: 1.11.2;
IP12 (and perhaps other systems) appear to be buggy and incapable of
reliably supporting badaddr(). False negatives appear to occur
approximately 1.8 percent of the time, although neither false positives
nor consecutive false negatives occur. We take advantage of the latter
property and always use a wrapper that makes multiple checks.

My IP12 no longer sees occasional ghost devices and related panics during
boot.
 1.10  04-Sep-2006  rumble branches: 1.10.2;
Check the haltwo hardware present bit in the match function, rather than
in the attach function after we've thwacked several registers and
potentially wedged the machine. This fixes booting on Challenge S systems
and addresses PR 25202.

Consequently, re-enable haltwo in the default kernel configuration.

Many thanks to George Harvey for testing and feedback.
 1.9  11-Dec-2005  christos branches: 1.9.4; 1.9.8; 1.9.18;
merge ktrace-lwp.
 1.8  28-Feb-2005  sekiya branches: 1.8.2; 1.8.4;
Attempt to verify presence of haltwo hardware, rather than just blithely
believing that all hpc3 have a haltwo. This should help Challenge-S owners.
 1.7  15-Jan-2005  kent branches: 1.7.2; 1.7.4;
ansify and KNF
 1.6  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.5  30-Dec-2004  rumble Prepend HPC3 macros universally with "HPC3_" to distinctly recognise
the corresponding revision and maintain consistency with HPC1.

No functional change intended.
 1.4  29-Oct-2004  yamt branches: 1.4.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.
 1.3  29-Dec-2003  sekiya branches: 1.3.4;
Fixes to HPC abstraction layer from Steve Rumble:

- hpc1_hdd_{ctl,bufptr} and hpc3_hdd_{ctl,bufptr} are
established in hpcreg.h. All references to these fields
are updated with the exception of if_sq: (haltwo,
hpcdma). This makes reading the code and spotting bugs
easier.
- hpcdma.c was applying EOCHAIN to the wrong descriptor
word for the hpc1 case.
- I added scsi_max_xfer to the abstraction layer, and it
allows some crusty #defines in wdsc.c to be removed.
hpc1 now doesn't waste descriptors as it once did.
- hpcreg.h was updated to reflect the lack of XMITDONE
bit in hpc1. HPC1_REV15 added for a test in hpc.c
- hpc.c now verifies HPC1 revisions (1.0 vs 1.5) and
prints the output a little prettier ;)
- power interrupts shouldn't establish on non-IP22
platforms.
 1.2  04-Oct-2003  tsutsui TAB/space cleanup.
 1.1  25-Sep-2003  lonewolf Support for HAL2 audio controller attached to the HPC ASIC, found on SGI Indy.

The driver is not too heavily tested and only supports audio playback and
master volume setting currently.
 1.3.4.7  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.3.4.6  17-Jan-2005  skrll Sync with HEAD.
 1.3.4.5  02-Nov-2004  skrll Sync with HEAD.
 1.3.4.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.4.3  18-Sep-2004  skrll Sync with HEAD.
 1.3.4.2  03-Aug-2004  skrll Sync with HEAD
 1.3.4.1  29-Dec-2003  skrll file haltwo.c was added on branch ktrace-lwp on 2004-08-03 10:40:06 +0000
 1.4.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.4.2.1  03-Jan-2005  kent adopt the filter pipeline framework
 1.7.4.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.2.1  29-Apr-2005  kent sync with -current
 1.8.4.2  03-Sep-2007  yamt sync with head.
 1.8.4.1  30-Dec-2006  yamt sync with head.
 1.8.2.1  16-Sep-2006  ghen Pull up following revision(s) (requested by rumble in ticket #1497):
sys/arch/sgimips/hpc/haltwo.c: revision 1.10
Check the haltwo hardware present bit in the match function, rather than
in the attach function after we've thwacked several registers and
potentially wedged the machine. This fixes booting on Challenge S systems
and addresses PR 25202.
Many thanks to George Harvey for testing and feedback.
 1.9.18.1  08-Sep-2006  riz Pull up following revision(s) (requested by rumble in ticket #120):
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.58 via patch
sys/arch/sgimips/hpc/haltwo.c: revision 1.10
Check the haltwo hardware present bit in the match function, rather than
in the attach function after we've thwacked several registers and
potentially wedged the machine. This fixes booting on Challenge S systems
and addresses PR 25202.
Consequently, re-enable haltwo in the default kernel configuration.
Many thanks to George Harvey for testing and feedback.
 1.9.8.1  14-Sep-2006  yamt sync with head.
 1.9.4.1  09-Sep-2006  rpaulo sync with head
 1.10.2.1  12-Jan-2007  ad Sync with head.
 1.11.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.12.14.1  15-Aug-2007  skrll Sync with HEAD.
 1.12.12.1  07-Aug-2007  matt Sync with HEAD.
 1.12.10.1  03-Oct-2007  garbled Sync with HEAD
 1.12.2.1  20-Aug-2007  ad Sync with HEAD.
 1.13.6.1  06-Nov-2007  matt sync with HEAD
 1.14.26.1  19-Oct-2008  haad Sync with HEAD.
 1.14.22.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.14.20.3  11-Mar-2010  yamt sync with head
 1.14.20.2  16-May-2009  yamt sync with head
 1.14.20.1  04-May-2009  yamt sync with head.
 1.14.16.1  28-Sep-2008  mjf Sync with HEAD.
 1.15.12.1  29-Dec-2010  matt Merge changes from netbsd-5.
 1.15.4.1  26-Sep-2009  snj Pull up following revision(s) (requested by macallan in ticket #964):
sys/arch/sgimips/hpc/haltwo.c: revision 1.16
set delta value for the mixer's master channel
 1.17.8.1  08-Feb-2011  bouyer Sync with HEAD
 1.17.6.1  06-Jun-2011  jruoho Sync with HEAD.
 1.17.4.1  05-Mar-2011  rmind sync with head
 1.20.4.2  22-Nov-2011  jmcneill get rid of unused 'powerstate' callback in audio_hw_if
 1.20.4.1  20-Nov-2011  jmcneill adapt to audiomp api changes
 1.20.2.1  17-Apr-2012  yamt sync with head
 1.22.26.1  28-Aug-2017  skrll Sync with HEAD
 1.22.8.1  03-Dec-2017  jdolecek update from HEAD
 1.23.10.1  10-Jun-2019  christos Sync with HEAD
 1.24.2.3  04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.24.2.2  28-Apr-2019  isaki Correct debug message in previous commit.
 1.24.2.1  21-Apr-2019  isaki Adapt to audio2.
- The driver doesn't seem to support recording.

RSS XML Feed