[PATCH] The scheduled removal of some OSS drivers

This patch contains the scheduled removal of OSS drivers that:
- have ALSA drivers for the same hardware without known regressions and
- whose Kconfig options have been removed in 2.6.17.

[michal.k.k.piotrowski@gmail.com: build fix]
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Цей коміт міститься в:
Adrian Bunk
2006-10-04 02:17:22 -07:00
зафіксовано Linus Torvalds
джерело 595182bcdf
коміт d56b9b9c46
81 змінених файлів з 6 додано та 62072 видалено

Переглянути файл

@@ -15,71 +15,42 @@ obj-$(CONFIG_SOUND_HAL2) += hal2.o
obj-$(CONFIG_SOUND_AEDSP16) += aedsp16.o
obj-$(CONFIG_SOUND_PSS) += pss.o ad1848.o mpu401.o
obj-$(CONFIG_SOUND_TRIX) += trix.o ad1848.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_OPL3SA1) += opl3sa.o ad1848.o uart401.o
obj-$(CONFIG_SOUND_SSCAPE) += sscape.o ad1848.o mpu401.o
obj-$(CONFIG_SOUND_MAD16) += mad16.o ad1848.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_CS4232) += cs4232.o uart401.o
obj-$(CONFIG_SOUND_MSS) += ad1848.o
obj-$(CONFIG_SOUND_OPL3SA2) += opl3sa2.o ad1848.o mpu401.o
obj-$(CONFIG_SOUND_PAS) += pas2.o sb.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_SB) += sb.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_KAHLUA) += kahlua.o
obj-$(CONFIG_SOUND_WAVEFRONT) += wavefront.o
obj-$(CONFIG_SOUND_MAUI) += maui.o mpu401.o
obj-$(CONFIG_SOUND_MPU401) += mpu401.o
obj-$(CONFIG_SOUND_UART6850) += uart6850.o
obj-$(CONFIG_SOUND_GUS) += gus.o ad1848.o
obj-$(CONFIG_SOUND_ADLIB) += adlib_card.o opl3.o
obj-$(CONFIG_SOUND_YM3812) += opl3.o
obj-$(CONFIG_SOUND_VMIDI) += v_midi.o
obj-$(CONFIG_SOUND_VIDC) += vidc_mod.o
obj-$(CONFIG_SOUND_WAVEARTIST) += waveartist.o
obj-$(CONFIG_SOUND_SGALAXY) += sgalaxy.o ad1848.o
obj-$(CONFIG_SOUND_AD1816) += ad1816.o
obj-$(CONFIG_SOUND_AD1889) += ad1889.o ac97_codec.o
obj-$(CONFIG_SOUND_ACI_MIXER) += aci.o
obj-$(CONFIG_SOUND_AWE32_SYNTH) += awe_wave.o
obj-$(CONFIG_SOUND_VIA82CXXX) += via82cxxx_audio.o ac97_codec.o
ifeq ($(CONFIG_MIDI_VIA82CXXX),y)
obj-$(CONFIG_SOUND_VIA82CXXX) += sound.o uart401.o
endif
obj-$(CONFIG_SOUND_YMFPCI) += ymfpci.o ac97_codec.o
ifeq ($(CONFIG_SOUND_YMFPCI_LEGACY),y)
obj-$(CONFIG_SOUND_YMFPCI) += opl3.o uart401.o
endif
obj-$(CONFIG_SOUND_MSNDCLAS) += msnd.o msnd_classic.o
obj-$(CONFIG_SOUND_MSNDPIN) += msnd.o msnd_pinnacle.o
obj-$(CONFIG_SOUND_VWSND) += vwsnd.o
obj-$(CONFIG_SOUND_NM256) += nm256_audio.o ac97.o
obj-$(CONFIG_SOUND_ICH) += i810_audio.o ac97_codec.o
obj-$(CONFIG_SOUND_SONICVIBES) += sonicvibes.o
obj-$(CONFIG_SOUND_CMPCI) += cmpci.o
ifeq ($(CONFIG_SOUND_CMPCI_FM),y)
obj-$(CONFIG_SOUND_CMPCI) += sound.o opl3.o
endif
ifeq ($(CONFIG_SOUND_CMPCI_MIDI),y)
obj-$(CONFIG_SOUND_CMPCI) += sound.o mpu401.o
endif
obj-$(CONFIG_SOUND_ES1370) += es1370.o
obj-$(CONFIG_SOUND_ES1371) += es1371.o ac97_codec.o
obj-$(CONFIG_SOUND_VRC5477) += nec_vrc5477.o ac97_codec.o
obj-$(CONFIG_SOUND_AU1000) += au1000.o ac97_codec.o
obj-$(CONFIG_SOUND_AU1550_AC97) += au1550_ac97.o ac97_codec.o
obj-$(CONFIG_SOUND_ESSSOLO1) += esssolo1.o
obj-$(CONFIG_SOUND_FUSION) += cs46xx.o ac97_codec.o
obj-$(CONFIG_SOUND_MAESTRO) += maestro.o
obj-$(CONFIG_SOUND_MAESTRO3) += maestro3.o ac97_codec.o
obj-$(CONFIG_SOUND_TRIDENT) += trident.o ac97_codec.o
obj-$(CONFIG_SOUND_HARMONY) += harmony.o
obj-$(CONFIG_SOUND_EMU10K1) += ac97_codec.o
obj-$(CONFIG_SOUND_BCM_CS4297A) += swarm_cs4297a.o
obj-$(CONFIG_SOUND_RME96XX) += rme96xx.o
obj-$(CONFIG_SOUND_BT878) += btaudio.o
obj-$(CONFIG_SOUND_ALI5455) += ali5455.o ac97_codec.o
obj-$(CONFIG_SOUND_FORTE) += forte.o ac97_codec.o
obj-$(CONFIG_SOUND_AD1980) += ac97_plugin_ad1980.o ac97_codec.o
obj-$(CONFIG_SOUND_WM97XX) += ac97_plugin_wm97xx.o
ifeq ($(CONFIG_MIDI_EMU10K1),y)
@@ -87,7 +58,6 @@ ifeq ($(CONFIG_MIDI_EMU10K1),y)
endif
obj-$(CONFIG_SOUND_EMU10K1) += emu10k1/
obj-$(CONFIG_SOUND_CS4281) += cs4281/
obj-$(CONFIG_DMASOUND) += dmasound/
# Declare multi-part drivers.
@@ -98,17 +68,15 @@ sound-objs := \
midi_syms.o midi_synth.o midibuf.o \
sequencer.o sequencer_syms.o sound_timer.o sys_timer.o
gus-objs := gus_card.o gus_midi.o gus_vol.o gus_wave.o ics2101.o
pas2-objs := pas2_card.o pas2_midi.o pas2_mixer.o pas2_pcm.o
sb-objs := sb_card.o
sb_lib-objs := sb_common.o sb_audio.o sb_midi.o sb_mixer.o sb_ess.o
vidc_mod-objs := vidc.o vidc_fill.o
wavefront-objs := wavfront.o wf_midi.o yss225.o
hostprogs-y := bin2hex hex2hex
# Files generated that shall be removed upon make clean
clean-files := maui_boot.h msndperm.c msndinit.c pndsperm.c pndspini.c \
clean-files := msndperm.c msndinit.c pndsperm.c pndspini.c \
pss_boot.h trix_boot.h
# Firmware files that need translation
@@ -118,21 +86,6 @@ clean-files := maui_boot.h msndperm.c msndinit.c pndsperm.c pndspini.c \
# will be forced to be remade.
#
# Turtle Beach Maui / Tropez
$(obj)/maui.o: $(obj)/maui_boot.h
ifeq ($(CONFIG_MAUI_HAVE_BOOT),y)
$(obj)/maui_boot.h: $(patsubst "%", %, $(CONFIG_MAUI_BOOT_FILE)) $(obj)/bin2hex
$(obj)/bin2hex -i maui_os < $< > $@
else
$(obj)/maui_boot.h:
( \
echo 'static unsigned char * maui_os = NULL;'; \
echo 'static int maui_osLen = 0;'; \
) > $@
endif
# Turtle Beach MultiSound
ifeq ($(CONFIG_MSNDCLAS_HAVE_BOOT),y)

Переглянути файл

@@ -112,25 +112,6 @@ ac97_init (struct ac97_hwint *dev)
return 0;
}
/* Reset the mixer to the currently saved settings. */
int
ac97_reset (struct ac97_hwint *dev)
{
int x;
if (dev->reset_device (dev))
return -1;
/* Now set the registers back to their last-written values. */
for (x = 0; mixerRegs[x].ac97_regnum != -1; x++) {
int regnum = mixerRegs[x].ac97_regnum;
int value = dev->last_written_mixer_values [regnum / 2];
if (value >= 0)
ac97_put_register (dev, regnum, value);
}
return 0;
}
/* Return the contents of register REG; use the cache if the value in it
is valid. Returns a negative error code on failure. */
static int
@@ -441,7 +422,6 @@ EXPORT_SYMBOL(ac97_init);
EXPORT_SYMBOL(ac97_set_values);
EXPORT_SYMBOL(ac97_put_register);
EXPORT_SYMBOL(ac97_mixer_ioctl);
EXPORT_SYMBOL(ac97_reset);
MODULE_LICENSE("GPL");

Переглянути файл

@@ -192,9 +192,6 @@ extern int ac97_put_register (struct ac97_hwint *dev, u8 reg, u16 value);
extern int ac97_mixer_ioctl (struct ac97_hwint *dev, unsigned int cmd,
void __user * arg);
/* Do a complete reset on the AC97 mixer, restoring all mixer registers to
the current values. Normally used after an APM resume event. */
extern int ac97_reset (struct ac97_hwint *dev);
#endif
/*

Переглянути файл

@@ -1399,95 +1399,6 @@ unsigned int ac97_set_adc_rate(struct ac97_codec *codec, unsigned int rate)
EXPORT_SYMBOL(ac97_set_adc_rate);
int ac97_save_state(struct ac97_codec *codec)
{
return 0;
}
EXPORT_SYMBOL(ac97_save_state);
int ac97_restore_state(struct ac97_codec *codec)
{
int i;
unsigned int left, right, val;
for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
if (!supported_mixer(codec, i))
continue;
val = codec->mixer_state[i];
right = val >> 8;
left = val & 0xff;
codec->write_mixer(codec, i, left, right);
}
return 0;
}
EXPORT_SYMBOL(ac97_restore_state);
/**
* ac97_register_driver - register a codec helper
* @driver: Driver handler
*
* Register a handler for codecs matching the codec id. The handler
* attach function is called for all present codecs and will be
* called when new codecs are discovered.
*/
int ac97_register_driver(struct ac97_driver *driver)
{
struct list_head *l;
struct ac97_codec *c;
mutex_lock(&codec_mutex);
INIT_LIST_HEAD(&driver->list);
list_add(&driver->list, &codec_drivers);
list_for_each(l, &codecs)
{
c = list_entry(l, struct ac97_codec, list);
if(c->driver != NULL || ((c->model ^ driver->codec_id) & driver->codec_mask))
continue;
if(driver->probe(c, driver))
continue;
c->driver = driver;
}
mutex_unlock(&codec_mutex);
return 0;
}
EXPORT_SYMBOL_GPL(ac97_register_driver);
/**
* ac97_unregister_driver - unregister a codec helper
* @driver: Driver handler
*
* Unregister a handler for codecs matching the codec id. The handler
* remove function is called for all matching codecs.
*/
void ac97_unregister_driver(struct ac97_driver *driver)
{
struct list_head *l;
struct ac97_codec *c;
mutex_lock(&codec_mutex);
list_del_init(&driver->list);
list_for_each(l, &codecs)
{
c = list_entry(l, struct ac97_codec, list);
if (c->driver == driver) {
driver->remove(c, driver);
c->driver = NULL;
}
}
mutex_unlock(&codec_mutex);
}
EXPORT_SYMBOL_GPL(ac97_unregister_driver);
static int swap_headphone(int remove_master)
{
struct list_head *l;

Переглянути файл

@@ -1,126 +0,0 @@
/*
ac97_plugin_ad1980.c Copyright (C) 2003 Red Hat, Inc. All rights reserved.
The contents of this file are subject to the Open Software License version 1.1
that can be found at http://www.opensource.org/licenses/osl-1.1.txt and is
included herein by reference.
Alternatively, the contents of this file may be used under the
terms of the GNU General Public License version 2 (the "GPL") as
distributed in the kernel source COPYING file, in which
case the provisions of the GPL are applicable instead of the
above. If you wish to allow the use of your version of this file
only under the terms of the GPL and not to allow others to use
your version of this file under the OSL, indicate your decision
by deleting the provisions above and replace them with the notice
and other provisions required by the GPL. If you do not delete
the provisions above, a recipient may use your version of this
file under either the OSL or the GPL.
Authors: Alan Cox <alan@redhat.com>
This is an example codec plugin. This one switches the connections
around to match the setups some vendors use with audio switched to
non standard front connectors not the normal rear ones
This code primarily exists to demonstrate how to use the codec
interface
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/ac97_codec.h>
/**
* ad1980_remove - codec remove callback
* @codec: The codec that is being removed
*
* This callback occurs when an AC97 codec is being removed. A
* codec remove call will not occur for a codec during that codec
* probe callback.
*
* Most drivers will need to lock their remove versus their
* use of the codec after the probe function.
*/
static void __devexit ad1980_remove(struct ac97_codec *codec, struct ac97_driver *driver)
{
/* Nothing to do in the simple example */
}
/**
* ad1980_probe - codec found callback
* @codec: ac97 codec matching the idents
* @driver: ac97_driver it matched
*
* This entry point is called when a codec is found which matches
* the driver. At the point it is called the codec is basically
* operational, mixer operations have been initialised and can
* be overriden. Called in process context. The field driver_private
* is available for the driver to use to store stuff.
*
* The caller can claim the device by returning zero, or return
* a negative error code.
*/
static int ad1980_probe(struct ac97_codec *codec, struct ac97_driver *driver)
{
u16 control;
#define AC97_AD_MISC 0x76
/* Switch the inputs/outputs over (from Dell code) */
control = codec->codec_read(codec, AC97_AD_MISC);
codec->codec_write(codec, AC97_AD_MISC, control | 0x4420);
/* We could refuse the device since we dont need to hang around,
but we will claim it */
return 0;
}
static struct ac97_driver ad1980_driver = {
.codec_id = 0x41445370,
.codec_mask = 0xFFFFFFFF,
.name = "AD1980 example",
.probe = ad1980_probe,
.remove = __devexit_p(ad1980_remove),
};
/**
* ad1980_exit - module exit path
*
* Our module is being unloaded. At this point unregister_driver
* will call back our remove handler for any existing codecs. You
* may not unregister_driver from interrupt context or from a
* probe/remove callback.
*/
static void ad1980_exit(void)
{
ac97_unregister_driver(&ad1980_driver);
}
/**
* ad1980_init - set up ad1980 handlers
*
* After we call the register function it will call our probe
* function for each existing matching device before returning to us.
* Any devices appearing afterwards whose id's match the codec_id
* will also cause the probe function to be called.
* You may not register_driver from interrupt context or from a
* probe/remove callback.
*/
static int ad1980_init(void)
{
return ac97_register_driver(&ad1980_driver);
}
module_init(ad1980_init);
module_exit(ad1980_exit);
MODULE_LICENSE("GPL");

Переглянути файл

@@ -195,6 +195,7 @@ static void ad1848_halt(int dev);
static void ad1848_halt_input(int dev);
static void ad1848_halt_output(int dev);
static void ad1848_trigger(int dev, int bits);
static irqreturn_t adintr(int irq, void *dev_id, struct pt_regs *dummy);
#ifndef EXCLUDE_TIMERS
static int ad1848_tmr_install(int dev);
@@ -2195,7 +2196,7 @@ void ad1848_unload(int io_base, int irq, int dma_playback, int dma_capture, int
printk(KERN_ERR "ad1848: Can't find device to be unloaded. Base=%x\n", io_base);
}
irqreturn_t adintr(int irq, void *dev_id, struct pt_regs *dummy)
static irqreturn_t adintr(int irq, void *dev_id, struct pt_regs *dummy)
{
unsigned char status;
ad1848_info *devc;
@@ -2802,7 +2803,6 @@ EXPORT_SYMBOL(ad1848_detect);
EXPORT_SYMBOL(ad1848_init);
EXPORT_SYMBOL(ad1848_unload);
EXPORT_SYMBOL(ad1848_control);
EXPORT_SYMBOL(adintr);
EXPORT_SYMBOL(probe_ms_sound);
EXPORT_SYMBOL(attach_ms_sound);
EXPORT_SYMBOL(unload_ms_sound);

Переглянути файл

@@ -18,7 +18,6 @@ void ad1848_unload (int io_base, int irq, int dma_playback, int dma_capture, int
int ad1848_detect (struct resource *ports, int *flags, int *osp);
int ad1848_control(int cmd, int arg);
irqreturn_t adintr(int irq, void *dev_id, struct pt_regs * dummy);
void attach_ms_sound(struct address_info * hw_config, struct resource *ports, struct module * owner);
int probe_ms_sound(struct address_info *hw_config, struct resource *ports);

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -10,7 +10,5 @@ char audio_syms_symbol;
#include "sound_calls.h"
EXPORT_SYMBOL(DMAbuf_start_dma);
EXPORT_SYMBOL(DMAbuf_open_dma);
EXPORT_SYMBOL(DMAbuf_close_dma);
EXPORT_SYMBOL(DMAbuf_inputintr);
EXPORT_SYMBOL(DMAbuf_outputintr);

Переглянути файл

@@ -1,99 +0,0 @@
/*
* sound/oss/awe_hw.h
*
* Access routines and definitions for the low level driver for the
* Creative AWE32/SB32/AWE64 wave table synth.
* version 0.4.4; Jan. 4, 2000
*
* Copyright (C) 1996-2000 Takashi Iwai
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef AWE_HW_H_DEF
#define AWE_HW_H_DEF
/*
* Emu-8000 control registers
* name(channel) reg, port
*/
#define awe_cmd_idx(reg,ch) (((reg)<< 5) | (ch))
#define Data0 0 /* 0x620: doubleword r/w */
#define Data1 1 /* 0xA20: doubleword r/w */
#define Data2 2 /* 0xA22: word r/w */
#define Data3 3 /* 0xE20: word r/w */
#define Pointer 4 /* 0xE22 register pointer r/w */
#define AWE_CPF(ch) awe_cmd_idx(0,ch), Data0 /* DW: current pitch and fractional address */
#define AWE_PTRX(ch) awe_cmd_idx(1,ch), Data0 /* DW: pitch target and reverb send */
#define AWE_CVCF(ch) awe_cmd_idx(2,ch), Data0 /* DW: current volume and filter cutoff */
#define AWE_VTFT(ch) awe_cmd_idx(3,ch), Data0 /* DW: volume and filter cutoff targets */
#define AWE_0080(ch) awe_cmd_idx(4,ch), Data0 /* DW: ?? */
#define AWE_00A0(ch) awe_cmd_idx(5,ch), Data0 /* DW: ?? */
#define AWE_PSST(ch) awe_cmd_idx(6,ch), Data0 /* DW: pan send and loop start address */
#define AWE_CSL(ch) awe_cmd_idx(7,ch), Data0 /* DW: chorus send and loop end address */
#define AWE_CCCA(ch) awe_cmd_idx(0,ch), Data1 /* DW: Q, control bits, and current address */
#define AWE_HWCF4 awe_cmd_idx(1,9), Data1 /* DW: config dw 4 */
#define AWE_HWCF5 awe_cmd_idx(1,10), Data1 /* DW: config dw 5 */
#define AWE_HWCF6 awe_cmd_idx(1,13), Data1 /* DW: config dw 6 */
#define AWE_HWCF7 awe_cmd_idx(1,14), Data1 /* DW: config dw 7? (not documented) */
#define AWE_SMALR awe_cmd_idx(1,20), Data1 /* DW: sound memory address for left read */
#define AWE_SMARR awe_cmd_idx(1,21), Data1 /* DW: for right read */
#define AWE_SMALW awe_cmd_idx(1,22), Data1 /* DW: sound memory address for left write */
#define AWE_SMARW awe_cmd_idx(1,23), Data1 /* DW: for right write */
#define AWE_SMLD awe_cmd_idx(1,26), Data1 /* W: sound memory left data */
#define AWE_SMRD awe_cmd_idx(1,26), Data2 /* W: right data */
#define AWE_WC awe_cmd_idx(1,27), Data2 /* W: sample counter */
#define AWE_WC_Cmd awe_cmd_idx(1,27)
#define AWE_WC_Port Data2
#define AWE_HWCF1 awe_cmd_idx(1,29), Data1 /* W: config w 1 */
#define AWE_HWCF2 awe_cmd_idx(1,30), Data1 /* W: config w 2 */
#define AWE_HWCF3 awe_cmd_idx(1,31), Data1 /* W: config w 3 */
#define AWE_INIT1(ch) awe_cmd_idx(2,ch), Data1 /* W: init array 1 */
#define AWE_INIT2(ch) awe_cmd_idx(2,ch), Data2 /* W: init array 2 */
#define AWE_INIT3(ch) awe_cmd_idx(3,ch), Data1 /* W: init array 3 */
#define AWE_INIT4(ch) awe_cmd_idx(3,ch), Data2 /* W: init array 4 */
#define AWE_ENVVOL(ch) awe_cmd_idx(4,ch), Data1 /* W: volume envelope delay */
#define AWE_DCYSUSV(ch) awe_cmd_idx(5,ch), Data1 /* W: volume envelope sustain and decay */
#define AWE_ENVVAL(ch) awe_cmd_idx(6,ch), Data1 /* W: modulation envelope delay */
#define AWE_DCYSUS(ch) awe_cmd_idx(7,ch), Data1 /* W: modulation envelope sustain and decay */
#define AWE_ATKHLDV(ch) awe_cmd_idx(4,ch), Data2 /* W: volume envelope attack and hold */
#define AWE_LFO1VAL(ch) awe_cmd_idx(5,ch), Data2 /* W: LFO#1 Delay */
#define AWE_ATKHLD(ch) awe_cmd_idx(6,ch), Data2 /* W: modulation envelope attack and hold */
#define AWE_LFO2VAL(ch) awe_cmd_idx(7,ch), Data2 /* W: LFO#2 Delay */
#define AWE_IP(ch) awe_cmd_idx(0,ch), Data3 /* W: initial pitch */
#define AWE_IFATN(ch) awe_cmd_idx(1,ch), Data3 /* W: initial filter cutoff and attenuation */
#define AWE_PEFE(ch) awe_cmd_idx(2,ch), Data3 /* W: pitch and filter envelope heights */
#define AWE_FMMOD(ch) awe_cmd_idx(3,ch), Data3 /* W: vibrato and filter modulation freq */
#define AWE_TREMFRQ(ch) awe_cmd_idx(4,ch), Data3 /* W: LFO#1 tremolo amount and freq */
#define AWE_FM2FRQ2(ch) awe_cmd_idx(5,ch), Data3 /* W: LFO#2 vibrato amount and freq */
/* used during detection (returns ROM version?; not documented in ADIP) */
#define AWE_U1 0xE0, Data3 /* (R)(W) used in initialization */
#define AWE_U2(ch) 0xC0+(ch), Data3 /* (W)(W) used in init envelope */
#define AWE_MAX_VOICES 32
#define AWE_NORMAL_VOICES 30 /*30&31 are reserved for DRAM refresh*/
#define AWE_MAX_CHANNELS 32 /* max midi channels (must >= voices) */
#define AWE_MAX_LAYERS AWE_MAX_VOICES /* maximum number of multiple layers */
#define AWE_DRAM_OFFSET 0x200000
#define AWE_MAX_DRAM_SIZE (28 * 1024) /* 28 MB is max onboard memory */
#endif

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,77 +0,0 @@
/*
* sound/oss/awe_wave.h
*
* Configuration of AWE32/SB32/AWE64 wave table synth driver.
* version 0.4.4; Jan. 4, 2000
*
* Copyright (C) 1996-1998 Takashi Iwai
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* chorus & reverb effects send for FM chip: from 0 to 0xff
* larger numbers often cause weird sounds.
*/
#define DEF_FM_CHORUS_DEPTH 0x10
#define DEF_FM_REVERB_DEPTH 0x10
/*
* other compile conditions
*/
/* initialize FM passthrough even without extended RAM */
#undef AWE_ALWAYS_INIT_FM
/* debug on */
#define AWE_DEBUG_ON
/* GUS compatible mode */
#define AWE_HAS_GUS_COMPATIBILITY
/* add MIDI emulation by wavetable */
#define CONFIG_AWE32_MIDIEMU
/* add mixer control of emu8000 equalizer */
#undef CONFIG_AWE32_MIXER
/* use new volume calculation method as default */
#define AWE_USE_NEW_VOLUME_CALC
/* check current volume target for searching empty voices */
#define AWE_CHECK_VTARGET
/* allow sample sharing */
#define AWE_ALLOW_SAMPLE_SHARING
/*
* AWE32 card configuration:
* uncomment the following lines *ONLY* when auto detection doesn't
* work properly on your machine.
*/
/*#define AWE_DEFAULT_BASE_ADDR 0x620*/ /* base port address */
/*#define AWE_DEFAULT_MEM_SIZE 512*/ /* kbytes */
/*
* AWE driver version number
*/
#define AWE_MAJOR_VERSION 0
#define AWE_MINOR_VERSION 4
#define AWE_TINY_VERSION 4
#define AWE_VERSION_NUMBER ((AWE_MAJOR_VERSION<<16)|(AWE_MINOR_VERSION<<8)|AWE_TINY_VERSION)
#define AWEDRV_VERSION "0.4.4"

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,6 +0,0 @@
# Makefile for Cirrus Logic-Crystal CS4281
#
obj-$(CONFIG_SOUND_CS4281) += cs4281.o
cs4281-objs += cs4281m.o

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,41 +0,0 @@
/*******************************************************************************
*
* "cs4281_wrapper.c" -- Cirrus Logic-Crystal CS4281 linux audio driver.
*
* Copyright (C) 2000,2001 Cirrus Logic Corp.
* -- tom woller (twoller@crystal.cirrus.com) or
* (audio@crystal.cirrus.com).
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* 12/20/00 trw - new file.
*
*******************************************************************************/
#include <linux/spinlock.h>
static int cs4281_resume_null(struct pci_dev *pcidev) { return 0; }
static int cs4281_suspend_null(struct pci_dev *pcidev, pm_message_t state) { return 0; }
#define free_dmabuf(state, dmabuf) \
pci_free_consistent(state->pcidev, \
PAGE_SIZE << (dmabuf)->buforder, \
(dmabuf)->rawbuf, (dmabuf)->dmaaddr);
#define free_dmabuf2(state, dmabuf) \
pci_free_consistent((state)->pcidev, \
PAGE_SIZE << (state)->buforder_tmpbuff, \
(state)->tmpbuff, (state)->dmaaddr_tmpbuff);
#define cs4x_pgoff(vma) ((vma)->vm_pgoff)

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,45 +0,0 @@
/*******************************************************************************
*
* "cs4281pm.c" -- Cirrus Logic-Crystal CS4281 linux audio driver.
*
* Copyright (C) 2000,2001 Cirrus Logic Corp.
* -- tom woller (twoller@crystal.cirrus.com) or
* (audio@crystal.cirrus.com).
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* 12/22/00 trw - new file.
*
*******************************************************************************/
#ifndef NOT_CS4281_PM
#include <linux/pm.h>
static int cs4281_suspend(struct cs4281_state *s);
static int cs4281_resume(struct cs4281_state *s);
/*
* for now (12/22/00) only enable the pm_register PM support.
* allow these table entries to be null.
#define CS4281_SUSPEND_TBL cs4281_suspend_tbl
#define CS4281_RESUME_TBL cs4281_resume_tbl
*/
#define CS4281_SUSPEND_TBL cs4281_suspend_null
#define CS4281_RESUME_TBL cs4281_resume_null
#else /* CS4281_PM */
#define CS4281_SUSPEND_TBL cs4281_suspend_null
#define CS4281_RESUME_TBL cs4281_resume_null
#endif /* CS4281_PM */

Переглянути файл

@@ -1,74 +0,0 @@
#ifndef NOT_CS4281_PM
/*******************************************************************************
*
* "cs4281pm.h" -- Cirrus Logic-Crystal CS4281 linux audio driver.
*
* Copyright (C) 2000,2001 Cirrus Logic Corp.
* -- tom woller (twoller@crystal.cirrus.com) or
* (audio@crystal.cirrus.com).
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* 12/22/00 trw - new file.
*
*******************************************************************************/
/* general pm definitions */
#define CS4281_AC97_HIGHESTREGTORESTORE 0x26
#define CS4281_AC97_NUMBER_RESTORE_REGS (CS4281_AC97_HIGHESTREGTORESTORE/2-1)
/* pipeline definitions */
#define CS4281_NUMBER_OF_PIPELINES 4
#define CS4281_PIPELINE_VALID 0x0001
#define CS4281_PLAYBACK_PIPELINE_NUMBER 0x0000
#define CS4281_CAPTURE_PIPELINE_NUMBER 0x0001
/* PM state defintions */
#define CS4281_PM_NOT_REGISTERED 0x1000
#define CS4281_PM_IDLE 0x0001
#define CS4281_PM_SUSPENDING 0x0002
#define CS4281_PM_SUSPENDED 0x0004
#define CS4281_PM_RESUMING 0x0008
#define CS4281_PM_RESUMED 0x0010
struct cs4281_pm {
unsigned long flags;
u32 u32CLKCR1_SAVE,u32SSPMValue,u32PPLVCvalue,u32PPRVCvalue;
u32 u32FMLVCvalue,u32FMRVCvalue,u32GPIORvalue,u32JSCTLvalue,u32SSCR;
u32 u32SRCSA,u32DacASR,u32AdcASR,u32DacSR,u32AdcSR,u32MIDCR_Save;
u32 u32SSPM_BITS;
u32 ac97[CS4281_AC97_NUMBER_RESTORE_REGS];
u32 u32AC97_master_volume, u32AC97_headphone_volume, u32AC97_master_volume_mono;
u32 u32AC97_pcm_out_volume, u32AC97_powerdown, u32AC97_general_purpose;
u32 u32hwptr_playback,u32hwptr_capture;
};
struct cs4281_pipeline {
unsigned flags;
unsigned number;
u32 u32DBAnValue,u32DBCnValue,u32DMRnValue,u32DCRnValue;
u32 u32DBAnAddress,u32DCAnAddress,u32DBCnAddress,u32DCCnAddress;
u32 u32DMRnAddress,u32DCRnAddress,u32HDSRnAddress;
u32 u32DBAn_Save,u32DBCn_Save,u32DMRn_Save,u32DCRn_Save;
u32 u32DCCn_Save,u32DCAn_Save;
/*
* technically, these are fifo variables, but just map the
* first fifo with the first pipeline and then use the fifo
* variables inside of the pipeline struct.
*/
u32 u32FCRn_Save,u32FSICn_Save;
u32 u32FCRnValue,u32FCRnAddress,u32FSICnValue,u32FSICnAddress;
u32 u32FPDRnValue,u32FPDRnAddress;
};
#endif

Переглянути файл

@@ -1,79 +0,0 @@
#ifndef _DRIVERS_SOUND_DM_H
#define _DRIVERS_SOUND_DM_H
/*
* Definitions of the 'direct midi sound' interface used
* by the newer commercial OSS package. We should export
* this to userland somewhere in glibc later.
*/
/*
* Data structure composing an FM "note" or sound event.
*/
struct dm_fm_voice
{
u8 op;
u8 voice;
u8 am;
u8 vibrato;
u8 do_sustain;
u8 kbd_scale;
u8 harmonic;
u8 scale_level;
u8 volume;
u8 attack;
u8 decay;
u8 sustain;
u8 release;
u8 feedback;
u8 connection;
u8 left;
u8 right;
u8 waveform;
};
/*
* This describes an FM note by its voice, octave, frequency number (10bit)
* and key on/off.
*/
struct dm_fm_note
{
u8 voice;
u8 octave;
u32 fnum;
u8 key_on;
};
/*
* FM parameters that apply globally to all voices, and thus are not "notes"
*/
struct dm_fm_params
{
u8 am_depth;
u8 vib_depth;
u8 kbd_split;
u8 rhythm;
/* This block is the percussion instrument data */
u8 bass;
u8 snare;
u8 tomtom;
u8 cymbal;
u8 hihat;
};
/*
* FM mode ioctl settings
*/
#define FM_IOCTL_RESET 0x20
#define FM_IOCTL_PLAY_NOTE 0x21
#define FM_IOCTL_SET_VOICE 0x22
#define FM_IOCTL_SET_PARAMS 0x23
#define FM_IOCTL_SET_MODE 0x24
#define FM_IOCTL_SET_OPL 0x25
#endif

Переглянути файл

@@ -1155,36 +1155,6 @@ void DMAbuf_inputintr(int dev)
spin_unlock_irqrestore(&dmap->lock,flags);
}
int DMAbuf_open_dma(int dev)
{
/*
* NOTE! This routine opens only the primary DMA channel (output).
*/
struct audio_operations *adev = audio_devs[dev];
int err;
if ((err = open_dmap(adev, OPEN_READWRITE, adev->dmap_out)) < 0)
return -EBUSY;
dma_init_buffers(adev->dmap_out);
adev->dmap_out->flags |= DMA_ALLOC_DONE;
adev->dmap_out->fragment_size = adev->dmap_out->buffsize;
if (adev->dmap_out->dma >= 0) {
unsigned long flags;
flags=claim_dma_lock();
clear_dma_ff(adev->dmap_out->dma);
disable_dma(adev->dmap_out->dma);
release_dma_lock(flags);
}
return 0;
}
void DMAbuf_close_dma(int dev)
{
close_dmap(audio_devs[dev], audio_devs[dev]->dmap_out);
}
void DMAbuf_init(int dev, int dma1, int dma2)
{
struct audio_operations *adev = audio_devs[dev];

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,24 +0,0 @@
#include "ad1848.h"
/* From gus_card.c */
int gus_set_midi_irq(int num);
irqreturn_t gusintr(int irq, void *dev_id, struct pt_regs * dummy);
/* From gus_wave.c */
int gus_wave_detect(int baseaddr);
void gus_wave_init(struct address_info *hw_config);
void gus_wave_unload (struct address_info *hw_config);
void gus_voice_irq(void);
void gus_write8(int reg, unsigned int data);
void guswave_dma_irq(void);
void gus_delay(void);
int gus_default_mixer_ioctl (int dev, unsigned int cmd, void __user *arg);
void gus_timer_command (unsigned int addr, unsigned int val);
/* From gus_midi.c */
void gus_midi_init(struct address_info *hw_config);
void gus_midi_interrupt(int dummy);
/* From ics2101.c */
int ics2101_mixer_init(void);

Переглянути файл

@@ -1,293 +0,0 @@
/*
* sound/oss/gus_card.c
*
* Detection routine for the Gravis Ultrasound.
*
* Copyright (C) by Hannu Savolainen 1993-1997
*
*
* Frank van de Pol : Fixed GUS MAX interrupt handling, enabled simultanious
* usage of CS4231A codec, GUS wave and MIDI for GUS MAX.
* Christoph Hellwig: Adapted to module_init/module_exit, simple cleanups.
*
* Status:
* Tested...
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include "sound_config.h"
#include "gus.h"
#include "gus_hw.h"
irqreturn_t gusintr(int irq, void *dev_id, struct pt_regs *dummy);
int gus_base = 0, gus_irq = 0, gus_dma = 0;
int gus_no_wave_dma = 0;
extern int gus_wave_volume;
extern int gus_pcm_volume;
extern int have_gus_max;
int gus_pnp_flag = 0;
#ifdef CONFIG_SOUND_GUS16
static int db16; /* Has a Gus16 AD1848 on it */
#endif
static void __init attach_gus(struct address_info *hw_config)
{
gus_wave_init(hw_config);
if (sound_alloc_dma(hw_config->dma, "GUS"))
printk(KERN_ERR "gus_card.c: Can't allocate DMA channel %d\n", hw_config->dma);
if (hw_config->dma2 != -1 && hw_config->dma2 != hw_config->dma)
if (sound_alloc_dma(hw_config->dma2, "GUS(2)"))
printk(KERN_ERR "gus_card.c: Can't allocate DMA channel %d\n", hw_config->dma2);
gus_midi_init(hw_config);
if(request_irq(hw_config->irq, gusintr, 0, "Gravis Ultrasound", hw_config)<0)
printk(KERN_ERR "gus_card.c: Unable to allocate IRQ %d\n", hw_config->irq);
return;
}
static int __init probe_gus(struct address_info *hw_config)
{
int irq;
int io_addr;
if (hw_config->card_subtype == 1)
gus_pnp_flag = 1;
irq = hw_config->irq;
if (hw_config->card_subtype == 0) /* GUS/MAX/ACE */
if (irq != 3 && irq != 5 && irq != 7 && irq != 9 &&
irq != 11 && irq != 12 && irq != 15)
{
printk(KERN_ERR "GUS: Unsupported IRQ %d\n", irq);
return 0;
}
if (gus_wave_detect(hw_config->io_base))
return 1;
#ifndef EXCLUDE_GUS_IODETECT
/*
* Look at the possible base addresses (0x2X0, X=1, 2, 3, 4, 5, 6)
*/
for (io_addr = 0x210; io_addr <= 0x260; io_addr += 0x10) {
if (io_addr == hw_config->io_base) /* Already tested */
continue;
if (gus_wave_detect(io_addr)) {
hw_config->io_base = io_addr;
return 1;
}
}
#endif
printk("NO GUS card found !\n");
return 0;
}
static void __exit unload_gus(struct address_info *hw_config)
{
DDB(printk("unload_gus(%x)\n", hw_config->io_base));
gus_wave_unload(hw_config);
release_region(hw_config->io_base, 16);
release_region(hw_config->io_base + 0x100, 12); /* 0x10c-> is MAX */
free_irq(hw_config->irq, hw_config);
sound_free_dma(hw_config->dma);
if (hw_config->dma2 != -1 && hw_config->dma2 != hw_config->dma)
sound_free_dma(hw_config->dma2);
}
irqreturn_t gusintr(int irq, void *dev_id, struct pt_regs *dummy)
{
unsigned char src;
extern int gus_timer_enabled;
int handled = 0;
#ifdef CONFIG_SOUND_GUSMAX
if (have_gus_max) {
struct address_info *hw_config = dev_id;
adintr(irq, (void *)hw_config->slots[1], NULL);
}
#endif
#ifdef CONFIG_SOUND_GUS16
if (db16) {
struct address_info *hw_config = dev_id;
adintr(irq, (void *)hw_config->slots[3], NULL);
}
#endif
while (1)
{
if (!(src = inb(u_IrqStatus)))
break;
handled = 1;
if (src & DMA_TC_IRQ)
{
guswave_dma_irq();
}
if (src & (MIDI_TX_IRQ | MIDI_RX_IRQ))
{
gus_midi_interrupt(0);
}
if (src & (GF1_TIMER1_IRQ | GF1_TIMER2_IRQ))
{
if (gus_timer_enabled)
sound_timer_interrupt();
gus_write8(0x45, 0); /* Ack IRQ */
gus_timer_command(4, 0x80); /* Reset IRQ flags */
}
if (src & (WAVETABLE_IRQ | ENVELOPE_IRQ))
gus_voice_irq();
}
return IRQ_RETVAL(handled);
}
/*
* Some extra code for the 16 bit sampling option
*/
#ifdef CONFIG_SOUND_GUS16
static int __init init_gus_db16(struct address_info *hw_config)
{
struct resource *ports;
ports = request_region(hw_config->io_base, 4, "ad1848");
if (!ports)
return 0;
if (!ad1848_detect(ports, NULL, hw_config->osp)) {
release_region(hw_config->io_base, 4);
return 0;
}
gus_pcm_volume = 100;
gus_wave_volume = 90;
hw_config->slots[3] = ad1848_init("GUS 16 bit sampling", ports,
hw_config->irq,
hw_config->dma,
hw_config->dma, 0,
hw_config->osp,
THIS_MODULE);
return 1;
}
static void __exit unload_gus_db16(struct address_info *hw_config)
{
ad1848_unload(hw_config->io_base,
hw_config->irq,
hw_config->dma,
hw_config->dma, 0);
sound_unload_audiodev(hw_config->slots[3]);
}
#endif
#ifdef CONFIG_SOUND_GUS16
static int gus16;
#endif
#ifdef CONFIG_SOUND_GUSMAX
static int no_wave_dma; /* Set if no dma is to be used for the
wave table (GF1 chip) */
#endif
/*
* Note DMA2 of -1 has the right meaning in the GUS driver as well
* as here.
*/
static struct address_info cfg;
static int __initdata io = -1;
static int __initdata irq = -1;
static int __initdata dma = -1;
static int __initdata dma16 = -1; /* Set this for modules that need it */
static int __initdata type = 0; /* 1 for PnP */
module_param(io, int, 0);
module_param(irq, int, 0);
module_param(dma, int, 0);
module_param(dma16, int, 0);
module_param(type, int, 0);
#ifdef CONFIG_SOUND_GUSMAX
module_param(no_wave_dma, int, 0);
#endif
#ifdef CONFIG_SOUND_GUS16
module_param(db16, int, 0);
module_param(gus16, int, 0);
#endif
MODULE_LICENSE("GPL");
static int __init init_gus(void)
{
printk(KERN_INFO "Gravis Ultrasound audio driver Copyright (C) by Hannu Savolainen 1993-1996\n");
cfg.io_base = io;
cfg.irq = irq;
cfg.dma = dma;
cfg.dma2 = dma16;
cfg.card_subtype = type;
#ifdef CONFIG_SOUND_GUSMAX
gus_no_wave_dma = no_wave_dma;
#endif
if (cfg.io_base == -1 || cfg.dma == -1 || cfg.irq == -1) {
printk(KERN_ERR "I/O, IRQ, and DMA are mandatory\n");
return -EINVAL;
}
#ifdef CONFIG_SOUND_GUS16
if (gus16 && init_gus_db16(&cfg))
db16 = 1;
#endif
if (!probe_gus(&cfg))
return -ENODEV;
attach_gus(&cfg);
return 0;
}
static void __exit cleanup_gus(void)
{
#ifdef CONFIG_SOUND_GUS16
if (db16)
unload_gus_db16(&cfg);
#endif
unload_gus(&cfg);
}
module_init(init_gus);
module_exit(cleanup_gus);
#ifndef MODULE
static int __init setup_gus(char *str)
{
/* io, irq, dma, dma2 */
int ints[5];
str = get_options(str, ARRAY_SIZE(ints), ints);
io = ints[1];
irq = ints[2];
dma = ints[3];
dma16 = ints[4];
return 1;
}
__setup("gus=", setup_gus);
#endif

Переглянути файл

@@ -1,50 +0,0 @@
/*
* I/O addresses
*/
#define u_Base (gus_base + 0x000)
#define u_Mixer u_Base
#define u_Status (gus_base + 0x006)
#define u_TimerControl (gus_base + 0x008)
#define u_TimerData (gus_base + 0x009)
#define u_IRQDMAControl (gus_base + 0x00b)
#define u_MidiControl (gus_base + 0x100)
#define MIDI_RESET 0x03
#define MIDI_ENABLE_XMIT 0x20
#define MIDI_ENABLE_RCV 0x80
#define u_MidiStatus u_MidiControl
#define MIDI_RCV_FULL 0x01
#define MIDI_XMIT_EMPTY 0x02
#define MIDI_FRAME_ERR 0x10
#define MIDI_OVERRUN 0x20
#define MIDI_IRQ_PEND 0x80
#define u_MidiData (gus_base + 0x101)
#define u_Voice (gus_base + 0x102)
#define u_Command (gus_base + 0x103)
#define u_DataLo (gus_base + 0x104)
#define u_DataHi (gus_base + 0x105)
#define u_MixData (gus_base + 0x106) /* Rev. 3.7+ mixing */
#define u_MixSelect (gus_base + 0x506) /* registers. */
#define u_IrqStatus u_Status
# define MIDI_TX_IRQ 0x01 /* pending MIDI xmit IRQ */
# define MIDI_RX_IRQ 0x02 /* pending MIDI recv IRQ */
# define GF1_TIMER1_IRQ 0x04 /* general purpose timer */
# define GF1_TIMER2_IRQ 0x08 /* general purpose timer */
# define WAVETABLE_IRQ 0x20 /* pending wavetable IRQ */
# define ENVELOPE_IRQ 0x40 /* pending volume envelope IRQ */
# define DMA_TC_IRQ 0x80 /* pending dma tc IRQ */
#define ICS2101 1
# define ICS_MIXDEVS 6
# define DEV_MIC 0
# define DEV_LINE 1
# define DEV_CD 2
# define DEV_GF1 3
# define DEV_UNUSED 4
# define DEV_VOL 5
# define CHN_LEFT 0
# define CHN_RIGHT 1
#define CS4231 2
#define u_DRAMIO (gus_base + 0x107)

Переглянути файл

@@ -1,18 +0,0 @@
static unsigned short gus_linearvol[128] = {
0x0000, 0x08ff, 0x09ff, 0x0a80, 0x0aff, 0x0b40, 0x0b80, 0x0bc0,
0x0bff, 0x0c20, 0x0c40, 0x0c60, 0x0c80, 0x0ca0, 0x0cc0, 0x0ce0,
0x0cff, 0x0d10, 0x0d20, 0x0d30, 0x0d40, 0x0d50, 0x0d60, 0x0d70,
0x0d80, 0x0d90, 0x0da0, 0x0db0, 0x0dc0, 0x0dd0, 0x0de0, 0x0df0,
0x0dff, 0x0e08, 0x0e10, 0x0e18, 0x0e20, 0x0e28, 0x0e30, 0x0e38,
0x0e40, 0x0e48, 0x0e50, 0x0e58, 0x0e60, 0x0e68, 0x0e70, 0x0e78,
0x0e80, 0x0e88, 0x0e90, 0x0e98, 0x0ea0, 0x0ea8, 0x0eb0, 0x0eb8,
0x0ec0, 0x0ec8, 0x0ed0, 0x0ed8, 0x0ee0, 0x0ee8, 0x0ef0, 0x0ef8,
0x0eff, 0x0f04, 0x0f08, 0x0f0c, 0x0f10, 0x0f14, 0x0f18, 0x0f1c,
0x0f20, 0x0f24, 0x0f28, 0x0f2c, 0x0f30, 0x0f34, 0x0f38, 0x0f3c,
0x0f40, 0x0f44, 0x0f48, 0x0f4c, 0x0f50, 0x0f54, 0x0f58, 0x0f5c,
0x0f60, 0x0f64, 0x0f68, 0x0f6c, 0x0f70, 0x0f74, 0x0f78, 0x0f7c,
0x0f80, 0x0f84, 0x0f88, 0x0f8c, 0x0f90, 0x0f94, 0x0f98, 0x0f9c,
0x0fa0, 0x0fa4, 0x0fa8, 0x0fac, 0x0fb0, 0x0fb4, 0x0fb8, 0x0fbc,
0x0fc0, 0x0fc4, 0x0fc8, 0x0fcc, 0x0fd0, 0x0fd4, 0x0fd8, 0x0fdc,
0x0fe0, 0x0fe4, 0x0fe8, 0x0fec, 0x0ff0, 0x0ff4, 0x0ff8, 0x0ffc
};

Переглянути файл

@@ -1,256 +0,0 @@
/*
* sound/oss/gus_midi.c
*
* The low level driver for the GUS Midi Interface.
*
*
* Copyright (C) by Hannu Savolainen 1993-1997
*
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
*
* Changes:
* 11-10-2000 Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
* Added __init to gus_midi_init()
*/
#include <linux/init.h>
#include <linux/spinlock.h>
#include "sound_config.h"
#include "gus.h"
#include "gus_hw.h"
static int midi_busy, input_opened;
static int my_dev;
static int output_used;
static volatile unsigned char gus_midi_control;
static void (*midi_input_intr) (int dev, unsigned char data);
static unsigned char tmp_queue[256];
extern int gus_pnp_flag;
static volatile int qlen;
static volatile unsigned char qhead, qtail;
extern int gus_base, gus_irq, gus_dma;
extern int *gus_osp;
extern spinlock_t gus_lock;
static int GUS_MIDI_STATUS(void)
{
return inb(u_MidiStatus);
}
static int gus_midi_open(int dev, int mode, void (*input) (int dev, unsigned char data), void (*output) (int dev))
{
if (midi_busy)
{
/* printk("GUS: Midi busy\n");*/
return -EBUSY;
}
outb((MIDI_RESET), u_MidiControl);
gus_delay();
gus_midi_control = 0;
input_opened = 0;
if (mode == OPEN_READ || mode == OPEN_READWRITE)
if (!gus_pnp_flag)
{
gus_midi_control |= MIDI_ENABLE_RCV;
input_opened = 1;
}
outb((gus_midi_control), u_MidiControl); /* Enable */
midi_busy = 1;
qlen = qhead = qtail = output_used = 0;
midi_input_intr = input;
return 0;
}
static int dump_to_midi(unsigned char midi_byte)
{
unsigned long flags;
int ok = 0;
output_used = 1;
spin_lock_irqsave(&gus_lock, flags);
if (GUS_MIDI_STATUS() & MIDI_XMIT_EMPTY)
{
ok = 1;
outb((midi_byte), u_MidiData);
}
else
{
/*
* Enable Midi xmit interrupts (again)
*/
gus_midi_control |= MIDI_ENABLE_XMIT;
outb((gus_midi_control), u_MidiControl);
}
spin_unlock_irqrestore(&gus_lock,flags);
return ok;
}
static void gus_midi_close(int dev)
{
/*
* Reset FIFO pointers, disable intrs
*/
outb((MIDI_RESET), u_MidiControl);
midi_busy = 0;
}
static int gus_midi_out(int dev, unsigned char midi_byte)
{
unsigned long flags;
/*
* Drain the local queue first
*/
spin_lock_irqsave(&gus_lock, flags);
while (qlen && dump_to_midi(tmp_queue[qhead]))
{
qlen--;
qhead++;
}
spin_unlock_irqrestore(&gus_lock,flags);
/*
* Output the byte if the local queue is empty.
*/
if (!qlen)
if (dump_to_midi(midi_byte))
return 1; /*
* OK
*/
/*
* Put to the local queue
*/
if (qlen >= 256)
return 0; /*
* Local queue full
*/
spin_lock_irqsave(&gus_lock, flags);
tmp_queue[qtail] = midi_byte;
qlen++;
qtail++;
spin_unlock_irqrestore(&gus_lock,flags);
return 1;
}
static int gus_midi_start_read(int dev)
{
return 0;
}
static int gus_midi_end_read(int dev)
{
return 0;
}
static void gus_midi_kick(int dev)
{
}
static int gus_midi_buffer_status(int dev)
{
unsigned long flags;
if (!output_used)
return 0;
spin_lock_irqsave(&gus_lock, flags);
if (qlen && dump_to_midi(tmp_queue[qhead]))
{
qlen--;
qhead++;
}
spin_unlock_irqrestore(&gus_lock,flags);
return (qlen > 0) || !(GUS_MIDI_STATUS() & MIDI_XMIT_EMPTY);
}
#define MIDI_SYNTH_NAME "Gravis Ultrasound Midi"
#define MIDI_SYNTH_CAPS SYNTH_CAP_INPUT
#include "midi_synth.h"
static struct midi_operations gus_midi_operations =
{
.owner = THIS_MODULE,
.info = {"Gravis UltraSound Midi", 0, 0, SNDCARD_GUS},
.converter = &std_midi_synth,
.in_info = {0},
.open = gus_midi_open,
.close = gus_midi_close,
.outputc = gus_midi_out,
.start_read = gus_midi_start_read,
.end_read = gus_midi_end_read,
.kick = gus_midi_kick,
.buffer_status = gus_midi_buffer_status,
};
void __init gus_midi_init(struct address_info *hw_config)
{
int dev = sound_alloc_mididev();
if (dev == -1)
{
printk(KERN_INFO "gus_midi: Too many midi devices detected\n");
return;
}
outb((MIDI_RESET), u_MidiControl);
std_midi_synth.midi_dev = my_dev = dev;
hw_config->slots[2] = dev;
midi_devs[dev] = &gus_midi_operations;
sequencer_init();
return;
}
void gus_midi_interrupt(int dummy)
{
volatile unsigned char stat, data;
int timeout = 10;
spin_lock(&gus_lock);
while (timeout-- > 0 && (stat = GUS_MIDI_STATUS()) & (MIDI_RCV_FULL | MIDI_XMIT_EMPTY))
{
if (stat & MIDI_RCV_FULL)
{
data = inb(u_MidiData);
if (input_opened)
midi_input_intr(my_dev, data);
}
if (stat & MIDI_XMIT_EMPTY)
{
while (qlen && dump_to_midi(tmp_queue[qhead]))
{
qlen--;
qhead++;
}
if (!qlen)
{
/*
* Disable Midi output interrupts, since no data in the buffer
*/
gus_midi_control &= ~MIDI_ENABLE_XMIT;
outb((gus_midi_control), u_MidiControl);
outb((gus_midi_control), u_MidiControl);
}
}
}
spin_unlock(&gus_lock);
}

Переглянути файл

@@ -1,153 +0,0 @@
/*
* gus_vol.c - Compute volume for GUS.
*
*
* Copyright (C) by Hannu Savolainen 1993-1997
*
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
*/
#include "sound_config.h"
#include "gus.h"
#include "gus_linearvol.h"
#define GUS_VOLUME gus_wave_volume
extern int gus_wave_volume;
/*
* Calculate gus volume from note velocity, main volume, expression, and
* intrinsic patch volume given in patch library. Expression is multiplied
* in, so it emphasizes differences in note velocity, while main volume is
* added in -- I don't know whether this is right, but it seems reasonable to
* me. (In the previous stage, main volume controller messages were changed
* to expression controller messages, if they were found to be used for
* dynamic volume adjustments, so here, main volume can be assumed to be
* constant throughout a song.)
*
* Intrinsic patch volume is added in, but if over 64 is also multiplied in, so
* we can give a big boost to very weak voices like nylon guitar and the
* basses. The normal value is 64. Strings are assigned lower values.
*/
unsigned short gus_adagio_vol(int vel, int mainv, int xpn, int voicev)
{
int i, m, n, x;
/*
* A voice volume of 64 is considered neutral, so adjust the main volume if
* something other than this neutral value was assigned in the patch
* library.
*/
x = 256 + 6 * (voicev - 64);
/*
* Boost expression by voice volume above neutral.
*/
if (voicev > 65)
xpn += voicev - 64;
xpn += (voicev - 64) / 2;
/*
* Combine multiplicative and level components.
*/
x = vel * xpn * 6 + (voicev / 4) * x;
#ifdef GUS_VOLUME
/*
* Further adjustment by installation-specific master volume control
* (default 60).
*/
x = (x * GUS_VOLUME * GUS_VOLUME) / 10000;
#endif
#ifdef GUS_USE_CHN_MAIN_VOLUME
/*
* Experimental support for the channel main volume
*/
mainv = (mainv / 2) + 64; /* Scale to 64 to 127 */
x = (x * mainv * mainv) / 16384;
#endif
if (x < 2)
return (0);
else if (x >= 65535)
return ((15 << 8) | 255);
/*
* Convert to GUS's logarithmic form with 4 bit exponent i and 8 bit
* mantissa m.
*/
n = x;
i = 7;
if (n < 128)
{
while (i > 0 && n < (1 << i))
i--;
}
else
{
while (n > 255)
{
n >>= 1;
i++;
}
}
/*
* Mantissa is part of linear volume not expressed in exponent. (This is
* not quite like real logs -- I wonder if it's right.)
*/
m = x - (1 << i);
/*
* Adjust mantissa to 8 bits.
*/
if (m > 0)
{
if (i > 8)
m >>= i - 8;
else if (i < 8)
m <<= 8 - i;
}
return ((i << 8) + m);
}
/*
* Volume-values are interpreted as linear values. Volume is based on the
* value supplied with SEQ_START_NOTE(), channel main volume (if compiled in)
* and the volume set by the mixer-device (default 60%).
*/
unsigned short gus_linear_vol(int vol, int mainvol)
{
int mixer_mainvol;
if (vol <= 0)
vol = 0;
else if (vol >= 127)
vol = 127;
#ifdef GUS_VOLUME
mixer_mainvol = GUS_VOLUME;
#else
mixer_mainvol = 100;
#endif
#ifdef GUS_USE_CHN_MAIN_VOLUME
if (mainvol <= 0)
mainvol = 0;
else if (mainvol >= 127)
mainvol = 127;
#else
mainvol = 127;
#endif
return gus_linearvol[(((vol * mainvol) / 127) * mixer_mainvol) / 100];
}

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,247 +0,0 @@
/*
* sound/oss/ics2101.c
*
* Driver for the ICS2101 mixer of GUS v3.7.
*
*
* Copyright (C) by Hannu Savolainen 1993-1997
*
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
*
*
* Thomas Sailer : ioctl code reworked (vmalloc/vfree removed)
* Bartlomiej Zolnierkiewicz : added __init to ics2101_mixer_init()
*/
#include <linux/init.h>
#include <linux/spinlock.h>
#include "sound_config.h"
#include <linux/ultrasound.h>
#include "gus.h"
#include "gus_hw.h"
#define MIX_DEVS (SOUND_MASK_MIC|SOUND_MASK_LINE| \
SOUND_MASK_SYNTH| \
SOUND_MASK_CD | SOUND_MASK_VOLUME)
extern int *gus_osp;
extern int gus_base;
extern spinlock_t gus_lock;
static int volumes[ICS_MIXDEVS];
static int left_fix[ICS_MIXDEVS] =
{1, 1, 1, 2, 1, 2};
static int right_fix[ICS_MIXDEVS] =
{2, 2, 2, 1, 2, 1};
static int scale_vol(int vol)
{
/*
* Experimental volume scaling by Risto Kankkunen.
* This should give smoother volume response than just
* a plain multiplication.
*/
int e;
if (vol < 0)
vol = 0;
if (vol > 100)
vol = 100;
vol = (31 * vol + 50) / 100;
e = 0;
if (vol)
{
while (vol < 16)
{
vol <<= 1;
e--;
}
vol -= 16;
e += 7;
}
return ((e << 4) + vol);
}
static void write_mix(int dev, int chn, int vol)
{
int *selector;
unsigned long flags;
int ctrl_addr = dev << 3;
int attn_addr = dev << 3;
vol = scale_vol(vol);
if (chn == CHN_LEFT)
{
selector = left_fix;
ctrl_addr |= 0x00;
attn_addr |= 0x02;
}
else
{
selector = right_fix;
ctrl_addr |= 0x01;
attn_addr |= 0x03;
}
spin_lock_irqsave(&gus_lock, flags);
outb((ctrl_addr), u_MixSelect);
outb((selector[dev]), u_MixData);
outb((attn_addr), u_MixSelect);
outb(((unsigned char) vol), u_MixData);
spin_unlock_irqrestore(&gus_lock,flags);
}
static int set_volumes(int dev, int vol)
{
int left = vol & 0x00ff;
int right = (vol >> 8) & 0x00ff;
if (left < 0)
left = 0;
if (left > 100)
left = 100;
if (right < 0)
right = 0;
if (right > 100)
right = 100;
write_mix(dev, CHN_LEFT, left);
write_mix(dev, CHN_RIGHT, right);
vol = left + (right << 8);
volumes[dev] = vol;
return vol;
}
static int ics2101_mixer_ioctl(int dev, unsigned int cmd, void __user *arg)
{
int val;
if (((cmd >> 8) & 0xff) == 'M') {
if (_SIOC_DIR(cmd) & _SIOC_WRITE) {
if (get_user(val, (int __user *)arg))
return -EFAULT;
switch (cmd & 0xff) {
case SOUND_MIXER_RECSRC:
return gus_default_mixer_ioctl(dev, cmd, arg);
case SOUND_MIXER_MIC:
val = set_volumes(DEV_MIC, val);
break;
case SOUND_MIXER_CD:
val = set_volumes(DEV_CD, val);
break;
case SOUND_MIXER_LINE:
val = set_volumes(DEV_LINE, val);
break;
case SOUND_MIXER_SYNTH:
val = set_volumes(DEV_GF1, val);
break;
case SOUND_MIXER_VOLUME:
val = set_volumes(DEV_VOL, val);
break;
default:
return -EINVAL;
}
return put_user(val, (int __user *)arg);
} else {
switch (cmd & 0xff) {
/*
* Return parameters
*/
case SOUND_MIXER_RECSRC:
return gus_default_mixer_ioctl(dev, cmd, arg);
case SOUND_MIXER_DEVMASK:
val = MIX_DEVS;
break;
case SOUND_MIXER_STEREODEVS:
val = SOUND_MASK_LINE | SOUND_MASK_CD | SOUND_MASK_SYNTH | SOUND_MASK_VOLUME | SOUND_MASK_MIC;
break;
case SOUND_MIXER_RECMASK:
val = SOUND_MASK_MIC | SOUND_MASK_LINE;
break;
case SOUND_MIXER_CAPS:
val = 0;
break;
case SOUND_MIXER_MIC:
val = volumes[DEV_MIC];
break;
case SOUND_MIXER_LINE:
val = volumes[DEV_LINE];
break;
case SOUND_MIXER_CD:
val = volumes[DEV_CD];
break;
case SOUND_MIXER_VOLUME:
val = volumes[DEV_VOL];
break;
case SOUND_MIXER_SYNTH:
val = volumes[DEV_GF1];
break;
default:
return -EINVAL;
}
return put_user(val, (int __user *)arg);
}
}
return -EINVAL;
}
static struct mixer_operations ics2101_mixer_operations =
{
.owner = THIS_MODULE,
.id = "ICS2101",
.name = "ICS2101 Multimedia Mixer",
.ioctl = ics2101_mixer_ioctl
};
int __init ics2101_mixer_init(void)
{
int i;
int n;
if ((n = sound_alloc_mixerdev()) != -1)
{
mixer_devs[n] = &ics2101_mixer_operations;
/*
* Some GUS v3.7 cards had some channels flipped. Disable
* the flipping feature if the model id is other than 5.
*/
if (inb(u_MixSelect) != 5)
{
for (i = 0; i < ICS_MIXDEVS; i++)
left_fix[i] = 1;
for (i = 0; i < ICS_MIXDEVS; i++)
right_fix[i] = 2;
}
set_volumes(DEV_GF1, 0x5a5a);
set_volumes(DEV_CD, 0x5a5a);
set_volumes(DEV_MIC, 0x0000);
set_volumes(DEV_LINE, 0x5a5a);
set_volumes(DEV_VOL, 0x5a5a);
set_volumes(DEV_UNUSED, 0x0000);
}
return n;
}

Переглянути файл

@@ -1,36 +0,0 @@
/*
* sound/oss/iwmem.h
*
* DRAM size encoding table for AMD Interwave chip.
*/
/*
* Copyright (C) by Hannu Savolainen 1993-1997
*
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
*
* Changes:
* Bartlomiej Zolnierkiewicz : added __initdata to mem_decode
*/
#define K 1024
#define M (1024*K)
static int mem_decode[][4] __initdata =
{
/* Bank0 Bank1 Bank2 Bank3 Encoding bits */
{256*K, 0, 0, 0}, /* 0 */
{256*K, 256*K, 0, 0}, /* 1 */
{256*K, 256*K, 256*K, 256*K}, /* 2 */
{256*K, 1*M, 0, 0}, /* 3 */
{256*K, 1*M, 1*M, 1*M}, /* 4 */
{256*K, 256*K, 1*M, 0}, /* 5 */
{256*K, 256*K, 1*M, 1*M}, /* 6 */
{1*M, 0, 0, 0}, /* 7 */
{1*M, 1*M, 0, 0}, /* 8 */
{1*M, 1*M, 1*M, 1*M}, /* 9 */
{4*M, 0, 0, 0}, /* 10 */
{4*M, 4*M, 0, 0}, /* 11 */
{4*M, 4*M, 4*M, 4*M} /* 12 */
};

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,60 +0,0 @@
/*
* Registers for the ESS PCI cards
*/
/*
* Memory access
*/
#define ESS_MEM_DATA 0x00
#define ESS_MEM_INDEX 0x02
/*
* AC-97 Codec port. Delay 1uS after each write. This is used to
* talk AC-97 (see intel.com). Write data then register.
*/
#define ESS_AC97_INDEX 0x30 /* byte wide */
#define ESS_AC97_DATA 0x32
/*
* Reading is a bit different. You write register|0x80 to ubdex
* delay 1uS poll the low bit of index, when it clears read the
* data value.
*/
/*
* Control port. Not yet fully understood
* The value 0xC090 gets loaded to it then 0x0000 and 0x2800
* to the data port. Then after 4uS the value 0x300 is written
*/
#define RING_BUS_CTRL_L 0x34
#define RING_BUS_CTRL_H 0x36
/*
* This is also used during setup. The value 0x17 is written to it
*/
#define ESS_SETUP_18 0x18
/*
* And this one gets 0x000b
*/
#define ESS_SETUP_A2 0xA2
/*
* And this 0x0000
*/
#define ESS_SETUP_A4 0xA4
#define ESS_SETUP_A6 0xA6
/*
* Stuff to do with Harpo - the wave stuff
*/
#define ESS_WAVETABLE_SIZE 0x14
#define ESS_WAVETABLE_2M 0xA180

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,821 +0,0 @@
/*
* ESS Technology allegro audio driver.
*
* Copyright (C) 1992-2000 Don Kim (don.kim@esstech.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Hacked for the maestro3 driver by zab
*/
// Allegro PCI configuration registers
#define PCI_LEGACY_AUDIO_CTRL 0x40
#define SOUND_BLASTER_ENABLE 0x00000001
#define FM_SYNTHESIS_ENABLE 0x00000002
#define GAME_PORT_ENABLE 0x00000004
#define MPU401_IO_ENABLE 0x00000008
#define MPU401_IRQ_ENABLE 0x00000010
#define ALIAS_10BIT_IO 0x00000020
#define SB_DMA_MASK 0x000000C0
#define SB_DMA_0 0x00000040
#define SB_DMA_1 0x00000040
#define SB_DMA_R 0x00000080
#define SB_DMA_3 0x000000C0
#define SB_IRQ_MASK 0x00000700
#define SB_IRQ_5 0x00000000
#define SB_IRQ_7 0x00000100
#define SB_IRQ_9 0x00000200
#define SB_IRQ_10 0x00000300
#define MIDI_IRQ_MASK 0x00003800
#define SERIAL_IRQ_ENABLE 0x00004000
#define DISABLE_LEGACY 0x00008000
#define PCI_ALLEGRO_CONFIG 0x50
#define SB_ADDR_240 0x00000004
#define MPU_ADDR_MASK 0x00000018
#define MPU_ADDR_330 0x00000000
#define MPU_ADDR_300 0x00000008
#define MPU_ADDR_320 0x00000010
#define MPU_ADDR_340 0x00000018
#define USE_PCI_TIMING 0x00000040
#define POSTED_WRITE_ENABLE 0x00000080
#define DMA_POLICY_MASK 0x00000700
#define DMA_DDMA 0x00000000
#define DMA_TDMA 0x00000100
#define DMA_PCPCI 0x00000200
#define DMA_WBDMA16 0x00000400
#define DMA_WBDMA4 0x00000500
#define DMA_WBDMA2 0x00000600
#define DMA_WBDMA1 0x00000700
#define DMA_SAFE_GUARD 0x00000800
#define HI_PERF_GP_ENABLE 0x00001000
#define PIC_SNOOP_MODE_0 0x00002000
#define PIC_SNOOP_MODE_1 0x00004000
#define SOUNDBLASTER_IRQ_MASK 0x00008000
#define RING_IN_ENABLE 0x00010000
#define SPDIF_TEST_MODE 0x00020000
#define CLK_MULT_MODE_SELECT_2 0x00040000
#define EEPROM_WRITE_ENABLE 0x00080000
#define CODEC_DIR_IN 0x00100000
#define HV_BUTTON_FROM_GD 0x00200000
#define REDUCED_DEBOUNCE 0x00400000
#define HV_CTRL_ENABLE 0x00800000
#define SPDIF_ENABLE 0x01000000
#define CLK_DIV_SELECT 0x06000000
#define CLK_DIV_BY_48 0x00000000
#define CLK_DIV_BY_49 0x02000000
#define CLK_DIV_BY_50 0x04000000
#define CLK_DIV_RESERVED 0x06000000
#define PM_CTRL_ENABLE 0x08000000
#define CLK_MULT_MODE_SELECT 0x30000000
#define CLK_MULT_MODE_SHIFT 28
#define CLK_MULT_MODE_0 0x00000000
#define CLK_MULT_MODE_1 0x10000000
#define CLK_MULT_MODE_2 0x20000000
#define CLK_MULT_MODE_3 0x30000000
#define INT_CLK_SELECT 0x40000000
#define INT_CLK_MULT_RESET 0x80000000
// M3
#define INT_CLK_SRC_NOT_PCI 0x00100000
#define INT_CLK_MULT_ENABLE 0x80000000
#define PCI_ACPI_CONTROL 0x54
#define PCI_ACPI_D0 0x00000000
#define PCI_ACPI_D1 0xB4F70000
#define PCI_ACPI_D2 0xB4F7B4F7
#define PCI_USER_CONFIG 0x58
#define EXT_PCI_MASTER_ENABLE 0x00000001
#define SPDIF_OUT_SELECT 0x00000002
#define TEST_PIN_DIR_CTRL 0x00000004
#define AC97_CODEC_TEST 0x00000020
#define TRI_STATE_BUFFER 0x00000080
#define IN_CLK_12MHZ_SELECT 0x00000100
#define MULTI_FUNC_DISABLE 0x00000200
#define EXT_MASTER_PAIR_SEL 0x00000400
#define PCI_MASTER_SUPPORT 0x00000800
#define STOP_CLOCK_ENABLE 0x00001000
#define EAPD_DRIVE_ENABLE 0x00002000
#define REQ_TRI_STATE_ENABLE 0x00004000
#define REQ_LOW_ENABLE 0x00008000
#define MIDI_1_ENABLE 0x00010000
#define MIDI_2_ENABLE 0x00020000
#define SB_AUDIO_SYNC 0x00040000
#define HV_CTRL_TEST 0x00100000
#define SOUNDBLASTER_TEST 0x00400000
#define PCI_USER_CONFIG_C 0x5C
#define PCI_DDMA_CTRL 0x60
#define DDMA_ENABLE 0x00000001
// Allegro registers
#define HOST_INT_CTRL 0x18
#define SB_INT_ENABLE 0x0001
#define MPU401_INT_ENABLE 0x0002
#define ASSP_INT_ENABLE 0x0010
#define RING_INT_ENABLE 0x0020
#define HV_INT_ENABLE 0x0040
#define CLKRUN_GEN_ENABLE 0x0100
#define HV_CTRL_TO_PME 0x0400
#define SOFTWARE_RESET_ENABLE 0x8000
/*
* should be using the above defines, probably.
*/
#define REGB_ENABLE_RESET 0x01
#define REGB_STOP_CLOCK 0x10
#define HOST_INT_STATUS 0x1A
#define SB_INT_PENDING 0x01
#define MPU401_INT_PENDING 0x02
#define ASSP_INT_PENDING 0x10
#define RING_INT_PENDING 0x20
#define HV_INT_PENDING 0x40
#define HARDWARE_VOL_CTRL 0x1B
#define SHADOW_MIX_REG_VOICE 0x1C
#define HW_VOL_COUNTER_VOICE 0x1D
#define SHADOW_MIX_REG_MASTER 0x1E
#define HW_VOL_COUNTER_MASTER 0x1F
#define CODEC_COMMAND 0x30
#define CODEC_READ_B 0x80
#define CODEC_STATUS 0x30
#define CODEC_BUSY_B 0x01
#define CODEC_DATA 0x32
#define RING_BUS_CTRL_A 0x36
#define RAC_PME_ENABLE 0x0100
#define RAC_SDFS_ENABLE 0x0200
#define LAC_PME_ENABLE 0x0400
#define LAC_SDFS_ENABLE 0x0800
#define SERIAL_AC_LINK_ENABLE 0x1000
#define IO_SRAM_ENABLE 0x2000
#define IIS_INPUT_ENABLE 0x8000
#define RING_BUS_CTRL_B 0x38
#define SECOND_CODEC_ID_MASK 0x0003
#define SPDIF_FUNC_ENABLE 0x0010
#define SECOND_AC_ENABLE 0x0020
#define SB_MODULE_INTF_ENABLE 0x0040
#define SSPE_ENABLE 0x0040
#define M3I_DOCK_ENABLE 0x0080
#define SDO_OUT_DEST_CTRL 0x3A
#define COMMAND_ADDR_OUT 0x0003
#define PCM_LR_OUT_LOCAL 0x0000
#define PCM_LR_OUT_REMOTE 0x0004
#define PCM_LR_OUT_MUTE 0x0008
#define PCM_LR_OUT_BOTH 0x000C
#define LINE1_DAC_OUT_LOCAL 0x0000
#define LINE1_DAC_OUT_REMOTE 0x0010
#define LINE1_DAC_OUT_MUTE 0x0020
#define LINE1_DAC_OUT_BOTH 0x0030
#define PCM_CLS_OUT_LOCAL 0x0000
#define PCM_CLS_OUT_REMOTE 0x0040
#define PCM_CLS_OUT_MUTE 0x0080
#define PCM_CLS_OUT_BOTH 0x00C0
#define PCM_RLF_OUT_LOCAL 0x0000
#define PCM_RLF_OUT_REMOTE 0x0100
#define PCM_RLF_OUT_MUTE 0x0200
#define PCM_RLF_OUT_BOTH 0x0300
#define LINE2_DAC_OUT_LOCAL 0x0000
#define LINE2_DAC_OUT_REMOTE 0x0400
#define LINE2_DAC_OUT_MUTE 0x0800
#define LINE2_DAC_OUT_BOTH 0x0C00
#define HANDSET_OUT_LOCAL 0x0000
#define HANDSET_OUT_REMOTE 0x1000
#define HANDSET_OUT_MUTE 0x2000
#define HANDSET_OUT_BOTH 0x3000
#define IO_CTRL_OUT_LOCAL 0x0000
#define IO_CTRL_OUT_REMOTE 0x4000
#define IO_CTRL_OUT_MUTE 0x8000
#define IO_CTRL_OUT_BOTH 0xC000
#define SDO_IN_DEST_CTRL 0x3C
#define STATUS_ADDR_IN 0x0003
#define PCM_LR_IN_LOCAL 0x0000
#define PCM_LR_IN_REMOTE 0x0004
#define PCM_LR_RESERVED 0x0008
#define PCM_LR_IN_BOTH 0x000C
#define LINE1_ADC_IN_LOCAL 0x0000
#define LINE1_ADC_IN_REMOTE 0x0010
#define LINE1_ADC_IN_MUTE 0x0020
#define MIC_ADC_IN_LOCAL 0x0000
#define MIC_ADC_IN_REMOTE 0x0040
#define MIC_ADC_IN_MUTE 0x0080
#define LINE2_DAC_IN_LOCAL 0x0000
#define LINE2_DAC_IN_REMOTE 0x0400
#define LINE2_DAC_IN_MUTE 0x0800
#define HANDSET_IN_LOCAL 0x0000
#define HANDSET_IN_REMOTE 0x1000
#define HANDSET_IN_MUTE 0x2000
#define IO_STATUS_IN_LOCAL 0x0000
#define IO_STATUS_IN_REMOTE 0x4000
#define SPDIF_IN_CTRL 0x3E
#define SPDIF_IN_ENABLE 0x0001
#define GPIO_DATA 0x60
#define GPIO_DATA_MASK 0x0FFF
#define GPIO_HV_STATUS 0x3000
#define GPIO_PME_STATUS 0x4000
#define GPIO_MASK 0x64
#define GPIO_DIRECTION 0x68
#define GPO_PRIMARY_AC97 0x0001
#define GPI_LINEOUT_SENSE 0x0004
#define GPO_SECONDARY_AC97 0x0008
#define GPI_VOL_DOWN 0x0010
#define GPI_VOL_UP 0x0020
#define GPI_IIS_CLK 0x0040
#define GPI_IIS_LRCLK 0x0080
#define GPI_IIS_DATA 0x0100
#define GPI_DOCKING_STATUS 0x0100
#define GPI_HEADPHONE_SENSE 0x0200
#define GPO_EXT_AMP_SHUTDOWN 0x1000
// M3
#define GPO_M3_EXT_AMP_SHUTDN 0x0002
#define ASSP_INDEX_PORT 0x80
#define ASSP_MEMORY_PORT 0x82
#define ASSP_DATA_PORT 0x84
#define MPU401_DATA_PORT 0x98
#define MPU401_STATUS_PORT 0x99
#define CLK_MULT_DATA_PORT 0x9C
#define ASSP_CONTROL_A 0xA2
#define ASSP_0_WS_ENABLE 0x01
#define ASSP_CTRL_A_RESERVED1 0x02
#define ASSP_CTRL_A_RESERVED2 0x04
#define ASSP_CLK_49MHZ_SELECT 0x08
#define FAST_PLU_ENABLE 0x10
#define ASSP_CTRL_A_RESERVED3 0x20
#define DSP_CLK_36MHZ_SELECT 0x40
#define ASSP_CONTROL_B 0xA4
#define RESET_ASSP 0x00
#define RUN_ASSP 0x01
#define ENABLE_ASSP_CLOCK 0x00
#define STOP_ASSP_CLOCK 0x10
#define RESET_TOGGLE 0x40
#define ASSP_CONTROL_C 0xA6
#define ASSP_HOST_INT_ENABLE 0x01
#define FM_ADDR_REMAP_DISABLE 0x02
#define HOST_WRITE_PORT_ENABLE 0x08
#define ASSP_HOST_INT_STATUS 0xAC
#define DSP2HOST_REQ_PIORECORD 0x01
#define DSP2HOST_REQ_I2SRATE 0x02
#define DSP2HOST_REQ_TIMER 0x04
// AC97 registers
// XXX fix this crap up
/*#define AC97_RESET 0x00*/
#define AC97_VOL_MUTE_B 0x8000
#define AC97_VOL_M 0x1F
#define AC97_LEFT_VOL_S 8
#define AC97_MASTER_VOL 0x02
#define AC97_LINE_LEVEL_VOL 0x04
#define AC97_MASTER_MONO_VOL 0x06
#define AC97_PC_BEEP_VOL 0x0A
#define AC97_PC_BEEP_VOL_M 0x0F
#define AC97_SROUND_MASTER_VOL 0x38
#define AC97_PC_BEEP_VOL_S 1
/*#define AC97_PHONE_VOL 0x0C
#define AC97_MIC_VOL 0x0E*/
#define AC97_MIC_20DB_ENABLE 0x40
/*#define AC97_LINEIN_VOL 0x10
#define AC97_CD_VOL 0x12
#define AC97_VIDEO_VOL 0x14
#define AC97_AUX_VOL 0x16*/
#define AC97_PCM_OUT_VOL 0x18
/*#define AC97_RECORD_SELECT 0x1A*/
#define AC97_RECORD_MIC 0x00
#define AC97_RECORD_CD 0x01
#define AC97_RECORD_VIDEO 0x02
#define AC97_RECORD_AUX 0x03
#define AC97_RECORD_MONO_MUX 0x02
#define AC97_RECORD_DIGITAL 0x03
#define AC97_RECORD_LINE 0x04
#define AC97_RECORD_STEREO 0x05
#define AC97_RECORD_MONO 0x06
#define AC97_RECORD_PHONE 0x07
/*#define AC97_RECORD_GAIN 0x1C*/
#define AC97_RECORD_VOL_M 0x0F
/*#define AC97_GENERAL_PURPOSE 0x20*/
#define AC97_POWER_DOWN_CTRL 0x26
#define AC97_ADC_READY 0x0001
#define AC97_DAC_READY 0x0002
#define AC97_ANALOG_READY 0x0004
#define AC97_VREF_ON 0x0008
#define AC97_PR0 0x0100
#define AC97_PR1 0x0200
#define AC97_PR2 0x0400
#define AC97_PR3 0x0800
#define AC97_PR4 0x1000
#define AC97_RESERVED1 0x28
#define AC97_VENDOR_TEST 0x5A
#define AC97_CLOCK_DELAY 0x5C
#define AC97_LINEOUT_MUX_SEL 0x0001
#define AC97_MONO_MUX_SEL 0x0002
#define AC97_CLOCK_DELAY_SEL 0x1F
#define AC97_DAC_CDS_SHIFT 6
#define AC97_ADC_CDS_SHIFT 11
#define AC97_MULTI_CHANNEL_SEL 0x74
/*#define AC97_VENDOR_ID1 0x7C
#define AC97_VENDOR_ID2 0x7E*/
/*
* ASSP control regs
*/
#define DSP_PORT_TIMER_COUNT 0x06
#define DSP_PORT_MEMORY_INDEX 0x80
#define DSP_PORT_MEMORY_TYPE 0x82
#define MEMTYPE_INTERNAL_CODE 0x0002
#define MEMTYPE_INTERNAL_DATA 0x0003
#define MEMTYPE_MASK 0x0003
#define DSP_PORT_MEMORY_DATA 0x84
#define DSP_PORT_CONTROL_REG_A 0xA2
#define DSP_PORT_CONTROL_REG_B 0xA4
#define DSP_PORT_CONTROL_REG_C 0xA6
#define REV_A_CODE_MEMORY_BEGIN 0x0000
#define REV_A_CODE_MEMORY_END 0x0FFF
#define REV_A_CODE_MEMORY_UNIT_LENGTH 0x0040
#define REV_A_CODE_MEMORY_LENGTH (REV_A_CODE_MEMORY_END - REV_A_CODE_MEMORY_BEGIN + 1)
#define REV_B_CODE_MEMORY_BEGIN 0x0000
#define REV_B_CODE_MEMORY_END 0x0BFF
#define REV_B_CODE_MEMORY_UNIT_LENGTH 0x0040
#define REV_B_CODE_MEMORY_LENGTH (REV_B_CODE_MEMORY_END - REV_B_CODE_MEMORY_BEGIN + 1)
#define REV_A_DATA_MEMORY_BEGIN 0x1000
#define REV_A_DATA_MEMORY_END 0x2FFF
#define REV_A_DATA_MEMORY_UNIT_LENGTH 0x0080
#define REV_A_DATA_MEMORY_LENGTH (REV_A_DATA_MEMORY_END - REV_A_DATA_MEMORY_BEGIN + 1)
#define REV_B_DATA_MEMORY_BEGIN 0x1000
#define REV_B_DATA_MEMORY_END 0x2BFF
#define REV_B_DATA_MEMORY_UNIT_LENGTH 0x0080
#define REV_B_DATA_MEMORY_LENGTH (REV_B_DATA_MEMORY_END - REV_B_DATA_MEMORY_BEGIN + 1)
#define NUM_UNITS_KERNEL_CODE 16
#define NUM_UNITS_KERNEL_DATA 2
#define NUM_UNITS_KERNEL_CODE_WITH_HSP 16
#define NUM_UNITS_KERNEL_DATA_WITH_HSP 5
/*
* Kernel data layout
*/
#define DP_SHIFT_COUNT 7
#define KDATA_BASE_ADDR 0x1000
#define KDATA_BASE_ADDR2 0x1080
#define KDATA_TASK0 (KDATA_BASE_ADDR + 0x0000)
#define KDATA_TASK1 (KDATA_BASE_ADDR + 0x0001)
#define KDATA_TASK2 (KDATA_BASE_ADDR + 0x0002)
#define KDATA_TASK3 (KDATA_BASE_ADDR + 0x0003)
#define KDATA_TASK4 (KDATA_BASE_ADDR + 0x0004)
#define KDATA_TASK5 (KDATA_BASE_ADDR + 0x0005)
#define KDATA_TASK6 (KDATA_BASE_ADDR + 0x0006)
#define KDATA_TASK7 (KDATA_BASE_ADDR + 0x0007)
#define KDATA_TASK_ENDMARK (KDATA_BASE_ADDR + 0x0008)
#define KDATA_CURRENT_TASK (KDATA_BASE_ADDR + 0x0009)
#define KDATA_TASK_SWITCH (KDATA_BASE_ADDR + 0x000A)
#define KDATA_INSTANCE0_POS3D (KDATA_BASE_ADDR + 0x000B)
#define KDATA_INSTANCE1_POS3D (KDATA_BASE_ADDR + 0x000C)
#define KDATA_INSTANCE2_POS3D (KDATA_BASE_ADDR + 0x000D)
#define KDATA_INSTANCE3_POS3D (KDATA_BASE_ADDR + 0x000E)
#define KDATA_INSTANCE4_POS3D (KDATA_BASE_ADDR + 0x000F)
#define KDATA_INSTANCE5_POS3D (KDATA_BASE_ADDR + 0x0010)
#define KDATA_INSTANCE6_POS3D (KDATA_BASE_ADDR + 0x0011)
#define KDATA_INSTANCE7_POS3D (KDATA_BASE_ADDR + 0x0012)
#define KDATA_INSTANCE8_POS3D (KDATA_BASE_ADDR + 0x0013)
#define KDATA_INSTANCE_POS3D_ENDMARK (KDATA_BASE_ADDR + 0x0014)
#define KDATA_INSTANCE0_SPKVIRT (KDATA_BASE_ADDR + 0x0015)
#define KDATA_INSTANCE_SPKVIRT_ENDMARK (KDATA_BASE_ADDR + 0x0016)
#define KDATA_INSTANCE0_SPDIF (KDATA_BASE_ADDR + 0x0017)
#define KDATA_INSTANCE_SPDIF_ENDMARK (KDATA_BASE_ADDR + 0x0018)
#define KDATA_INSTANCE0_MODEM (KDATA_BASE_ADDR + 0x0019)
#define KDATA_INSTANCE_MODEM_ENDMARK (KDATA_BASE_ADDR + 0x001A)
#define KDATA_INSTANCE0_SRC (KDATA_BASE_ADDR + 0x001B)
#define KDATA_INSTANCE1_SRC (KDATA_BASE_ADDR + 0x001C)
#define KDATA_INSTANCE_SRC_ENDMARK (KDATA_BASE_ADDR + 0x001D)
#define KDATA_INSTANCE0_MINISRC (KDATA_BASE_ADDR + 0x001E)
#define KDATA_INSTANCE1_MINISRC (KDATA_BASE_ADDR + 0x001F)
#define KDATA_INSTANCE2_MINISRC (KDATA_BASE_ADDR + 0x0020)
#define KDATA_INSTANCE3_MINISRC (KDATA_BASE_ADDR + 0x0021)
#define KDATA_INSTANCE_MINISRC_ENDMARK (KDATA_BASE_ADDR + 0x0022)
#define KDATA_INSTANCE0_CPYTHRU (KDATA_BASE_ADDR + 0x0023)
#define KDATA_INSTANCE1_CPYTHRU (KDATA_BASE_ADDR + 0x0024)
#define KDATA_INSTANCE_CPYTHRU_ENDMARK (KDATA_BASE_ADDR + 0x0025)
#define KDATA_CURRENT_DMA (KDATA_BASE_ADDR + 0x0026)
#define KDATA_DMA_SWITCH (KDATA_BASE_ADDR + 0x0027)
#define KDATA_DMA_ACTIVE (KDATA_BASE_ADDR + 0x0028)
#define KDATA_DMA_XFER0 (KDATA_BASE_ADDR + 0x0029)
#define KDATA_DMA_XFER1 (KDATA_BASE_ADDR + 0x002A)
#define KDATA_DMA_XFER2 (KDATA_BASE_ADDR + 0x002B)
#define KDATA_DMA_XFER3 (KDATA_BASE_ADDR + 0x002C)
#define KDATA_DMA_XFER4 (KDATA_BASE_ADDR + 0x002D)
#define KDATA_DMA_XFER5 (KDATA_BASE_ADDR + 0x002E)
#define KDATA_DMA_XFER6 (KDATA_BASE_ADDR + 0x002F)
#define KDATA_DMA_XFER7 (KDATA_BASE_ADDR + 0x0030)
#define KDATA_DMA_XFER8 (KDATA_BASE_ADDR + 0x0031)
#define KDATA_DMA_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0032)
#define KDATA_I2S_SAMPLE_COUNT (KDATA_BASE_ADDR + 0x0033)
#define KDATA_I2S_INT_METER (KDATA_BASE_ADDR + 0x0034)
#define KDATA_I2S_ACTIVE (KDATA_BASE_ADDR + 0x0035)
#define KDATA_TIMER_COUNT_RELOAD (KDATA_BASE_ADDR + 0x0036)
#define KDATA_TIMER_COUNT_CURRENT (KDATA_BASE_ADDR + 0x0037)
#define KDATA_HALT_SYNCH_CLIENT (KDATA_BASE_ADDR + 0x0038)
#define KDATA_HALT_SYNCH_DMA (KDATA_BASE_ADDR + 0x0039)
#define KDATA_HALT_ACKNOWLEDGE (KDATA_BASE_ADDR + 0x003A)
#define KDATA_ADC1_XFER0 (KDATA_BASE_ADDR + 0x003B)
#define KDATA_ADC1_XFER_ENDMARK (KDATA_BASE_ADDR + 0x003C)
#define KDATA_ADC1_LEFT_VOLUME (KDATA_BASE_ADDR + 0x003D)
#define KDATA_ADC1_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x003E)
#define KDATA_ADC1_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x003F)
#define KDATA_ADC1_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x0040)
#define KDATA_ADC2_XFER0 (KDATA_BASE_ADDR + 0x0041)
#define KDATA_ADC2_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0042)
#define KDATA_ADC2_LEFT_VOLUME (KDATA_BASE_ADDR + 0x0043)
#define KDATA_ADC2_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x0044)
#define KDATA_ADC2_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x0045)
#define KDATA_ADC2_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x0046)
#define KDATA_CD_XFER0 (KDATA_BASE_ADDR + 0x0047)
#define KDATA_CD_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0048)
#define KDATA_CD_LEFT_VOLUME (KDATA_BASE_ADDR + 0x0049)
#define KDATA_CD_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x004A)
#define KDATA_CD_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x004B)
#define KDATA_CD_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x004C)
#define KDATA_MIC_XFER0 (KDATA_BASE_ADDR + 0x004D)
#define KDATA_MIC_XFER_ENDMARK (KDATA_BASE_ADDR + 0x004E)
#define KDATA_MIC_VOLUME (KDATA_BASE_ADDR + 0x004F)
#define KDATA_MIC_SUR_VOL (KDATA_BASE_ADDR + 0x0050)
#define KDATA_I2S_XFER0 (KDATA_BASE_ADDR + 0x0051)
#define KDATA_I2S_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0052)
#define KDATA_CHI_XFER0 (KDATA_BASE_ADDR + 0x0053)
#define KDATA_CHI_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0054)
#define KDATA_SPDIF_XFER (KDATA_BASE_ADDR + 0x0055)
#define KDATA_SPDIF_CURRENT_FRAME (KDATA_BASE_ADDR + 0x0056)
#define KDATA_SPDIF_FRAME0 (KDATA_BASE_ADDR + 0x0057)
#define KDATA_SPDIF_FRAME1 (KDATA_BASE_ADDR + 0x0058)
#define KDATA_SPDIF_FRAME2 (KDATA_BASE_ADDR + 0x0059)
#define KDATA_SPDIF_REQUEST (KDATA_BASE_ADDR + 0x005A)
#define KDATA_SPDIF_TEMP (KDATA_BASE_ADDR + 0x005B)
#define KDATA_SPDIFIN_XFER0 (KDATA_BASE_ADDR + 0x005C)
#define KDATA_SPDIFIN_XFER_ENDMARK (KDATA_BASE_ADDR + 0x005D)
#define KDATA_SPDIFIN_INT_METER (KDATA_BASE_ADDR + 0x005E)
#define KDATA_DSP_RESET_COUNT (KDATA_BASE_ADDR + 0x005F)
#define KDATA_DEBUG_OUTPUT (KDATA_BASE_ADDR + 0x0060)
#define KDATA_KERNEL_ISR_LIST (KDATA_BASE_ADDR + 0x0061)
#define KDATA_KERNEL_ISR_CBSR1 (KDATA_BASE_ADDR + 0x0062)
#define KDATA_KERNEL_ISR_CBER1 (KDATA_BASE_ADDR + 0x0063)
#define KDATA_KERNEL_ISR_CBCR (KDATA_BASE_ADDR + 0x0064)
#define KDATA_KERNEL_ISR_AR0 (KDATA_BASE_ADDR + 0x0065)
#define KDATA_KERNEL_ISR_AR1 (KDATA_BASE_ADDR + 0x0066)
#define KDATA_KERNEL_ISR_AR2 (KDATA_BASE_ADDR + 0x0067)
#define KDATA_KERNEL_ISR_AR3 (KDATA_BASE_ADDR + 0x0068)
#define KDATA_KERNEL_ISR_AR4 (KDATA_BASE_ADDR + 0x0069)
#define KDATA_KERNEL_ISR_AR5 (KDATA_BASE_ADDR + 0x006A)
#define KDATA_KERNEL_ISR_BRCR (KDATA_BASE_ADDR + 0x006B)
#define KDATA_KERNEL_ISR_PASR (KDATA_BASE_ADDR + 0x006C)
#define KDATA_KERNEL_ISR_PAER (KDATA_BASE_ADDR + 0x006D)
#define KDATA_CLIENT_SCRATCH0 (KDATA_BASE_ADDR + 0x006E)
#define KDATA_CLIENT_SCRATCH1 (KDATA_BASE_ADDR + 0x006F)
#define KDATA_KERNEL_SCRATCH (KDATA_BASE_ADDR + 0x0070)
#define KDATA_KERNEL_ISR_SCRATCH (KDATA_BASE_ADDR + 0x0071)
#define KDATA_OUEUE_LEFT (KDATA_BASE_ADDR + 0x0072)
#define KDATA_QUEUE_RIGHT (KDATA_BASE_ADDR + 0x0073)
#define KDATA_ADC1_REQUEST (KDATA_BASE_ADDR + 0x0074)
#define KDATA_ADC2_REQUEST (KDATA_BASE_ADDR + 0x0075)
#define KDATA_CD_REQUEST (KDATA_BASE_ADDR + 0x0076)
#define KDATA_MIC_REQUEST (KDATA_BASE_ADDR + 0x0077)
#define KDATA_ADC1_MIXER_REQUEST (KDATA_BASE_ADDR + 0x0078)
#define KDATA_ADC2_MIXER_REQUEST (KDATA_BASE_ADDR + 0x0079)
#define KDATA_CD_MIXER_REQUEST (KDATA_BASE_ADDR + 0x007A)
#define KDATA_MIC_MIXER_REQUEST (KDATA_BASE_ADDR + 0x007B)
#define KDATA_MIC_SYNC_COUNTER (KDATA_BASE_ADDR + 0x007C)
/*
* second 'segment' (?) reserved for mixer
* buffers..
*/
#define KDATA_MIXER_WORD0 (KDATA_BASE_ADDR2 + 0x0000)
#define KDATA_MIXER_WORD1 (KDATA_BASE_ADDR2 + 0x0001)
#define KDATA_MIXER_WORD2 (KDATA_BASE_ADDR2 + 0x0002)
#define KDATA_MIXER_WORD3 (KDATA_BASE_ADDR2 + 0x0003)
#define KDATA_MIXER_WORD4 (KDATA_BASE_ADDR2 + 0x0004)
#define KDATA_MIXER_WORD5 (KDATA_BASE_ADDR2 + 0x0005)
#define KDATA_MIXER_WORD6 (KDATA_BASE_ADDR2 + 0x0006)
#define KDATA_MIXER_WORD7 (KDATA_BASE_ADDR2 + 0x0007)
#define KDATA_MIXER_WORD8 (KDATA_BASE_ADDR2 + 0x0008)
#define KDATA_MIXER_WORD9 (KDATA_BASE_ADDR2 + 0x0009)
#define KDATA_MIXER_WORDA (KDATA_BASE_ADDR2 + 0x000A)
#define KDATA_MIXER_WORDB (KDATA_BASE_ADDR2 + 0x000B)
#define KDATA_MIXER_WORDC (KDATA_BASE_ADDR2 + 0x000C)
#define KDATA_MIXER_WORDD (KDATA_BASE_ADDR2 + 0x000D)
#define KDATA_MIXER_WORDE (KDATA_BASE_ADDR2 + 0x000E)
#define KDATA_MIXER_WORDF (KDATA_BASE_ADDR2 + 0x000F)
#define KDATA_MIXER_XFER0 (KDATA_BASE_ADDR2 + 0x0010)
#define KDATA_MIXER_XFER1 (KDATA_BASE_ADDR2 + 0x0011)
#define KDATA_MIXER_XFER2 (KDATA_BASE_ADDR2 + 0x0012)
#define KDATA_MIXER_XFER3 (KDATA_BASE_ADDR2 + 0x0013)
#define KDATA_MIXER_XFER4 (KDATA_BASE_ADDR2 + 0x0014)
#define KDATA_MIXER_XFER5 (KDATA_BASE_ADDR2 + 0x0015)
#define KDATA_MIXER_XFER6 (KDATA_BASE_ADDR2 + 0x0016)
#define KDATA_MIXER_XFER7 (KDATA_BASE_ADDR2 + 0x0017)
#define KDATA_MIXER_XFER8 (KDATA_BASE_ADDR2 + 0x0018)
#define KDATA_MIXER_XFER9 (KDATA_BASE_ADDR2 + 0x0019)
#define KDATA_MIXER_XFER_ENDMARK (KDATA_BASE_ADDR2 + 0x001A)
#define KDATA_MIXER_TASK_NUMBER (KDATA_BASE_ADDR2 + 0x001B)
#define KDATA_CURRENT_MIXER (KDATA_BASE_ADDR2 + 0x001C)
#define KDATA_MIXER_ACTIVE (KDATA_BASE_ADDR2 + 0x001D)
#define KDATA_MIXER_BANK_STATUS (KDATA_BASE_ADDR2 + 0x001E)
#define KDATA_DAC_LEFT_VOLUME (KDATA_BASE_ADDR2 + 0x001F)
#define KDATA_DAC_RIGHT_VOLUME (KDATA_BASE_ADDR2 + 0x0020)
#define MAX_INSTANCE_MINISRC (KDATA_INSTANCE_MINISRC_ENDMARK - KDATA_INSTANCE0_MINISRC)
#define MAX_VIRTUAL_DMA_CHANNELS (KDATA_DMA_XFER_ENDMARK - KDATA_DMA_XFER0)
#define MAX_VIRTUAL_MIXER_CHANNELS (KDATA_MIXER_XFER_ENDMARK - KDATA_MIXER_XFER0)
#define MAX_VIRTUAL_ADC1_CHANNELS (KDATA_ADC1_XFER_ENDMARK - KDATA_ADC1_XFER0)
/*
* client data area offsets
*/
#define CDATA_INSTANCE_READY 0x00
#define CDATA_HOST_SRC_ADDRL 0x01
#define CDATA_HOST_SRC_ADDRH 0x02
#define CDATA_HOST_SRC_END_PLUS_1L 0x03
#define CDATA_HOST_SRC_END_PLUS_1H 0x04
#define CDATA_HOST_SRC_CURRENTL 0x05
#define CDATA_HOST_SRC_CURRENTH 0x06
#define CDATA_IN_BUF_CONNECT 0x07
#define CDATA_OUT_BUF_CONNECT 0x08
#define CDATA_IN_BUF_BEGIN 0x09
#define CDATA_IN_BUF_END_PLUS_1 0x0A
#define CDATA_IN_BUF_HEAD 0x0B
#define CDATA_IN_BUF_TAIL 0x0C
#define CDATA_OUT_BUF_BEGIN 0x0D
#define CDATA_OUT_BUF_END_PLUS_1 0x0E
#define CDATA_OUT_BUF_HEAD 0x0F
#define CDATA_OUT_BUF_TAIL 0x10
#define CDATA_DMA_CONTROL 0x11
#define CDATA_RESERVED 0x12
#define CDATA_FREQUENCY 0x13
#define CDATA_LEFT_VOLUME 0x14
#define CDATA_RIGHT_VOLUME 0x15
#define CDATA_LEFT_SUR_VOL 0x16
#define CDATA_RIGHT_SUR_VOL 0x17
#define CDATA_HEADER_LEN 0x18
#define SRC3_DIRECTION_OFFSET CDATA_HEADER_LEN
#define SRC3_MODE_OFFSET (CDATA_HEADER_LEN + 1)
#define SRC3_WORD_LENGTH_OFFSET (CDATA_HEADER_LEN + 2)
#define SRC3_PARAMETER_OFFSET (CDATA_HEADER_LEN + 3)
#define SRC3_COEFF_ADDR_OFFSET (CDATA_HEADER_LEN + 8)
#define SRC3_FILTAP_ADDR_OFFSET (CDATA_HEADER_LEN + 10)
#define SRC3_TEMP_INBUF_ADDR_OFFSET (CDATA_HEADER_LEN + 16)
#define SRC3_TEMP_OUTBUF_ADDR_OFFSET (CDATA_HEADER_LEN + 17)
#define MINISRC_IN_BUFFER_SIZE ( 0x50 * 2 )
#define MINISRC_OUT_BUFFER_SIZE ( 0x50 * 2 * 2)
#define MINISRC_OUT_BUFFER_SIZE ( 0x50 * 2 * 2)
#define MINISRC_TMP_BUFFER_SIZE ( 112 + ( MINISRC_BIQUAD_STAGE * 3 + 4 ) * 2 * 2 )
#define MINISRC_BIQUAD_STAGE 2
#define MINISRC_COEF_LOC 0X175
#define DMACONTROL_BLOCK_MASK 0x000F
#define DMAC_BLOCK0_SELECTOR 0x0000
#define DMAC_BLOCK1_SELECTOR 0x0001
#define DMAC_BLOCK2_SELECTOR 0x0002
#define DMAC_BLOCK3_SELECTOR 0x0003
#define DMAC_BLOCK4_SELECTOR 0x0004
#define DMAC_BLOCK5_SELECTOR 0x0005
#define DMAC_BLOCK6_SELECTOR 0x0006
#define DMAC_BLOCK7_SELECTOR 0x0007
#define DMAC_BLOCK8_SELECTOR 0x0008
#define DMAC_BLOCK9_SELECTOR 0x0009
#define DMAC_BLOCKA_SELECTOR 0x000A
#define DMAC_BLOCKB_SELECTOR 0x000B
#define DMAC_BLOCKC_SELECTOR 0x000C
#define DMAC_BLOCKD_SELECTOR 0x000D
#define DMAC_BLOCKE_SELECTOR 0x000E
#define DMAC_BLOCKF_SELECTOR 0x000F
#define DMACONTROL_PAGE_MASK 0x00F0
#define DMAC_PAGE0_SELECTOR 0x0030
#define DMAC_PAGE1_SELECTOR 0x0020
#define DMAC_PAGE2_SELECTOR 0x0010
#define DMAC_PAGE3_SELECTOR 0x0000
#define DMACONTROL_AUTOREPEAT 0x1000
#define DMACONTROL_STOPPED 0x2000
#define DMACONTROL_DIRECTION 0x0100
/*
* DSP Code images
*/
static u16 assp_kernel_image[] = {
0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4,
0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4,
0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4,
0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x0063, 0x7980, 0x006B, 0x7980, 0x03B4, 0x7980, 0x03B4,
0xBF80, 0x2C7C, 0x8806, 0x8804, 0xBE40, 0xBC20, 0xAE09, 0x1000, 0xAE0A, 0x0001, 0x6938, 0xEB08,
0x0053, 0x695A, 0xEB08, 0x00D6, 0x0009, 0x8B88, 0x6980, 0xE388, 0x0036, 0xBE30, 0xBC20, 0x6909,
0xB801, 0x9009, 0xBE41, 0xBE41, 0x6928, 0xEB88, 0x0078, 0xBE41, 0xBE40, 0x7980, 0x0038, 0xBE41,
0xBE41, 0x903A, 0x6938, 0xE308, 0x0056, 0x903A, 0xBE41, 0xBE40, 0xEF00, 0x903A, 0x6939, 0xE308,
0x005E, 0x903A, 0xEF00, 0x690B, 0x660C, 0xEF8C, 0x690A, 0x660C, 0x620B, 0x6609, 0xEF00, 0x6910,
0x660F, 0xEF04, 0xE388, 0x0075, 0x690E, 0x660F, 0x6210, 0x660D, 0xEF00, 0x690E, 0x660D, 0xEF00,
0xAE70, 0x0001, 0xBC20, 0xAE27, 0x0001, 0x6939, 0xEB08, 0x005D, 0x6926, 0xB801, 0x9026, 0x0026,
0x8B88, 0x6980, 0xE388, 0x00CB, 0x9028, 0x0D28, 0x4211, 0xE100, 0x007A, 0x4711, 0xE100, 0x00A0,
0x7A80, 0x0063, 0xB811, 0x660A, 0x6209, 0xE304, 0x007A, 0x0C0B, 0x4005, 0x100A, 0xBA01, 0x9012,
0x0C12, 0x4002, 0x7980, 0x00AF, 0x7A80, 0x006B, 0xBE02, 0x620E, 0x660D, 0xBA10, 0xE344, 0x007A,
0x0C10, 0x4005, 0x100E, 0xBA01, 0x9012, 0x0C12, 0x4002, 0x1003, 0xBA02, 0x9012, 0x0C12, 0x4000,
0x1003, 0xE388, 0x00BA, 0x1004, 0x7980, 0x00BC, 0x1004, 0xBA01, 0x9012, 0x0C12, 0x4001, 0x0C05,
0x4003, 0x0C06, 0x4004, 0x1011, 0xBFB0, 0x01FF, 0x9012, 0x0C12, 0x4006, 0xBC20, 0xEF00, 0xAE26,
0x1028, 0x6970, 0xBFD0, 0x0001, 0x9070, 0xE388, 0x007A, 0xAE28, 0x0000, 0xEF00, 0xAE70, 0x0300,
0x0C70, 0xB00C, 0xAE5A, 0x0000, 0xEF00, 0x7A80, 0x038A, 0x697F, 0xB801, 0x907F, 0x0056, 0x8B88,
0x0CA0, 0xB008, 0xAF71, 0xB000, 0x4E71, 0xE200, 0x00F3, 0xAE56, 0x1057, 0x0056, 0x0CA0, 0xB008,
0x8056, 0x7980, 0x03A1, 0x0810, 0xBFA0, 0x1059, 0xE304, 0x03A1, 0x8056, 0x7980, 0x03A1, 0x7A80,
0x038A, 0xBF01, 0xBE43, 0xBE59, 0x907C, 0x6937, 0xE388, 0x010D, 0xBA01, 0xE308, 0x010C, 0xAE71,
0x0004, 0x0C71, 0x5000, 0x6936, 0x9037, 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80, 0xBF0A,
0x0560, 0xF500, 0xBF0A, 0x0520, 0xB900, 0xBB17, 0x90A0, 0x6917, 0xE388, 0x0148, 0x0D17, 0xE100,
0x0127, 0xBF0C, 0x0578, 0xBF0D, 0x057C, 0x7980, 0x012B, 0xBF0C, 0x0538, 0xBF0D, 0x053C, 0x6900,
0xE308, 0x0135, 0x8B8C, 0xBE59, 0xBB07, 0x90A0, 0xBC20, 0x7980, 0x0157, 0x030C, 0x8B8B, 0xB903,
0x8809, 0xBEC6, 0x013E, 0x69AC, 0x90AB, 0x69AD, 0x90AB, 0x0813, 0x660A, 0xE344, 0x0144, 0x0309,
0x830C, 0xBC20, 0x7980, 0x0157, 0x6955, 0xE388, 0x0157, 0x7C38, 0xBF0B, 0x0578, 0xF500, 0xBF0B,
0x0538, 0xB907, 0x8809, 0xBEC6, 0x0156, 0x10AB, 0x90AA, 0x6974, 0xE388, 0x0163, 0xAE72, 0x0540,
0xF500, 0xAE72, 0x0500, 0xAE61, 0x103B, 0x7A80, 0x02F6, 0x6978, 0xE388, 0x0182, 0x8B8C, 0xBF0C,
0x0560, 0xE500, 0x7C40, 0x0814, 0xBA20, 0x8812, 0x733D, 0x7A80, 0x0380, 0x733E, 0x7A80, 0x0380,
0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA2C, 0x8812, 0x733F, 0x7A80, 0x0380, 0x7340,
0x7A80, 0x0380, 0x6975, 0xE388, 0x018E, 0xAE72, 0x0548, 0xF500, 0xAE72, 0x0508, 0xAE61, 0x1041,
0x7A80, 0x02F6, 0x6979, 0xE388, 0x01AD, 0x8B8C, 0xBF0C, 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA18,
0x8812, 0x7343, 0x7A80, 0x0380, 0x7344, 0x7A80, 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40,
0x0814, 0xBA24, 0x8812, 0x7345, 0x7A80, 0x0380, 0x7346, 0x7A80, 0x0380, 0x6976, 0xE388, 0x01B9,
0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61, 0x1047, 0x7A80, 0x02F6, 0x697A, 0xE388, 0x01D8,
0x8B8C, 0xBF0C, 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA08, 0x8812, 0x7349, 0x7A80, 0x0380, 0x734A,
0x7A80, 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA14, 0x8812, 0x734B, 0x7A80,
0x0380, 0x734C, 0x7A80, 0x0380, 0xBC21, 0xAE1C, 0x1090, 0x8B8A, 0xBF0A, 0x0560, 0xE500, 0x7C40,
0x0812, 0xB804, 0x8813, 0x8B8D, 0xBF0D, 0x056C, 0xE500, 0x7C40, 0x0815, 0xB804, 0x8811, 0x7A80,
0x034A, 0x8B8A, 0xBF0A, 0x0560, 0xE500, 0x7C40, 0x731F, 0xB903, 0x8809, 0xBEC6, 0x01F9, 0x548A,
0xBE03, 0x98A0, 0x7320, 0xB903, 0x8809, 0xBEC6, 0x0201, 0x548A, 0xBE03, 0x98A0, 0x1F20, 0x2F1F,
0x9826, 0xBC20, 0x6935, 0xE388, 0x03A1, 0x6933, 0xB801, 0x9033, 0xBFA0, 0x02EE, 0xE308, 0x03A1,
0x9033, 0xBF00, 0x6951, 0xE388, 0x021F, 0x7334, 0xBE80, 0x5760, 0xBE03, 0x9F7E, 0xBE59, 0x9034,
0x697E, 0x0D51, 0x9013, 0xBC20, 0x695C, 0xE388, 0x03A1, 0x735E, 0xBE80, 0x5760, 0xBE03, 0x9F7E,
0xBE59, 0x905E, 0x697E, 0x0D5C, 0x9013, 0x7980, 0x03A1, 0x7A80, 0x038A, 0xBF01, 0xBE43, 0x6977,
0xE388, 0x024E, 0xAE61, 0x104D, 0x0061, 0x8B88, 0x6980, 0xE388, 0x024E, 0x9071, 0x0D71, 0x000B,
0xAFA0, 0x8010, 0xAFA0, 0x8010, 0x0810, 0x660A, 0xE308, 0x0249, 0x0009, 0x0810, 0x660C, 0xE388,
0x024E, 0x800B, 0xBC20, 0x697B, 0xE388, 0x03A1, 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80,
0xE100, 0x0266, 0x697C, 0xBF90, 0x0560, 0x9072, 0x0372, 0x697C, 0xBF90, 0x0564, 0x9073, 0x0473,
0x7980, 0x0270, 0x697C, 0xBF90, 0x0520, 0x9072, 0x0372, 0x697C, 0xBF90, 0x0524, 0x9073, 0x0473,
0x697C, 0xB801, 0x907C, 0xBF0A, 0x10FD, 0x8B8A, 0xAF80, 0x8010, 0x734F, 0x548A, 0xBE03, 0x9880,
0xBC21, 0x7326, 0x548B, 0xBE03, 0x618B, 0x988C, 0xBE03, 0x6180, 0x9880, 0x7980, 0x03A1, 0x7A80,
0x038A, 0x0D28, 0x4711, 0xE100, 0x02BE, 0xAF12, 0x4006, 0x6912, 0xBFB0, 0x0C00, 0xE388, 0x02B6,
0xBFA0, 0x0800, 0xE388, 0x02B2, 0x6912, 0xBFB0, 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02A3, 0x6909,
0x900B, 0x7980, 0x02A5, 0xAF0B, 0x4005, 0x6901, 0x9005, 0x6902, 0x9006, 0x4311, 0xE100, 0x02ED,
0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980, 0x02ED, 0x6909, 0x900B, 0x7980, 0x02B8, 0xAF0B, 0x4005,
0xAF05, 0x4003, 0xAF06, 0x4004, 0x7980, 0x02ED, 0xAF12, 0x4006, 0x6912, 0xBFB0, 0x0C00, 0xE388,
0x02E7, 0xBFA0, 0x0800, 0xE388, 0x02E3, 0x6912, 0xBFB0, 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02D4,
0x690D, 0x9010, 0x7980, 0x02D6, 0xAF10, 0x4005, 0x6901, 0x9005, 0x6902, 0x9006, 0x4311, 0xE100,
0x02ED, 0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980, 0x02ED, 0x690D, 0x9010, 0x7980, 0x02E9, 0xAF10,
0x4005, 0xAF05, 0x4003, 0xAF06, 0x4004, 0xBC20, 0x6970, 0x9071, 0x7A80, 0x0078, 0x6971, 0x9070,
0x7980, 0x03A1, 0xBC20, 0x0361, 0x8B8B, 0x6980, 0xEF88, 0x0272, 0x0372, 0x7804, 0x9071, 0x0D71,
0x8B8A, 0x000B, 0xB903, 0x8809, 0xBEC6, 0x0309, 0x69A8, 0x90AB, 0x69A8, 0x90AA, 0x0810, 0x660A,
0xE344, 0x030F, 0x0009, 0x0810, 0x660C, 0xE388, 0x0314, 0x800B, 0xBC20, 0x6961, 0xB801, 0x9061,
0x7980, 0x02F7, 0x7A80, 0x038A, 0x5D35, 0x0001, 0x6934, 0xB801, 0x9034, 0xBF0A, 0x109E, 0x8B8A,
0xAF80, 0x8014, 0x4880, 0xAE72, 0x0550, 0xF500, 0xAE72, 0x0510, 0xAE61, 0x1051, 0x7A80, 0x02F6,
0x7980, 0x03A1, 0x7A80, 0x038A, 0x5D35, 0x0002, 0x695E, 0xB801, 0x905E, 0xBF0A, 0x109E, 0x8B8A,
0xAF80, 0x8014, 0x4780, 0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61, 0x105C, 0x7A80, 0x02F6,
0x7980, 0x03A1, 0x001C, 0x8B88, 0x6980, 0xEF88, 0x901D, 0x0D1D, 0x100F, 0x6610, 0xE38C, 0x0358,
0x690E, 0x6610, 0x620F, 0x660D, 0xBA0F, 0xE301, 0x037A, 0x0410, 0x8B8A, 0xB903, 0x8809, 0xBEC6,
0x036C, 0x6A8C, 0x61AA, 0x98AB, 0x6A8C, 0x61AB, 0x98AD, 0x6A8C, 0x61AD, 0x98A9, 0x6A8C, 0x61A9,
0x98AA, 0x7C04, 0x8B8B, 0x7C04, 0x8B8D, 0x7C04, 0x8B89, 0x7C04, 0x0814, 0x660E, 0xE308, 0x0379,
0x040D, 0x8410, 0xBC21, 0x691C, 0xB801, 0x901C, 0x7980, 0x034A, 0xB903, 0x8809, 0x8B8A, 0xBEC6,
0x0388, 0x54AC, 0xBE03, 0x618C, 0x98AA, 0xEF00, 0xBC20, 0xBE46, 0x0809, 0x906B, 0x080A, 0x906C,
0x080B, 0x906D, 0x081A, 0x9062, 0x081B, 0x9063, 0x081E, 0x9064, 0xBE59, 0x881E, 0x8065, 0x8166,
0x8267, 0x8368, 0x8469, 0x856A, 0xEF00, 0xBC20, 0x696B, 0x8809, 0x696C, 0x880A, 0x696D, 0x880B,
0x6962, 0x881A, 0x6963, 0x881B, 0x6964, 0x881E, 0x0065, 0x0166, 0x0267, 0x0368, 0x0469, 0x056A,
0xBE3A,
};
/*
* Mini sample rate converter code image
* that is to be loaded at 0x400 on the DSP.
*/
static u16 assp_minisrc_image[] = {
0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412,
0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41,
0x7A80, 0x002A, 0xBE40, 0x3029, 0xEFCC, 0xBE41, 0x7A80, 0x0028, 0xBE40, 0x3028, 0xEFCC, 0x6907,
0xE308, 0x042A, 0x6909, 0x902C, 0x7980, 0x042C, 0x690D, 0x902C, 0x1009, 0x881A, 0x100A, 0xBA01,
0x881B, 0x100D, 0x881C, 0x100E, 0xBA01, 0x881D, 0xBF80, 0x00ED, 0x881E, 0x050C, 0x0124, 0xB904,
0x9027, 0x6918, 0xE308, 0x04B3, 0x902D, 0x6913, 0xBFA0, 0x7598, 0xF704, 0xAE2D, 0x00FF, 0x8B8D,
0x6919, 0xE308, 0x0463, 0x691A, 0xE308, 0x0456, 0xB907, 0x8809, 0xBEC6, 0x0453, 0x10A9, 0x90AD,
0x7980, 0x047C, 0xB903, 0x8809, 0xBEC6, 0x0460, 0x1889, 0x6C22, 0x90AD, 0x10A9, 0x6E23, 0x6C22,
0x90AD, 0x7980, 0x047C, 0x101A, 0xE308, 0x046F, 0xB903, 0x8809, 0xBEC6, 0x046C, 0x10A9, 0x90A0,
0x90AD, 0x7980, 0x047C, 0xB901, 0x8809, 0xBEC6, 0x047B, 0x1889, 0x6C22, 0x90A0, 0x90AD, 0x10A9,
0x6E23, 0x6C22, 0x90A0, 0x90AD, 0x692D, 0xE308, 0x049C, 0x0124, 0xB703, 0xB902, 0x8818, 0x8B89,
0x022C, 0x108A, 0x7C04, 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89, 0x99A0,
0x108A, 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89, 0x99AF, 0x7B99, 0x0484,
0x0124, 0x060F, 0x101B, 0x2013, 0x901B, 0xBFA0, 0x7FFF, 0xE344, 0x04AC, 0x901B, 0x8B89, 0x7A80,
0x051A, 0x6927, 0xBA01, 0x9027, 0x7A80, 0x0523, 0x6927, 0xE308, 0x049E, 0x7980, 0x050F, 0x0624,
0x1026, 0x2013, 0x9026, 0xBFA0, 0x7FFF, 0xE304, 0x04C0, 0x8B8D, 0x7A80, 0x051A, 0x7980, 0x04B4,
0x9026, 0x1013, 0x3026, 0x901B, 0x8B8D, 0x7A80, 0x051A, 0x7A80, 0x0523, 0x1027, 0xBA01, 0x9027,
0xE308, 0x04B4, 0x0124, 0x060F, 0x8B89, 0x691A, 0xE308, 0x04EA, 0x6919, 0xE388, 0x04E0, 0xB903,
0x8809, 0xBEC6, 0x04DD, 0x1FA0, 0x2FAE, 0x98A9, 0x7980, 0x050F, 0xB901, 0x8818, 0xB907, 0x8809,
0xBEC6, 0x04E7, 0x10EE, 0x90A9, 0x7980, 0x050F, 0x6919, 0xE308, 0x04FE, 0xB903, 0x8809, 0xBE46,
0xBEC6, 0x04FA, 0x17A0, 0xBE1E, 0x1FAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080, 0x99A9, 0xBE47,
0x7980, 0x050F, 0xB901, 0x8809, 0xBEC6, 0x050E, 0x16A0, 0x26A0, 0xBFB7, 0xFF00, 0xBE1E, 0x1EA0,
0x2EAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080, 0x99A9, 0x850C, 0x860F, 0x6907, 0xE388, 0x0516,
0x0D07, 0x8510, 0xBE59, 0x881E, 0xBE4A, 0xEF00, 0x101E, 0x901C, 0x101F, 0x901D, 0x10A0, 0x901E,
0x10A0, 0x901F, 0xEF00, 0x101E, 0x301C, 0x9020, 0x731B, 0x5420, 0xBE03, 0x9825, 0x1025, 0x201C,
0x9025, 0x7325, 0x5414, 0xBE03, 0x8B8E, 0x9880, 0x692F, 0xE388, 0x0539, 0xBE59, 0xBB07, 0x6180,
0x9880, 0x8BA0, 0x101F, 0x301D, 0x9021, 0x731B, 0x5421, 0xBE03, 0x982E, 0x102E, 0x201D, 0x902E,
0x732E, 0x5415, 0xBE03, 0x9880, 0x692F, 0xE388, 0x054F, 0xBE59, 0xBB07, 0x6180, 0x9880, 0x8BA0,
0x6918, 0xEF08, 0x7325, 0x5416, 0xBE03, 0x98A0, 0x732E, 0x5417, 0xBE03, 0x98A0, 0xEF00, 0x8BA0,
0xBEC6, 0x056B, 0xBE59, 0xBB04, 0xAA90, 0xBE04, 0xBE1E, 0x99E0, 0x8BE0, 0x69A0, 0x90D0, 0x69A0,
0x90D0, 0x081F, 0xB805, 0x881F, 0x8B90, 0x69A0, 0x90D0, 0x69A0, 0x9090, 0x8BD0, 0x8BD8, 0xBE1F,
0xEF00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
};

Переглянути файл

@@ -1,478 +0,0 @@
/*
* sound/oss/maui.c
*
* The low level driver for Turtle Beach Maui and Tropez.
*
*
* Copyright (C) by Hannu Savolainen 1993-1997
*
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
*
* Changes:
* Alan Cox General clean up, use kernel IRQ
* system
* Christoph Hellwig Adapted to module_init/module_exit
* Bartlomiej Zolnierkiewicz
* Added __init to download_code()
*
* Status:
* Andrew J. Kroll Tested 06/01/1999 with:
* * OSWF.MOT File Version: 1.15
* * OSWF.MOT File Dated: 09/12/94
* * Older versions will cause problems.
*/
#include <linux/interrupt.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#define USE_SEQ_MACROS
#define USE_SIMPLE_MACROS
#include "sound_config.h"
#include "sound_firmware.h"
#include "mpu401.h"
static int maui_base = 0x330;
static volatile int irq_ok;
static int *maui_osp;
#define HOST_DATA_PORT (maui_base + 2)
#define HOST_STAT_PORT (maui_base + 3)
#define HOST_CTRL_PORT (maui_base + 3)
#define STAT_TX_INTR 0x40
#define STAT_TX_AVAIL 0x20
#define STAT_TX_IENA 0x10
#define STAT_RX_INTR 0x04
#define STAT_RX_AVAIL 0x02
#define STAT_RX_IENA 0x01
static int (*orig_load_patch)(int dev, int format, const char __user *addr,
int offs, int count, int pmgr_flag) = NULL;
#include "maui_boot.h"
static int maui_wait(int mask)
{
int i;
/*
* Perform a short initial wait without sleeping
*/
for (i = 0; i < 100; i++)
if (inb(HOST_STAT_PORT) & mask)
return 1;
/*
* Wait up to 15 seconds with sleeping
*/
for (i = 0; i < 150; i++) {
if (inb(HOST_STAT_PORT) & mask)
return 1;
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(HZ / 10);
if (signal_pending(current))
return 0;
}
return 0;
}
static int maui_read(void)
{
if (maui_wait(STAT_RX_AVAIL))
return inb(HOST_DATA_PORT);
return -1;
}
static int maui_write(unsigned char data)
{
if (maui_wait(STAT_TX_AVAIL)) {
outb((data), HOST_DATA_PORT);
return 1;
}
printk(KERN_WARNING "Maui: Write timeout\n");
return 0;
}
static irqreturn_t mauiintr(int irq, void *dev_id, struct pt_regs *dummy)
{
irq_ok = 1;
return IRQ_HANDLED;
}
static int __init download_code(void)
{
int i, lines = 0;
int eol_seen = 0, done = 0;
int skip = 1;
printk(KERN_INFO "Code download (%d bytes): ", maui_osLen);
for (i = 0; i < maui_osLen; i++) {
if (maui_os[i] != '\r') {
if (!skip || (maui_os[i] == 'S' && (i == 0 || maui_os[i - 1] == '\n'))) {
skip = 0;
if (maui_os[i] == '\n')
eol_seen = skip = 1;
else if (maui_os[i] == 'S') {
if (maui_os[i + 1] == '8')
done = 1;
if (!maui_write(0xF1))
goto failure;
if (!maui_write('S'))
goto failure;
} else {
if (!maui_write(maui_os[i]))
goto failure;
}
if (eol_seen) {
int c = 0;
int n;
eol_seen = 0;
for (n = 0; n < 2; n++) {
if (maui_wait(STAT_RX_AVAIL)) {
c = inb(HOST_DATA_PORT);
break;
}
}
if (c != 0x80) {
printk("Download not acknowledged\n");
return 0;
}
else if (!(lines++ % 10))
printk(".");
if (done) {
printk("\n");
printk(KERN_INFO "Download complete\n");
return 1;
}
}
}
}
}
failure:
printk("\n");
printk(KERN_ERR "Download failed!!!\n");
return 0;
}
static int __init maui_init(int irq)
{
unsigned char bits;
switch (irq) {
case 9:
bits = 0x00;
break;
case 5:
bits = 0x08;
break;
case 12:
bits = 0x10;
break;
case 15:
bits = 0x18;
break;
default:
printk(KERN_ERR "Maui: Invalid IRQ %d\n", irq);
return 0;
}
outb((0x00), HOST_CTRL_PORT); /* Reset */
outb((bits), HOST_DATA_PORT); /* Set the IRQ bits */
outb((bits | 0x80), HOST_DATA_PORT); /* Set the IRQ bits again? */
outb((0x80), HOST_CTRL_PORT); /* Leave reset */
outb((0x80), HOST_CTRL_PORT); /* Leave reset */
outb((0xD0), HOST_CTRL_PORT); /* Cause interrupt */
#ifdef CONFIG_SMP
{
int i;
for (i = 0; i < 1000000 && !irq_ok; i++)
;
if (!irq_ok)
return 0;
}
#endif
outb((0x80), HOST_CTRL_PORT); /* Leave reset */
printk(KERN_INFO "Turtle Beach Maui initialization\n");
if (!download_code())
return 0;
outb((0xE0), HOST_CTRL_PORT); /* Normal operation */
/* Select mpu401 mode */
maui_write(0xf0);
maui_write(1);
if (maui_read() != 0x80) {
maui_write(0xf0);
maui_write(1);
if (maui_read() != 0x80)
printk(KERN_ERR "Maui didn't acknowledge set HW mode command\n");
}
printk(KERN_INFO "Maui initialized OK\n");
return 1;
}
static int maui_short_wait(int mask) {
int i;
for (i = 0; i < 1000; i++) {
if (inb(HOST_STAT_PORT) & mask) {
return 1;
}
}
return 0;
}
static int maui_load_patch(int dev, int format, const char __user *addr,
int offs, int count, int pmgr_flag)
{
struct sysex_info header;
unsigned long left, src_offs;
int hdr_size = (unsigned long) &header.data[0] - (unsigned long) &header;
int i;
if (format == SYSEX_PATCH) /* Handled by midi_synth.c */
return orig_load_patch(dev, format, addr, offs, count, pmgr_flag);
if (format != MAUI_PATCH)
{
printk(KERN_WARNING "Maui: Unknown patch format\n");
}
if (count < hdr_size) {
/* printk("Maui error: Patch header too short\n");*/
return -EINVAL;
}
count -= hdr_size;
/*
* Copy the header from user space but ignore the first bytes which have
* been transferred already.
*/
if(copy_from_user(&((char *) &header)[offs], &(addr)[offs], hdr_size - offs))
return -EFAULT;
if (count < header.len) {
printk(KERN_ERR "Maui warning: Host command record too short (%d<%d)\n", count, (int) header.len);
header.len = count;
}
left = header.len;
src_offs = 0;
for (i = 0; i < left; i++) {
unsigned char data;
if(get_user(*(unsigned char *) &data, (unsigned char __user *) &((addr)[hdr_size + i])))
return -EFAULT;
if (i == 0 && !(data & 0x80))
return -EINVAL;
if (maui_write(data) == -1)
return -EIO;
}
if ((i = maui_read()) != 0x80) {
if (i != -1)
printk("Maui: Error status %02x\n", i);
return -EIO;
}
return 0;
}
static int __init probe_maui(struct address_info *hw_config)
{
struct resource *ports;
int this_dev;
int i;
int tmp1, tmp2, ret;
ports = request_region(hw_config->io_base, 2, "mpu401");
if (!ports)
return 0;
if (!request_region(hw_config->io_base + 2, 6, "Maui"))
goto out;
maui_base = hw_config->io_base;
maui_osp = hw_config->osp;
if (request_irq(hw_config->irq, mauiintr, 0, "Maui", NULL) < 0)
goto out2;
/*
* Initialize the processor if necessary
*/
if (maui_osLen > 0) {
if (!(inb(HOST_STAT_PORT) & STAT_TX_AVAIL) ||
!maui_write(0x9F) || /* Report firmware version */
!maui_short_wait(STAT_RX_AVAIL) ||
maui_read() == -1 || maui_read() == -1)
if (!maui_init(hw_config->irq))
goto out3;
}
if (!maui_write(0xCF)) /* Report hardware version */ {
printk(KERN_ERR "No WaveFront firmware detected (card uninitialized?)\n");
goto out3;
}
if ((tmp1 = maui_read()) == -1 || (tmp2 = maui_read()) == -1) {
printk(KERN_ERR "No WaveFront firmware detected (card uninitialized?)\n");
goto out3;
}
if (tmp1 == 0xff || tmp2 == 0xff)
goto out3;
printk(KERN_DEBUG "WaveFront hardware version %d.%d\n", tmp1, tmp2);
if (!maui_write(0x9F)) /* Report firmware version */
goto out3;
if ((tmp1 = maui_read()) == -1 || (tmp2 = maui_read()) == -1)
goto out3;
printk(KERN_DEBUG "WaveFront firmware version %d.%d\n", tmp1, tmp2);
if (!maui_write(0x85)) /* Report free DRAM */
goto out3;
tmp1 = 0;
for (i = 0; i < 4; i++) {
tmp1 |= maui_read() << (7 * i);
}
printk(KERN_DEBUG "Available DRAM %dk\n", tmp1 / 1024);
for (i = 0; i < 1000; i++)
if (probe_mpu401(hw_config, ports))
break;
ret = probe_mpu401(hw_config, ports);
if (!ret)
goto out3;
conf_printf("Maui", hw_config);
hw_config->irq *= -1;
hw_config->name = "Maui";
attach_mpu401(hw_config, THIS_MODULE);
if (hw_config->slots[1] != -1) /* The MPU401 driver installed itself */ {
struct synth_operations *synth;
this_dev = hw_config->slots[1];
/*
* Intercept patch loading calls so that they can be handled
* by the Maui driver.
*/
synth = midi_devs[this_dev]->converter;
if (synth != NULL) {
synth->id = "MAUI";
orig_load_patch = synth->load_patch;
synth->load_patch = &maui_load_patch;
} else
printk(KERN_ERR "Maui: Can't install patch loader\n");
}
return 1;
out3:
free_irq(hw_config->irq, NULL);
out2:
release_region(hw_config->io_base + 2, 6);
out:
release_region(hw_config->io_base, 2);
return 0;
}
static void __exit unload_maui(struct address_info *hw_config)
{
int irq = hw_config->irq;
release_region(hw_config->io_base + 2, 6);
unload_mpu401(hw_config);
if (irq < 0)
irq = -irq;
if (irq > 0)
free_irq(irq, NULL);
}
static int fw_load;
static struct address_info cfg;
static int __initdata io = -1;
static int __initdata irq = -1;
module_param(io, int, 0);
module_param(irq, int, 0);
/*
* Install a Maui card. Needs mpu401 loaded already.
*/
static int __init init_maui(void)
{
printk(KERN_INFO "Turtle beach Maui and Tropez driver, Copyright (C) by Hannu Savolainen 1993-1996\n");
cfg.io_base = io;
cfg.irq = irq;
if (cfg.io_base == -1 || cfg.irq == -1) {
printk(KERN_INFO "maui: irq and io must be set.\n");
return -EINVAL;
}
if (maui_os == NULL) {
fw_load = 1;
maui_osLen = mod_firmware_load("/etc/sound/oswf.mot", (char **) &maui_os);
}
if (probe_maui(&cfg) == 0)
return -ENODEV;
return 0;
}
static void __exit cleanup_maui(void)
{
if (fw_load && maui_os)
vfree(maui_os);
unload_maui(&cfg);
}
module_init(init_maui);
module_exit(cleanup_maui);
#ifndef MODULE
static int __init setup_maui(char *str)
{
/* io, irq */
int ints[3];
str = get_options(str, ARRAY_SIZE(ints), ints);
io = ints[1];
irq = ints[2];
return 1;
}
__setup("maui=", setup_maui);
#endif
MODULE_LICENSE("GPL");

Переглянути файл

@@ -432,16 +432,7 @@ static void mpu401_input_loop(struct mpu_config *devc)
devc->m_busy = 0;
}
int intchk_mpu401(void *dev_id)
{
struct mpu_config *devc;
int dev = (int) dev_id;
devc = &dev_conf[dev];
return input_avail(devc);
}
irqreturn_t mpuintr(int irq, void *dev_id, struct pt_regs *dummy)
static irqreturn_t mpuintr(int irq, void *dev_id, struct pt_regs *dummy)
{
struct mpu_config *devc;
int dev = (int) dev_id;
@@ -1761,8 +1752,6 @@ static int mpu_timer_init(int midi_dev)
EXPORT_SYMBOL(probe_mpu401);
EXPORT_SYMBOL(attach_mpu401);
EXPORT_SYMBOL(unload_mpu401);
EXPORT_SYMBOL(intchk_mpu401);
EXPORT_SYMBOL(mpuintr);
static struct address_info cfg;

Переглянути файл

@@ -10,5 +10,3 @@ int probe_mpu401(struct address_info *hw_config, struct resource *ports);
int attach_mpu401(struct address_info * hw_config, struct module *owner);
void unload_mpu401(struct address_info *hw_info);
int intchk_mpu401(void *dev_id);
irqreturn_t mpuintr(int irq, void *dev_id, struct pt_regs * dummy);

Переглянути файл

@@ -1,329 +0,0 @@
/*
* sound/oss/opl3sa.c
*
* Low level driver for Yamaha YMF701B aka OPL3-SA chip
*
*
*
* Copyright (C) by Hannu Savolainen 1993-1997
*
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
*
* Changes:
* Alan Cox Modularisation
* Christoph Hellwig Adapted to module_init/module_exit
* Arnaldo C. de Melo got rid of attach_uart401
*
* FIXME:
* Check for install of mpu etc is wrong, should check result of the mss stuff
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#undef SB_OK
#include "sound_config.h"
#include "ad1848.h"
#include "mpu401.h"
#ifdef SB_OK
#include "sb.h"
static int sb_initialized;
#endif
static DEFINE_SPINLOCK(lock);
static unsigned char opl3sa_read(int addr)
{
unsigned long flags;
unsigned char tmp;
spin_lock_irqsave(&lock,flags);
outb((0x1d), 0xf86); /* password */
outb(((unsigned char) addr), 0xf86); /* address */
tmp = inb(0xf87); /* data */
spin_unlock_irqrestore(&lock,flags);
return tmp;
}
static void opl3sa_write(int addr, int data)
{
unsigned long flags;
spin_lock_irqsave(&lock,flags);
outb((0x1d), 0xf86); /* password */
outb(((unsigned char) addr), 0xf86); /* address */
outb(((unsigned char) data), 0xf87); /* data */
spin_unlock_irqrestore(&lock,flags);
}
static int __init opl3sa_detect(void)
{
int tmp;
if (((tmp = opl3sa_read(0x01)) & 0xc4) != 0x04)
{
DDB(printk("OPL3-SA detect error 1 (%x)\n", opl3sa_read(0x01)));
/* return 0; */
}
/*
* Check that the password feature has any effect
*/
if (inb(0xf87) == tmp)
{
DDB(printk("OPL3-SA detect failed 2 (%x/%x)\n", tmp, inb(0xf87)));
return 0;
}
tmp = (opl3sa_read(0x04) & 0xe0) >> 5;
if (tmp != 0 && tmp != 1)
{
DDB(printk("OPL3-SA detect failed 3 (%d)\n", tmp));
return 0;
}
DDB(printk("OPL3-SA mode %x detected\n", tmp));
opl3sa_write(0x01, 0x00); /* Disable MSS */
opl3sa_write(0x02, 0x00); /* Disable SB */
opl3sa_write(0x03, 0x00); /* Disable MPU */
return 1;
}
/*
* Probe and attach routines for the Windows Sound System mode of
* OPL3-SA
*/
static int __init probe_opl3sa_wss(struct address_info *hw_config, struct resource *ports)
{
unsigned char tmp = 0x24; /* WSS enable */
/*
* Check if the IO port returns valid signature. The original MS Sound
* system returns 0x04 while some cards (OPL3-SA for example)
* return 0x00.
*/
if (!opl3sa_detect())
{
printk(KERN_ERR "OSS: OPL3-SA chip not found\n");
return 0;
}
switch (hw_config->io_base)
{
case 0x530:
tmp |= 0x00;
break;
case 0xe80:
tmp |= 0x08;
break;
case 0xf40:
tmp |= 0x10;
break;
case 0x604:
tmp |= 0x18;
break;
default:
printk(KERN_ERR "OSS: Unsupported OPL3-SA/WSS base %x\n", hw_config->io_base);
return 0;
}
opl3sa_write(0x01, tmp); /* WSS setup register */
return probe_ms_sound(hw_config, ports);
}
static void __init attach_opl3sa_wss(struct address_info *hw_config, struct resource *ports)
{
int nm = num_mixers;
/* FIXME */
attach_ms_sound(hw_config, ports, THIS_MODULE);
if (num_mixers > nm) /* A mixer was installed */
{
AD1848_REROUTE(SOUND_MIXER_LINE1, SOUND_MIXER_CD);
AD1848_REROUTE(SOUND_MIXER_LINE2, SOUND_MIXER_SYNTH);
AD1848_REROUTE(SOUND_MIXER_LINE3, SOUND_MIXER_LINE);
}
}
static int __init probe_opl3sa_mpu(struct address_info *hw_config)
{
unsigned char conf;
static signed char irq_bits[] = {
-1, -1, -1, -1, -1, 1, -1, 2, -1, 3, 4
};
if (hw_config->irq > 10)
{
printk(KERN_ERR "OPL3-SA: Bad MPU IRQ %d\n", hw_config->irq);
return 0;
}
if (irq_bits[hw_config->irq] == -1)
{
printk(KERN_ERR "OPL3-SA: Bad MPU IRQ %d\n", hw_config->irq);
return 0;
}
switch (hw_config->io_base)
{
case 0x330:
conf = 0x00;
break;
case 0x332:
conf = 0x20;
break;
case 0x334:
conf = 0x40;
break;
case 0x300:
conf = 0x60;
break;
default:
return 0; /* Invalid port */
}
conf |= 0x83; /* MPU & OPL3 (synth) & game port enable */
conf |= irq_bits[hw_config->irq] << 2;
opl3sa_write(0x03, conf);
hw_config->name = "OPL3-SA (MPU401)";
return probe_uart401(hw_config, THIS_MODULE);
}
static void __exit unload_opl3sa_wss(struct address_info *hw_config)
{
int dma2 = hw_config->dma2;
if (dma2 == -1)
dma2 = hw_config->dma;
release_region(0xf86, 2);
release_region(hw_config->io_base, 4);
ad1848_unload(hw_config->io_base + 4,
hw_config->irq,
hw_config->dma,
dma2,
0);
sound_unload_audiodev(hw_config->slots[0]);
}
static inline void __exit unload_opl3sa_mpu(struct address_info *hw_config)
{
unload_uart401(hw_config);
}
#ifdef SB_OK
static inline void __exit unload_opl3sa_sb(struct address_info *hw_config)
{
sb_dsp_unload(hw_config);
}
#endif
static int found_mpu;
static struct address_info cfg;
static struct address_info cfg_mpu;
static int __initdata io = -1;
static int __initdata irq = -1;
static int __initdata dma = -1;
static int __initdata dma2 = -1;
static int __initdata mpu_io = -1;
static int __initdata mpu_irq = -1;
module_param(io, int, 0);
module_param(irq, int, 0);
module_param(dma, int, 0);
module_param(dma2, int, 0);
module_param(mpu_io, int, 0);
module_param(mpu_irq, int, 0);
static int __init init_opl3sa(void)
{
struct resource *ports;
if (io == -1 || irq == -1 || dma == -1) {
printk(KERN_ERR "opl3sa: dma, irq and io must be set.\n");
return -EINVAL;
}
cfg.io_base = io;
cfg.irq = irq;
cfg.dma = dma;
cfg.dma2 = dma2;
cfg_mpu.io_base = mpu_io;
cfg_mpu.irq = mpu_irq;
ports = request_region(io + 4, 4, "ad1848");
if (!ports)
return -EBUSY;
if (!request_region(0xf86, 2, "OPL3-SA"))/* Control port is busy */ {
release_region(io + 4, 4);
return 0;
}
if (!request_region(io, 4, "WSS config")) {
release_region(0x86, 2);
release_region(io + 4, 4);
return 0;
}
if (probe_opl3sa_wss(&cfg, ports) == 0) {
release_region(0xf86, 2);
release_region(io, 4);
release_region(io + 4, 4);
return -ENODEV;
}
found_mpu=probe_opl3sa_mpu(&cfg_mpu);
attach_opl3sa_wss(&cfg, ports);
return 0;
}
static void __exit cleanup_opl3sa(void)
{
if(found_mpu)
unload_opl3sa_mpu(&cfg_mpu);
unload_opl3sa_wss(&cfg);
}
module_init(init_opl3sa);
module_exit(cleanup_opl3sa);
#ifndef MODULE
static int __init setup_opl3sa(char *str)
{
/* io, irq, dma, dma2, mpu_io, mpu_irq */
int ints[7];
str = get_options(str, ARRAY_SIZE(ints), ints);
io = ints[1];
irq = ints[2];
dma = ints[3];
dma2 = ints[4];
mpu_io = ints[5];
mpu_irq = ints[6];
return 1;
}
__setup("opl3sa=", setup_opl3sa);
#endif
MODULE_LICENSE("GPL");

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,78 +0,0 @@
/* (C) 2000 Guenter Geiger <geiger@debian.org>
with copy/pastes from the driver of Winfried Ritsch <ritsch@iem.kug.ac.at>
Modifications - Heiko Purnhagen <purnhage@tnt.uni-hannover.de>
HP20020116 towards REV 1.5 support, based on ALSA's card-rme9652.c
HP20020201 completed?
A text/graphic control panel (rmectrl/xrmectrl) is available from
http://gige.xdv.org/pages/soft/pages/rme
*/
#ifndef AFMT_S32_BLOCKED
#define AFMT_S32_BLOCKED 0x0000400
#endif
/* AFMT_S16_BLOCKED not yet supported */
#ifndef AFMT_S16_BLOCKED
#define AFMT_S16_BLOCKED 0x0000800
#endif
typedef struct rme_status {
unsigned int irq:1;
unsigned int lockmask:3; /* ADAT input PLLs locked */
/* 100=ADAT1, 010=ADAT2, 001=ADAT3 */
unsigned int sr48:1; /* sample rate: 0=44.1/88.2 1=48/96 kHz */
unsigned int wclock:1; /* 1=wordclock used */
unsigned int bufpoint:10;
unsigned int syncmask:3; /* ADAT input in sync with system clock */
/* 100=ADAT1, 010=ADAT2, 001=ADAT3 */
unsigned int doublespeed:1; /* sample rate: 0=44.1/48 1=88.2/96 kHz */
unsigned int tc_busy:1;
unsigned int tc_out:1;
unsigned int crystalrate:3; /* spdif input sample rate: */
/* 000=64kHz, 100=88.2kHz, 011=96kHz */
/* 111=32kHz, 110=44.1kHz, 101=48kHz */
unsigned int spdif_error:1; /* 1=no spdif lock */
unsigned int bufid:1;
unsigned int tc_valid:1; /* 1=timecode input detected */
unsigned int spdif_read:1;
} rme_status_t;
/* only fields marked W: can be modified by writing to SOUND_MIXER_PRIVATE3 */
typedef struct rme_control {
unsigned int start:1;
unsigned int latency:3; /* buffer size / latency [samples]: */
/* 0=64 ... 7=8192 */
unsigned int master:1; /* W: clock mode: 1=master 0=slave/auto */
unsigned int ie:1;
unsigned int sr48:1; /* samplerate 0=44.1/88.2, 1=48/96 kHz */
unsigned int spare:1;
unsigned int doublespeed:1; /* double speed 0=44.1/48, 1=88.2/96 Khz */
unsigned int pro:1; /* W: SPDIF-OUT 0=consumer, 1=professional */
unsigned int emphasis:1; /* W: SPDIF-OUT emphasis 0=off, 1=on */
unsigned int dolby:1; /* W: SPDIF-OUT non-audio bit 1=set, 0=unset */
unsigned int opt_out:1; /* W: use 1st optical OUT as SPDIF: 1=yes, 0=no */
unsigned int wordclock:1; /* W: use Wordclock as sync (overwrites master) */
unsigned int spdif_in:2; /* W: SPDIF-IN: */
/* 00=optical (ADAT1), 01=coaxial (Cinch), 10=internal CDROM */
unsigned int sync_ref:2; /* W: preferred sync-source in autosync */
/* 00=ADAT1, 01=ADAT2, 10=ADAT3, 11=SPDIF */
unsigned int spdif_reset:1;
unsigned int spdif_select:1;
unsigned int spdif_clock:1;
unsigned int spdif_write:1;
unsigned int adat1_cd:1; /* W: Rev 1.5+: if set, internal CD connector carries ADAT */
} rme_ctrl_t;
typedef struct _rme_mixer {
int i_offset;
int o_offset;
int devnr;
int spare[8];
} rme_mixer;

Переглянути файл

@@ -16,7 +16,6 @@
*/
#include <linux/kmod.h>
#include <linux/spinlock.h>
#define SEQUENCER_C
#include "sound_config.h"
#include "midi_ctrl.h"

Переглянути файл

@@ -20,10 +20,3 @@ EXPORT_SYMBOL(sound_timer_init);
EXPORT_SYMBOL(sound_timer_interrupt);
EXPORT_SYMBOL(sound_timer_syncinterval);
/* Tuning */
#define _SEQUENCER_C_
#include "tuning.h"
EXPORT_SYMBOL(cent_tuning);
EXPORT_SYMBOL(semitone_tuning);

Переглянути файл

@@ -1,207 +0,0 @@
/*
* sound/oss/sgalaxy.c
*
* Low level driver for Aztech Sound Galaxy cards.
* Copyright 1998 Artur Skawina <skawina@geocities.com>
*
* Supported cards:
* Aztech Sound Galaxy Waverider Pro 32 - 3D
* Aztech Sound Galaxy Washington 16
*
* Based on cs4232.c by Hannu Savolainen and Alan Cox.
*
*
* Copyright (C) by Hannu Savolainen 1993-1997
*
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
*
* Changes:
* 11-10-2000 Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
* Added __init to sb_rst() and sb_cmd()
*/
#include <linux/init.h>
#include <linux/module.h>
#include "sound_config.h"
#include "ad1848.h"
static void sleep( unsigned howlong )
{
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(howlong);
}
#define DPORT 0x80
/* Sound Blaster regs */
#define SBDSP_RESET 0x6
#define SBDSP_READ 0xA
#define SBDSP_COMMAND 0xC
#define SBDSP_STATUS SBDSP_COMMAND
#define SBDSP_DATA_AVAIL 0xE
static int __init sb_rst(int base)
{
int i;
outb( 1, base+SBDSP_RESET ); /* reset the DSP */
outb( 0, base+SBDSP_RESET );
for ( i=0; i<500; i++ ) /* delay */
inb(DPORT);
for ( i=0; i<100000; i++ )
{
if ( inb( base+SBDSP_DATA_AVAIL )&0x80 )
break;
}
if ( inb( base+SBDSP_READ )!=0xAA )
return 0;
return 1;
}
static int __init sb_cmd( int base, unsigned char val )
{
int i;
for ( i=100000; i; i-- )
{
if ( (inb( base+SBDSP_STATUS )&0x80)==0 )
{
outb( val, base+SBDSP_COMMAND );
break;
}
}
return i; /* i>0 == success */
}
#define ai_sgbase driver_use_1
static int __init probe_sgalaxy( struct address_info *ai )
{
struct resource *ports;
int n;
if (!request_region(ai->io_base, 4, "WSS config")) {
printk(KERN_ERR "sgalaxy: WSS IO port 0x%03x not available\n", ai->io_base);
return 0;
}
ports = request_region(ai->io_base + 4, 4, "ad1848");
if (!ports) {
printk(KERN_ERR "sgalaxy: WSS IO port 0x%03x not available\n", ai->io_base);
release_region(ai->io_base, 4);
return 0;
}
if (!request_region( ai->ai_sgbase, 0x10, "SoundGalaxy SB")) {
printk(KERN_ERR "sgalaxy: SB IO port 0x%03x not available\n", ai->ai_sgbase);
release_region(ai->io_base + 4, 4);
release_region(ai->io_base, 4);
return 0;
}
if (ad1848_detect(ports, NULL, ai->osp))
goto out; /* The card is already active, check irq etc... */
/* switch to MSS/WSS mode */
sb_rst( ai->ai_sgbase );
sb_cmd( ai->ai_sgbase, 9 );
sb_cmd( ai->ai_sgbase, 0 );
sleep( HZ/10 );
out:
if (!probe_ms_sound(ai, ports)) {
release_region(ai->io_base + 4, 4);
release_region(ai->io_base, 4);
release_region(ai->ai_sgbase, 0x10);
return 0;
}
attach_ms_sound(ai, ports, THIS_MODULE);
n=ai->slots[0];
if (n!=-1 && audio_devs[n]->mixer_dev != -1 ) {
AD1848_REROUTE( SOUND_MIXER_LINE1, SOUND_MIXER_LINE ); /* Line-in */
AD1848_REROUTE( SOUND_MIXER_LINE2, SOUND_MIXER_SYNTH ); /* FM+Wavetable*/
AD1848_REROUTE( SOUND_MIXER_LINE3, SOUND_MIXER_CD ); /* CD */
}
return 1;
}
static void __exit unload_sgalaxy( struct address_info *ai )
{
unload_ms_sound( ai );
release_region( ai->ai_sgbase, 0x10 );
}
static struct address_info cfg;
static int __initdata io = -1;
static int __initdata irq = -1;
static int __initdata dma = -1;
static int __initdata dma2 = -1;
static int __initdata sgbase = -1;
module_param(io, int, 0);
module_param(irq, int, 0);
module_param(dma, int, 0);
module_param(dma2, int, 0);
module_param(sgbase, int, 0);
static int __init init_sgalaxy(void)
{
cfg.io_base = io;
cfg.irq = irq;
cfg.dma = dma;
cfg.dma2 = dma2;
cfg.ai_sgbase = sgbase;
if (cfg.io_base == -1 || cfg.irq == -1 || cfg.dma == -1 || cfg.ai_sgbase == -1 ) {
printk(KERN_ERR "sgalaxy: io, irq, dma and sgbase must be set.\n");
return -EINVAL;
}
if ( probe_sgalaxy(&cfg) == 0 )
return -ENODEV;
return 0;
}
static void __exit cleanup_sgalaxy(void)
{
unload_sgalaxy(&cfg);
}
module_init(init_sgalaxy);
module_exit(cleanup_sgalaxy);
#ifndef MODULE
static int __init setup_sgalaxy(char *str)
{
/* io, irq, dma, dma2, sgbase */
int ints[6];
str = get_options(str, ARRAY_SIZE(ints), ints);
io = ints[1];
irq = ints[2];
dma = ints[3];
dma2 = ints[4];
sgbase = ints[5];
return 1;
}
__setup("sgalaxy=", setup_sgalaxy);
#endif
MODULE_LICENSE("GPL");

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -13,8 +13,6 @@ int DMAbuf_move_wrpointer(int dev, int l);
void DMAbuf_init(int dev, int dma1, int dma2);
void DMAbuf_deinit(int dev);
int DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode);
int DMAbuf_open_dma (int dev);
void DMAbuf_close_dma (int dev);
void DMAbuf_inputintr(int dev);
void DMAbuf_outputintr(int dev, int underflow_flag);
struct dma_buffparms;

