Add aica firmware source
PATCH 1/1 Add aica firmware source
This provides a separately-buildable copy of the aica firmware source.
The documentation in alsa-firmware indicates aica_firmware.bin was built with code from
http://linuxdc.cvs.sourceforge.net/linuxdc/linux-sh-dc/sound/oss/aica/firmware/
While it's still possible to obtain the firmware source code from there using rsync the linuxdc project has been defunct for a number of years and it seems a good idea to get a copy of the source code stashed away somewhere else just in case.
I don't know that we should necessarily expect people to have a cross compiler installed on their system and so this patch doesn't change any of the existing Makefiles so as to leave the default behavior as-is, but anyone interested in rebuilding aica_firmware.bin would at least have the option to do so.
aica/src/COPYING new file +25 -0
@@ -0,0 +1,25 @@ +(c)2000 Dan Potter + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of Cryptic Allusion nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE.
aica/src/INSTALL new file +7 -0
@@ -0,0 +1,7 @@ +To build this you will need the following on the host system: + + * GNU Make + * GNU C cross-compiler for ARM: + - arm-none-eabi-gcc + - arm-none-eabi-objcopy + - arm-none-eabi-as
aica/src/aica.c new file +220 -0
220 lines not on this page · raw message
aica/src/aica.h new file +25 -0
@@ -0,0 +1,25 @@ +/* $Id: aica.h,v 1.3 2002/10/29 15:43:51 mrbrown Exp $ */ + +#ifndef __AICA_H +#define __AICA_H + +/* volatile unsigned char *dc_snd_base = (unsigned char *)0x00800000; */ +#define dc_snd_base ((volatile unsigned char *)0x00800000) + +/* Some convienence macros */ +#define SNDREG32A (x) ((volatile unsigned long *)(dc_snd_base + (x))) +#define SNDREG32 (x) (*SNDREG32A(x)) +#define SNDREG8A (x) (dc_snd_base + (x)) +#define SNDREG8 (x) (*SNDREG8A(x)) +#define CHNREG32A (chn, x) SNDREG32A(0x80*(chn) + (x)) +#define CHNREG32 (chn, x) (*CHNREG32A(chn, x)) +#define CHNREG8A (chn, x) SNDREG8A(0x80*(chn) + (x)) +#define CHNREG8 (chn, x) (*CHNREG8A(chn, x)) + +/* Sound modes */ +#define SM_8BIT 1 +#define SM_16BIT 0 +#define SM_ADPCM 2 + +#endif /* __AICA_H */ +
aica/src/aica_cmd_iface.h new file +29 -0
@@ -0,0 +1,29 @@ +/* $Id: aica_cmd_iface.h,v 1.2 2002/10/29 15:45:10 mrbrown Exp $ */ + +#ifndef __ARM_AICA_CMD_IFACE_H +#define __ARM_AICA_CMD_IFACE_H + +#ifndef __ARCH_TYPES_H +typedef unsigned long uint32 ; +#endif + +/* Make this 8 dwords long for one aica bus queue */ +typedef struct { +uint32 cmd;/* Command ID */ +uint32 pos;/* Sample position */ +uint32 length;/* Sample length */ +uint32 freq;/* Frequency */ +uint32 vol;/* Volume 0-255 */ +uint32 pan;/* Pan 0-255 */ +uint32 sfmt;/* Sound format */ +uint32 flags;/* flags */ +}aica_channel ; + +/* Command values */ +#define AICA_CMD_KICK 0x80000000 +#define AICA_CMD_NONE 0 +#define AICA_CMD_START 1 +#define AICA_CMD_STOP 2 +#define AICA_CMD_VOL 3 + +#endif /* __ARM_AICA_CMD_IFACE_H */
aica/src/crt0.s new file +104 -0
104 lines not on this page · raw message
aica/src/main.c new file +123 -0
123 lines not on this page · raw message
Signature · 1 line
2.7.4