Home | History | Annotate | Download | only in g2
History log of /src/sys/arch/dreamcast/dev/g2/aica.c
RevisionDateAuthorComments
 1.31  07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.30  09-Feb-2021  isaki Update function name in a comment.
 1.29  06-Feb-2021  isaki Remove sc_open flag.
Counting {open,close} is done by the MI audio layer.
 1.28  23-Feb-2020  isaki branches: 1.28.6;
Make start_input/halt_input optional if the driver has no recording,
make start_output/halt_output optional if the driver has no playback.
And remove such never called functions.
 1.27  08-May-2019  isaki branches: 1.27.4;
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.26  06-May-2019  ryo don't use tsleep() in interrupt context.
when the audio starts playing, initialization is performed on the aica arm driver side.
 1.25  16-Mar-2019  isaki branches: 1.25.2;
Use C99 style struct initializer to audio_hw_if.
 1.24  03-Mar-2018  christos branches: 1.24.4;
this ain't python, thanks gcc6.
 1.23  25-Jul-2017  nat Dreamcast audio only supports playback so set it in the props.
This makes dreamcast audio work again.

Tested by Bjorn Johannesson.
cvs: ----------------------------------------------------------------------
 1.22  23-Nov-2011  jmcneill branches: 1.22.8; 1.22.26; 1.22.42;
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.21  19-Jul-2011  dyoung branches: 1.21.2; 1.21.4;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.20  21-Nov-2010  tsutsui Split softc/device_t.
 1.19  20-Nov-2010  tsutsui Make aica_round_blocksize() always return a fixed buffer size.

I'm not sure if this is correct, but audio playback doesn't work
on dreamcast without this workaround. (since kent-audio1 merge?)
 1.18  01-Aug-2008  marcus branches: 1.18.4; 1.18.16;
sysasic_intr_string() takes an IRL, not an IPL.
 1.17  06-Jan-2008  he branches: 1.17.6; 1.17.10; 1.17.12; 1.17.16;
Include <sys/device.h> explicitly to pull in needed definitions.
 1.16  17-Oct-2007  garbled branches: 1.16.2; 1.16.8;
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.15  16-Jul-2007  marcus branches: 1.15.10;
Clear the correct amount of audio RAM in AICA driver (fixes port-dreamcast/35022).
 1.14  12-Mar-2007  tsutsui branches: 1.14.8;
IRL line connected to each device on sysasic is not always corresponding
with MI IPL_* definitions, so add an independent arg to pass IRL lines
to sysasic_intr_establish() and use appropriate macro for them.
 1.13  22-Feb-2007  thorpej branches: 1.13.4;
TRUE -> true, FALSE -> false
 1.12  10-May-2006  skrll branches: 1.12.14;
Fix a bunch of cast lvalues.
 1.11  24-Dec-2005  perry branches: 1.11.4; 1.11.6; 1.11.8; 1.11.10; 1.11.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.10  11-Dec-2005  christos merge ktrace-lwp.
 1.9  02-Jun-2005  he branches: 1.9.2;
Fix const fallout.
 1.8  19-Feb-2005  tsutsui - u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 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  29-Oct-2004  yamt branches: 1.5.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.
 1.4  25-Aug-2003  marcus branches: 1.4.4;
mulaw/alaw timing bugfix from Izumi Tsutsui.
 1.3  24-Aug-2003  marcus LINEAR and LINEAR_LE need to be interchangeable (fixes 8bit unsigned bug).
 1.2  24-Aug-2003  marcus Added some encodings which were supported but not listed.
 1.1  24-Aug-2003  marcus Added AICA sound driver contributed by Ryo Shimizu.
 1.4.4.8  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.4.7  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.4.6  17-Jan-2005  skrll Sync with HEAD.
 1.4.4.5  02-Nov-2004  skrll Sync with HEAD.
 1.4.4.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.4.3  18-Sep-2004  skrll Sync with HEAD.
 1.4.4.2  03-Aug-2004  skrll Sync with HEAD
 1.4.4.1  25-Aug-2003  skrll file aica.c was added on branch ktrace-lwp on 2004-08-03 10:33:53 +0000
 1.5.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.5.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.9.2.4  21-Jan-2008  yamt sync with head
 1.9.2.3  03-Sep-2007  yamt sync with head.
 1.9.2.2  26-Feb-2007  yamt sync with head.
 1.9.2.1  21-Jun-2006  yamt sync with head.
 1.11.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.11.10.1  11-May-2006  elad sync with head
 1.11.8.1  24-May-2006  yamt sync with head.
 1.11.6.1  01-Jun-2006  kardel Sync with head.
 1.11.4.1  09-Sep-2006  rpaulo sync with head
 1.12.14.2  24-Mar-2007  yamt sync with head.
 1.12.14.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.13.4.2  20-Aug-2007  ad Sync with HEAD.
 1.13.4.1  13-Mar-2007  ad Sync with head.
 1.14.8.1  03-Oct-2007  garbled Sync with HEAD
 1.15.10.2  09-Jan-2008  matt sync with HEAD
 1.15.10.1  06-Nov-2007  matt sync with HEAD
 1.16.8.1  08-Jan-2008  bouyer Sync with HEAD
 1.16.2.1  18-Feb-2008  mjf Sync with HEAD.
 1.17.16.1  19-Oct-2008  haad Sync with HEAD.
 1.17.12.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.10.1  04-May-2009  yamt sync with head.
 1.17.6.1  28-Sep-2008  mjf Sync with HEAD.
 1.18.16.1  05-Mar-2011  rmind sync with head
 1.18.4.1  21-Dec-2010  riz Pull up following revision(s) (requested by tsutsui in ticket #1497):
sys/arch/dreamcast/dev/g2/aica.c: revision 1.19
Make aica_round_blocksize() always return a fixed buffer size.
I'm not sure if this is correct, but audio playback doesn't work
on dreamcast without this workaround. (since kent-audio1 merge?)
 1.21.4.2  22-Nov-2011  jmcneill get rid of unused 'powerstate' callback in audio_hw_if
 1.21.4.1  20-Nov-2011  jmcneill adapt to audiomp api changes
 1.21.2.1  17-Apr-2012  yamt sync with head
 1.22.42.1  26-Jul-2017  martin Pull up following revision(s) (requested by nat in ticket #160):
sys/arch/dreamcast/conf/G1IDE: revision 1.2
sys/arch/dreamcast/conf/GENERIC: revision 1.126
sys/arch/dreamcast/dev/g2/aica.c: revision 1.23
Dreamcast audio only supports playback so set it in the props.
This makes dreamcast audio work again.
Tested by Bjorn Johannesson.
cvs: ----------------------------------------------------------------------
Use the correct attachment for dreamcast audio.
Found and tested by Bjorn Johannesson on port-dreamcast.
 1.22.26.1  28-Aug-2017  skrll Sync with HEAD
 1.22.8.1  03-Dec-2017  jdolecek update from HEAD
 1.24.4.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.24.4.1  10-Jun-2019  christos Sync with HEAD
 1.25.2.3  04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.25.2.2  03-May-2019  isaki Adapt to audio2.
- audio2 limits the lowest frequency.
- Remove unused sc_encodings.
- In audio2, round_buffersize(RECORD) will not be called if the
driver does not support recording.
 1.25.2.1  21-Apr-2019  isaki Use C99 style struct initializer to audio_format.
 1.27.4.1  29-Feb-2020  ad Sync with head.
 1.28.6.1  03-Apr-2021  thorpej Sync with HEAD.

RSS XML Feed