Переглянути файл

@@ -1,13 +1,11 @@
#ifdef SEQUENCER_C
unsigned short semitone_tuning[24] =
static unsigned short semitone_tuning[24] =
{
/* 0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983,
/* 8 */ 15874, 16818, 17818, 18877, 20000, 21189, 22449, 23784,
/* 16 */ 25198, 26697, 28284, 29966, 31748, 33636, 35636, 37755
};
unsigned short cent_tuning[100] =
static unsigned short cent_tuning[100] =
{
/* 0 */ 10000, 10006, 10012, 10017, 10023, 10029, 10035, 10041,
/* 8 */ 10046, 10052, 10058, 10064, 10070, 10075, 10081, 10087,
@@ -23,7 +21,3 @@ unsigned short cent_tuning[100] =
/* 88 */ 10521, 10528, 10534, 10540, 10546, 10552, 10558, 10564,
/* 96 */ 10570, 10576, 10582, 10589
};
#else
extern unsigned short semitone_tuning[24];
extern unsigned short cent_tuning[100];
#endif

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,880 +0,0 @@
/*
* sound/oss/wf_midi.c
*
* The low level driver for the WaveFront ICS2115 MIDI interface(s)
* Note that there is also an MPU-401 emulation (actually, a UART-401
* emulation) on the CS4232 on the Tropez Plus. This code has nothing
* to do with that interface at all.
*
* The interface is essentially just a UART-401, but is has the
* interesting property of supporting what Turtle Beach called
* "Virtual MIDI" mode. In this mode, there are effectively *two*
* MIDI buses accessible via the interface, one that is routed
* solely to/from the external WaveFront synthesizer and the other
* corresponding to the pin/socket connector used to link external
* MIDI devices to the board.
*
* This driver fully supports this mode, allowing two distinct
* midi devices (/dev/midiNN and /dev/midiNN+1) to be used
* completely independently, giving 32 channels of MIDI routing,
* 16 to the WaveFront synth and 16 to the external MIDI bus.
*
* Switching between the two is accomplished externally by the driver
* using the two otherwise unused MIDI bytes. See the code for more details.
*
* NOTE: VIRTUAL MIDI MODE IS ON BY DEFAULT (see wavefront.c)
*
* The main reason to turn off Virtual MIDI mode is when you want to
* tightly couple the WaveFront synth with an external MIDI
* device. You won't be able to distinguish the source of any MIDI
* data except via SysEx ID, but thats probably OK, since for the most
* part, the WaveFront won't be sending any MIDI data at all.
*
* The main reason to turn on Virtual MIDI Mode is to provide two
* completely independent 16-channel MIDI buses, one to the
* WaveFront and one to any external MIDI devices. Given the 32
* voice nature of the WaveFront, its pretty easy to find a use
* for all 16 channels driving just that synth.
*
*/
/*
* Copyright (C) by Paul Barton-Davis 1998
* Some portions of this file are derived from work that is:
*
* CopyriGht (C) by Hannu Savolainen 1993-1996
*
* USS/Lite for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
*/
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include "sound_config.h"
#include <linux/wavefront.h>
#ifdef MODULE
struct wf_mpu_config {
int base;
#define DATAPORT(d) (d)->base
#define COMDPORT(d) (d)->base+1
#define STATPORT(d) (d)->base+1
int irq;
int opened;
int devno;
int synthno;
int mode;
#define MODE_MIDI 1
#define MODE_SYNTH 2
void (*inputintr) (int dev, unsigned char data);
char isvirtual; /* do virtual I/O stuff */
};
static struct wf_mpu_config devs[2];
static struct wf_mpu_config *phys_dev = &devs[0];
static struct wf_mpu_config *virt_dev = &devs[1];
static void start_uart_mode (void);
static DEFINE_SPINLOCK(lock);
#define OUTPUT_READY 0x40
#define INPUT_AVAIL 0x80
#define MPU_ACK 0xFE
#define UART_MODE_ON 0x3F
static inline int wf_mpu_status (void)
{
return inb (STATPORT (phys_dev));
}
static inline int input_avail (void)
{
return !(wf_mpu_status() & INPUT_AVAIL);
}
static inline int output_ready (void)
{
return !(wf_mpu_status() & OUTPUT_READY);
}
static inline int read_data (void)
{
return inb (DATAPORT (phys_dev));
}
static inline void write_data (unsigned char byte)
{
outb (byte, DATAPORT (phys_dev));
}
/*
* States for the input scanner (should be in dev_table.h)
*/
#define MST_SYSMSG 100 /* System message (sysx etc). */
#define MST_MTC 102 /* Midi Time Code (MTC) qframe msg */
#define MST_SONGSEL 103 /* Song select */
#define MST_SONGPOS 104 /* Song position pointer */
#define MST_TIMED 105 /* Leading timing byte rcvd */
/* buffer space check for input scanner */
#define BUFTEST(mi) if (mi->m_ptr >= MI_MAX || mi->m_ptr < 0) \
{printk(KERN_ERR "WF-MPU: Invalid buffer pointer %d/%d, s=%d\n", \
mi->m_ptr, mi->m_left, mi->m_state);mi->m_ptr--;}
static unsigned char len_tab[] = /* # of data bytes following a status
*/
{
2, /* 8x */
2, /* 9x */
2, /* Ax */
2, /* Bx */
1, /* Cx */
1, /* Dx */
2, /* Ex */
0 /* Fx */
};
static int
wf_mpu_input_scanner (int devno, int synthdev, unsigned char midic)
{
struct midi_input_info *mi = &midi_devs[devno]->in_info;
switch (mi->m_state) {
case MST_INIT:
switch (midic) {
case 0xf8:
/* Timer overflow */
break;
case 0xfc:
break;
case 0xfd:
/* XXX do something useful with this. If there is
an external MIDI timer (e.g. a hardware sequencer,
a useful timer can be derived ...
For now, no timer support.
*/
break;
case 0xfe:
return MPU_ACK;
break;
case 0xf0:
case 0xf1:
case 0xf2:
case 0xf3:
case 0xf4:
case 0xf5:
case 0xf6:
case 0xf7:
break;
case 0xf9:
break;
case 0xff:
mi->m_state = MST_SYSMSG;
break;
default:
if (midic <= 0xef) {
mi->m_state = MST_TIMED;
}
else
printk (KERN_ERR "<MPU: Unknown event %02x> ",
midic);
}
break;
case MST_TIMED:
{
int msg = ((int) (midic & 0xf0) >> 4);
mi->m_state = MST_DATA;
if (msg < 8) { /* Data byte */
msg = ((int) (mi->m_prev_status & 0xf0) >> 4);
msg -= 8;
mi->m_left = len_tab[msg] - 1;
mi->m_ptr = 2;
mi->m_buf[0] = mi->m_prev_status;
mi->m_buf[1] = midic;
if (mi->m_left <= 0) {
mi->m_state = MST_INIT;
do_midi_msg (synthdev, mi->m_buf, mi->m_ptr);
mi->m_ptr = 0;
}
} else if (msg == 0xf) { /* MPU MARK */
mi->m_state = MST_INIT;
switch (midic) {
case 0xf8:
break;
case 0xf9:
break;
case 0xfc:
break;
default:
break;
}
} else {
mi->m_prev_status = midic;
msg -= 8;
mi->m_left = len_tab[msg];
mi->m_ptr = 1;
mi->m_buf[0] = midic;
if (mi->m_left <= 0) {
mi->m_state = MST_INIT;
do_midi_msg (synthdev, mi->m_buf, mi->m_ptr);
mi->m_ptr = 0;
}
}
}
break;
case MST_SYSMSG:
switch (midic) {
case 0xf0:
mi->m_state = MST_SYSEX;
break;
case 0xf1:
mi->m_state = MST_MTC;
break;
case 0xf2:
mi->m_state = MST_SONGPOS;
mi->m_ptr = 0;
break;
case 0xf3:
mi->m_state = MST_SONGSEL;
break;
case 0xf6:
mi->m_state = MST_INIT;
/*
* Real time messages
*/
case 0xf8:
/* midi clock */
mi->m_state = MST_INIT;
/* XXX need ext MIDI timer support */
break;
case 0xfA:
mi->m_state = MST_INIT;
/* XXX need ext MIDI timer support */
break;
case 0xFB:
mi->m_state = MST_INIT;
/* XXX need ext MIDI timer support */
break;
case 0xFC:
mi->m_state = MST_INIT;
/* XXX need ext MIDI timer support */
break;
case 0xFE:
/* active sensing */
mi->m_state = MST_INIT;
break;
case 0xff:
mi->m_state = MST_INIT;
break;
default:
printk (KERN_ERR "unknown MIDI sysmsg %0x\n", midic);
mi->m_state = MST_INIT;
}
break;
case MST_MTC:
mi->m_state = MST_INIT;
break;
case MST_SYSEX:
if (midic == 0xf7) {
mi->m_state = MST_INIT;
} else {
/* XXX fix me */
}
break;
case MST_SONGPOS:
BUFTEST (mi);
mi->m_buf[mi->m_ptr++] = midic;
if (mi->m_ptr == 2) {
mi->m_state = MST_INIT;
mi->m_ptr = 0;
/* XXX need ext MIDI timer support */
}
break;
case MST_DATA:
BUFTEST (mi);
mi->m_buf[mi->m_ptr++] = midic;
if ((--mi->m_left) <= 0) {
mi->m_state = MST_INIT;
do_midi_msg (synthdev, mi->m_buf, mi->m_ptr);
mi->m_ptr = 0;
}
break;
default:
printk (KERN_ERR "Bad state %d ", mi->m_state);
mi->m_state = MST_INIT;
}
return 1;
}
static irqreturn_t
wf_mpuintr(int irq, void *dev_id, struct pt_regs *dummy)
{
struct wf_mpu_config *physical_dev = dev_id;
static struct wf_mpu_config *input_dev;
struct midi_input_info *mi = &midi_devs[physical_dev->devno]->in_info;
int n;
if (!input_avail()) { /* not for us */
return IRQ_NONE;
}
if (mi->m_busy)
return IRQ_HANDLED;
spin_lock(&lock);
mi->m_busy = 1;
if (!input_dev) {
input_dev = physical_dev;
}
n = 50; /* XXX why ? */
do {
unsigned char c = read_data ();
if (phys_dev->isvirtual) {
if (c == WF_EXTERNAL_SWITCH) {
input_dev = virt_dev;
continue;
} else if (c == WF_INTERNAL_SWITCH) {
input_dev = phys_dev;
continue;
} /* else just leave it as it is */
} else {
input_dev = phys_dev;
}
if (input_dev->mode == MODE_SYNTH) {
wf_mpu_input_scanner (input_dev->devno,
input_dev->synthno, c);
} else if (input_dev->opened & OPEN_READ) {
if (input_dev->inputintr) {
input_dev->inputintr (input_dev->devno, c);
}
}
} while (input_avail() && n-- > 0);
mi->m_busy = 0;
spin_unlock(&lock);
return IRQ_HANDLED;
}
static int
wf_mpu_open (int dev, int mode,
void (*input) (int dev, unsigned char data),
void (*output) (int dev)
)
{
struct wf_mpu_config *devc;
if (dev < 0 || dev >= num_midis || midi_devs[dev]==NULL)
return -(ENXIO);
if (phys_dev->devno == dev) {
devc = phys_dev;
} else if (phys_dev->isvirtual && virt_dev->devno == dev) {
devc = virt_dev;
} else {
printk (KERN_ERR "WF-MPU: unknown device number %d\n", dev);
return -(EINVAL);
}
if (devc->opened) {
return -(EBUSY);
}
devc->mode = MODE_MIDI;
devc->opened = mode;
devc->synthno = 0;
devc->inputintr = input;
return 0;
}
static void
wf_mpu_close (int dev)
{
struct wf_mpu_config *devc;
if (dev < 0 || dev >= num_midis || midi_devs[dev]==NULL)
return;
if (phys_dev->devno == dev) {
devc = phys_dev;
} else if (phys_dev->isvirtual && virt_dev->devno == dev) {
devc = virt_dev;
} else {
printk (KERN_ERR "WF-MPU: unknown device number %d\n", dev);
return;
}
devc->mode = 0;
devc->inputintr = NULL;
devc->opened = 0;
}
static int
wf_mpu_out (int dev, unsigned char midi_byte)
{
int timeout;
unsigned long flags;
static int lastoutdev = -1;
unsigned char switchch;
if (phys_dev->isvirtual && lastoutdev != dev) {
if (dev == phys_dev->devno) {
switchch = WF_INTERNAL_SWITCH;
} else if (dev == virt_dev->devno) {
switchch = WF_EXTERNAL_SWITCH;
} else {
printk (KERN_ERR "WF-MPU: bad device number %d", dev);
return (0);
}
/* XXX fix me */
for (timeout = 30000; timeout > 0 && !output_ready ();
timeout--);
spin_lock_irqsave(&lock,flags);
if (!output_ready ()) {
printk (KERN_WARNING "WF-MPU: Send switch "
"byte timeout\n");
spin_unlock_irqrestore(&lock,flags);
return 0;
}
write_data (switchch);
spin_unlock_irqrestore(&lock,flags);
}
lastoutdev = dev;
/*
* Sometimes it takes about 30000 loops before the output becomes ready
* (After reset). Normally it takes just about 10 loops.
*/
/* XXX fix me */
for (timeout = 30000; timeout > 0 && !output_ready (); timeout--);
spin_lock_irqsave(&lock,flags);
if (!output_ready ()) {
spin_unlock_irqrestore(&lock,flags);
printk (KERN_WARNING "WF-MPU: Send data timeout\n");
return 0;
}
write_data (midi_byte);
spin_unlock_irqrestore(&lock,flags);
return 1;
}
static inline int wf_mpu_start_read (int dev) {
return 0;
}
static inline int wf_mpu_end_read (int dev) {
return 0;
}
static int wf_mpu_ioctl (int dev, unsigned cmd, void __user *arg)
{
printk (KERN_WARNING
"WF-MPU: Intelligent mode not supported by hardware.\n");
return -(EINVAL);
}
static int wf_mpu_buffer_status (int dev)
{
return 0;
}
static struct synth_operations wf_mpu_synth_operations[2];
static struct midi_operations wf_mpu_midi_operations[2];
static struct midi_operations wf_mpu_midi_proto =
{
.owner = THIS_MODULE,
.info = {"WF-MPU MIDI", 0, MIDI_CAP_MPU401, SNDCARD_MPU401},
.in_info = {0}, /* in_info */
.open = wf_mpu_open,
.close = wf_mpu_close,
.ioctl = wf_mpu_ioctl,
.outputc = wf_mpu_out,
.start_read = wf_mpu_start_read,
.end_read = wf_mpu_end_read,
.buffer_status = wf_mpu_buffer_status,
};
static struct synth_info wf_mpu_synth_info_proto =
{"WaveFront MPU-401 interface", 0,
SYNTH_TYPE_MIDI, MIDI_TYPE_MPU401, 0, 128, 0, 128, SYNTH_CAP_INPUT};
static struct synth_info wf_mpu_synth_info[2];
static int
wf_mpu_synth_ioctl (int dev, unsigned int cmd, void __user *arg)
{
int midi_dev;
int index;
midi_dev = synth_devs[dev]->midi_dev;
if (midi_dev < 0 || midi_dev > num_midis || midi_devs[midi_dev]==NULL)
return -(ENXIO);
if (midi_dev == phys_dev->devno) {
index = 0;
} else if (phys_dev->isvirtual && midi_dev == virt_dev->devno) {
index = 1;
} else {
return -(EINVAL);
}
switch (cmd) {
case SNDCTL_SYNTH_INFO:
if (copy_to_user(arg,
&wf_mpu_synth_info[index],
sizeof (struct synth_info)))
return -EFAULT;
return 0;
case SNDCTL_SYNTH_MEMAVL:
return 0x7fffffff;
default:
return -EINVAL;
}
}
static int
wf_mpu_synth_open (int dev, int mode)
{
int midi_dev;
struct wf_mpu_config *devc;
midi_dev = synth_devs[dev]->midi_dev;
if (midi_dev < 0 || midi_dev > num_midis || midi_devs[midi_dev]==NULL) {
return -(ENXIO);
}
if (phys_dev->devno == midi_dev) {
devc = phys_dev;
} else if (phys_dev->isvirtual && virt_dev->devno == midi_dev) {
devc = virt_dev;
} else {
printk (KERN_ERR "WF-MPU: unknown device number %d\n", dev);
return -(EINVAL);
}
if (devc->opened) {
return -(EBUSY);
}
devc->mode = MODE_SYNTH;
devc->synthno = dev;
devc->opened = mode;
devc->inputintr = NULL;
return 0;
}
static void
wf_mpu_synth_close (int dev)
{
int midi_dev;
struct wf_mpu_config *devc;
midi_dev = synth_devs[dev]->midi_dev;
if (phys_dev->devno == midi_dev) {
devc = phys_dev;
} else if (phys_dev->isvirtual && virt_dev->devno == midi_dev) {
devc = virt_dev;
} else {
printk (KERN_ERR "WF-MPU: unknown device number %d\n", dev);
return;
}
devc->inputintr = NULL;
devc->opened = 0;
devc->mode = 0;
}
#define _MIDI_SYNTH_C_
#define MIDI_SYNTH_NAME "WaveFront (MIDI)"
#define MIDI_SYNTH_CAPS SYNTH_CAP_INPUT
#include "midi_synth.h"
static struct synth_operations wf_mpu_synth_proto =
{
.owner = THIS_MODULE,
.id = "WaveFront (ICS2115)",
.info = NULL, /* info field, filled in during configuration */
.midi_dev = 0, /* MIDI dev XXX should this be -1 ? */
.synth_type = SYNTH_TYPE_MIDI,
.synth_subtype = SAMPLE_TYPE_WAVEFRONT,
.open = wf_mpu_synth_open,
.close = wf_mpu_synth_close,
.ioctl = wf_mpu_synth_ioctl,
.kill_note = midi_synth_kill_note,
.start_note = midi_synth_start_note,
.set_instr = midi_synth_set_instr,
.reset = midi_synth_reset,
.hw_control = midi_synth_hw_control,
.load_patch = midi_synth_load_patch,
.aftertouch = midi_synth_aftertouch,
.controller = midi_synth_controller,
.panning = midi_synth_panning,
.bender = midi_synth_bender,
.setup_voice = midi_synth_setup_voice,
.send_sysex = midi_synth_send_sysex
};
static int
config_wf_mpu (struct wf_mpu_config *dev)
{
int is_external;
char *name;
int index;
if (dev == phys_dev) {
name = "WaveFront internal MIDI";
is_external = 0;
index = 0;
memcpy ((char *) &wf_mpu_synth_operations[index],
(char *) &wf_mpu_synth_proto,
sizeof (struct synth_operations));
} else {
name = "WaveFront external MIDI";
is_external = 1;
index = 1;
/* no synth operations for an external MIDI interface */
}
memcpy ((char *) &wf_mpu_synth_info[dev->devno],
(char *) &wf_mpu_synth_info_proto,
sizeof (struct synth_info));
strcpy (wf_mpu_synth_info[index].name, name);
wf_mpu_synth_operations[index].midi_dev = dev->devno;
wf_mpu_synth_operations[index].info = &wf_mpu_synth_info[index];
memcpy ((char *) &wf_mpu_midi_operations[index],
(char *) &wf_mpu_midi_proto,
sizeof (struct midi_operations));
if (is_external) {
wf_mpu_midi_operations[index].converter = NULL;
} else {
wf_mpu_midi_operations[index].converter =
&wf_mpu_synth_operations[index];
}
strcpy (wf_mpu_midi_operations[index].info.name, name);
midi_devs[dev->devno] = &wf_mpu_midi_operations[index];
midi_devs[dev->devno]->in_info.m_busy = 0;
midi_devs[dev->devno]->in_info.m_state = MST_INIT;
midi_devs[dev->devno]->in_info.m_ptr = 0;
midi_devs[dev->devno]->in_info.m_left = 0;
midi_devs[dev->devno]->in_info.m_prev_status = 0;
devs[index].opened = 0;
devs[index].mode = 0;
return (0);
}
int virtual_midi_enable (void)
{
if ((virt_dev->devno < 0) &&
(virt_dev->devno = sound_alloc_mididev()) == -1) {
printk (KERN_ERR
"WF-MPU: too many midi devices detected\n");
return -1;
}
config_wf_mpu (virt_dev);
phys_dev->isvirtual = 1;
return virt_dev->devno;
}
int
virtual_midi_disable (void)
{
unsigned long flags;
spin_lock_irqsave(&lock,flags);
wf_mpu_close (virt_dev->devno);
/* no synth on virt_dev, so no need to call wf_mpu_synth_close() */
phys_dev->isvirtual = 0;
spin_unlock_irqrestore(&lock,flags);
return 0;
}
int __init detect_wf_mpu (int irq, int io_base)
{
if (!request_region(io_base, 2, "wavefront midi")) {
printk (KERN_WARNING "WF-MPU: I/O port %x already in use.\n",
io_base);
return -1;
}
phys_dev->base = io_base;
phys_dev->irq = irq;
phys_dev->devno = -1;
virt_dev->devno = -1;
return 0;
}
int __init install_wf_mpu (void)
{
if ((phys_dev->devno = sound_alloc_mididev()) < 0){
printk (KERN_ERR "WF-MPU: Too many MIDI devices detected.\n");
release_region(phys_dev->base, 2);
return -1;
}
phys_dev->isvirtual = 0;
if (config_wf_mpu (phys_dev)) {
printk (KERN_WARNING
"WF-MPU: configuration for MIDI device %d failed\n",
phys_dev->devno);
sound_unload_mididev (phys_dev->devno);
}
/* OK, now we're configured to handle an interrupt ... */
if (request_irq (phys_dev->irq, wf_mpuintr, IRQF_DISABLED|IRQF_SHARED,
"wavefront midi", phys_dev) < 0) {
printk (KERN_ERR "WF-MPU: Failed to allocate IRQ%d\n",
phys_dev->irq);
return -1;
}
/* This being a WaveFront (ICS-2115) emulated MPU-401, we have
to switch it into UART (dumb) mode, because otherwise, it
won't do anything at all.
*/
start_uart_mode ();
return phys_dev->devno;
}
void
uninstall_wf_mpu (void)
{
release_region (phys_dev->base, 2);
free_irq (phys_dev->irq, phys_dev);
sound_unload_mididev (phys_dev->devno);
if (virt_dev->devno >= 0) {
sound_unload_mididev (virt_dev->devno);
}
}
static void
start_uart_mode (void)
{
int ok, i;
unsigned long flags;
spin_lock_irqsave(&lock,flags);
/* XXX fix me */
for (i = 0; i < 30000 && !output_ready (); i++);
outb (UART_MODE_ON, COMDPORT(phys_dev));
for (ok = 0, i = 50000; i > 0 && !ok; i--) {
if (input_avail ()) {
if (read_data () == MPU_ACK) {
ok = 1;
}
}
}
spin_unlock_irqrestore(&lock,flags);
}
#endif

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,361 +0,0 @@
#ifndef __YMFPCI_H
#define __YMFPCI_H
/*
* Copyright (c) by Jaroslav Kysela <perex@suse.cz>
* Definitions for Yahama YMF724/740/744/754 chips
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include <linux/config.h>
#include <linux/mutex.h>
/*
* Direct registers
*/
/* #define YMFREG(codec, reg) (codec->port + YDSXGR_##reg) */
#define YDSXGR_INTFLAG 0x0004
#define YDSXGR_ACTIVITY 0x0006
#define YDSXGR_GLOBALCTRL 0x0008
#define YDSXGR_ZVCTRL 0x000A
#define YDSXGR_TIMERCTRL 0x0010
#define YDSXGR_TIMERCTRL_TEN 0x0001
#define YDSXGR_TIMERCTRL_TIEN 0x0002
#define YDSXGR_TIMERCOUNT 0x0012
#define YDSXGR_SPDIFOUTCTRL 0x0018
#define YDSXGR_SPDIFOUTSTATUS 0x001C
#define YDSXGR_EEPROMCTRL 0x0020
#define YDSXGR_SPDIFINCTRL 0x0034
#define YDSXGR_SPDIFINSTATUS 0x0038
#define YDSXGR_DSPPROGRAMDL 0x0048
#define YDSXGR_DLCNTRL 0x004C
#define YDSXGR_GPIOININTFLAG 0x0050
#define YDSXGR_GPIOININTENABLE 0x0052
#define YDSXGR_GPIOINSTATUS 0x0054
#define YDSXGR_GPIOOUTCTRL 0x0056
#define YDSXGR_GPIOFUNCENABLE 0x0058
#define YDSXGR_GPIOTYPECONFIG 0x005A
#define YDSXGR_AC97CMDDATA 0x0060
#define YDSXGR_AC97CMDADR 0x0062
#define YDSXGR_PRISTATUSDATA 0x0064
#define YDSXGR_PRISTATUSADR 0x0066
#define YDSXGR_SECSTATUSDATA 0x0068
#define YDSXGR_SECSTATUSADR 0x006A
#define YDSXGR_SECCONFIG 0x0070
#define YDSXGR_LEGACYOUTVOL 0x0080
#define YDSXGR_LEGACYOUTVOLL 0x0080
#define YDSXGR_LEGACYOUTVOLR 0x0082
#define YDSXGR_NATIVEDACOUTVOL 0x0084
#define YDSXGR_NATIVEDACOUTVOLL 0x0084
#define YDSXGR_NATIVEDACOUTVOLR 0x0086
#define YDSXGR_SPDIFOUTVOL 0x0088
#define YDSXGR_SPDIFOUTVOLL 0x0088
#define YDSXGR_SPDIFOUTVOLR 0x008A
#define YDSXGR_AC3OUTVOL 0x008C
#define YDSXGR_AC3OUTVOLL 0x008C
#define YDSXGR_AC3OUTVOLR 0x008E
#define YDSXGR_PRIADCOUTVOL 0x0090
#define YDSXGR_PRIADCOUTVOLL 0x0090
#define YDSXGR_PRIADCOUTVOLR 0x0092
#define YDSXGR_LEGACYLOOPVOL 0x0094
#define YDSXGR_LEGACYLOOPVOLL 0x0094
#define YDSXGR_LEGACYLOOPVOLR 0x0096
#define YDSXGR_NATIVEDACLOOPVOL 0x0098
#define YDSXGR_NATIVEDACLOOPVOLL 0x0098
#define YDSXGR_NATIVEDACLOOPVOLR 0x009A
#define YDSXGR_SPDIFLOOPVOL 0x009C
#define YDSXGR_SPDIFLOOPVOLL 0x009E
#define YDSXGR_SPDIFLOOPVOLR 0x009E
#define YDSXGR_AC3LOOPVOL 0x00A0
#define YDSXGR_AC3LOOPVOLL 0x00A0
#define YDSXGR_AC3LOOPVOLR 0x00A2
#define YDSXGR_PRIADCLOOPVOL 0x00A4
#define YDSXGR_PRIADCLOOPVOLL 0x00A4
#define YDSXGR_PRIADCLOOPVOLR 0x00A6
#define YDSXGR_NATIVEADCINVOL 0x00A8
#define YDSXGR_NATIVEADCINVOLL 0x00A8
#define YDSXGR_NATIVEADCINVOLR 0x00AA
#define YDSXGR_NATIVEDACINVOL 0x00AC
#define YDSXGR_NATIVEDACINVOLL 0x00AC
#define YDSXGR_NATIVEDACINVOLR 0x00AE
#define YDSXGR_BUF441OUTVOL 0x00B0
#define YDSXGR_BUF441OUTVOLL 0x00B0
#define YDSXGR_BUF441OUTVOLR 0x00B2
#define YDSXGR_BUF441LOOPVOL 0x00B4
#define YDSXGR_BUF441LOOPVOLL 0x00B4
#define YDSXGR_BUF441LOOPVOLR 0x00B6
#define YDSXGR_SPDIFOUTVOL2 0x00B8
#define YDSXGR_SPDIFOUTVOL2L 0x00B8
#define YDSXGR_SPDIFOUTVOL2R 0x00BA
#define YDSXGR_SPDIFLOOPVOL2 0x00BC
#define YDSXGR_SPDIFLOOPVOL2L 0x00BC
#define YDSXGR_SPDIFLOOPVOL2R 0x00BE
#define YDSXGR_ADCSLOTSR 0x00C0
#define YDSXGR_RECSLOTSR 0x00C4
#define YDSXGR_ADCFORMAT 0x00C8
#define YDSXGR_RECFORMAT 0x00CC
#define YDSXGR_P44SLOTSR 0x00D0
#define YDSXGR_STATUS 0x0100
#define YDSXGR_CTRLSELECT 0x0104
#define YDSXGR_MODE 0x0108
#define YDSXGR_SAMPLECOUNT 0x010C
#define YDSXGR_NUMOFSAMPLES 0x0110
#define YDSXGR_CONFIG 0x0114
#define YDSXGR_PLAYCTRLSIZE 0x0140
#define YDSXGR_RECCTRLSIZE 0x0144
#define YDSXGR_EFFCTRLSIZE 0x0148
#define YDSXGR_WORKSIZE 0x014C
#define YDSXGR_MAPOFREC 0x0150
#define YDSXGR_MAPOFEFFECT 0x0154
#define YDSXGR_PLAYCTRLBASE 0x0158
#define YDSXGR_RECCTRLBASE 0x015C
#define YDSXGR_EFFCTRLBASE 0x0160
#define YDSXGR_WORKBASE 0x0164
#define YDSXGR_DSPINSTRAM 0x1000
#define YDSXGR_CTRLINSTRAM 0x4000
#define YDSXG_AC97READCMD 0x8000
#define YDSXG_AC97WRITECMD 0x0000
#define PCIR_LEGCTRL 0x40
#define PCIR_ELEGCTRL 0x42
#define PCIR_DSXGCTRL 0x48
#define PCIR_DSXPWRCTRL1 0x4a
#define PCIR_DSXPWRCTRL2 0x4e
#define PCIR_OPLADR 0x60
#define PCIR_SBADR 0x62
#define PCIR_MPUADR 0x64
#define YDSXG_DSPLENGTH 0x0080
#define YDSXG_CTRLLENGTH 0x3000
#define YDSXG_DEFAULT_WORK_SIZE 0x0400
#define YDSXG_PLAYBACK_VOICES 64
#define YDSXG_CAPTURE_VOICES 2
#define YDSXG_EFFECT_VOICES 5
/* maxinum number of AC97 codecs connected, AC97 2.0 defined 4 */
#define NR_AC97 2
#define YMF_SAMPF 256 /* Samples per frame @48000 */
/*
* The slot/voice control bank (2 of these per voice)
*/
typedef struct stru_ymfpci_playback_bank {
u32 format;
u32 loop_default;
u32 base; /* 32-bit address */
u32 loop_start; /* 32-bit offset */
u32 loop_end; /* 32-bit offset */
u32 loop_frac; /* 8-bit fraction - loop_start */
u32 delta_end; /* pitch delta end */
u32 lpfK_end;
u32 eg_gain_end;
u32 left_gain_end;
u32 right_gain_end;
u32 eff1_gain_end;
u32 eff2_gain_end;
u32 eff3_gain_end;
u32 lpfQ;
u32 status; /* P3: Always 0 for some reason. */
u32 num_of_frames;
u32 loop_count;
u32 start; /* P3: J. reads this to know where chip is. */
u32 start_frac;
u32 delta;
u32 lpfK;
u32 eg_gain;
u32 left_gain;
u32 right_gain;
u32 eff1_gain;
u32 eff2_gain;
u32 eff3_gain;
u32 lpfD1;
u32 lpfD2;
} ymfpci_playback_bank_t;
typedef struct stru_ymfpci_capture_bank {
u32 base; /* 32-bit address (aligned at 4) */
u32 loop_end; /* size in BYTES (aligned at 4) */
u32 start; /* 32-bit offset */
u32 num_of_loops; /* counter */
} ymfpci_capture_bank_t;
typedef struct stru_ymfpci_effect_bank {
u32 base; /* 32-bit address */
u32 loop_end; /* 32-bit offset */
u32 start; /* 32-bit offset */
u32 temp;
} ymfpci_effect_bank_t;
typedef struct ymf_voice ymfpci_voice_t;
/*
* Throughout the code Yaroslav names YMF unit pointer "codec"
* even though it does not correspond to any codec. Must be historic.
* We replace it with "unit" over time.
* AC97 parts use "codec" to denote a codec, naturally.
*/
typedef struct ymf_unit ymfpci_t;
typedef enum {
YMFPCI_PCM,
YMFPCI_SYNTH,
YMFPCI_MIDI
} ymfpci_voice_type_t;
struct ymf_voice {
// ymfpci_t *codec;
int number;
char use, pcm, synth, midi; // bool
ymfpci_playback_bank_t *bank;
struct ymf_pcm *ypcm;
dma_addr_t bank_ba;
};
struct ymf_capture {
// struct ymf_unit *unit;
int use;
ymfpci_capture_bank_t *bank;
struct ymf_pcm *ypcm;
};
struct ymf_unit {
u8 rev; /* PCI revision */
void __iomem *reg_area_virt;
void *dma_area_va;
dma_addr_t dma_area_ba;
unsigned int dma_area_size;
dma_addr_t bank_base_capture;
dma_addr_t bank_base_effect;
dma_addr_t work_base;
unsigned int work_size;
u32 *ctrl_playback;
dma_addr_t ctrl_playback_ba;
ymfpci_playback_bank_t *bank_playback[YDSXG_PLAYBACK_VOICES][2];
ymfpci_capture_bank_t *bank_capture[YDSXG_CAPTURE_VOICES][2];
ymfpci_effect_bank_t *bank_effect[YDSXG_EFFECT_VOICES][2];
int start_count;
int suspended;
u32 active_bank;
struct ymf_voice voices[YDSXG_PLAYBACK_VOICES];
struct ymf_capture capture[YDSXG_CAPTURE_VOICES];
struct ac97_codec *ac97_codec[NR_AC97];
u16 ac97_features;
struct pci_dev *pci;
#ifdef CONFIG_SOUND_YMFPCI_LEGACY
/* legacy hardware resources */
unsigned int iosynth, iomidi;
struct address_info opl3_data, mpu_data;
#endif
spinlock_t reg_lock;
spinlock_t voice_lock;
spinlock_t ac97_lock;
/* soundcore stuff */
int dev_audio;
struct mutex open_mutex;
struct list_head ymf_devs;
struct list_head states; /* List of states for this unit */
};
struct ymf_dmabuf {
dma_addr_t dma_addr;
void *rawbuf;
unsigned buforder;
/* OSS buffer management stuff */
unsigned numfrag;
unsigned fragshift;
/* our buffer acts like a circular ring */
unsigned hwptr; /* where dma last started */
unsigned swptr; /* where driver last clear/filled */
int count; /* fill count */
unsigned total_bytes; /* total bytes dmaed by hardware */
wait_queue_head_t wait; /* put process on wait queue when no more space in buffer */
/* redundant, but makes calculations easier */
unsigned fragsize;
unsigned dmasize; /* Total rawbuf[] size */
/* OSS stuff */
unsigned mapped:1;
unsigned ready:1;
unsigned ossfragshift;
int ossmaxfrags;
unsigned subdivision;
};
struct ymf_pcm_format {
int format; /* OSS format */
int rate; /* rate in Hz */
int voices; /* number of voices */
int shift; /* redundant, computed from the above */
};
typedef enum {
PLAYBACK_VOICE,
CAPTURE_REC,
CAPTURE_AC97,
EFFECT_DRY_LEFT,
EFFECT_DRY_RIGHT,
EFFECT_EFF1,
EFFECT_EFF2,
EFFECT_EFF3
} ymfpci_pcm_type_t;
/* This is variant record, but we hate unions. Little waste on pointers []. */
struct ymf_pcm {
ymfpci_pcm_type_t type;
struct ymf_state *state;
ymfpci_voice_t *voices[2];
int capture_bank_number;
struct ymf_dmabuf dmabuf;
int running;
int spdif;
};
/*
* "Software" or virtual channel, an instance of opened /dev/dsp.
* It may have two physical channels (pcms) for duplex operations.
*/
struct ymf_state {
struct list_head chain;
struct ymf_unit *unit; /* backpointer */
struct ymf_pcm rpcm, wpcm;
struct ymf_pcm_format format;
};
#endif /* __YMFPCI_H */

Різницю між файлами не показано, бо вона завелика Завантажити різницю

Переглянути файл

@@ -1,319 +0,0 @@
#include <linux/init.h>
unsigned char page_zero[] __initdata = {
0x01, 0x7c, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00,
0x11, 0x00, 0x20, 0x00, 0x32, 0x00, 0x40, 0x00, 0x13, 0x00, 0x00,
0x00, 0x14, 0x02, 0x76, 0x00, 0x60, 0x00, 0x80, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x19,
0x01, 0x1a, 0x01, 0x20, 0x01, 0x40, 0x01, 0x17, 0x00, 0x00, 0x01,
0x80, 0x01, 0x20, 0x00, 0x10, 0x01, 0xa0, 0x03, 0xd1, 0x00, 0x00,
0x01, 0xf2, 0x02, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0xf4, 0x02,
0xe0, 0x00, 0x15, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x17,
0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x50, 0x00, 0x00, 0x00,
0x40, 0x00, 0x00, 0x00, 0x71, 0x02, 0x00, 0x00, 0x60, 0x00, 0x00,
0x00, 0x92, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb3, 0x02,
0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x40,
0x00, 0x80, 0x00, 0xf5, 0x00, 0x20, 0x00, 0x70, 0x00, 0xa0, 0x02,
0x11, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x02, 0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0x17, 0x00, 0x1b, 0x00,
0x1d, 0x02, 0xdf
};
unsigned char page_one[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00,
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xd8, 0x00, 0x00,
0x02, 0x20, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01,
0xc0, 0x01, 0xfa, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x02, 0x60,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xc0, 0x02, 0x80, 0x00,
0x00, 0x02, 0xfb, 0x02, 0xa0, 0x00, 0x00, 0x00, 0x1b, 0x02, 0xd7,
0x00, 0x00, 0x02, 0xf7, 0x03, 0x20, 0x03, 0x00, 0x00, 0x00, 0x00,
0x1c, 0x03, 0x3c, 0x00, 0x00, 0x03, 0x3f, 0x00, 0x00, 0x03, 0xc0,
0x00, 0x00, 0x03, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5d, 0x00,
0x00, 0x03, 0xc0, 0x00, 0x00, 0x03, 0x7d, 0x00, 0x00, 0x03, 0xc0,
0x00, 0x00, 0x03, 0x9e, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x03,
0xbe, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0xdb, 0x00, 0x00, 0x02, 0xdb, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00,
0x02, 0xfb, 0x00, 0x00, 0x02, 0xc0, 0x02, 0x40, 0x02, 0xfb, 0x02,
0x60, 0x00, 0x1b
};
unsigned char page_two[] __initdata = {
0xc4, 0x00, 0x44, 0x07, 0x44, 0x00, 0x40, 0x25, 0x01, 0x06, 0xc4,
0x07, 0x40, 0x25, 0x01, 0x00, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x07,
0x05, 0x05, 0x05, 0x04, 0x07, 0x05, 0x04, 0x07, 0x05, 0x44, 0x46,
0x44, 0x46, 0x46, 0x07, 0x05, 0x44, 0x46, 0x05, 0x46, 0x05, 0x46,
0x05, 0x46, 0x05, 0x44, 0x46, 0x05, 0x07, 0x44, 0x46, 0x05, 0x07,
0x44, 0x46, 0x05, 0x07, 0x44, 0x46, 0x05, 0x07, 0x44, 0x05, 0x05,
0x05, 0x44, 0x05, 0x05, 0x05, 0x46, 0x05, 0x46, 0x05, 0x46, 0x05,
0x46, 0x05, 0x46, 0x07, 0x46, 0x07, 0x44
};
unsigned char page_three[] __initdata = {
0x07, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x40, 0x00, 0x40, 0x06,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
0xc0, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00,
0x60, 0x00, 0x70, 0x00, 0x40, 0x00, 0x40, 0x00, 0x42, 0x00, 0x40,
0x00, 0x02, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
0x00, 0x42, 0x00, 0x40, 0x00, 0x42, 0x00, 0x02, 0x00, 0x02, 0x00,
0x02, 0x00, 0x42, 0x00, 0xc0, 0x00, 0x40
};
unsigned char page_four[] __initdata = {
0x63, 0x03, 0x26, 0x02, 0x2c, 0x00, 0x24, 0x00, 0x2e, 0x02, 0x02,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x20, 0x00, 0x60, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x60, 0x00,
0x20, 0x00, 0x60, 0x00, 0x20, 0x00, 0x60, 0x00, 0x20, 0x00, 0x60,
0x00, 0x20, 0x00, 0x60, 0x00, 0x20, 0x00, 0x60, 0x00, 0x20, 0x00,
0x20, 0x00, 0x22, 0x02, 0x22, 0x02, 0x20, 0x00, 0x60, 0x00, 0x22,
0x02, 0x62, 0x02, 0x20, 0x01, 0x21, 0x01
};
unsigned char page_six[] __initdata = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00,
0x00, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e,
0x00, 0x00, 0x10, 0x00, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x00,
0x16, 0x00, 0x00, 0x18, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x1c, 0x00,
0x00, 0x1e, 0x00, 0x00, 0x20, 0x00, 0x00, 0x22, 0x00, 0x00, 0x24,
0x00, 0x00, 0x26, 0x00, 0x00, 0x28, 0x00, 0x00, 0x2a, 0x00, 0x00,
0x2c, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x30, 0x00, 0x00, 0x32, 0x00,
0x00, 0x34, 0x00, 0x00, 0x36, 0x00, 0x00, 0x38, 0x00, 0x00, 0x3a,
0x00, 0x00, 0x3c, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x40, 0x00, 0x00,
0x42, 0x03, 0x00, 0x44, 0x01, 0x00, 0x46, 0x0a, 0x21, 0x48, 0x0d,
0x23, 0x4a, 0x23, 0x1b, 0x4c, 0x37, 0x8f, 0x4e, 0x45, 0x77, 0x50,
0x52, 0xe2, 0x52, 0x1c, 0x92, 0x54, 0x1c, 0x52, 0x56, 0x07, 0x00,
0x58, 0x2f, 0xc6, 0x5a, 0x0b, 0x00, 0x5c, 0x30, 0x06, 0x5e, 0x17,
0x00, 0x60, 0x3d, 0xda, 0x62, 0x29, 0x00, 0x64, 0x3e, 0x41, 0x66,
0x39, 0x00, 0x68, 0x4c, 0x48, 0x6a, 0x49, 0x00, 0x6c, 0x4c, 0x6c,
0x6e, 0x11, 0xd2, 0x70, 0x16, 0x0c, 0x72, 0x00, 0x00, 0x74, 0x00,
0x80, 0x76, 0x0f, 0x00, 0x78, 0x00, 0x80, 0x7a, 0x13, 0x00, 0x7c,
0x80, 0x00, 0x7e, 0x80, 0x80
};
unsigned char page_seven[] __initdata = {
0x0f, 0xff, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
0x08, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0f,
0xff, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x0f, 0xff,
0x0f, 0xff, 0x0f, 0xff, 0x02, 0xe9, 0x06, 0x8c, 0x06, 0x8c, 0x0f,
0xff, 0x1a, 0x75, 0x0d, 0x8b, 0x04, 0xe9, 0x0b, 0x16, 0x1a, 0x38,
0x0d, 0xc8, 0x04, 0x6f, 0x0b, 0x91, 0x0f, 0xff, 0x06, 0x40, 0x06,
0x40, 0x02, 0x8f, 0x0f, 0xff, 0x06, 0x62, 0x06, 0x62, 0x02, 0x7b,
0x0f, 0xff, 0x06, 0x97, 0x06, 0x97, 0x02, 0x52, 0x0f, 0xff, 0x06,
0xf6, 0x06, 0xf6, 0x02, 0x19, 0x05, 0x55, 0x05, 0x55, 0x05, 0x55,
0x05, 0x55, 0x05, 0x55, 0x05, 0x55, 0x05, 0x55, 0x05, 0x55, 0x14,
0xda, 0x0d, 0x93, 0x04, 0xda, 0x05, 0x93, 0x14, 0xda, 0x0d, 0x93,
0x04, 0xda, 0x05, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00
};
unsigned char page_zero_v2[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
unsigned char page_one_v2[] __initdata = {
0x01, 0xc0, 0x01, 0xfa, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
unsigned char page_two_v2[] __initdata = {
0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
unsigned char page_three_v2[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
unsigned char page_four_v2[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
unsigned char page_seven_v2[] __initdata = {
0x0f, 0xff, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
unsigned char mod_v2[] __initdata = {
0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02,
0x00, 0x01, 0x03, 0x02, 0x00, 0x01, 0x04, 0x02, 0x00, 0x01, 0x05,
0x02, 0x00, 0x01, 0x06, 0x02, 0x00, 0x01, 0x07, 0x02, 0x00, 0xb0,
0x20, 0xb1, 0x20, 0xb2, 0x20, 0xb3, 0x20, 0xb4, 0x20, 0xb5, 0x20,
0xb6, 0x20, 0xb7, 0x20, 0xf0, 0x20, 0xf1, 0x20, 0xf2, 0x20, 0xf3,
0x20, 0xf4, 0x20, 0xf5, 0x20, 0xf6, 0x20, 0xf7, 0x20, 0x10, 0xff,
0x11, 0xff, 0x12, 0xff, 0x13, 0xff, 0x14, 0xff, 0x15, 0xff, 0x16,
0xff, 0x17, 0xff, 0x20, 0xff, 0x21, 0xff, 0x22, 0xff, 0x23, 0xff,
0x24, 0xff, 0x25, 0xff, 0x26, 0xff, 0x27, 0xff, 0x30, 0x00, 0x31,
0x00, 0x32, 0x00, 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00,
0x37, 0x00, 0x40, 0x00, 0x41, 0x00, 0x42, 0x00, 0x43, 0x00, 0x44,
0x00, 0x45, 0x00, 0x46, 0x00, 0x47, 0x00, 0x50, 0x00, 0x51, 0x00,
0x52, 0x00, 0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57,
0x00, 0x60, 0x00, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00, 0x64, 0x00,
0x65, 0x00, 0x66, 0x00, 0x67, 0x00, 0x70, 0xc0, 0x71, 0xc0, 0x72,
0xc0, 0x73, 0xc0, 0x74, 0xc0, 0x75, 0xc0, 0x76, 0xc0, 0x77, 0xc0,
0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85,
0x00, 0x86, 0x00, 0x87, 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00,
0x93, 0x00, 0x94, 0x00, 0x95, 0x00, 0x96, 0x00, 0x97, 0x00, 0xa0,
0x00, 0xa1, 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00,
0xa6, 0x00, 0xa7, 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3,
0x00, 0xc4, 0x00, 0xc5, 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xd0, 0x00,
0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6,
0x00, 0xd7, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3, 0x00,
0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0x01, 0x00, 0x02,
0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x03,
0x02, 0x01, 0x01, 0x04, 0x02, 0x01, 0x01, 0x05, 0x02, 0x01, 0x01,
0x06, 0x02, 0x01, 0x01, 0x07, 0x02, 0x01
};
unsigned char coefficients[] __initdata = {
0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x00, 0x4b, 0x03,
0x11, 0x00, 0x4d, 0x01, 0x32, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49,
0x00, 0x00, 0x07, 0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x01,
0x40, 0x02, 0x40, 0x01, 0x41, 0x02, 0x60, 0x07, 0x40, 0x00, 0x00,
0x07, 0x41, 0x00, 0x00, 0x07, 0x47, 0x00, 0x00, 0x07, 0x4a, 0x00,
0x00, 0x00, 0x47, 0x01, 0x00, 0x00, 0x4a, 0x01, 0x20, 0x07, 0x47,
0x00, 0x00, 0x07, 0x4a, 0x00, 0x00, 0x07, 0x7c, 0x00, 0x00, 0x07,
0x7e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x07, 0x7c, 0x00, 0x00,
0x07, 0x7e, 0x00, 0x00, 0x07, 0x44, 0x00, 0x00, 0x00, 0x44, 0x01,
0x00, 0x07, 0x44, 0x00, 0x00, 0x07, 0x42, 0x00, 0x00, 0x07, 0x43,
0x00, 0x00, 0x00, 0x42, 0x01, 0x1a, 0x00, 0x43, 0x01, 0x20, 0x07,
0x42, 0x00, 0x00, 0x07, 0x43, 0x00, 0x00, 0x07, 0x40, 0x00, 0x00,
0x07, 0x41, 0x00, 0x00, 0x01, 0x40, 0x02, 0x40, 0x01, 0x41, 0x02,
0x60, 0x07, 0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x07, 0x44,
0x0f, 0xff, 0x07, 0x42, 0x00, 0x00, 0x07, 0x43, 0x00, 0x00, 0x07,
0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x07, 0x51, 0x06, 0x40,
0x07, 0x50, 0x06, 0x40, 0x07, 0x4f, 0x03, 0x81, 0x07, 0x53, 0x1a,
0x76, 0x07, 0x54, 0x0d, 0x8b, 0x07, 0x55, 0x04, 0xe9, 0x07, 0x56,
0x0b, 0x17, 0x07, 0x57, 0x1a, 0x38, 0x07, 0x58, 0x0d, 0xc9, 0x07,
0x59, 0x04, 0x6f, 0x07, 0x5a, 0x0b, 0x91, 0x07, 0x73, 0x14, 0xda,
0x07, 0x74, 0x0d, 0x93, 0x07, 0x75, 0x04, 0xd9, 0x07, 0x76, 0x05,
0x93, 0x07, 0x77, 0x14, 0xda, 0x07, 0x78, 0x0d, 0x93, 0x07, 0x79,
0x04, 0xd9, 0x07, 0x7a, 0x05, 0x93, 0x07, 0x5e, 0x03, 0x68, 0x07,
0x5c, 0x04, 0x31, 0x07, 0x5d, 0x04, 0x31, 0x07, 0x62, 0x03, 0x52,
0x07, 0x60, 0x04, 0x76, 0x07, 0x61, 0x04, 0x76, 0x07, 0x66, 0x03,
0x2e, 0x07, 0x64, 0x04, 0xda, 0x07, 0x65, 0x04, 0xda, 0x07, 0x6a,
0x02, 0xf6, 0x07, 0x68, 0x05, 0x62, 0x07, 0x69, 0x05, 0x62, 0x06,
0x46, 0x0a, 0x22, 0x06, 0x48, 0x0d, 0x24, 0x06, 0x6e, 0x11, 0xd3,
0x06, 0x70, 0x15, 0xcb, 0x06, 0x52, 0x20, 0x93, 0x06, 0x54, 0x20,
0x54, 0x06, 0x4a, 0x27, 0x1d, 0x06, 0x58, 0x2f, 0xc8, 0x06, 0x5c,
0x30, 0x07, 0x06, 0x4c, 0x37, 0x90, 0x06, 0x60, 0x3d, 0xdb, 0x06,
0x64, 0x3e, 0x42, 0x06, 0x4e, 0x45, 0x78, 0x06, 0x68, 0x4c, 0x48,
0x06, 0x6c, 0x4c, 0x6c, 0x06, 0x50, 0x52, 0xe2, 0x06, 0x42, 0x02,
0xba
};
unsigned char coefficients2[] __initdata = {
0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x45, 0x0f,
0xff, 0x07, 0x48, 0x0f, 0xff, 0x07, 0x7b, 0x04, 0xcc, 0x07, 0x7d,
0x04, 0xcc, 0x07, 0x7c, 0x00, 0x00, 0x07, 0x7e, 0x00, 0x00, 0x07,
0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x47, 0x00, 0x00,
0x07, 0x4a, 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x07, 0x4e, 0x00, 0x00
};
unsigned char coefficients3[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x00, 0x51, 0x00,
0x51, 0x00, 0x7a, 0x00, 0x7a, 0x00, 0xa3, 0x00, 0xa3, 0x00, 0xcc,
0x00, 0xcc, 0x00, 0xf5, 0x00, 0xf5, 0x01, 0x1e, 0x01, 0x1e, 0x01,
0x47, 0x01, 0x47, 0x01, 0x70, 0x01, 0x70, 0x01, 0x99, 0x01, 0x99,
0x01, 0xc2, 0x01, 0xc2, 0x01, 0xeb, 0x01, 0xeb, 0x02, 0x14, 0x02,
0x14, 0x02, 0x3d, 0x02, 0x3d, 0x02, 0x66, 0x02, 0x66, 0x02, 0x8f,
0x02, 0x8f, 0x02, 0xb8, 0x02, 0xb8, 0x02, 0xe1, 0x02, 0xe1, 0x03,
0x0a, 0x03, 0x0a, 0x03, 0x33, 0x03, 0x33, 0x03, 0x5c, 0x03, 0x5c,
0x03, 0x85, 0x03, 0x85, 0x03, 0xae, 0x03, 0xae, 0x03, 0xd7, 0x03,
0xd7, 0x04, 0x00, 0x04, 0x00, 0x04, 0x28, 0x04, 0x28, 0x04, 0x51,
0x04, 0x51, 0x04, 0x7a, 0x04, 0x7a, 0x04, 0xa3, 0x04, 0xa3, 0x04,
0xcc, 0x04, 0xcc, 0x04, 0xf5, 0x04, 0xf5, 0x05, 0x1e, 0x05, 0x1e,
0x05, 0x47, 0x05, 0x47, 0x05, 0x70, 0x05, 0x70, 0x05, 0x99, 0x05,
0x99, 0x05, 0xc2, 0x05, 0xc2, 0x05, 0xeb, 0x05, 0xeb, 0x06, 0x14,
0x06, 0x14, 0x06, 0x3d, 0x06, 0x3d, 0x06, 0x66, 0x06, 0x66, 0x06,
0x8f, 0x06, 0x8f, 0x06, 0xb8, 0x06, 0xb8, 0x06, 0xe1, 0x06, 0xe1,
0x07, 0x0a, 0x07, 0x0a, 0x07, 0x33, 0x07, 0x33, 0x07, 0x5c, 0x07,
0x5c, 0x07, 0x85, 0x07, 0x85, 0x07, 0xae, 0x07, 0xae, 0x07, 0xd7,
0x07, 0xd7, 0x08, 0x00, 0x08, 0x00, 0x08, 0x28, 0x08, 0x28, 0x08,
0x51, 0x08, 0x51, 0x08, 0x7a, 0x08, 0x7a, 0x08, 0xa3, 0x08, 0xa3,
0x08, 0xcc, 0x08, 0xcc, 0x08, 0xf5, 0x08, 0xf5, 0x09, 0x1e, 0x09,
0x1e, 0x09, 0x47, 0x09, 0x47, 0x09, 0x70, 0x09, 0x70, 0x09, 0x99,
0x09, 0x99, 0x09, 0xc2, 0x09, 0xc2, 0x09, 0xeb, 0x09, 0xeb, 0x0a,
0x14, 0x0a, 0x14, 0x0a, 0x3d, 0x0a, 0x3d, 0x0a, 0x66, 0x0a, 0x66,
0x0a, 0x8f, 0x0a, 0x8f, 0x0a, 0xb8, 0x0a, 0xb8, 0x0a, 0xe1, 0x0a,
0xe1, 0x0b, 0x0a, 0x0b, 0x0a, 0x0b, 0x33, 0x0b, 0x33, 0x0b, 0x5c,
0x0b, 0x5c, 0x0b, 0x85, 0x0b, 0x85, 0x0b, 0xae, 0x0b, 0xae, 0x0b,
0xd7, 0x0b, 0xd7, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x28, 0x0c, 0x28,
0x0c, 0x51, 0x0c, 0x51, 0x0c, 0x7a, 0x0c, 0x7a, 0x0c, 0xa3, 0x0c,
0xa3, 0x0c, 0xcc, 0x0c, 0xcc, 0x0c, 0xf5, 0x0c, 0xf5, 0x0d, 0x1e,
0x0d, 0x1e, 0x0d, 0x47, 0x0d, 0x47, 0x0d, 0x70, 0x0d, 0x70, 0x0d,
0x99, 0x0d, 0x99, 0x0d, 0xc2, 0x0d, 0xc2, 0x0d, 0xeb, 0x0d, 0xeb,
0x0e, 0x14, 0x0e, 0x14, 0x0e, 0x3d, 0x0e, 0x3d, 0x0e, 0x66, 0x0e,
0x66, 0x0e, 0x8f, 0x0e, 0x8f, 0x0e, 0xb8, 0x0e, 0xb8, 0x0e, 0xe1,
0x0e, 0xe1, 0x0f, 0x0a, 0x0f, 0x0a, 0x0f, 0x33, 0x0f, 0x33, 0x0f,
0x5c, 0x0f, 0x5c, 0x0f, 0x85, 0x0f, 0x85, 0x0f, 0xae, 0x0f, 0xae,
0x0f, 0xd7, 0x0f, 0xd7, 0x0f, 0xff, 0x0f, 0xff
};

Переглянути файл

@@ -1,24 +0,0 @@
#ifndef __yss255_h__
#define __yss255_h__
extern unsigned char page_zero[256];
extern unsigned char page_one[256];
extern unsigned char page_two[128];
extern unsigned char page_three[128];
extern unsigned char page_four[128];
extern unsigned char page_six[192];
extern unsigned char page_seven[256];
extern unsigned char page_zero_v2[96];
extern unsigned char page_one_v2[96];
extern unsigned char page_two_v2[48];
extern unsigned char page_three_v2[48];
extern unsigned char page_four_v2[48];
extern unsigned char page_seven_v2[96];
extern unsigned char mod_v2[304];
extern unsigned char coefficients[364];
extern unsigned char coefficients2[56];
extern unsigned char coefficients3[404];
#endif /* __ys225_h__ */