Commit eb4698f3 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] Remove xxx_t typedefs: PCI emu10k1

Modules: EMU10K1/EMU10K2 driver

Remove xxx_t typedefs from the PCI emu10k1 driver.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 3d19f804
This diff is collapsed.
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
#define SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH "emu10k1-synth" #define SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH "emu10k1-synth"
/* argument for snd_seq_device_new */ /* argument for snd_seq_device_new */
typedef struct snd_emu10k1_synth_arg { struct snd_emu10k1_synth_arg {
emu10k1_t *hwptr; /* chip */ struct snd_emu10k1 *hwptr; /* chip */
int index; /* sequencer client index */ int index; /* sequencer client index */
int seq_ports; /* number of sequencer ports to be created */ int seq_ports; /* number of sequencer ports to be created */
int max_voices; /* maximum number of voices for wavetable */ int max_voices; /* maximum number of voices for wavetable */
} snd_emu10k1_synth_arg_t; };
#define EMU10K1_MAX_MEMSIZE (32 * 1024 * 1024) /* 32MB */ #define EMU10K1_MAX_MEMSIZE (32 * 1024 * 1024) /* 32MB */
......
...@@ -101,10 +101,10 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci, ...@@ -101,10 +101,10 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) const struct pci_device_id *pci_id)
{ {
static int dev; static int dev;
snd_card_t *card; struct snd_card *card;
emu10k1_t *emu; struct snd_emu10k1 *emu;
#ifdef ENABLE_SYNTH #ifdef ENABLE_SYNTH
snd_seq_device_t *wave = NULL; struct snd_seq_device *wave = NULL;
#endif #endif
int err; int err;
...@@ -186,11 +186,11 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci, ...@@ -186,11 +186,11 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
} }
#ifdef ENABLE_SYNTH #ifdef ENABLE_SYNTH
if (snd_seq_device_new(card, 1, SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, if (snd_seq_device_new(card, 1, SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH,
sizeof(snd_emu10k1_synth_arg_t), &wave) < 0 || sizeof(struct snd_emu10k1_synth_arg), &wave) < 0 ||
wave == NULL) { wave == NULL) {
snd_printk(KERN_WARNING "can't initialize Emu10k1 wavetable synth\n"); snd_printk(KERN_WARNING "can't initialize Emu10k1 wavetable synth\n");
} else { } else {
snd_emu10k1_synth_arg_t *arg; struct snd_emu10k1_synth_arg *arg;
arg = SNDRV_SEQ_DEVICE_ARGPTR(wave); arg = SNDRV_SEQ_DEVICE_ARGPTR(wave);
strcpy(wave->name, "Emu-10k1 Synth"); strcpy(wave->name, "Emu-10k1 Synth");
arg->hwptr = emu; arg->hwptr = emu;
......
...@@ -27,26 +27,28 @@ enum { ...@@ -27,26 +27,28 @@ enum {
}; };
/* Keeps track of what we are finding */ /* Keeps track of what we are finding */
typedef struct best_voice { struct best_voice {
unsigned int time; unsigned int time;
int voice; int voice;
} best_voice_t; };
/* /*
* prototypes * prototypes
*/ */
static void lookup_voices(snd_emux_t *emu, emu10k1_t *hw, best_voice_t *best, int active_only); static void lookup_voices(struct snd_emux *emu, struct snd_emu10k1 *hw,
static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port); struct best_voice *best, int active_only);
static int start_voice(snd_emux_voice_t *vp); static struct snd_emux_voice *get_voice(struct snd_emux *emu,
static void trigger_voice(snd_emux_voice_t *vp); struct snd_emux_port *port);
static void release_voice(snd_emux_voice_t *vp); static int start_voice(struct snd_emux_voice *vp);
static void update_voice(snd_emux_voice_t *vp, int update); static void trigger_voice(struct snd_emux_voice *vp);
static void terminate_voice(snd_emux_voice_t *vp); static void release_voice(struct snd_emux_voice *vp);
static void free_voice(snd_emux_voice_t *vp); static void update_voice(struct snd_emux_voice *vp, int update);
static void terminate_voice(struct snd_emux_voice *vp);
static void set_fmmod(emu10k1_t *hw, snd_emux_voice_t *vp); static void free_voice(struct snd_emux_voice *vp);
static void set_fm2frq2(emu10k1_t *hw, snd_emux_voice_t *vp);
static void set_filterQ(emu10k1_t *hw, snd_emux_voice_t *vp); static void set_fmmod(struct snd_emu10k1 *hw, struct snd_emux_voice *vp);
static void set_fm2frq2(struct snd_emu10k1 *hw, struct snd_emux_voice *vp);
static void set_filterQ(struct snd_emu10k1 *hw, struct snd_emux_voice *vp);
/* /*
* Ensure a value is between two points * Ensure a value is between two points
...@@ -59,7 +61,7 @@ static void set_filterQ(emu10k1_t *hw, snd_emux_voice_t *vp); ...@@ -59,7 +61,7 @@ static void set_filterQ(emu10k1_t *hw, snd_emux_voice_t *vp);
/* /*
* set up operators * set up operators
*/ */
static snd_emux_operators_t emu10k1_ops = { static struct snd_emux_operators emu10k1_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.get_voice = get_voice, .get_voice = get_voice,
.prepare = start_voice, .prepare = start_voice,
...@@ -73,7 +75,7 @@ static snd_emux_operators_t emu10k1_ops = { ...@@ -73,7 +75,7 @@ static snd_emux_operators_t emu10k1_ops = {
}; };
void void
snd_emu10k1_ops_setup(snd_emux_t *emu) snd_emu10k1_ops_setup(struct snd_emux *emu)
{ {
emu->ops = emu10k1_ops; emu->ops = emu10k1_ops;
} }
...@@ -85,11 +87,11 @@ snd_emu10k1_ops_setup(snd_emux_t *emu) ...@@ -85,11 +87,11 @@ snd_emu10k1_ops_setup(snd_emux_t *emu)
* terminate most inactive voice and give it as a pcm voice. * terminate most inactive voice and give it as a pcm voice.
*/ */
int int
snd_emu10k1_synth_get_voice(emu10k1_t *hw) snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw)
{ {
snd_emux_t *emu; struct snd_emux *emu;
snd_emux_voice_t *vp; struct snd_emux_voice *vp;
best_voice_t best[V_END]; struct best_voice best[V_END];
unsigned long flags; unsigned long flags;
int i; int i;
...@@ -123,10 +125,10 @@ snd_emu10k1_synth_get_voice(emu10k1_t *hw) ...@@ -123,10 +125,10 @@ snd_emu10k1_synth_get_voice(emu10k1_t *hw)
* turn off the voice (not terminated) * turn off the voice (not terminated)
*/ */
static void static void
release_voice(snd_emux_voice_t *vp) release_voice(struct snd_emux_voice *vp)
{ {
int dcysusv; int dcysusv;
emu10k1_t *hw; struct snd_emu10k1 *hw;
hw = vp->hw; hw = vp->hw;
dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease; dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease;
...@@ -140,16 +142,16 @@ release_voice(snd_emux_voice_t *vp) ...@@ -140,16 +142,16 @@ release_voice(snd_emux_voice_t *vp)
* terminate the voice * terminate the voice
*/ */
static void static void
terminate_voice(snd_emux_voice_t *vp) terminate_voice(struct snd_emux_voice *vp)
{ {
emu10k1_t *hw; struct snd_emu10k1 *hw;
snd_assert(vp, return); snd_assert(vp, return);
hw = vp->hw; hw = vp->hw;
snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK); snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK);
if (vp->block) { if (vp->block) {
emu10k1_memblk_t *emem; struct snd_emu10k1_memblk *emem;
emem = (emu10k1_memblk_t *)vp->block; emem = (struct snd_emu10k1_memblk *)vp->block;
if (emem->map_locked > 0) if (emem->map_locked > 0)
emem->map_locked--; emem->map_locked--;
} }
...@@ -159,9 +161,9 @@ terminate_voice(snd_emux_voice_t *vp) ...@@ -159,9 +161,9 @@ terminate_voice(snd_emux_voice_t *vp)
* release the voice to system * release the voice to system
*/ */
static void static void
free_voice(snd_emux_voice_t *vp) free_voice(struct snd_emux_voice *vp)
{ {
emu10k1_t *hw; struct snd_emu10k1 *hw;
hw = vp->hw; hw = vp->hw;
if (vp->ch >= 0) { if (vp->ch >= 0) {
...@@ -181,9 +183,9 @@ free_voice(snd_emux_voice_t *vp) ...@@ -181,9 +183,9 @@ free_voice(snd_emux_voice_t *vp)
* update registers * update registers
*/ */
static void static void
update_voice(snd_emux_voice_t *vp, int update) update_voice(struct snd_emux_voice *vp, int update)
{ {
emu10k1_t *hw; struct snd_emu10k1 *hw;
hw = vp->hw; hw = vp->hw;
if (update & SNDRV_EMUX_UPDATE_VOLUME) if (update & SNDRV_EMUX_UPDATE_VOLUME)
...@@ -210,10 +212,11 @@ update_voice(snd_emux_voice_t *vp, int update) ...@@ -210,10 +212,11 @@ update_voice(snd_emux_voice_t *vp, int update)
*/ */
/* spinlock held! */ /* spinlock held! */
static void static void
lookup_voices(snd_emux_t *emu, emu10k1_t *hw, best_voice_t *best, int active_only) lookup_voices(struct snd_emux *emu, struct snd_emu10k1 *hw,
struct best_voice *best, int active_only)
{ {
snd_emux_voice_t *vp; struct snd_emux_voice *vp;
best_voice_t *bp; struct best_voice *bp;
int i; int i;
for (i = 0; i < V_END; i++) { for (i = 0; i < V_END; i++) {
...@@ -274,12 +277,12 @@ lookup_voices(snd_emux_t *emu, emu10k1_t *hw, best_voice_t *best, int active_onl ...@@ -274,12 +277,12 @@ lookup_voices(snd_emux_t *emu, emu10k1_t *hw, best_voice_t *best, int active_onl
* *
* emu->voice_lock is already held. * emu->voice_lock is already held.
*/ */
static snd_emux_voice_t * static struct snd_emux_voice *
get_voice(snd_emux_t *emu, snd_emux_port_t *port) get_voice(struct snd_emux *emu, struct snd_emux_port *port)
{ {
emu10k1_t *hw; struct snd_emu10k1 *hw;
snd_emux_voice_t *vp; struct snd_emux_voice *vp;
best_voice_t best[V_END]; struct best_voice best[V_END];
int i; int i;
hw = emu->hw; hw = emu->hw;
...@@ -290,7 +293,7 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port) ...@@ -290,7 +293,7 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port)
vp = &emu->voices[best[i].voice]; vp = &emu->voices[best[i].voice];
if (vp->ch < 0) { if (vp->ch < 0) {
/* allocate a voice */ /* allocate a voice */
emu10k1_voice_t *hwvoice; struct snd_emu10k1_voice *hwvoice;
if (snd_emu10k1_voice_alloc(hw, EMU10K1_SYNTH, 1, &hwvoice) < 0 || hwvoice == NULL) if (snd_emu10k1_voice_alloc(hw, EMU10K1_SYNTH, 1, &hwvoice) < 0 || hwvoice == NULL)
continue; continue;
vp->ch = hwvoice->number; vp->ch = hwvoice->number;
...@@ -308,21 +311,21 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port) ...@@ -308,21 +311,21 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port)
* prepare envelopes and LFOs * prepare envelopes and LFOs
*/ */
static int static int
start_voice(snd_emux_voice_t *vp) start_voice(struct snd_emux_voice *vp)
{ {
unsigned int temp; unsigned int temp;
int ch; int ch;
unsigned int addr, mapped_offset; unsigned int addr, mapped_offset;
snd_midi_channel_t *chan; struct snd_midi_channel *chan;
emu10k1_t *hw; struct snd_emu10k1 *hw;
emu10k1_memblk_t *emem; struct snd_emu10k1_memblk *emem;
hw = vp->hw; hw = vp->hw;
ch = vp->ch; ch = vp->ch;
snd_assert(ch >= 0, return -EINVAL); snd_assert(ch >= 0, return -EINVAL);
chan = vp->chan; chan = vp->chan;
emem = (emu10k1_memblk_t *)vp->block; emem = (struct snd_emu10k1_memblk *)vp->block;
if (emem == NULL) if (emem == NULL)
return -EINVAL; return -EINVAL;
emem->map_locked++; emem->map_locked++;
...@@ -463,15 +466,15 @@ start_voice(snd_emux_voice_t *vp) ...@@ -463,15 +466,15 @@ start_voice(snd_emux_voice_t *vp)
* Start envelope * Start envelope
*/ */
static void static void
trigger_voice(snd_emux_voice_t *vp) trigger_voice(struct snd_emux_voice *vp)
{ {
unsigned int temp, ptarget; unsigned int temp, ptarget;
emu10k1_t *hw; struct snd_emu10k1 *hw;
emu10k1_memblk_t *emem; struct snd_emu10k1_memblk *emem;
hw = vp->hw; hw = vp->hw;
emem = (emu10k1_memblk_t *)vp->block; emem = (struct snd_emu10k1_memblk *)vp->block;
if (! emem || emem->mapped_page < 0) if (! emem || emem->mapped_page < 0)
return; /* not mapped */ return; /* not mapped */
...@@ -495,7 +498,7 @@ trigger_voice(snd_emux_voice_t *vp) ...@@ -495,7 +498,7 @@ trigger_voice(snd_emux_voice_t *vp)
/* set lfo1 modulation height and cutoff */ /* set lfo1 modulation height and cutoff */
static void static void
set_fmmod(emu10k1_t *hw, snd_emux_voice_t *vp) set_fmmod(struct snd_emu10k1 *hw, struct snd_emux_voice *vp)
{ {
unsigned short fmmod; unsigned short fmmod;
short pitch; short pitch;
...@@ -513,7 +516,7 @@ set_fmmod(emu10k1_t *hw, snd_emux_voice_t *vp) ...@@ -513,7 +516,7 @@ set_fmmod(emu10k1_t *hw, snd_emux_voice_t *vp)
/* set lfo2 pitch & frequency */ /* set lfo2 pitch & frequency */
static void static void
set_fm2frq2(emu10k1_t *hw, snd_emux_voice_t *vp) set_fm2frq2(struct snd_emu10k1 *hw, struct snd_emux_voice *vp)
{ {
unsigned short fm2frq2; unsigned short fm2frq2;
short pitch; short pitch;
...@@ -531,7 +534,7 @@ set_fm2frq2(emu10k1_t *hw, snd_emux_voice_t *vp) ...@@ -531,7 +534,7 @@ set_fm2frq2(emu10k1_t *hw, snd_emux_voice_t *vp)
/* set filterQ */ /* set filterQ */
static void static void
set_filterQ(emu10k1_t *hw, snd_emux_voice_t *vp) set_filterQ(struct snd_emu10k1 *hw, struct snd_emux_voice *vp)
{ {
unsigned int val; unsigned int val;
val = snd_emu10k1_ptr_read(hw, CCCA, vp->ch) & ~CCCA_RESONANCE; val = snd_emu10k1_ptr_read(hw, CCCA, vp->ch) & ~CCCA_RESONANCE;
......
...@@ -52,7 +52,7 @@ MODULE_LICENSE("GPL"); ...@@ -52,7 +52,7 @@ MODULE_LICENSE("GPL");
* EMU10K1 init / done * EMU10K1 init / done
*************************************************************************/ *************************************************************************/
void snd_emu10k1_voice_init(emu10k1_t * emu, int ch) void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int ch)
{ {
snd_emu10k1_ptr_write(emu, DCYSUSV, ch, 0); snd_emu10k1_ptr_write(emu, DCYSUSV, ch, 0);
snd_emu10k1_ptr_write(emu, IP, ch, 0); snd_emu10k1_ptr_write(emu, IP, ch, 0);
...@@ -97,7 +97,7 @@ void snd_emu10k1_voice_init(emu10k1_t * emu, int ch) ...@@ -97,7 +97,7 @@ void snd_emu10k1_voice_init(emu10k1_t * emu, int ch)
} }
} }
static int __devinit snd_emu10k1_init(emu10k1_t * emu, int enable_ir) static int __devinit snd_emu10k1_init(struct snd_emu10k1 * emu, int enable_ir)
{ {
int ch, idx, err; int ch, idx, err;
unsigned int silent_page; unsigned int silent_page;
...@@ -336,14 +336,14 @@ static int __devinit snd_emu10k1_init(emu10k1_t * emu, int enable_ir) ...@@ -336,14 +336,14 @@ static int __devinit snd_emu10k1_init(emu10k1_t * emu, int enable_ir)
snd_emu10k1_intr_enable(emu, INTE_PCIERRORENABLE); snd_emu10k1_intr_enable(emu, INTE_PCIERRORENABLE);
emu->reserved_page = (emu10k1_memblk_t *)snd_emu10k1_synth_alloc(emu, 4096); emu->reserved_page = (struct snd_emu10k1_memblk *)snd_emu10k1_synth_alloc(emu, 4096);
if (emu->reserved_page) if (emu->reserved_page)
emu->reserved_page->map_locked = 1; emu->reserved_page->map_locked = 1;
return 0; return 0;
} }
static int snd_emu10k1_done(emu10k1_t * emu) static int snd_emu10k1_done(struct snd_emu10k1 * emu)
{ {
int ch; int ch;
...@@ -384,7 +384,7 @@ static int snd_emu10k1_done(emu10k1_t * emu) ...@@ -384,7 +384,7 @@ static int snd_emu10k1_done(emu10k1_t * emu)
/* remove reserved page */ /* remove reserved page */
if (emu->reserved_page != NULL) { if (emu->reserved_page != NULL) {
snd_emu10k1_synth_free(emu, (snd_util_memblk_t *)emu->reserved_page); snd_emu10k1_synth_free(emu, (struct snd_util_memblk *)emu->reserved_page);
emu->reserved_page = NULL; emu->reserved_page = NULL;
} }
...@@ -474,7 +474,7 @@ static int snd_emu10k1_done(emu10k1_t * emu) ...@@ -474,7 +474,7 @@ static int snd_emu10k1_done(emu10k1_t * emu)
* register. * register.
*/ */
static void snd_emu10k1_ecard_write(emu10k1_t * emu, unsigned int value) static void snd_emu10k1_ecard_write(struct snd_emu10k1 * emu, unsigned int value)
{ {
unsigned short count; unsigned short count;
unsigned int data; unsigned int data;
...@@ -512,7 +512,7 @@ static void snd_emu10k1_ecard_write(emu10k1_t * emu, unsigned int value) ...@@ -512,7 +512,7 @@ static void snd_emu10k1_ecard_write(emu10k1_t * emu, unsigned int value)
* channel. * channel.
*/ */
static void snd_emu10k1_ecard_setadcgain(emu10k1_t * emu, static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 * emu,
unsigned short gain) unsigned short gain)
{ {
unsigned int bit; unsigned int bit;
...@@ -540,7 +540,7 @@ static void snd_emu10k1_ecard_setadcgain(emu10k1_t * emu, ...@@ -540,7 +540,7 @@ static void snd_emu10k1_ecard_setadcgain(emu10k1_t * emu,
snd_emu10k1_ecard_write(emu, emu->ecard_ctrl); snd_emu10k1_ecard_write(emu, emu->ecard_ctrl);
} }
static int __devinit snd_emu10k1_ecard_init(emu10k1_t * emu) static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu)
{ {
unsigned int hc_value; unsigned int hc_value;
...@@ -580,7 +580,7 @@ static int __devinit snd_emu10k1_ecard_init(emu10k1_t * emu) ...@@ -580,7 +580,7 @@ static int __devinit snd_emu10k1_ecard_init(emu10k1_t * emu)
return 0; return 0;
} }
static int __devinit snd_emu10k1_cardbus_init(emu10k1_t * emu) static int __devinit snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu)
{ {
unsigned long special_port; unsigned long special_port;
unsigned int value; unsigned int value;
...@@ -609,7 +609,7 @@ static int __devinit snd_emu10k1_cardbus_init(emu10k1_t * emu) ...@@ -609,7 +609,7 @@ static int __devinit snd_emu10k1_cardbus_init(emu10k1_t * emu)
* Create the EMU10K1 instance * Create the EMU10K1 instance
*/ */
static int snd_emu10k1_free(emu10k1_t *emu) static int snd_emu10k1_free(struct snd_emu10k1 *emu)
{ {
if (emu->port) { /* avoid access to already used hardware */ if (emu->port) { /* avoid access to already used hardware */
snd_emu10k1_fx8010_tram_setup(emu, 0); snd_emu10k1_fx8010_tram_setup(emu, 0);
...@@ -634,13 +634,13 @@ static int snd_emu10k1_free(emu10k1_t *emu) ...@@ -634,13 +634,13 @@ static int snd_emu10k1_free(emu10k1_t *emu)
return 0; return 0;
} }
static int snd_emu10k1_dev_free(snd_device_t *device) static int snd_emu10k1_dev_free(struct snd_device *device)
{ {
emu10k1_t *emu = device->device_data; struct snd_emu10k1 *emu = device->device_data;
return snd_emu10k1_free(emu); return snd_emu10k1_free(emu);
} }
static emu_chip_details_t emu_chip_details[] = { static struct snd_emu_chip_details emu_chip_details[] = {
/* Audigy 2 Value AC3 out does not work yet. Need to find out how to turn off interpolators.*/ /* Audigy 2 Value AC3 out does not work yet. Need to find out how to turn off interpolators.*/
/* Tested by James@superbug.co.uk 3rd July 2005 */ /* Tested by James@superbug.co.uk 3rd July 2005 */
{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10011102, {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10011102,
...@@ -890,21 +890,21 @@ static emu_chip_details_t emu_chip_details[] = { ...@@ -890,21 +890,21 @@ static emu_chip_details_t emu_chip_details[] = {
{ } /* terminator */ { } /* terminator */
}; };
int __devinit snd_emu10k1_create(snd_card_t * card, int __devinit snd_emu10k1_create(struct snd_card *card,
struct pci_dev * pci, struct pci_dev * pci,
unsigned short extin_mask, unsigned short extin_mask,
unsigned short extout_mask, unsigned short extout_mask,
long max_cache_bytes, long max_cache_bytes,
int enable_ir, int enable_ir,
uint subsystem, uint subsystem,
emu10k1_t ** remu) struct snd_emu10k1 ** remu)
{ {
emu10k1_t *emu; struct snd_emu10k1 *emu;
int err; int err;
int is_audigy; int is_audigy;
unsigned char revision; unsigned char revision;
const emu_chip_details_t *c; const struct snd_emu_chip_details *c;
static snd_device_ops_t ops = { static struct snd_device_ops ops = {
.dev_free = snd_emu10k1_dev_free, .dev_free = snd_emu10k1_dev_free,
}; };
...@@ -1041,7 +1041,8 @@ int __devinit snd_emu10k1_create(snd_card_t * card, ...@@ -1041,7 +1041,8 @@ int __devinit snd_emu10k1_create(snd_card_t * card,
snd_emu10k1_free(emu); snd_emu10k1_free(emu);
return -ENOMEM; return -ENOMEM;
} }
emu->memhdr->block_extra_size = sizeof(emu10k1_memblk_t) - sizeof(snd_util_memblk_t); emu->memhdr->block_extra_size = sizeof(struct snd_emu10k1_memblk) -
sizeof(struct snd_util_memblk);
pci_set_master(pci); pci_set_master(pci);
......
...@@ -35,14 +35,15 @@ ...@@ -35,14 +35,15 @@
* allocate a sample block and copy data from userspace * allocate a sample block and copy data from userspace
*/ */
int int
snd_emu10k1_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, snd_emu10k1_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
snd_util_memhdr_t *hdr, const void __user *data, long count) struct snd_util_memhdr *hdr,
const void __user *data, long count)
{ {
int offset; int offset;
int truesize, size, loopsize, blocksize; int truesize, size, loopsize, blocksize;
int loopend, sampleend; int loopend, sampleend;
unsigned int start_addr; unsigned int start_addr;
emu10k1_t *emu; struct snd_emu10k1 *emu;
emu = rec->hw; emu = rec->hw;
snd_assert(sp != NULL, return -EINVAL); snd_assert(sp != NULL, return -EINVAL);
...@@ -205,10 +206,10 @@ snd_emu10k1_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, ...@@ -205,10 +206,10 @@ snd_emu10k1_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
* free a sample block * free a sample block
*/ */
int int
snd_emu10k1_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_emu10k1_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp,
snd_util_memhdr_t *hdr) struct snd_util_memhdr *hdr)
{ {
emu10k1_t *emu; struct snd_emu10k1 *emu;
emu = rec->hw; emu = rec->hw;
snd_assert(sp != NULL, return -EINVAL); snd_assert(sp != NULL, return -EINVAL);
......
...@@ -28,11 +28,11 @@ MODULE_LICENSE("GPL"); ...@@ -28,11 +28,11 @@ MODULE_LICENSE("GPL");
/* /*
* create a new hardware dependent device for Emu10k1 * create a new hardware dependent device for Emu10k1
*/ */
static int snd_emu10k1_synth_new_device(snd_seq_device_t *dev) static int snd_emu10k1_synth_new_device(struct snd_seq_device *dev)
{ {
snd_emux_t *emu; struct snd_emux *emu;
emu10k1_t *hw; struct snd_emu10k1 *hw;
snd_emu10k1_synth_arg_t *arg; struct snd_emu10k1_synth_arg *arg;
unsigned long flags; unsigned long flags;
arg = SNDRV_SEQ_DEVICE_ARGPTR(dev); arg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
...@@ -76,10 +76,10 @@ static int snd_emu10k1_synth_new_device(snd_seq_device_t *dev) ...@@ -76,10 +76,10 @@ static int snd_emu10k1_synth_new_device(snd_seq_device_t *dev)
return 0; return 0;
} }
static int snd_emu10k1_synth_delete_device(snd_seq_device_t *dev) static int snd_emu10k1_synth_delete_device(struct snd_seq_device *dev)
{ {
snd_emux_t *emu; struct snd_emux *emu;
emu10k1_t *hw; struct snd_emu10k1 *hw;
unsigned long flags; unsigned long flags;
if (dev->driver_data == NULL) if (dev->driver_data == NULL)
...@@ -104,11 +104,12 @@ static int snd_emu10k1_synth_delete_device(snd_seq_device_t *dev) ...@@ -104,11 +104,12 @@ static int snd_emu10k1_synth_delete_device(snd_seq_device_t *dev)
static int __init alsa_emu10k1_synth_init(void) static int __init alsa_emu10k1_synth_init(void)
{ {
static snd_seq_dev_ops_t ops = { static struct snd_seq_dev_ops ops = {
snd_emu10k1_synth_new_device, snd_emu10k1_synth_new_device,
snd_emu10k1_synth_delete_device, snd_emu10k1_synth_delete_device,
}; };
return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, &ops, sizeof(snd_emu10k1_synth_arg_t)); return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, &ops,
sizeof(struct snd_emu10k1_synth_arg));
} }
static void __exit alsa_emu10k1_synth_exit(void) static void __exit alsa_emu10k1_synth_exit(void)
......
...@@ -26,13 +26,18 @@ ...@@ -26,13 +26,18 @@
#include <sound/emu10k1_synth.h> #include <sound/emu10k1_synth.h>
/* emu10k1_patch.c */ /* emu10k1_patch.c */
int snd_emu10k1_sample_new(snd_emux_t *private_data, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *_data, long count); int snd_emu10k1_sample_new(struct snd_emux *private_data,
int snd_emu10k1_sample_free(snd_emux_t *private_data, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr); struct snd_sf_sample *sp,
int snd_emu10k1_memhdr_init(snd_emux_t *emu); struct snd_util_memhdr *hdr,
const void __user *_data, long count);
int snd_emu10k1_sample_free(struct snd_emux *private_data,
struct snd_sf_sample *sp,
struct snd_util_memhdr *hdr);
int snd_emu10k1_memhdr_init(struct snd_emux *emu);
/* emu10k1_callback.c */ /* emu10k1_callback.c */
void snd_emu10k1_ops_setup(snd_emux_t *emu); void snd_emu10k1_ops_setup(struct snd_emux *emu);
int snd_emu10k1_synth_get_voice(emu10k1_t *hw); int snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw);
#endif /* __EMU10K1_SYNTH_LOCAL_H */ #endif /* __EMU10K1_SYNTH_LOCAL_H */
This diff is collapsed.
This diff is collapsed.
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
#define EMU10K1_MIDI_MODE_INPUT (1<<0) #define EMU10K1_MIDI_MODE_INPUT (1<<0)
#define EMU10K1_MIDI_MODE_OUTPUT (1<<1) #define EMU10K1_MIDI_MODE_OUTPUT (1<<1)
static inline unsigned char mpu401_read(emu10k1_t *emu, emu10k1_midi_t *mpu, int idx) static inline unsigned char mpu401_read(struct snd_emu10k1 *emu,
struct snd_emu10k1_midi *mpu, int idx)
{ {
if (emu->audigy) if (emu->audigy)
return (unsigned char)snd_emu10k1_ptr_read(emu, mpu->port + idx, 0); return (unsigned char)snd_emu10k1_ptr_read(emu, mpu->port + idx, 0);
...@@ -36,7 +37,8 @@ static inline unsigned char mpu401_read(emu10k1_t *emu, emu10k1_midi_t *mpu, int ...@@ -36,7 +37,8 @@ static inline unsigned char mpu401_read(emu10k1_t *emu, emu10k1_midi_t *mpu, int
return inb(emu->port + mpu->port + idx); return inb(emu->port + mpu->port + idx);
} }
static inline void mpu401_write(emu10k1_t *emu, emu10k1_midi_t *mpu, int data, int idx) static inline void mpu401_write(struct snd_emu10k1 *emu,
struct snd_emu10k1_midi *mpu, int data, int idx)
{ {
if (emu->audigy) if (emu->audigy)
snd_emu10k1_ptr_write(emu, mpu->port + idx, 0, data); snd_emu10k1_ptr_write(emu, mpu->port + idx, 0, data);
...@@ -56,7 +58,7 @@ static inline void mpu401_write(emu10k1_t *emu, emu10k1_midi_t *mpu, int data, i ...@@ -56,7 +58,7 @@ static inline void mpu401_write(emu10k1_t *emu, emu10k1_midi_t *mpu, int data, i
#define MPU401_ENTER_UART 0x3f #define MPU401_ENTER_UART 0x3f
#define MPU401_ACK 0xfe #define MPU401_ACK 0xfe
static void mpu401_clear_rx(emu10k1_t *emu, emu10k1_midi_t *mpu) static void mpu401_clear_rx(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *mpu)
{ {
int timeout = 100000; int timeout = 100000;
for (; timeout > 0 && mpu401_input_avail(emu, mpu); timeout--) for (; timeout > 0 && mpu401_input_avail(emu, mpu); timeout--)
...@@ -71,7 +73,7 @@ static void mpu401_clear_rx(emu10k1_t *emu, emu10k1_midi_t *mpu) ...@@ -71,7 +73,7 @@ static void mpu401_clear_rx(emu10k1_t *emu, emu10k1_midi_t *mpu)
*/ */
static void do_emu10k1_midi_interrupt(emu10k1_t *emu, emu10k1_midi_t *midi, unsigned int status) static void do_emu10k1_midi_interrupt(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, unsigned int status)
{ {
unsigned char byte; unsigned char byte;
...@@ -104,17 +106,17 @@ static void do_emu10k1_midi_interrupt(emu10k1_t *emu, emu10k1_midi_t *midi, unsi ...@@ -104,17 +106,17 @@ static void do_emu10k1_midi_interrupt(emu10k1_t *emu, emu10k1_midi_t *midi, unsi
spin_unlock(&midi->output_lock); spin_unlock(&midi->output_lock);
} }
static void snd_emu10k1_midi_interrupt(emu10k1_t *emu, unsigned int status) static void snd_emu10k1_midi_interrupt(struct snd_emu10k1 *emu, unsigned int status)
{ {
do_emu10k1_midi_interrupt(emu, &emu->midi, status); do_emu10k1_midi_interrupt(emu, &emu->midi, status);
} }
static void snd_emu10k1_midi_interrupt2(emu10k1_t *emu, unsigned int status) static void snd_emu10k1_midi_interrupt2(struct snd_emu10k1 *emu, unsigned int status)
{ {
do_emu10k1_midi_interrupt(emu, &emu->midi2, status); do_emu10k1_midi_interrupt(emu, &emu->midi2, status);
} }
static void snd_emu10k1_midi_cmd(emu10k1_t * emu, emu10k1_midi_t *midi, unsigned char cmd, int ack) static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack)
{ {
unsigned long flags; unsigned long flags;
int timeout, ok; int timeout, ok;
...@@ -146,10 +148,10 @@ static void snd_emu10k1_midi_cmd(emu10k1_t * emu, emu10k1_midi_t *midi, unsigned ...@@ -146,10 +148,10 @@ static void snd_emu10k1_midi_cmd(emu10k1_t * emu, emu10k1_midi_t *midi, unsigned
mpu401_read_data(emu, midi)); mpu401_read_data(emu, midi));
} }
static int snd_emu10k1_midi_input_open(snd_rawmidi_substream_t * substream) static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream)
{ {
emu10k1_t *emu; struct snd_emu10k1 *emu;
emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
emu = midi->emu; emu = midi->emu;
...@@ -167,10 +169,10 @@ static int snd_emu10k1_midi_input_open(snd_rawmidi_substream_t * substream) ...@@ -167,10 +169,10 @@ static int snd_emu10k1_midi_input_open(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static int snd_emu10k1_midi_output_open(snd_rawmidi_substream_t * substream) static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream)
{ {
emu10k1_t *emu; struct snd_emu10k1 *emu;
emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
emu = midi->emu; emu = midi->emu;
...@@ -188,10 +190,10 @@ static int snd_emu10k1_midi_output_open(snd_rawmidi_substream_t * substream) ...@@ -188,10 +190,10 @@ static int snd_emu10k1_midi_output_open(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static int snd_emu10k1_midi_input_close(snd_rawmidi_substream_t * substream) static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream)
{ {
emu10k1_t *emu; struct snd_emu10k1 *emu;
emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
emu = midi->emu; emu = midi->emu;
...@@ -209,10 +211,10 @@ static int snd_emu10k1_midi_input_close(snd_rawmidi_substream_t * substream) ...@@ -209,10 +211,10 @@ static int snd_emu10k1_midi_input_close(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static int snd_emu10k1_midi_output_close(snd_rawmidi_substream_t * substream) static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream)
{ {
emu10k1_t *emu; struct snd_emu10k1 *emu;
emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
emu = midi->emu; emu = midi->emu;
...@@ -230,10 +232,10 @@ static int snd_emu10k1_midi_output_close(snd_rawmidi_substream_t * substream) ...@@ -230,10 +232,10 @@ static int snd_emu10k1_midi_output_close(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static void snd_emu10k1_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) static void snd_emu10k1_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
{ {
emu10k1_t *emu; struct snd_emu10k1 *emu;
emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
emu = midi->emu; emu = midi->emu;
snd_assert(emu, return); snd_assert(emu, return);
...@@ -243,10 +245,10 @@ static void snd_emu10k1_midi_input_trigger(snd_rawmidi_substream_t * substream, ...@@ -243,10 +245,10 @@ static void snd_emu10k1_midi_input_trigger(snd_rawmidi_substream_t * substream,
snd_emu10k1_intr_disable(emu, midi->rx_enable); snd_emu10k1_intr_disable(emu, midi->rx_enable);
} }
static void snd_emu10k1_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) static void snd_emu10k1_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
{ {
emu10k1_t *emu; struct snd_emu10k1 *emu;
emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
emu = midi->emu; emu = midi->emu;
...@@ -283,30 +285,30 @@ static void snd_emu10k1_midi_output_trigger(snd_rawmidi_substream_t * substream, ...@@ -283,30 +285,30 @@ static void snd_emu10k1_midi_output_trigger(snd_rawmidi_substream_t * substream,
*/ */
static snd_rawmidi_ops_t snd_emu10k1_midi_output = static struct snd_rawmidi_ops snd_emu10k1_midi_output =
{ {
.open = snd_emu10k1_midi_output_open, .open = snd_emu10k1_midi_output_open,
.close = snd_emu10k1_midi_output_close, .close = snd_emu10k1_midi_output_close,
.trigger = snd_emu10k1_midi_output_trigger, .trigger = snd_emu10k1_midi_output_trigger,
}; };
static snd_rawmidi_ops_t snd_emu10k1_midi_input = static struct snd_rawmidi_ops snd_emu10k1_midi_input =
{ {
.open = snd_emu10k1_midi_input_open, .open = snd_emu10k1_midi_input_open,
.close = snd_emu10k1_midi_input_close, .close = snd_emu10k1_midi_input_close,
.trigger = snd_emu10k1_midi_input_trigger, .trigger = snd_emu10k1_midi_input_trigger,
}; };
static void snd_emu10k1_midi_free(snd_rawmidi_t *rmidi) static void snd_emu10k1_midi_free(struct snd_rawmidi *rmidi)
{ {
emu10k1_midi_t *midi = (emu10k1_midi_t *)rmidi->private_data; struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)rmidi->private_data;
midi->interrupt = NULL; midi->interrupt = NULL;
midi->rmidi = NULL; midi->rmidi = NULL;
} }
static int __devinit emu10k1_midi_init(emu10k1_t *emu, emu10k1_midi_t *midi, int device, char *name) static int __devinit emu10k1_midi_init(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, int device, char *name)
{ {
snd_rawmidi_t *rmidi; struct snd_rawmidi *rmidi;
int err; int err;
if ((err = snd_rawmidi_new(emu->card, name, device, 1, 1, &rmidi)) < 0) if ((err = snd_rawmidi_new(emu->card, name, device, 1, 1, &rmidi)) < 0)
...@@ -327,9 +329,9 @@ static int __devinit emu10k1_midi_init(emu10k1_t *emu, emu10k1_midi_t *midi, int ...@@ -327,9 +329,9 @@ static int __devinit emu10k1_midi_init(emu10k1_t *emu, emu10k1_midi_t *midi, int
return 0; return 0;
} }
int __devinit snd_emu10k1_midi(emu10k1_t *emu) int __devinit snd_emu10k1_midi(struct snd_emu10k1 *emu)
{ {
emu10k1_midi_t *midi = &emu->midi; struct snd_emu10k1_midi *midi = &emu->midi;
int err; int err;
if ((err = emu10k1_midi_init(emu, midi, 0, "EMU10K1 MPU-401 (UART)")) < 0) if ((err = emu10k1_midi_init(emu, midi, 0, "EMU10K1 MPU-401 (UART)")) < 0)
...@@ -344,9 +346,9 @@ int __devinit snd_emu10k1_midi(emu10k1_t *emu) ...@@ -344,9 +346,9 @@ int __devinit snd_emu10k1_midi(emu10k1_t *emu)
return 0; return 0;
} }
int __devinit snd_emu10k1_audigy_midi(emu10k1_t *emu) int __devinit snd_emu10k1_audigy_midi(struct snd_emu10k1 *emu)
{ {
emu10k1_midi_t *midi; struct snd_emu10k1_midi *midi;
int err; int err;
midi = &emu->midi; midi = &emu->midi;
......
This diff is collapsed.
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
#include <sound/emu10k1.h> #include <sound/emu10k1.h>
#include "p16v.h" #include "p16v.h"
static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu, static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu,
snd_info_buffer_t * buffer, struct snd_info_buffer *buffer,
char *title, char *title,
int status_reg, int status_reg,
int rate_reg) int rate_reg)
...@@ -75,8 +75,8 @@ static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu, ...@@ -75,8 +75,8 @@ static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu,
} }
static void snd_emu10k1_proc_read(snd_info_entry_t *entry, static void snd_emu10k1_proc_read(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
/* FIXME - output names are in emufx.c too */ /* FIXME - output names are in emufx.c too */
static char *creative_outs[32] = { static char *creative_outs[32] = {
...@@ -181,7 +181,7 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry, ...@@ -181,7 +181,7 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
/* 63 */ "FXBUS2_31" /* 63 */ "FXBUS2_31"
}; };
emu10k1_t *emu = entry->private_data; struct snd_emu10k1 *emu = entry->private_data;
unsigned int val, val1; unsigned int val, val1;
int nefx = emu->audigy ? 64 : 32; int nefx = emu->audigy ? 64 : 32;
char **outputs = emu->audigy ? audigy_outs : creative_outs; char **outputs = emu->audigy ? audigy_outs : creative_outs;
...@@ -232,10 +232,10 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry, ...@@ -232,10 +232,10 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
snd_iprintf(buffer, " Output %02i [%s]\n", idx, outputs[idx]); snd_iprintf(buffer, " Output %02i [%s]\n", idx, outputs[idx]);
} }
static void snd_emu10k1_proc_spdif_read(snd_info_entry_t *entry, static void snd_emu10k1_proc_spdif_read(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
emu10k1_t *emu = entry->private_data; struct snd_emu10k1 *emu = entry->private_data;
snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS); snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS);
snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS); snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS);
#if 0 #if 0
...@@ -246,11 +246,11 @@ static void snd_emu10k1_proc_spdif_read(snd_info_entry_t *entry, ...@@ -246,11 +246,11 @@ static void snd_emu10k1_proc_spdif_read(snd_info_entry_t *entry,
#endif #endif
} }
static void snd_emu10k1_proc_rates_read(snd_info_entry_t *entry, static void snd_emu10k1_proc_rates_read(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
static int samplerate[8] = { 44100, 48000, 96000, 192000, 4, 5, 6, 7 }; static int samplerate[8] = { 44100, 48000, 96000, 192000, 4, 5, 6, 7 };
emu10k1_t *emu = entry->private_data; struct snd_emu10k1 *emu = entry->private_data;
unsigned int val, tmp, n; unsigned int val, tmp, n;
val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0); val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0);
tmp = (val >> 16) & 0x8; tmp = (val >> 16) & 0x8;
...@@ -261,11 +261,11 @@ static void snd_emu10k1_proc_rates_read(snd_info_entry_t *entry, ...@@ -261,11 +261,11 @@ static void snd_emu10k1_proc_rates_read(snd_info_entry_t *entry,
} }
} }
static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry, static void snd_emu10k1_proc_acode_read(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
u32 pc; u32 pc;
emu10k1_t *emu = entry->private_data; struct snd_emu10k1 *emu = entry->private_data;
snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name); snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name);
snd_iprintf(buffer, " Code dump :\n"); snd_iprintf(buffer, " Code dump :\n");
...@@ -304,12 +304,13 @@ static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry, ...@@ -304,12 +304,13 @@ static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry,
#define TOTAL_SIZE_CODE (0x200*8) #define TOTAL_SIZE_CODE (0x200*8)
#define A_TOTAL_SIZE_CODE (0x400*8) #define A_TOTAL_SIZE_CODE (0x400*8)
static long snd_emu10k1_fx8010_read(snd_info_entry_t *entry, void *file_private_data, static long snd_emu10k1_fx8010_read(struct snd_info_entry *entry,
void *file_private_data,
struct file *file, char __user *buf, struct file *file, char __user *buf,
unsigned long count, unsigned long pos) unsigned long count, unsigned long pos)
{ {
long size; long size;
emu10k1_t *emu = entry->private_data; struct snd_emu10k1 *emu = entry->private_data;
unsigned int offset; unsigned int offset;
int tram_addr = 0; int tram_addr = 0;
...@@ -349,11 +350,11 @@ static long snd_emu10k1_fx8010_read(snd_info_entry_t *entry, void *file_private_ ...@@ -349,11 +350,11 @@ static long snd_emu10k1_fx8010_read(snd_info_entry_t *entry, void *file_private_
return 0; return 0;
} }
static void snd_emu10k1_proc_voices_read(snd_info_entry_t *entry, static void snd_emu10k1_proc_voices_read(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
emu10k1_t *emu = entry->private_data; struct snd_emu10k1 *emu = entry->private_data;
emu10k1_voice_t *voice; struct snd_emu10k1_voice *voice;
int idx; int idx;
snd_iprintf(buffer, "ch\tuse\tpcm\tefx\tsynth\tmidi\n"); snd_iprintf(buffer, "ch\tuse\tpcm\tefx\tsynth\tmidi\n");
...@@ -370,10 +371,10 @@ static void snd_emu10k1_proc_voices_read(snd_info_entry_t *entry, ...@@ -370,10 +371,10 @@ static void snd_emu10k1_proc_voices_read(snd_info_entry_t *entry,
} }
#ifdef CONFIG_SND_DEBUG #ifdef CONFIG_SND_DEBUG
static void snd_emu_proc_io_reg_read(snd_info_entry_t *entry, static void snd_emu_proc_io_reg_read(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
emu10k1_t *emu = entry->private_data; struct snd_emu10k1 *emu = entry->private_data;
unsigned long value; unsigned long value;
unsigned long flags; unsigned long flags;
int i; int i;
...@@ -386,10 +387,10 @@ static void snd_emu_proc_io_reg_read(snd_info_entry_t *entry, ...@@ -386,10 +387,10 @@ static void snd_emu_proc_io_reg_read(snd_info_entry_t *entry,
} }
} }
static void snd_emu_proc_io_reg_write(snd_info_entry_t *entry, static void snd_emu_proc_io_reg_write(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
emu10k1_t *emu = entry->private_data; struct snd_emu10k1 *emu = entry->private_data;
unsigned long flags; unsigned long flags;
char line[64]; char line[64];
u32 reg, val; u32 reg, val;
...@@ -404,7 +405,7 @@ static void snd_emu_proc_io_reg_write(snd_info_entry_t *entry, ...@@ -404,7 +405,7 @@ static void snd_emu_proc_io_reg_write(snd_info_entry_t *entry,
} }
} }
static unsigned int snd_ptr_read(emu10k1_t * emu, static unsigned int snd_ptr_read(struct snd_emu10k1 * emu,
unsigned int iobase, unsigned int iobase,
unsigned int reg, unsigned int reg,
unsigned int chn) unsigned int chn)
...@@ -421,7 +422,7 @@ static unsigned int snd_ptr_read(emu10k1_t * emu, ...@@ -421,7 +422,7 @@ static unsigned int snd_ptr_read(emu10k1_t * emu,
return val; return val;
} }
static void snd_ptr_write(emu10k1_t *emu, static void snd_ptr_write(struct snd_emu10k1 *emu,
unsigned int iobase, unsigned int iobase,
unsigned int reg, unsigned int reg,
unsigned int chn, unsigned int chn,
...@@ -439,10 +440,10 @@ static void snd_ptr_write(emu10k1_t *emu, ...@@ -439,10 +440,10 @@ static void snd_ptr_write(emu10k1_t *emu,
} }
static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry, static void snd_emu_proc_ptr_reg_read(struct snd_info_entry *entry,
snd_info_buffer_t * buffer, int iobase, int offset, int length, int voices) struct snd_info_buffer *buffer, int iobase, int offset, int length, int voices)
{ {
emu10k1_t *emu = entry->private_data; struct snd_emu10k1 *emu = entry->private_data;
unsigned long value; unsigned long value;
int i,j; int i,j;
if (offset+length > 0xa0) { if (offset+length > 0xa0) {
...@@ -463,10 +464,10 @@ static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry, ...@@ -463,10 +464,10 @@ static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry,
} }
} }
static void snd_emu_proc_ptr_reg_write(snd_info_entry_t *entry, static void snd_emu_proc_ptr_reg_write(struct snd_info_entry *entry,
snd_info_buffer_t * buffer, int iobase) struct snd_info_buffer *buffer, int iobase)
{ {
emu10k1_t *emu = entry->private_data; struct snd_emu10k1 *emu = entry->private_data;
char line[64]; char line[64];
unsigned int reg, channel_id , val; unsigned int reg, channel_id , val;
while (!snd_info_get_line(buffer, line, sizeof(line))) { while (!snd_info_get_line(buffer, line, sizeof(line))) {
...@@ -477,45 +478,45 @@ static void snd_emu_proc_ptr_reg_write(snd_info_entry_t *entry, ...@@ -477,45 +478,45 @@ static void snd_emu_proc_ptr_reg_write(snd_info_entry_t *entry,
} }
} }
static void snd_emu_proc_ptr_reg_write00(snd_info_entry_t *entry, static void snd_emu_proc_ptr_reg_write00(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
snd_emu_proc_ptr_reg_write(entry, buffer, 0); snd_emu_proc_ptr_reg_write(entry, buffer, 0);
} }
static void snd_emu_proc_ptr_reg_write20(snd_info_entry_t *entry, static void snd_emu_proc_ptr_reg_write20(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
snd_emu_proc_ptr_reg_write(entry, buffer, 0x20); snd_emu_proc_ptr_reg_write(entry, buffer, 0x20);
} }
static void snd_emu_proc_ptr_reg_read00a(snd_info_entry_t *entry, static void snd_emu_proc_ptr_reg_read00a(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0, 0x40, 64); snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0, 0x40, 64);
} }
static void snd_emu_proc_ptr_reg_read00b(snd_info_entry_t *entry, static void snd_emu_proc_ptr_reg_read00b(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0x40, 0x40, 64); snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0x40, 0x40, 64);
} }
static void snd_emu_proc_ptr_reg_read20a(snd_info_entry_t *entry, static void snd_emu_proc_ptr_reg_read20a(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0, 0x40, 4); snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0, 0x40, 4);
} }
static void snd_emu_proc_ptr_reg_read20b(snd_info_entry_t *entry, static void snd_emu_proc_ptr_reg_read20b(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40, 4); snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40, 4);
} }
static void snd_emu_proc_ptr_reg_read20c(snd_info_entry_t *entry, static void snd_emu_proc_ptr_reg_read20c(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer * buffer)
{ {
snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x80, 0x20, 4); snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x80, 0x20, 4);
} }
...@@ -525,9 +526,9 @@ static struct snd_info_entry_ops snd_emu10k1_proc_ops_fx8010 = { ...@@ -525,9 +526,9 @@ static struct snd_info_entry_ops snd_emu10k1_proc_ops_fx8010 = {
.read = snd_emu10k1_fx8010_read, .read = snd_emu10k1_fx8010_read,
}; };
int __devinit snd_emu10k1_proc_init(emu10k1_t * emu) int __devinit snd_emu10k1_proc_init(struct snd_emu10k1 * emu)
{ {
snd_info_entry_t *entry; struct snd_info_entry *entry;
#ifdef CONFIG_SND_DEBUG #ifdef CONFIG_SND_DEBUG
if (! snd_card_proc_new(emu->card, "io_regs", &entry)) { if (! snd_card_proc_new(emu->card, "io_regs", &entry)) {
snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_io_reg_read); snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_io_reg_read);
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <sound/core.h> #include <sound/core.h>
#include <sound/emu10k1.h> #include <sound/emu10k1.h>
unsigned int snd_emu10k1_ptr_read(emu10k1_t * emu, unsigned int reg, unsigned int chn) unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn)
{ {
unsigned long flags; unsigned long flags;
unsigned int regptr, val; unsigned int regptr, val;
...@@ -61,7 +61,7 @@ unsigned int snd_emu10k1_ptr_read(emu10k1_t * emu, unsigned int reg, unsigned in ...@@ -61,7 +61,7 @@ unsigned int snd_emu10k1_ptr_read(emu10k1_t * emu, unsigned int reg, unsigned in
} }
} }
void snd_emu10k1_ptr_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, unsigned int data) void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data)
{ {
unsigned int regptr; unsigned int regptr;
unsigned long flags; unsigned long flags;
...@@ -91,7 +91,7 @@ void snd_emu10k1_ptr_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, u ...@@ -91,7 +91,7 @@ void snd_emu10k1_ptr_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, u
} }
} }
unsigned int snd_emu10k1_ptr20_read(emu10k1_t * emu, unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu,
unsigned int reg, unsigned int reg,
unsigned int chn) unsigned int chn)
{ {
...@@ -107,7 +107,7 @@ unsigned int snd_emu10k1_ptr20_read(emu10k1_t * emu, ...@@ -107,7 +107,7 @@ unsigned int snd_emu10k1_ptr20_read(emu10k1_t * emu,
return val; return val;
} }
void snd_emu10k1_ptr20_write(emu10k1_t *emu, void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu,
unsigned int reg, unsigned int reg,
unsigned int chn, unsigned int chn,
unsigned int data) unsigned int data)
...@@ -123,7 +123,7 @@ void snd_emu10k1_ptr20_write(emu10k1_t *emu, ...@@ -123,7 +123,7 @@ void snd_emu10k1_ptr20_write(emu10k1_t *emu,
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb) void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb)
{ {
unsigned long flags; unsigned long flags;
unsigned int enable; unsigned int enable;
...@@ -134,7 +134,7 @@ void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb) ...@@ -134,7 +134,7 @@ void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb)
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
void snd_emu10k1_intr_disable(emu10k1_t *emu, unsigned int intrenb) void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb)
{ {
unsigned long flags; unsigned long flags;
unsigned int enable; unsigned int enable;
...@@ -145,7 +145,7 @@ void snd_emu10k1_intr_disable(emu10k1_t *emu, unsigned int intrenb) ...@@ -145,7 +145,7 @@ void snd_emu10k1_intr_disable(emu10k1_t *emu, unsigned int intrenb)
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
void snd_emu10k1_voice_intr_enable(emu10k1_t *emu, unsigned int voicenum) void snd_emu10k1_voice_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum)
{ {
unsigned long flags; unsigned long flags;
unsigned int val; unsigned int val;
...@@ -165,7 +165,7 @@ void snd_emu10k1_voice_intr_enable(emu10k1_t *emu, unsigned int voicenum) ...@@ -165,7 +165,7 @@ void snd_emu10k1_voice_intr_enable(emu10k1_t *emu, unsigned int voicenum)
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
void snd_emu10k1_voice_intr_disable(emu10k1_t *emu, unsigned int voicenum) void snd_emu10k1_voice_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum)
{ {
unsigned long flags; unsigned long flags;
unsigned int val; unsigned int val;
...@@ -185,7 +185,7 @@ void snd_emu10k1_voice_intr_disable(emu10k1_t *emu, unsigned int voicenum) ...@@ -185,7 +185,7 @@ void snd_emu10k1_voice_intr_disable(emu10k1_t *emu, unsigned int voicenum)
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
void snd_emu10k1_voice_intr_ack(emu10k1_t *emu, unsigned int voicenum) void snd_emu10k1_voice_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum)
{ {
unsigned long flags; unsigned long flags;
...@@ -202,7 +202,7 @@ void snd_emu10k1_voice_intr_ack(emu10k1_t *emu, unsigned int voicenum) ...@@ -202,7 +202,7 @@ void snd_emu10k1_voice_intr_ack(emu10k1_t *emu, unsigned int voicenum)
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
void snd_emu10k1_voice_half_loop_intr_enable(emu10k1_t *emu, unsigned int voicenum) void snd_emu10k1_voice_half_loop_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum)
{ {
unsigned long flags; unsigned long flags;
unsigned int val; unsigned int val;
...@@ -222,7 +222,7 @@ void snd_emu10k1_voice_half_loop_intr_enable(emu10k1_t *emu, unsigned int voicen ...@@ -222,7 +222,7 @@ void snd_emu10k1_voice_half_loop_intr_enable(emu10k1_t *emu, unsigned int voicen
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
void snd_emu10k1_voice_half_loop_intr_disable(emu10k1_t *emu, unsigned int voicenum) void snd_emu10k1_voice_half_loop_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum)
{ {
unsigned long flags; unsigned long flags;
unsigned int val; unsigned int val;
...@@ -242,7 +242,7 @@ void snd_emu10k1_voice_half_loop_intr_disable(emu10k1_t *emu, unsigned int voice ...@@ -242,7 +242,7 @@ void snd_emu10k1_voice_half_loop_intr_disable(emu10k1_t *emu, unsigned int voice
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
void snd_emu10k1_voice_half_loop_intr_ack(emu10k1_t *emu, unsigned int voicenum) void snd_emu10k1_voice_half_loop_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum)
{ {
unsigned long flags; unsigned long flags;
...@@ -259,7 +259,7 @@ void snd_emu10k1_voice_half_loop_intr_ack(emu10k1_t *emu, unsigned int voicenum) ...@@ -259,7 +259,7 @@ void snd_emu10k1_voice_half_loop_intr_ack(emu10k1_t *emu, unsigned int voicenum)
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
void snd_emu10k1_voice_set_loop_stop(emu10k1_t *emu, unsigned int voicenum) void snd_emu10k1_voice_set_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum)
{ {
unsigned long flags; unsigned long flags;
unsigned int sol; unsigned int sol;
...@@ -279,7 +279,7 @@ void snd_emu10k1_voice_set_loop_stop(emu10k1_t *emu, unsigned int voicenum) ...@@ -279,7 +279,7 @@ void snd_emu10k1_voice_set_loop_stop(emu10k1_t *emu, unsigned int voicenum)
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
void snd_emu10k1_voice_clear_loop_stop(emu10k1_t *emu, unsigned int voicenum) void snd_emu10k1_voice_clear_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum)
{ {
unsigned long flags; unsigned long flags;
unsigned int sol; unsigned int sol;
...@@ -299,7 +299,7 @@ void snd_emu10k1_voice_clear_loop_stop(emu10k1_t *emu, unsigned int voicenum) ...@@ -299,7 +299,7 @@ void snd_emu10k1_voice_clear_loop_stop(emu10k1_t *emu, unsigned int voicenum)
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
void snd_emu10k1_wait(emu10k1_t *emu, unsigned int wait) void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait)
{ {
volatile unsigned count; volatile unsigned count;
unsigned int newtime = 0, curtime; unsigned int newtime = 0, curtime;
...@@ -318,9 +318,9 @@ void snd_emu10k1_wait(emu10k1_t *emu, unsigned int wait) ...@@ -318,9 +318,9 @@ void snd_emu10k1_wait(emu10k1_t *emu, unsigned int wait)
} }
} }
unsigned short snd_emu10k1_ac97_read(ac97_t *ac97, unsigned short reg) unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
{ {
emu10k1_t *emu = ac97->private_data; struct snd_emu10k1 *emu = ac97->private_data;
unsigned long flags; unsigned long flags;
unsigned short val; unsigned short val;
...@@ -331,9 +331,9 @@ unsigned short snd_emu10k1_ac97_read(ac97_t *ac97, unsigned short reg) ...@@ -331,9 +331,9 @@ unsigned short snd_emu10k1_ac97_read(ac97_t *ac97, unsigned short reg)
return val; return val;
} }
void snd_emu10k1_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short data) void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data)
{ {
emu10k1_t *emu = ac97->private_data; struct snd_emu10k1 *emu = ac97->private_data;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&emu->emu_lock, flags); spin_lock_irqsave(&emu->emu_lock, flags);
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs) irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
emu10k1_t *emu = dev_id; struct snd_emu10k1 *emu = dev_id;
unsigned int status, status2, orig_status, orig_status2; unsigned int status, status2, orig_status, orig_status2;
int handled = 0; int handled = 0;
...@@ -56,7 +56,7 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -56,7 +56,7 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
int voice; int voice;
int voice_max = status & IPR_CHANNELNUMBERMASK; int voice_max = status & IPR_CHANNELNUMBERMASK;
u32 val; u32 val;
emu10k1_voice_t *pvoice = emu->voices; struct snd_emu10k1_voice *pvoice = emu->voices;
val = snd_emu10k1_ptr_read(emu, CLIPL, 0); val = snd_emu10k1_ptr_read(emu, CLIPL, 0);
for (voice = 0; voice <= voice_max; voice++) { for (voice = 0; voice <= voice_max; voice++) {
...@@ -150,8 +150,8 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -150,8 +150,8 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (status & IPR_P16V) { if (status & IPR_P16V) {
while ((status2 = inl(emu->port + IPR2)) != 0) { while ((status2 = inl(emu->port + IPR2)) != 0) {
u32 mask = INTE2_PLAYBACK_CH_0_LOOP; /* Full Loop */ u32 mask = INTE2_PLAYBACK_CH_0_LOOP; /* Full Loop */
emu10k1_voice_t *pvoice = &(emu->p16v_voices[0]); struct snd_emu10k1_voice *pvoice = &(emu->p16v_voices[0]);
emu10k1_voice_t *cvoice = &(emu->p16v_capture_voice); struct snd_emu10k1_voice *cvoice = &(emu->p16v_capture_voice);
//printk(KERN_INFO "status2=0x%x\n", status2); //printk(KERN_INFO "status2=0x%x\n", status2);
orig_status2 = status2; orig_status2 = status2;
......
This diff is collapsed.
This diff is collapsed.
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
#include <sound/core.h> #include <sound/core.h>
#include <sound/emu10k1.h> #include <sound/emu10k1.h>
static int snd_emu10k1_timer_start(snd_timer_t *timer) static int snd_emu10k1_timer_start(struct snd_timer *timer)
{ {
emu10k1_t *emu; struct snd_emu10k1 *emu;
unsigned long flags; unsigned long flags;
unsigned int delay; unsigned int delay;
...@@ -47,9 +47,9 @@ static int snd_emu10k1_timer_start(snd_timer_t *timer) ...@@ -47,9 +47,9 @@ static int snd_emu10k1_timer_start(snd_timer_t *timer)
return 0; return 0;
} }
static int snd_emu10k1_timer_stop(snd_timer_t *timer) static int snd_emu10k1_timer_stop(struct snd_timer *timer)
{ {
emu10k1_t *emu; struct snd_emu10k1 *emu;
unsigned long flags; unsigned long flags;
emu = snd_timer_chip(timer); emu = snd_timer_chip(timer);
...@@ -59,7 +59,7 @@ static int snd_emu10k1_timer_stop(snd_timer_t *timer) ...@@ -59,7 +59,7 @@ static int snd_emu10k1_timer_stop(snd_timer_t *timer)
return 0; return 0;
} }
static int snd_emu10k1_timer_precise_resolution(snd_timer_t *timer, static int snd_emu10k1_timer_precise_resolution(struct snd_timer *timer,
unsigned long *num, unsigned long *den) unsigned long *num, unsigned long *den)
{ {
*num = 1; *num = 1;
...@@ -67,7 +67,7 @@ static int snd_emu10k1_timer_precise_resolution(snd_timer_t *timer, ...@@ -67,7 +67,7 @@ static int snd_emu10k1_timer_precise_resolution(snd_timer_t *timer,
return 0; return 0;
} }
static struct _snd_timer_hardware snd_emu10k1_timer_hw = { static struct snd_timer_hardware snd_emu10k1_timer_hw = {
.flags = SNDRV_TIMER_HW_AUTO, .flags = SNDRV_TIMER_HW_AUTO,
.resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */ .resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */
.ticks = 1024, .ticks = 1024,
...@@ -76,10 +76,10 @@ static struct _snd_timer_hardware snd_emu10k1_timer_hw = { ...@@ -76,10 +76,10 @@ static struct _snd_timer_hardware snd_emu10k1_timer_hw = {
.precise_resolution = snd_emu10k1_timer_precise_resolution, .precise_resolution = snd_emu10k1_timer_precise_resolution,
}; };
int __devinit snd_emu10k1_timer(emu10k1_t *emu, int device) int __devinit snd_emu10k1_timer(struct snd_emu10k1 *emu, int device)
{ {
snd_timer_t *timer = NULL; struct snd_timer *timer = NULL;
snd_timer_id_t tid; struct snd_timer_id tid;
int err; int err;
tid.dev_class = SNDRV_TIMER_CLASS_CARD; tid.dev_class = SNDRV_TIMER_CLASS_CARD;
......
...@@ -45,9 +45,10 @@ ...@@ -45,9 +45,10 @@
* --rlrevell * --rlrevell
*/ */
static int voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int number, emu10k1_voice_t **rvoice) static int voice_alloc(struct snd_emu10k1 *emu, int type, int number,
struct snd_emu10k1_voice **rvoice)
{ {
emu10k1_voice_t *voice; struct snd_emu10k1_voice *voice;
int i, j, k, first_voice, last_voice, skip; int i, j, k, first_voice, last_voice, skip;
*rvoice = NULL; *rvoice = NULL;
...@@ -105,7 +106,8 @@ static int voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int number, em ...@@ -105,7 +106,8 @@ static int voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int number, em
return 0; return 0;
} }
int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int number, emu10k1_voice_t **rvoice) int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int number,
struct snd_emu10k1_voice **rvoice)
{ {
unsigned long flags; unsigned long flags;
int result; int result;
...@@ -123,7 +125,7 @@ int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int numbe ...@@ -123,7 +125,7 @@ int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int numbe
if (emu->get_synth_voice) { if (emu->get_synth_voice) {
result = emu->get_synth_voice(emu); result = emu->get_synth_voice(emu);
if (result >= 0) { if (result >= 0) {
emu10k1_voice_t *pvoice = &emu->voices[result]; struct snd_emu10k1_voice *pvoice = &emu->voices[result];
pvoice->interrupt = NULL; pvoice->interrupt = NULL;
pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0; pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0;
pvoice->epcm = NULL; pvoice->epcm = NULL;
...@@ -137,7 +139,8 @@ int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int numbe ...@@ -137,7 +139,8 @@ int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int numbe
return result; return result;
} }
int snd_emu10k1_voice_free(emu10k1_t *emu, emu10k1_voice_t *pvoice) int snd_emu10k1_voice_free(struct snd_emu10k1 *emu,
struct snd_emu10k1_voice *pvoice)
{ {
unsigned long flags; unsigned long flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment