aboutsummaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/emu10k1/emu10k1.c10
-rw-r--r--sound/pci/emu10k1/emu10k1_callback.c105
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c39
-rw-r--r--sound/pci/emu10k1/emu10k1_patch.c13
-rw-r--r--sound/pci/emu10k1/emu10k1_synth.c19
-rw-r--r--sound/pci/emu10k1/emu10k1_synth_local.h15
-rw-r--r--sound/pci/emu10k1/emufx.c244
-rw-r--r--sound/pci/emu10k1/emumixer.c229
-rw-r--r--sound/pci/emu10k1/emumpu401.c72
-rw-r--r--sound/pci/emu10k1/emupcm.c354
-rw-r--r--sound/pci/emu10k1/emuproc.c101
-rw-r--r--sound/pci/emu10k1/io.c38
-rw-r--r--sound/pci/emu10k1/irq.c8
-rw-r--r--sound/pci/emu10k1/memory.c94
-rw-r--r--sound/pci/emu10k1/p16v.c254
-rw-r--r--sound/pci/emu10k1/timer.c18
-rw-r--r--sound/pci/emu10k1/voice.c13
17 files changed, 848 insertions, 778 deletions
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c
index 78270f8710ff..9be900224771 100644
--- a/sound/pci/emu10k1/emu10k1.c
+++ b/sound/pci/emu10k1/emu10k1.c
@@ -101,10 +101,10 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
static int dev;
- snd_card_t *card;
- emu10k1_t *emu;
+ struct snd_card *card;
+ struct snd_emu10k1 *emu;
#ifdef ENABLE_SYNTH
- snd_seq_device_t *wave = NULL;
+ struct snd_seq_device *wave = NULL;
#endif
int err;
@@ -186,11 +186,11 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
}
#ifdef ENABLE_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) {
snd_printk(KERN_WARNING "can't initialize Emu10k1 wavetable synth\n");
} else {
- snd_emu10k1_synth_arg_t *arg;
+ struct snd_emu10k1_synth_arg *arg;
arg = SNDRV_SEQ_DEVICE_ARGPTR(wave);
strcpy(wave->name, "Emu-10k1 Synth");
arg->hwptr = emu;
diff --git a/sound/pci/emu10k1/emu10k1_callback.c b/sound/pci/emu10k1/emu10k1_callback.c
index 6589bf24abcd..01965bd99966 100644
--- a/sound/pci/emu10k1/emu10k1_callback.c
+++ b/sound/pci/emu10k1/emu10k1_callback.c
@@ -27,26 +27,28 @@ enum {
};
/* Keeps track of what we are finding */
-typedef struct best_voice {
+struct best_voice {
unsigned int time;
int voice;
-} best_voice_t;
+};
/*
* prototypes
*/
-static void lookup_voices(snd_emux_t *emu, emu10k1_t *hw, best_voice_t *best, int active_only);
-static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port);
-static int start_voice(snd_emux_voice_t *vp);
-static void trigger_voice(snd_emux_voice_t *vp);
-static void release_voice(snd_emux_voice_t *vp);
-static void update_voice(snd_emux_voice_t *vp, int update);
-static void terminate_voice(snd_emux_voice_t *vp);
-static void free_voice(snd_emux_voice_t *vp);
-
-static void set_fmmod(emu10k1_t *hw, snd_emux_voice_t *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 lookup_voices(struct snd_emux *emu, struct snd_emu10k1 *hw,
+ struct best_voice *best, int active_only);
+static struct snd_emux_voice *get_voice(struct snd_emux *emu,
+ struct snd_emux_port *port);
+static int start_voice(struct snd_emux_voice *vp);
+static void trigger_voice(struct snd_emux_voice *vp);
+static void release_voice(struct snd_emux_voice *vp);
+static void update_voice(struct snd_emux_voice *vp, int update);
+static void terminate_voice(struct snd_emux_voice *vp);
+static void free_voice(struct snd_emux_voice *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
@@ -59,7 +61,7 @@ static void set_filterQ(emu10k1_t *hw, snd_emux_voice_t *vp);
/*
* set up operators
*/
-static snd_emux_operators_t emu10k1_ops = {
+static struct snd_emux_operators emu10k1_ops = {
.owner = THIS_MODULE,
.get_voice = get_voice,
.prepare = start_voice,
@@ -73,7 +75,7 @@ static snd_emux_operators_t emu10k1_ops = {
};
void
-snd_emu10k1_ops_setup(snd_emux_t *emu)
+snd_emu10k1_ops_setup(struct snd_emux *emu)
{
emu->ops = emu10k1_ops;
}
@@ -85,11 +87,11 @@ snd_emu10k1_ops_setup(snd_emux_t *emu)
* terminate most inactive voice and give it as a pcm voice.
*/
int
-snd_emu10k1_synth_get_voice(emu10k1_t *hw)
+snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw)
{
- snd_emux_t *emu;
- snd_emux_voice_t *vp;
- best_voice_t best[V_END];
+ struct snd_emux *emu;
+ struct snd_emux_voice *vp;
+ struct best_voice best[V_END];
unsigned long flags;
int i;
@@ -123,10 +125,10 @@ snd_emu10k1_synth_get_voice(emu10k1_t *hw)
* turn off the voice (not terminated)
*/
static void
-release_voice(snd_emux_voice_t *vp)
+release_voice(struct snd_emux_voice *vp)
{
int dcysusv;
- emu10k1_t *hw;
+ struct snd_emu10k1 *hw;
hw = vp->hw;
dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease;
@@ -140,16 +142,16 @@ release_voice(snd_emux_voice_t *vp)
* terminate the voice
*/
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);
hw = vp->hw;
snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK);
if (vp->block) {
- emu10k1_memblk_t *emem;
- emem = (emu10k1_memblk_t *)vp->block;
+ struct snd_emu10k1_memblk *emem;
+ emem = (struct snd_emu10k1_memblk *)vp->block;
if (emem->map_locked > 0)
emem->map_locked--;
}
@@ -159,9 +161,9 @@ terminate_voice(snd_emux_voice_t *vp)
* release the voice to system
*/
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;
if (vp->ch >= 0) {
@@ -181,9 +183,9 @@ free_voice(snd_emux_voice_t *vp)
* update registers
*/
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;
if (update & SNDRV_EMUX_UPDATE_VOLUME)
@@ -210,10 +212,11 @@ update_voice(snd_emux_voice_t *vp, int update)
*/
/* spinlock held! */
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;
- best_voice_t *bp;
+ struct snd_emux_voice *vp;
+ struct best_voice *bp;
int 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
*
* emu->voice_lock is already held.
*/
-static snd_emux_voice_t *
-get_voice(snd_emux_t *emu, snd_emux_port_t *port)
+static struct snd_emux_voice *
+get_voice(struct snd_emux *emu, struct snd_emux_port *port)
{
- emu10k1_t *hw;
- snd_emux_voice_t *vp;
- best_voice_t best[V_END];
+ struct snd_emu10k1 *hw;
+ struct snd_emux_voice *vp;
+ struct best_voice best[V_END];
int i;
hw = emu->hw;
@@ -290,7 +293,7 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port)
vp = &emu->voices[best[i].voice];
if (vp->ch < 0) {
/* 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)
continue;
vp->ch = hwvoice->number;
@@ -308,21 +311,21 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port)
* prepare envelopes and LFOs
*/
static int
-start_voice(snd_emux_voice_t *vp)
+start_voice(struct snd_emux_voice *vp)
{
unsigned int temp;
int ch;
unsigned int addr, mapped_offset;
- snd_midi_channel_t *chan;
- emu10k1_t *hw;
- emu10k1_memblk_t *emem;
+ struct snd_midi_channel *chan;
+ struct snd_emu10k1 *hw;
+ struct snd_emu10k1_memblk *emem;
hw = vp->hw;
ch = vp->ch;
snd_assert(ch >= 0, return -EINVAL);
chan = vp->chan;
- emem = (emu10k1_memblk_t *)vp->block;
+ emem = (struct snd_emu10k1_memblk *)vp->block;
if (emem == NULL)
return -EINVAL;
emem->map_locked++;
@@ -463,15 +466,15 @@ start_voice(snd_emux_voice_t *vp)
* Start envelope
*/
static void
-trigger_voice(snd_emux_voice_t *vp)
+trigger_voice(struct snd_emux_voice *vp)
{
unsigned int temp, ptarget;
- emu10k1_t *hw;
- emu10k1_memblk_t *emem;
+ struct snd_emu10k1 *hw;
+ struct snd_emu10k1_memblk *emem;
hw = vp->hw;
- emem = (emu10k1_memblk_t *)vp->block;
+ emem = (struct snd_emu10k1_memblk *)vp->block;
if (! emem || emem->mapped_page < 0)
return; /* not mapped */
@@ -495,7 +498,7 @@ trigger_voice(snd_emux_voice_t *vp)
/* set lfo1 modulation height and cutoff */
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;
short pitch;
@@ -513,7 +516,7 @@ set_fmmod(emu10k1_t *hw, snd_emux_voice_t *vp)
/* set lfo2 pitch & frequency */
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;
short pitch;
@@ -531,7 +534,7 @@ set_fm2frq2(emu10k1_t *hw, snd_emux_voice_t *vp)
/* set filterQ */
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;
val = snd_emu10k1_ptr_read(hw, CCCA, vp->ch) & ~CCCA_RESONANCE;
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 2d1ebe8c6b41..f9855073a0a9 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -52,7 +52,7 @@ MODULE_LICENSE("GPL");
* 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, IP, ch, 0);
@@ -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;
unsigned int silent_page;
@@ -336,14 +336,14 @@ static int __devinit snd_emu10k1_init(emu10k1_t * emu, int enable_ir)
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)
emu->reserved_page->map_locked = 1;
return 0;
}
-static int snd_emu10k1_done(emu10k1_t * emu)
+static int snd_emu10k1_done(struct snd_emu10k1 * emu)
{
int ch;
@@ -384,7 +384,7 @@ static int snd_emu10k1_done(emu10k1_t * emu)
/* remove reserved page */
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;
}
@@ -474,7 +474,7 @@ static int snd_emu10k1_done(emu10k1_t * emu)
* 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 int data;
@@ -512,7 +512,7 @@ static void snd_emu10k1_ecard_write(emu10k1_t * emu, unsigned int value)
* channel.
*/
-static void snd_emu10k1_ecard_setadcgain(emu10k1_t * emu,
+static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 * emu,
unsigned short gain)
{
unsigned int bit;
@@ -540,7 +540,7 @@ static void snd_emu10k1_ecard_setadcgain(emu10k1_t * emu,
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;
@@ -580,7 +580,7 @@ static int __devinit snd_emu10k1_ecard_init(emu10k1_t * emu)
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 int value;
@@ -609,7 +609,7 @@ static int __devinit snd_emu10k1_cardbus_init(emu10k1_t * emu)
* 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 */
snd_emu10k1_fx8010_tram_setup(emu, 0);
@@ -634,13 +634,13 @@ static int snd_emu10k1_free(emu10k1_t *emu)
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);
}
-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.*/
/* Tested by James@superbug.co.uk 3rd July 2005 */
{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10011102,
@@ -890,21 +890,21 @@ static emu_chip_details_t emu_chip_details[] = {
{ } /* terminator */
};
-int __devinit snd_emu10k1_create(snd_card_t * card,
+int __devinit snd_emu10k1_create(struct snd_card *card,
struct pci_dev * pci,
unsigned short extin_mask,
unsigned short extout_mask,
long max_cache_bytes,
int enable_ir,
uint subsystem,
- emu10k1_t ** remu)
+ struct snd_emu10k1 ** remu)
{
- emu10k1_t *emu;
+ struct snd_emu10k1 *emu;
int err;
int is_audigy;
unsigned char revision;
- const emu_chip_details_t *c;
- static snd_device_ops_t ops = {
+ const struct snd_emu_chip_details *c;
+ static struct snd_device_ops ops = {
.dev_free = snd_emu10k1_dev_free,
};
@@ -1041,7 +1041,8 @@ int __devinit snd_emu10k1_create(snd_card_t * card,
snd_emu10k1_free(emu);
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);
diff --git a/sound/pci/emu10k1/emu10k1_patch.c b/sound/pci/emu10k1/emu10k1_patch.c
index 4df668eb32b4..42bae6f7e9a4 100644
--- a/sound/pci/emu10k1/emu10k1_patch.c
+++ b/sound/pci/emu10k1/emu10k1_patch.c
@@ -35,14 +35,15 @@
* allocate a sample block and copy data from userspace
*/
int
-snd_emu10k1_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
- snd_util_memhdr_t *hdr, const void __user *data, long count)
+snd_emu10k1_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
+ struct snd_util_memhdr *hdr,
+ const void __user *data, long count)
{
int offset;
int truesize, size, loopsize, blocksize;
int loopend, sampleend;
unsigned int start_addr;
- emu10k1_t *emu;
+ struct snd_emu10k1 *emu;
emu = rec->hw;
snd_assert(sp != NULL, return -EINVAL);
@@ -205,10 +206,10 @@ snd_emu10k1_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
* free a sample block
*/
int
-snd_emu10k1_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp,
- snd_util_memhdr_t *hdr)
+snd_emu10k1_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp,
+ struct snd_util_memhdr *hdr)
{
- emu10k1_t *emu;
+ struct snd_emu10k1 *emu;
emu = rec->hw;
snd_assert(sp != NULL, return -EINVAL);
diff --git a/sound/pci/emu10k1/emu10k1_synth.c b/sound/pci/emu10k1/emu10k1_synth.c
index 8bd58d1dcc26..1fa393f22a99 100644
--- a/sound/pci/emu10k1/emu10k1_synth.c
+++ b/sound/pci/emu10k1/emu10k1_synth.c
@@ -28,11 +28,11 @@ MODULE_LICENSE("GPL");
/*
* 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;
- emu10k1_t *hw;
- snd_emu10k1_synth_arg_t *arg;
+ struct snd_emux *emu;
+ struct snd_emu10k1 *hw;
+ struct snd_emu10k1_synth_arg *arg;
unsigned long flags;
arg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
@@ -76,10 +76,10 @@ static int snd_emu10k1_synth_new_device(snd_seq_device_t *dev)
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;
- emu10k1_t *hw;
+ struct snd_emux *emu;
+ struct snd_emu10k1 *hw;
unsigned long flags;
if (dev->driver_data == NULL)
@@ -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 snd_seq_dev_ops_t ops = {
+ static struct snd_seq_dev_ops ops = {
snd_emu10k1_synth_new_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)
diff --git a/sound/pci/emu10k1/emu10k1_synth_local.h b/sound/pci/emu10k1/emu10k1_synth_local.h
index 7f50b01ddb76..308ddc84bb4d 100644
--- a/sound/pci/emu10k1/emu10k1_synth_local.h
+++ b/sound/pci/emu10k1/emu10k1_synth_local.h
@@ -26,13 +26,18 @@
#include <sound/emu10k1_synth.h>
/* 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_free(snd_emux_t *private_data, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr);
-int snd_emu10k1_memhdr_init(snd_emux_t *emu);
+int snd_emu10k1_sample_new(struct snd_emux *private_data,
+ struct snd_sf_sample *sp,
+ 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 */
-void snd_emu10k1_ops_setup(snd_emux_t *emu);
-int snd_emu10k1_synth_get_voice(emu10k1_t *hw);
+void snd_emu10k1_ops_setup(struct snd_emux *emu);
+int snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw);
#endif /* __EMU10K1_SYNTH_LOCAL_H */
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 03e8c1678952..f4452c5cb4cd 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -309,9 +309,10 @@ static inline void snd_leave_user(mm_segment_t fs)
* controls
*/
-static int snd_emu10k1_gpr_ctl_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_gpr_ctl_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
- snd_emu10k1_fx8010_ctl_t *ctl = (snd_emu10k1_fx8010_ctl_t *)kcontrol->private_value;
+ struct snd_emu10k1_fx8010_ctl *ctl =
+ (struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value;
if (ctl->min == 0 && ctl->max == 1)
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
@@ -323,10 +324,11 @@ static int snd_emu10k1_gpr_ctl_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
return 0;
}
-static int snd_emu10k1_gpr_ctl_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_gpr_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
- snd_emu10k1_fx8010_ctl_t *ctl = (snd_emu10k1_fx8010_ctl_t *)kcontrol->private_value;
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1_fx8010_ctl *ctl =
+ (struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value;
unsigned long flags;
unsigned int i;
@@ -337,10 +339,11 @@ static int snd_emu10k1_gpr_ctl_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
return 0;
}
-static int snd_emu10k1_gpr_ctl_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_gpr_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
- snd_emu10k1_fx8010_ctl_t *ctl = (snd_emu10k1_fx8010_ctl_t *)kcontrol->private_value;
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1_fx8010_ctl *ctl =
+ (struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value;
unsigned long flags;
unsigned int nval, val;
unsigned int i, j;
@@ -393,9 +396,9 @@ static int snd_emu10k1_gpr_ctl_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
* Interrupt handler
*/
-static void snd_emu10k1_fx8010_interrupt(emu10k1_t *emu)
+static void snd_emu10k1_fx8010_interrupt(struct snd_emu10k1 *emu)
{
- snd_emu10k1_fx8010_irq_t *irq, *nirq;
+ struct snd_emu10k1_fx8010_irq *irq, *nirq;
irq = emu->fx8010.irq_handlers;
while (irq) {
@@ -409,13 +412,13 @@ static void snd_emu10k1_fx8010_interrupt(emu10k1_t *emu)
}
}
-int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu,
- snd_fx8010_irq_handler_t *handler,
- unsigned char gpr_running,
- void *private_data,
- snd_emu10k1_fx8010_irq_t **r_irq)
+int snd_emu10k1_fx8010_register_irq_handler(struct snd_emu10k1 *emu,
+ snd_fx8010_irq_handler_t *handler,
+ unsigned char gpr_running,
+ void *private_data,
+ struct snd_emu10k1_fx8010_irq **r_irq)
{
- snd_emu10k1_fx8010_irq_t *irq;
+ struct snd_emu10k1_fx8010_irq *irq;
unsigned long flags;
irq = kmalloc(sizeof(*irq), GFP_ATOMIC);
@@ -440,10 +443,10 @@ int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu,
return 0;
}
-int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
- snd_emu10k1_fx8010_irq_t *irq)
+int snd_emu10k1_fx8010_unregister_irq_handler(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_irq *irq)
{
- snd_emu10k1_fx8010_irq_t *tmp;
+ struct snd_emu10k1_fx8010_irq *tmp;
unsigned long flags;
spin_lock_irqsave(&emu->fx8010.irq_lock, flags);
@@ -468,7 +471,8 @@ int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
* EMU10K1 effect manager
*************************************************************************/
-static void snd_emu10k1_write_op(emu10k1_fx8010_code_t *icode, unsigned int *ptr,
+static void snd_emu10k1_write_op(struct snd_emu10k1_fx8010_code *icode,
+ unsigned int *ptr,
u32 op, u32 r, u32 a, u32 x, u32 y)
{
u_int32_t *code;
@@ -483,7 +487,8 @@ static void snd_emu10k1_write_op(emu10k1_fx8010_code_t *icode, unsigned int *ptr
#define OP(icode, ptr, op, r, a, x, y) \
snd_emu10k1_write_op(icode, ptr, op, r, a, x, y)
-static void snd_emu10k1_audigy_write_op(emu10k1_fx8010_code_t *icode, unsigned int *ptr,
+static void snd_emu10k1_audigy_write_op(struct snd_emu10k1_fx8010_code *icode,
+ unsigned int *ptr,
u32 op, u32 r, u32 a, u32 x, u32 y)
{
u_int32_t *code;
@@ -498,19 +503,20 @@ static void snd_emu10k1_audigy_write_op(emu10k1_fx8010_code_t *icode, unsigned i
#define A_OP(icode, ptr, op, r, a, x, y) \
snd_emu10k1_audigy_write_op(icode, ptr, op, r, a, x, y)
-static void snd_emu10k1_efx_write(emu10k1_t *emu, unsigned int pc, unsigned int data)
+static void snd_emu10k1_efx_write(struct snd_emu10k1 *emu, unsigned int pc, unsigned int data)
{
pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE;
snd_emu10k1_ptr_write(emu, pc, 0, data);
}
-unsigned int snd_emu10k1_efx_read(emu10k1_t *emu, unsigned int pc)
+unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc)
{
pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE;
return snd_emu10k1_ptr_read(emu, pc, 0);
}
-static int snd_emu10k1_gpr_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_gpr_poke(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
int gpr;
u32 val;
@@ -525,7 +531,8 @@ static int snd_emu10k1_gpr_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
return 0;
}
-static int snd_emu10k1_gpr_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_gpr_peek(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
int gpr;
u32 val;
@@ -539,7 +546,8 @@ static int snd_emu10k1_gpr_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
return 0;
}
-static int snd_emu10k1_tram_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_tram_poke(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
int tram;
u32 addr, val;
@@ -561,7 +569,8 @@ static int snd_emu10k1_tram_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
return 0;
}
-static int snd_emu10k1_tram_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_tram_peek(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
int tram;
u32 val, addr;
@@ -583,7 +592,8 @@ static int snd_emu10k1_tram_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
return 0;
}
-static int snd_emu10k1_code_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_code_poke(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
u32 pc, lo, hi;
@@ -599,7 +609,8 @@ static int snd_emu10k1_code_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
return 0;
}
-static int snd_emu10k1_code_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_code_peek(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
u32 pc;
@@ -614,10 +625,11 @@ static int snd_emu10k1_code_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
return 0;
}
-static snd_emu10k1_fx8010_ctl_t *snd_emu10k1_look_for_ctl(emu10k1_t *emu, snd_ctl_elem_id_t *id)
+static struct snd_emu10k1_fx8010_ctl *
+snd_emu10k1_look_for_ctl(struct snd_emu10k1 *emu, struct snd_ctl_elem_id *id)
{
- snd_emu10k1_fx8010_ctl_t *ctl;
- snd_kcontrol_t *kcontrol;
+ struct snd_emu10k1_fx8010_ctl *ctl;
+ struct snd_kcontrol *kcontrol;
struct list_head *list;
list_for_each(list, &emu->fx8010.gpr_ctl) {
@@ -631,13 +643,14 @@ static snd_emu10k1_fx8010_ctl_t *snd_emu10k1_look_for_ctl(emu10k1_t *emu, snd_ct
return NULL;
}
-static int snd_emu10k1_verify_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_verify_controls(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
unsigned int i;
- snd_ctl_elem_id_t __user *_id;
- snd_ctl_elem_id_t id;
- emu10k1_fx8010_control_gpr_t __user *_gctl;
- emu10k1_fx8010_control_gpr_t *gctl;
+ struct snd_ctl_elem_id __user *_id;
+ struct snd_ctl_elem_id id;
+ struct snd_emu10k1_fx8010_control_gpr __user *_gctl;
+ struct snd_emu10k1_fx8010_control_gpr *gctl;
int err;
for (i = 0, _id = icode->gpr_del_controls;
@@ -685,28 +698,29 @@ static int snd_emu10k1_verify_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *ic
return err;
}
-static void snd_emu10k1_ctl_private_free(snd_kcontrol_t *kctl)
+static void snd_emu10k1_ctl_private_free(struct snd_kcontrol *kctl)
{
- snd_emu10k1_fx8010_ctl_t *ctl;
+ struct snd_emu10k1_fx8010_ctl *ctl;
- ctl = (snd_emu10k1_fx8010_ctl_t *)kctl->private_value;
+ ctl = (struct snd_emu10k1_fx8010_ctl *) kctl->private_value;
kctl->private_value = 0;
list_del(&ctl->list);
kfree(ctl);
}
-static int snd_emu10k1_add_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_add_controls(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
unsigned int i, j;
- emu10k1_fx8010_control_gpr_t __user *_gctl;
- emu10k1_fx8010_control_gpr_t *gctl;
- snd_emu10k1_fx8010_ctl_t *ctl, *nctl;
- snd_kcontrol_new_t knew;
- snd_kcontrol_t *kctl;
- snd_ctl_elem_value_t *val;
+ struct snd_emu10k1_fx8010_control_gpr __user *_gctl;
+ struct snd_emu10k1_fx8010_control_gpr *gctl;
+ struct snd_emu10k1_fx8010_ctl *ctl, *nctl;
+ struct snd_kcontrol_new knew;
+ struct snd_kcontrol *kctl;
+ struct snd_ctl_elem_value *val;
int err = 0;
- val = (snd_ctl_elem_value_t *)kmalloc(sizeof(*val), GFP_KERNEL);
+ val = kmalloc(sizeof(*val), GFP_KERNEL);
gctl = kmalloc(sizeof(*gctl), GFP_KERNEL);
nctl = kmalloc(sizeof(*nctl), GFP_KERNEL);
if (!val || !gctl || !nctl) {
@@ -751,7 +765,7 @@ static int snd_emu10k1_add_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode
nctl->max = gctl->max;
nctl->translation = gctl->translation;
if (ctl == NULL) {
- ctl = (snd_emu10k1_fx8010_ctl_t *)kmalloc(sizeof(*ctl), GFP_KERNEL);
+ ctl = kmalloc(sizeof(*ctl), GFP_KERNEL);
if (ctl == NULL) {
err = -ENOMEM;
goto __error;
@@ -782,13 +796,14 @@ static int snd_emu10k1_add_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode
return err;
}
-static int snd_emu10k1_del_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_del_controls(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
unsigned int i;
- snd_ctl_elem_id_t id;
- snd_ctl_elem_id_t __user *_id;
- snd_emu10k1_fx8010_ctl_t *ctl;
- snd_card_t *card = emu->card;
+ struct snd_ctl_elem_id id;
+ struct snd_ctl_elem_id __user *_id;
+ struct snd_emu10k1_fx8010_ctl *ctl;
+ struct snd_card *card = emu->card;
for (i = 0, _id = icode->gpr_del_controls;
i < icode->gpr_del_control_count; i++, _id++) {
@@ -803,14 +818,15 @@ static int snd_emu10k1_del_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode
return 0;
}
-static int snd_emu10k1_list_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_list_controls(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
unsigned int i = 0, j;
unsigned int total = 0;
- emu10k1_fx8010_control_gpr_t *gctl;
- emu10k1_fx8010_control_gpr_t __user *_gctl;
- snd_emu10k1_fx8010_ctl_t *ctl;
- snd_ctl_elem_id_t *id;
+ struct snd_emu10k1_fx8010_control_gpr *gctl;
+ struct snd_emu10k1_fx8010_control_gpr __user *_gctl;
+ struct snd_emu10k1_fx8010_ctl *ctl;
+ struct snd_ctl_elem_id *id;
struct list_head *list;
gctl = kmalloc(sizeof(*gctl), GFP_KERNEL);
@@ -851,7 +867,8 @@ static int snd_emu10k1_list_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icod
return 0;
}
-static int snd_emu10k1_icode_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_icode_poke(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
int err = 0;
@@ -882,7 +899,8 @@ static int snd_emu10k1_icode_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
return err;
}
-static int snd_emu10k1_icode_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_icode_peek(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_code *icode)
{
int err;
@@ -900,11 +918,12 @@ static int snd_emu10k1_icode_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
return err;
}
-static int snd_emu10k1_ipcm_poke(emu10k1_t *emu, emu10k1_fx8010_pcm_t *ipcm)
+static int snd_emu10k1_ipcm_poke(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_pcm_rec *ipcm)
{
unsigned int i;
int err = 0;
- snd_emu10k1_fx8010_pcm_t *pcm;
+ struct snd_emu10k1_fx8010_pcm *pcm;
if (ipcm->substream >= EMU10K1_FX8010_PCM_COUNT)
return -EINVAL;
@@ -945,11 +964,12 @@ static int snd_emu10k1_ipcm_poke(emu10k1_t *emu, emu10k1_fx8010_pcm_t *ipcm)
return err;
}
-static int snd_emu10k1_ipcm_peek(emu10k1_t *emu, emu10k1_fx8010_pcm_t *ipcm)
+static int snd_emu10k1_ipcm_peek(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_pcm_rec *ipcm)
{
unsigned int i;
int err = 0;
- snd_emu10k1_fx8010_pcm_t *pcm;
+ struct snd_emu10k1_fx8010_pcm *pcm;
if (ipcm->substream >= EMU10K1_FX8010_PCM_COUNT)
return -EINVAL;
@@ -979,7 +999,9 @@ static int snd_emu10k1_ipcm_peek(emu10k1_t *emu, emu10k1_fx8010_pcm_t *ipcm)
#define SND_EMU10K1_PLAYBACK_CHANNELS 8
#define SND_EMU10K1_CAPTURE_CHANNELS 4
-static void __devinit snd_emu10k1_init_mono_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval)
+static void __devinit
+snd_emu10k1_init_mono_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
+ const char *name, int gpr, int defval)
{
ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
strcpy(ctl->id.name, name);
@@ -990,7 +1012,9 @@ static void __devinit snd_emu10k1_init_mono_control(emu10k1_fx8010_control_gpr_t
ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100;
}
-static void __devinit snd_emu10k1_init_stereo_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval)
+static void __devinit
+snd_emu10k1_init_stereo_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
+ const char *name, int gpr, int defval)
{
ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
strcpy(ctl->id.name, name);
@@ -1002,7 +1026,9 @@ static void __devinit snd_emu10k1_init_stereo_control(emu10k1_fx8010_control_gpr
ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100;
}
-static void __devinit snd_emu10k1_init_mono_onoff_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval)
+static void __devinit
+snd_emu10k1_init_mono_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
+ const char *name, int gpr, int defval)
{
ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
strcpy(ctl->id.name, name);
@@ -1013,7 +1039,9 @@ static void __devinit snd_emu10k1_init_mono_onoff_control(emu10k1_fx8010_control
ctl->translation = EMU10K1_GPR_TRANSLATION_ONOFF;
}
-static void __devinit snd_emu10k1_init_stereo_onoff_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval)
+static void __devinit
+snd_emu10k1_init_stereo_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
+ const char *name, int gpr, int defval)
{
ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
strcpy(ctl->id.name, name);
@@ -1030,7 +1058,7 @@ static void __devinit snd_emu10k1_init_stereo_onoff_control(emu10k1_fx8010_contr
* initial DSP configuration for Audigy
*/
-static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu)
+static int __devinit _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu)
{
int err, i, z, gpr, nctl;
const int playback = 10;
@@ -1038,8 +1066,8 @@ static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu)
const int stereo_mix = capture + 2;
const int tmp = 0x88;
u32 ptr;
- emu10k1_fx8010_code_t *icode = NULL;
- emu10k1_fx8010_control_gpr_t *controls = NULL, *ctl;
+ struct snd_emu10k1_fx8010_code *icode = NULL;
+ struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl;
u32 *gpr_map;
mm_segment_t seg;
@@ -1047,8 +1075,11 @@ static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu)
INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL ||
- (icode->gpr_map = (u_int32_t __user *)kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
- (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(*controls), GFP_KERNEL)) == NULL) {
+ (icode->gpr_map = (u_int32_t __user *)
+ kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t),
+ GFP_KERNEL)) == NULL ||
+ (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
+ sizeof(*controls), GFP_KERNEL)) == NULL) {
err = -ENOMEM;
goto __err;
}
@@ -1434,7 +1465,7 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
seg = snd_enter_user();
icode->gpr_add_control_count = nctl;
- icode->gpr_add_controls = (emu10k1_fx8010_control_gpr_t __user *)controls;
+ icode->gpr_add_controls = (struct snd_emu10k1_fx8010_control_gpr __user *)controls;
err = snd_emu10k1_icode_poke(emu, icode);
snd_leave_user(seg);
@@ -1454,14 +1485,14 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
/* when volume = max, then copy only to avoid volume modification */
/* with iMAC0 (negative values) */
-static void __devinit _volume(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
+static void __devinit _volume(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
{
OP(icode, ptr, iMAC0, dst, C_00000000, src, vol);
OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff);
OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000001);
OP(icode, ptr, iACC3, dst, src, C_00000000, C_00000000);
}
-static void __devinit _volume_add(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
+static void __devinit _volume_add(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
{
OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff);
OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002);
@@ -1469,7 +1500,7 @@ static void __devinit _volume_add(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 ds
OP(icode, ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000001);
OP(icode, ptr, iMAC0, dst, dst, src, vol);
}
-static void __devinit _volume_out(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
+static void __devinit _volume_out(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
{
OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff);
OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002);
@@ -1500,13 +1531,13 @@ static void __devinit _volume_out(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 ds
_SWITCH_NEG(icode, ptr, GPR(dst), GPR(src))
-static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
+static int __devinit _snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
{
int err, i, z, gpr, tmp, playback, capture;
u32 ptr;
- emu10k1_fx8010_code_t *icode;
- emu10k1_fx8010_pcm_t *ipcm = NULL;
- emu10k1_fx8010_control_gpr_t *controls = NULL, *ctl;
+ struct snd_emu10k1_fx8010_code *icode;
+ struct snd_emu10k1_fx8010_pcm_rec *ipcm = NULL;
+ struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl;
u32 *gpr_map;
mm_segment_t seg;
@@ -1515,8 +1546,12 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL)
return -ENOMEM;
- if ((icode->gpr_map = (u_int32_t __user *)kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
- (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(emu10k1_fx8010_control_gpr_t), GFP_KERNEL)) == NULL ||
+ if ((icode->gpr_map = (u_int32_t __user *)
+ kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t),
+ GFP_KERNEL)) == NULL ||
+ (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
+ sizeof(struct snd_emu10k1_fx8010_control_gpr),
+ GFP_KERNEL)) == NULL ||
(ipcm = kzalloc(sizeof(*ipcm), GFP_KERNEL)) == NULL) {
err = -ENOMEM;
goto __err;
@@ -2050,7 +2085,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
goto __err;
seg = snd_enter_user();
icode->gpr_add_control_count = i;
- icode->gpr_add_controls = (emu10k1_fx8010_control_gpr_t __user *)controls;
+ icode->gpr_add_controls = (struct snd_emu10k1_fx8010_control_gpr __user *)controls;
err = snd_emu10k1_icode_poke(emu, icode);
snd_leave_user(seg);
if (err >= 0)
@@ -2065,7 +2100,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
return err;
}
-int __devinit snd_emu10k1_init_efx(emu10k1_t *emu)
+int __devinit snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
{
if (emu->audigy)
return _snd_emu10k1_audigy_init_efx(emu);
@@ -2073,7 +2108,7 @@ int __devinit snd_emu10k1_init_efx(emu10k1_t *emu)
return _snd_emu10k1_init_efx(emu);
}
-void snd_emu10k1_free_efx(emu10k1_t *emu)
+void snd_emu10k1_free_efx(struct snd_emu10k1 *emu)
{
/* stop processor */
if (emu->audigy)
@@ -2083,7 +2118,7 @@ void snd_emu10k1_free_efx(emu10k1_t *emu)
}
#if 0 // FIXME: who use them?
-int snd_emu10k1_fx8010_tone_control_activate(emu10k1_t *emu, int output)
+int snd_emu10k1_fx8010_tone_control_activate(struct snd_emu10k1 *emu, int output)
{
if (output < 0 || output >= 6)
return -EINVAL;
@@ -2091,7 +2126,7 @@ int snd_emu10k1_fx8010_tone_control_activate(emu10k1_t *emu, int output)
return 0;
}
-int snd_emu10k1_fx8010_tone_control_deactivate(emu10k1_t *emu, int output)
+int snd_emu10k1_fx8010_tone_control_deactivate(struct snd_emu10k1 *emu, int output)
{
if (output < 0 || output >= 6)
return -EINVAL;
@@ -2100,7 +2135,7 @@ int snd_emu10k1_fx8010_tone_control_deactivate(emu10k1_t *emu, int output)
}
#endif
-int snd_emu10k1_fx8010_tram_setup(emu10k1_t *emu, u32 size)
+int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size)
{
u8 size_reg = 0;
@@ -2142,7 +2177,7 @@ int snd_emu10k1_fx8010_tram_setup(emu10k1_t *emu, u32 size)
return 0;
}
-static int snd_emu10k1_fx8010_open(snd_hwdep_t * hw, struct file *file)
+static int snd_emu10k1_fx8010_open(struct snd_hwdep * hw, struct file *file)
{
return 0;
}
@@ -2155,7 +2190,8 @@ static void copy_string(char *dst, char *src, char *null, int idx)
strcpy(dst, src);
}
-static int snd_emu10k1_fx8010_info(emu10k1_t *emu, emu10k1_fx8010_info_t *info)
+static int snd_emu10k1_fx8010_info(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_fx8010_info *info)
{
char **fxbus, **extin, **extout;
unsigned short fxbus_mask, extin_mask, extout_mask;
@@ -2181,19 +2217,19 @@ static int snd_emu10k1_fx8010_info(emu10k1_t *emu, emu10k1_fx8010_info_t *info)
return 0;
}
-static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg)
+static int snd_emu10k1_fx8010_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg)
{
- emu10k1_t *emu = hw->private_data;
- emu10k1_fx8010_info_t *info;
- emu10k1_fx8010_code_t *icode;
- emu10k1_fx8010_pcm_t *ipcm;
+ struct snd_emu10k1 *emu = hw->private_data;
+ struct snd_emu10k1_fx8010_info *info;
+ struct snd_emu10k1_fx8010_code *icode;
+ struct snd_emu10k1_fx8010_pcm_rec *ipcm;
unsigned int addr;
void __user *argp = (void __user *)arg;
int res;
switch (cmd) {
case SNDRV_EMU10K1_IOCTL_INFO:
- info = (emu10k1_fx8010_info_t *)kmalloc(sizeof(*info), GFP_KERNEL);
+ info = kmalloc(sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
if ((res = snd_emu10k1_fx8010_info(emu, info)) < 0) {
@@ -2209,7 +2245,7 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne
case SNDRV_EMU10K1_IOCTL_CODE_POKE:
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
- icode = (emu10k1_fx8010_code_t *)kmalloc(sizeof(*icode), GFP_KERNEL);
+ icode = kmalloc(sizeof(*icode), GFP_KERNEL);
if (icode == NULL)
return -ENOMEM;
if (copy_from_user(icode, argp, sizeof(*icode))) {
@@ -2220,7 +2256,7 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne
kfree(icode);
return res;
case SNDRV_EMU10K1_IOCTL_CODE_PEEK:
- icode = (emu10k1_fx8010_code_t *)kmalloc(sizeof(*icode), GFP_KERNEL);
+ icode = kmalloc(sizeof(*icode), GFP_KERNEL);
if (icode == NULL)
return -ENOMEM;
if (copy_from_user(icode, argp, sizeof(*icode))) {
@@ -2235,7 +2271,7 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne
kfree(icode);
return res;
case SNDRV_EMU10K1_IOCTL_PCM_POKE:
- ipcm = (emu10k1_fx8010_pcm_t *)kmalloc(sizeof(*ipcm), GFP_KERNEL);
+ ipcm = kmalloc(sizeof(*ipcm), GFP_KERNEL);
if (ipcm == NULL)
return -ENOMEM;
if (copy_from_user(ipcm, argp, sizeof(*ipcm))) {
@@ -2327,14 +2363,14 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne
return -ENOTTY;
}
-static int snd_emu10k1_fx8010_release(snd_hwdep_t * hw, struct file *file)
+static int snd_emu10k1_fx8010_release(struct snd_hwdep * hw, struct file *file)
{
return 0;
}
-int __devinit snd_emu10k1_fx8010_new(emu10k1_t *emu, int device, snd_hwdep_t ** rhwdep)
+int __devinit snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep)
{
- snd_hwdep_t *hw;
+ struct snd_hwdep *hw;
int err;
if (rhwdep)
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c
index 7cc831ccd0cb..98fb8139427b 100644
--- a/sound/pci/emu10k1/emumixer.c
+++ b/sound/pci/emu10k1/emumixer.c
@@ -35,17 +35,17 @@
#define AC97_ID_STAC9758 0x83847658
-static int snd_emu10k1_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
uinfo->count = 1;
return 0;
}
-static int snd_emu10k1_spdif_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_spdif_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
unsigned long flags;
@@ -58,8 +58,8 @@ static int snd_emu10k1_spdif_get(snd_kcontrol_t * kcontrol,
return 0;
}
-static int snd_emu10k1_spdif_get_mask(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_spdif_get_mask(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
ucontrol->value.iec958.status[0] = 0xff;
ucontrol->value.iec958.status[1] = 0xff;
@@ -69,7 +69,7 @@ static int snd_emu10k1_spdif_get_mask(snd_kcontrol_t * kcontrol,
}
#if 0
-static int snd_audigy_spdif_output_rate_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_audigy_spdif_output_rate_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
static char *texts[] = {"44100", "48000", "96000"};
@@ -82,10 +82,10 @@ static int snd_audigy_spdif_output_rate_info(snd_kcontrol_t *kcontrol, snd_ctl_e
return 0;
}
-static int snd_audigy_spdif_output_rate_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_audigy_spdif_output_rate_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
unsigned int tmp;
unsigned long flags;
@@ -109,10 +109,10 @@ static int snd_audigy_spdif_output_rate_get(snd_kcontrol_t * kcontrol,
return 0;
}
-static int snd_audigy_spdif_output_rate_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_audigy_spdif_output_rate_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
int change;
unsigned int reg, val, tmp;
unsigned long flags;
@@ -143,7 +143,7 @@ static int snd_audigy_spdif_output_rate_put(snd_kcontrol_t * kcontrol,
return change;
}
-static snd_kcontrol_new_t snd_audigy_spdif_output_rate =
+static struct snd_kcontrol_new snd_audigy_spdif_output_rate =
{
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -155,10 +155,10 @@ static snd_kcontrol_new_t snd_audigy_spdif_output_rate =
};
#endif
-static int snd_emu10k1_spdif_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_spdif_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
int change;
unsigned int val;
@@ -178,7 +178,7 @@ static int snd_emu10k1_spdif_put(snd_kcontrol_t * kcontrol,
return change;
}
-static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control =
+static struct snd_kcontrol_new snd_emu10k1_spdif_mask_control =
{
.access = SNDRV_CTL_ELEM_ACCESS_READ,
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -188,7 +188,7 @@ static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control =
.get = snd_emu10k1_spdif_get_mask
};
-static snd_kcontrol_new_t snd_emu10k1_spdif_control =
+static struct snd_kcontrol_new snd_emu10k1_spdif_control =
{
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
@@ -199,7 +199,7 @@ static snd_kcontrol_new_t snd_emu10k1_spdif_control =
};
-static void update_emu10k1_fxrt(emu10k1_t *emu, int voice, unsigned char *route)
+static void update_emu10k1_fxrt(struct snd_emu10k1 *emu, int voice, unsigned char *route)
{
if (emu->audigy) {
snd_emu10k1_ptr_write(emu, A_FXRT1, voice,
@@ -212,7 +212,7 @@ static void update_emu10k1_fxrt(emu10k1_t *emu, int voice, unsigned char *route)
}
}
-static void update_emu10k1_send_volume(emu10k1_t *emu, int voice, unsigned char *volume)
+static void update_emu10k1_send_volume(struct snd_emu10k1 *emu, int voice, unsigned char *volume)
{
snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_A, voice, volume[0]);
snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_B, voice, volume[1]);
@@ -229,9 +229,9 @@ static void update_emu10k1_send_volume(emu10k1_t *emu, int voice, unsigned char
/* PCM stream controls */
-static int snd_emu10k1_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_send_routing_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = emu->audigy ? 3*8 : 3*4;
uinfo->value.integer.min = 0;
@@ -239,12 +239,13 @@ static int snd_emu10k1_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_
return 0;
}
-static int snd_emu10k1_send_routing_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_send_routing_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
unsigned long flags;
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
- emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1_pcm_mixer *mix =
+ &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
int voice, idx;
int num_efx = emu->audigy ? 8 : 4;
int mask = emu->audigy ? 0x3f : 0x0f;
@@ -258,12 +259,13 @@ static int snd_emu10k1_send_routing_get(snd_kcontrol_t * kcontrol,
return 0;
}
-static int snd_emu10k1_send_routing_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_send_routing_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
unsigned long flags;
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
- emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1_pcm_mixer *mix =
+ &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
int change = 0, voice, idx, val;
int num_efx = emu->audigy ? 8 : 4;
int mask = emu->audigy ? 0x3f : 0x0f;
@@ -292,7 +294,7 @@ static int snd_emu10k1_send_routing_put(snd_kcontrol_t * kcontrol,
return change;
}
-static snd_kcontrol_new_t snd_emu10k1_send_routing_control =
+static struct snd_kcontrol_new snd_emu10k1_send_routing_control =
{
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -303,9 +305,9 @@ static snd_kcontrol_new_t snd_emu10k1_send_routing_control =
.put = snd_emu10k1_send_routing_put
};
-static int snd_emu10k1_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_send_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = emu->audigy ? 3*8 : 3*4;
uinfo->value.integer.min = 0;
@@ -313,12 +315,13 @@ static int snd_emu10k1_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i
return 0;
}
-static int snd_emu10k1_send_volume_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_send_volume_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
unsigned long flags;
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
- emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1_pcm_mixer *mix =
+ &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
int idx;
int num_efx = emu->audigy ? 8 : 4;
@@ -329,12 +332,13 @@ static int snd_emu10k1_send_volume_get(snd_kcontrol_t * kcontrol,
return 0;
}
-static int snd_emu10k1_send_volume_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_send_volume_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
unsigned long flags;
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
- emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1_pcm_mixer *mix =
+ &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
int change = 0, idx, val;
int num_efx = emu->audigy ? 8 : 4;
@@ -361,7 +365,7 @@ static int snd_emu10k1_send_volume_put(snd_kcontrol_t * kcontrol,
return change;
}
-static snd_kcontrol_new_t snd_emu10k1_send_volume_control =
+static struct snd_kcontrol_new snd_emu10k1_send_volume_control =
{
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -372,7 +376,7 @@ static snd_kcontrol_new_t snd_emu10k1_send_volume_control =
.put = snd_emu10k1_send_volume_put
};
-static int snd_emu10k1_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_attn_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 3;
@@ -381,11 +385,12 @@ static int snd_emu10k1_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
return 0;
}
-static int snd_emu10k1_attn_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_attn_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
- emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1_pcm_mixer *mix =
+ &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
unsigned long flags;
int idx;
@@ -396,12 +401,13 @@ static int snd_emu10k1_attn_get(snd_kcontrol_t * kcontrol,
return 0;
}
-static int snd_emu10k1_attn_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_attn_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
unsigned long flags;
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
- emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1_pcm_mixer *mix =
+ &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
int change = 0, idx, val;
spin_lock_irqsave(&emu->reg_lock, flags);
@@ -424,7 +430,7 @@ static int snd_emu10k1_attn_put(snd_kcontrol_t * kcontrol,
return change;
}
-static snd_kcontrol_new_t snd_emu10k1_attn_control =
+static struct snd_kcontrol_new snd_emu10k1_attn_control =
{
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -437,9 +443,9 @@ static snd_kcontrol_new_t snd_emu10k1_attn_control =
/* Mutichannel PCM stream controls */
-static int snd_emu10k1_efx_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_efx_send_routing_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = emu->audigy ? 8 : 4;
uinfo->value.integer.min = 0;
@@ -447,12 +453,13 @@ static int snd_emu10k1_efx_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_e
return 0;
}
-static int snd_emu10k1_efx_send_routing_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_send_routing_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
unsigned long flags;
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
- emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1_pcm_mixer *mix =
+ &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
int idx;
int num_efx = emu->audigy ? 8 : 4;
int mask = emu->audigy ? 0x3f : 0x0f;
@@ -465,13 +472,13 @@ static int snd_emu10k1_efx_send_routing_get(snd_kcontrol_t * kcontrol,
return 0;
}
-static int snd_emu10k1_efx_send_routing_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_send_routing_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
unsigned long flags;
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
- emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch];
+ struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
int change = 0, idx, val;
int num_efx = emu->audigy ? 8 : 4;
int mask = emu->audigy ? 0x3f : 0x0f;
@@ -495,7 +502,7 @@ static int snd_emu10k1_efx_send_routing_put(snd_kcontrol_t * kcontrol,
return change;
}
-static snd_kcontrol_new_t snd_emu10k1_efx_send_routing_control =
+static struct snd_kcontrol_new snd_emu10k1_efx_send_routing_control =
{
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -506,9 +513,9 @@ static snd_kcontrol_new_t snd_emu10k1_efx_send_routing_control =
.put = snd_emu10k1_efx_send_routing_put
};
-static int snd_emu10k1_efx_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_efx_send_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = emu->audigy ? 8 : 4;
uinfo->value.integer.min = 0;
@@ -516,12 +523,13 @@ static int snd_emu10k1_efx_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_el
return 0;
}
-static int snd_emu10k1_efx_send_volume_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_send_volume_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
unsigned long flags;
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
- emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1_pcm_mixer *mix =
+ &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
int idx;
int num_efx = emu->audigy ? 8 : 4;
@@ -532,13 +540,13 @@ static int snd_emu10k1_efx_send_volume_get(snd_kcontrol_t * kcontrol,
return 0;
}
-static int snd_emu10k1_efx_send_volume_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_send_volume_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
unsigned long flags;
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
- emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch];
+ struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
int change = 0, idx, val;
int num_efx = emu->audigy ? 8 : 4;
@@ -561,7 +569,7 @@ static int snd_emu10k1_efx_send_volume_put(snd_kcontrol_t * kcontrol,
}
-static snd_kcontrol_new_t snd_emu10k1_efx_send_volume_control =
+static struct snd_kcontrol_new snd_emu10k1_efx_send_volume_control =
{
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -572,7 +580,7 @@ static snd_kcontrol_new_t snd_emu10k1_efx_send_volume_control =
.put = snd_emu10k1_efx_send_volume_put
};
-static int snd_emu10k1_efx_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_efx_attn_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 1;
@@ -581,11 +589,12 @@ static int snd_emu10k1_efx_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info
return 0;
}
-static int snd_emu10k1_efx_attn_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_attn_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
- emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1_pcm_mixer *mix =
+ &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
unsigned long flags;
spin_lock_irqsave(&emu->reg_lock, flags);
@@ -594,13 +603,13 @@ static int snd_emu10k1_efx_attn_get(snd_kcontrol_t * kcontrol,
return 0;
}
-static int snd_emu10k1_efx_attn_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_attn_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
unsigned long flags;
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
- emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch];
+ struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
int change = 0, val;
spin_lock_irqsave(&emu->reg_lock, flags);
@@ -618,7 +627,7 @@ static int snd_emu10k1_efx_attn_put(snd_kcontrol_t * kcontrol,
return change;
}
-static snd_kcontrol_new_t snd_emu10k1_efx_attn_control =
+static struct snd_kcontrol_new snd_emu10k1_efx_attn_control =
{
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -629,7 +638,7 @@ static snd_kcontrol_new_t snd_emu10k1_efx_attn_control =
.put = snd_emu10k1_efx_attn_put
};
-static int snd_emu10k1_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_shared_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1;
@@ -638,10 +647,10 @@ static int snd_emu10k1_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_
return 0;
}
-static int snd_emu10k1_shared_spdif_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_shared_spdif_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
if (emu->audigy)
ucontrol->value.integer.value[0] = inl(emu->port + A_IOCFG) & A_IOCFG_GPOUT0 ? 1 : 0;
@@ -650,11 +659,11 @@ static int snd_emu10k1_shared_spdif_get(snd_kcontrol_t * kcontrol,
return 0;
}
-static int snd_emu10k1_shared_spdif_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_shared_spdif_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
unsigned long flags;
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
unsigned int reg, val;
int change = 0;
@@ -681,7 +690,7 @@ static int snd_emu10k1_shared_spdif_put(snd_kcontrol_t * kcontrol,
return change;
}
-static snd_kcontrol_new_t snd_emu10k1_shared_spdif __devinitdata =
+static struct snd_kcontrol_new snd_emu10k1_shared_spdif __devinitdata =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "SB Live Analog/Digital Output Jack",
@@ -690,7 +699,7 @@ static snd_kcontrol_new_t snd_emu10k1_shared_spdif __devinitdata =
.put = snd_emu10k1_shared_spdif_put
};
-static snd_kcontrol_new_t snd_audigy_shared_spdif __devinitdata =
+static struct snd_kcontrol_new snd_audigy_shared_spdif __devinitdata =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Audigy Analog/Digital Output Jack",
@@ -701,35 +710,35 @@ static snd_kcontrol_new_t snd_audigy_shared_spdif __devinitdata =
/*
*/
-static void snd_emu10k1_mixer_free_ac97(ac97_t *ac97)
+static void snd_emu10k1_mixer_free_ac97(struct snd_ac97 *ac97)
{
- emu10k1_t *emu = ac97->private_data;
+ struct snd_emu10k1 *emu = ac97->private_data;
emu->ac97 = NULL;
}
/*
*/
-static int remove_ctl(snd_card_t *card, const char *name)
+static int remove_ctl(struct snd_card *card, const char *name)
{
- snd_ctl_elem_id_t id;
+ struct snd_ctl_elem_id id;
memset(&id, 0, sizeof(id));
strcpy(id.name, name);
id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
return snd_ctl_remove_id(card, &id);
}
-static snd_kcontrol_t *ctl_find(snd_card_t *card, const char *name)
+static struct snd_kcontrol *ctl_find(struct snd_card *card, const char *name)
{
- snd_ctl_elem_id_t sid;
+ struct snd_ctl_elem_id sid;
memset(&sid, 0, sizeof(sid));
strcpy(sid.name, name);
sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
return snd_ctl_find_id(card, &sid);
}
-static int rename_ctl(snd_card_t *card, const char *src, const char *dst)
+static int rename_ctl(struct snd_card *card, const char *src, const char *dst)
{
- snd_kcontrol_t *kctl = ctl_find(card, src);
+ struct snd_kcontrol *kctl = ctl_find(card, src);
if (kctl) {
strcpy(kctl->id.name, dst);
return 0;
@@ -737,12 +746,12 @@ static int rename_ctl(snd_card_t *card, const char *src, const char *dst)
return -ENOENT;
}
-int __devinit snd_emu10k1_mixer(emu10k1_t *emu,
+int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
int pcm_device, int multi_device)
{
int err, pcm;
- snd_kcontrol_t *kctl;
- snd_card_t *card = emu->card;
+ struct snd_kcontrol *kctl;
+ struct snd_card *card = emu->card;
char **c;
static char *emu10k1_remove_ctls[] = {
/* no AC97 mono, surround, center/lfe */
@@ -795,9 +804,9 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu,
};
if (emu->card_capabilities->ac97_chip) {
- ac97_bus_t *pbus;
- ac97_template_t ac97;
- static ac97_bus_ops_t ops = {
+ struct snd_ac97_bus *pbus;
+ struct snd_ac97_template ac97;
+ static struct snd_ac97_bus_ops ops = {
.write = snd_emu10k1_ac97_write,
.read = snd_emu10k1_ac97_read,
};
@@ -894,7 +903,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu,
/* initialize the routing and volume table for each pcm playback stream */
for (pcm = 0; pcm < 32; pcm++) {
- emu10k1_pcm_mixer_t *mix;
+ struct snd_emu10k1_pcm_mixer *mix;
int v;
mix = &emu->pcm_mixer[pcm];
@@ -914,7 +923,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu,
/* initialize the routing and volume table for the multichannel playback stream */
for (pcm = 0; pcm < NUM_EFX_PLAYBACK; pcm++) {
- emu10k1_pcm_mixer_t *mix;
+ struct snd_emu10k1_pcm_mixer *mix;
int v;
mix = &emu->efx_pcm_mixer[pcm];
diff --git a/sound/pci/emu10k1/emumpu401.c b/sound/pci/emu10k1/emumpu401.c
index eb57458a9665..d96eb455103f 100644
--- a/sound/pci/emu10k1/emumpu401.c
+++ b/sound/pci/emu10k1/emumpu401.c
@@ -28,7 +28,8 @@
#define EMU10K1_MIDI_MODE_INPUT (1<<0)
#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)
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
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)
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
#define MPU401_ENTER_UART 0x3f
#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;
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)
*/
-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;
@@ -104,17 +106,17 @@ static void do_emu10k1_midi_interrupt(emu10k1_t *emu, emu10k1_midi_t *midi, unsi
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);
}
-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);
}
-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;
int timeout, ok;
@@ -146,10 +148,10 @@ static void snd_emu10k1_midi_cmd(emu10k1_t * emu, emu10k1_midi_t *midi, unsigned
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;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags;
emu = midi->emu;
@@ -167,10 +169,10 @@ static int snd_emu10k1_midi_input_open(snd_rawmidi_substream_t * substream)
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;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags;
emu = midi->emu;
@@ -188,10 +190,10 @@ static int snd_emu10k1_midi_output_open(snd_rawmidi_substream_t * substream)
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;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags;
emu = midi->emu;
@@ -209,10 +211,10 @@ static int snd_emu10k1_midi_input_close(snd_rawmidi_substream_t * substream)
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;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags;
emu = midi->emu;
@@ -230,10 +232,10 @@ static int snd_emu10k1_midi_output_close(snd_rawmidi_substream_t * substream)
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;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
emu = midi->emu;
snd_assert(emu, return);
@@ -243,10 +245,10 @@ static void snd_emu10k1_midi_input_trigger(snd_rawmidi_substream_t * substream,
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;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags;
emu = midi->emu;
@@ -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,
.close = snd_emu10k1_midi_output_close,
.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,
.close = snd_emu10k1_midi_input_close,
.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->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;
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
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;
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)
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;
midi = &emu->midi;
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c
index 166f7c4d28c9..8e6caf581c0c 100644
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -35,9 +35,10 @@
#include <sound/core.h>
#include <sound/emu10k1.h>
-static void snd_emu10k1_pcm_interrupt(emu10k1_t *emu, emu10k1_voice_t *voice)
+static void snd_emu10k1_pcm_interrupt(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_voice *voice)
{
- emu10k1_pcm_t *epcm;
+ struct snd_emu10k1_pcm *epcm;
if ((epcm = voice->epcm) == NULL)
return;
@@ -52,7 +53,8 @@ static void snd_emu10k1_pcm_interrupt(emu10k1_t *emu, emu10k1_voice_t *voice)
snd_pcm_period_elapsed(epcm->substream);
}
-static void snd_emu10k1_pcm_ac97adc_interrupt(emu10k1_t *emu, unsigned int status)
+static void snd_emu10k1_pcm_ac97adc_interrupt(struct snd_emu10k1 *emu,
+ unsigned int status)
{
#if 0
if (status & IPR_ADCBUFHALFFULL) {
@@ -63,7 +65,8 @@ static void snd_emu10k1_pcm_ac97adc_interrupt(emu10k1_t *emu, unsigned int statu
snd_pcm_period_elapsed(emu->pcm_capture_substream);
}
-static void snd_emu10k1_pcm_ac97mic_interrupt(emu10k1_t *emu, unsigned int status)
+static void snd_emu10k1_pcm_ac97mic_interrupt(struct snd_emu10k1 *emu,
+ unsigned int status)
{
#if 0
if (status & IPR_MICBUFHALFFULL) {
@@ -74,7 +77,8 @@ static void snd_emu10k1_pcm_ac97mic_interrupt(emu10k1_t *emu, unsigned int statu
snd_pcm_period_elapsed(emu->pcm_capture_mic_substream);
}
-static void snd_emu10k1_pcm_efx_interrupt(emu10k1_t *emu, unsigned int status)
+static void snd_emu10k1_pcm_efx_interrupt(struct snd_emu10k1 *emu,
+ unsigned int status)
{
#if 0
if (status & IPR_EFXBUFHALFFULL) {
@@ -85,11 +89,11 @@ static void snd_emu10k1_pcm_efx_interrupt(emu10k1_t *emu, unsigned int status)
snd_pcm_period_elapsed(emu->pcm_capture_efx_substream);
}
-static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
unsigned int ptr;
if (!epcm->running)
@@ -102,7 +106,7 @@ static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(snd_pcm_substream_t *
return ptr;
}
-static int snd_emu10k1_pcm_channel_alloc(emu10k1_pcm_t * epcm, int voices)
+static int snd_emu10k1_pcm_channel_alloc(struct snd_emu10k1_pcm * epcm, int voices)
{
int err, i;
@@ -167,7 +171,7 @@ static unsigned int capture_period_sizes[31] = {
384*128,448*128,512*128
};
-static snd_pcm_hw_constraint_list_t hw_constraints_capture_period_sizes = {
+static struct snd_pcm_hw_constraint_list hw_constraints_capture_period_sizes = {
.count = 31,
.list = capture_period_sizes,
.mask = 0
@@ -177,7 +181,7 @@ static unsigned int capture_rates[8] = {
8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000
};
-static snd_pcm_hw_constraint_list_t hw_constraints_capture_rates = {
+static struct snd_pcm_hw_constraint_list hw_constraints_capture_rates = {
.count = 8,
.list = capture_rates,
.mask = 0
@@ -271,15 +275,15 @@ static inline int emu10k1_ccis(int stereo, int w_16)
}
}
-static void snd_emu10k1_pcm_init_voice(emu10k1_t *emu,
+static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu,
int master, int extra,
- emu10k1_voice_t *evoice,
+ struct snd_emu10k1_voice *evoice,
unsigned int start_addr,
unsigned int end_addr,
- emu10k1_pcm_mixer_t *mix)
+ struct snd_emu10k1_pcm_mixer *mix)
{
- snd_pcm_substream_t *substream = evoice->epcm->substream;
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_substream *substream = evoice->epcm->substream;
+ struct snd_pcm_runtime *runtime = substream->runtime;
unsigned int silent_page, tmp;
int voice, stereo, w_16;
unsigned char attn, send_amount[8];
@@ -392,12 +396,12 @@ static void snd_emu10k1_pcm_init_voice(emu10k1_t *emu,
spin_unlock_irqrestore(&emu->reg_lock, flags);
}
-static int snd_emu10k1_playback_hw_params(snd_pcm_substream_t * substream,
- snd_pcm_hw_params_t * hw_params)
+static int snd_emu10k1_playback_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *hw_params)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
int err;
if ((err = snd_emu10k1_pcm_channel_alloc(epcm, params_channels(hw_params))) < 0)
@@ -412,7 +416,7 @@ static int snd_emu10k1_playback_hw_params(snd_pcm_substream_t * substream,
epcm->start_addr = 0;
if (! epcm->memblk)
return -ENOMEM;
- mapped = ((emu10k1_memblk_t *)epcm->memblk)->mapped_page;
+ mapped = ((struct snd_emu10k1_memblk *)epcm->memblk)->mapped_page;
if (mapped < 0)
return -ENOMEM;
epcm->start_addr = mapped << PAGE_SHIFT;
@@ -420,11 +424,11 @@ static int snd_emu10k1_playback_hw_params(snd_pcm_substream_t * substream,
return 0;
}
-static int snd_emu10k1_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_emu10k1_playback_hw_free(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm;
if (runtime->private_data == NULL)
return 0;
@@ -450,11 +454,11 @@ static int snd_emu10k1_playback_hw_free(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_efx_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_emu10k1_efx_playback_hw_free(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm;
int i;
if (runtime->private_data == NULL)
@@ -479,11 +483,11 @@ static int snd_emu10k1_efx_playback_hw_free(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_emu10k1_playback_prepare(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
unsigned int start_addr, end_addr;
start_addr = epcm->start_addr;
@@ -507,11 +511,11 @@ static int snd_emu10k1_playback_prepare(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_efx_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_emu10k1_efx_playback_prepare(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
unsigned int start_addr, end_addr;
unsigned int channel_size;
int i;
@@ -543,7 +547,7 @@ static int snd_emu10k1_efx_playback_prepare(snd_pcm_substream_t * substream)
return 0;
}
-static snd_pcm_hardware_t snd_emu10k1_efx_playback =
+static struct snd_pcm_hardware snd_emu10k1_efx_playback =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_NONINTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -562,22 +566,22 @@ static snd_pcm_hardware_t snd_emu10k1_efx_playback =
.fifo_size = 0,
};
-static int snd_emu10k1_capture_hw_params(snd_pcm_substream_t * substream,
- snd_pcm_hw_params_t * hw_params)
+static int snd_emu10k1_capture_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *hw_params)
{
return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
}
-static int snd_emu10k1_capture_hw_free(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_hw_free(struct snd_pcm_substream *substream)
{
return snd_pcm_lib_free_pages(substream);
}
-static int snd_emu10k1_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_prepare(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
int idx;
/* zeroing the buffer size will stop capture */
@@ -620,9 +624,9 @@ static int snd_emu10k1_capture_prepare(snd_pcm_substream_t * substream)
return 0;
}
-static void snd_emu10k1_playback_invalidate_cache(emu10k1_t *emu, int extra, emu10k1_voice_t *evoice)
+static void snd_emu10k1_playback_invalidate_cache(struct snd_emu10k1 *emu, int extra, struct snd_emu10k1_voice *evoice)
{
- snd_pcm_runtime_t *runtime;
+ struct snd_pcm_runtime *runtime;
unsigned int voice, stereo, i, ccis, cra = 64, cs, sample;
if (evoice == NULL)
@@ -655,12 +659,12 @@ static void snd_emu10k1_playback_invalidate_cache(emu10k1_t *emu, int extra, emu
}
}
-static void snd_emu10k1_playback_prepare_voice(emu10k1_t *emu, emu10k1_voice_t *evoice,
+static void snd_emu10k1_playback_prepare_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice,
int master, int extra,
- emu10k1_pcm_mixer_t *mix)
+ struct snd_emu10k1_pcm_mixer *mix)
{
- snd_pcm_substream_t *substream;
- snd_pcm_runtime_t *runtime;
+ struct snd_pcm_substream *substream;
+ struct snd_pcm_runtime *runtime;
unsigned int attn, vattn;
unsigned int voice, tmp;
@@ -680,10 +684,10 @@ static void snd_emu10k1_playback_prepare_voice(emu10k1_t *emu, emu10k1_voice_t *
snd_emu10k1_voice_clear_loop_stop(emu, voice);
}
-static void snd_emu10k1_playback_trigger_voice(emu10k1_t *emu, emu10k1_voice_t *evoice, int master, int extra)
+static void snd_emu10k1_playback_trigger_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice, int master, int extra)
{
- snd_pcm_substream_t *substream;
- snd_pcm_runtime_t *runtime;
+ struct snd_pcm_substream *substream;
+ struct snd_pcm_runtime *runtime;
unsigned int voice, pitch, pitch_target;
if (evoice == NULL) /* skip second voice for mono */
@@ -702,7 +706,7 @@ static void snd_emu10k1_playback_trigger_voice(emu10k1_t *emu, emu10k1_voice_t *
snd_emu10k1_voice_intr_enable(emu, voice);
}
-static void snd_emu10k1_playback_stop_voice(emu10k1_t *emu, emu10k1_voice_t *evoice)
+static void snd_emu10k1_playback_stop_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice)
{
unsigned int voice;
@@ -718,13 +722,13 @@ static void snd_emu10k1_playback_stop_voice(emu10k1_t *emu, emu10k1_voice_t *evo
snd_emu10k1_ptr_write(emu, IP, voice, 0);
}
-static int snd_emu10k1_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream,
int cmd)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
- emu10k1_pcm_mixer_t *mix;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
+ struct snd_emu10k1_pcm_mixer *mix;
int result = 0;
// printk("trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n", (int)emu, cmd, substream->ops->pointer(substream));
@@ -759,12 +763,12 @@ static int snd_emu10k1_playback_trigger(snd_pcm_substream_t * substream,
return result;
}
-static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream,
int cmd)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
int result = 0;
spin_lock(&emu->reg_lock);
@@ -819,11 +823,11 @@ static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream,
return result;
}
-static snd_pcm_uframes_t snd_emu10k1_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_emu10k1_playback_pointer(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
unsigned int ptr;
if (!epcm->running)
@@ -847,12 +851,12 @@ static snd_pcm_uframes_t snd_emu10k1_playback_pointer(snd_pcm_substream_t * subs
}
-static int snd_emu10k1_efx_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_emu10k1_efx_playback_trigger(struct snd_pcm_substream *substream,
int cmd)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
int i;
int result = 0;
@@ -896,11 +900,11 @@ static int snd_emu10k1_efx_playback_trigger(snd_pcm_substream_t * substream,
}
-static snd_pcm_uframes_t snd_emu10k1_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_emu10k1_capture_pointer(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
unsigned int ptr;
if (!epcm->running)
@@ -917,7 +921,7 @@ static snd_pcm_uframes_t snd_emu10k1_capture_pointer(snd_pcm_substream_t * subst
* Playback support device description
*/
-static snd_pcm_hardware_t snd_emu10k1_playback =
+static struct snd_pcm_hardware snd_emu10k1_playback =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -940,7 +944,7 @@ static snd_pcm_hardware_t snd_emu10k1_playback =
* Capture support device description
*/
-static snd_pcm_hardware_t snd_emu10k1_capture =
+static struct snd_pcm_hardware snd_emu10k1_capture =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -963,9 +967,9 @@ static snd_pcm_hardware_t snd_emu10k1_capture =
*
*/
-static void snd_emu10k1_pcm_mixer_notify1(emu10k1_t *emu, snd_kcontrol_t *kctl, int idx, int activate)
+static void snd_emu10k1_pcm_mixer_notify1(struct snd_emu10k1 *emu, struct snd_kcontrol *kctl, int idx, int activate)
{
- snd_ctl_elem_id_t id;
+ struct snd_ctl_elem_id id;
if (! kctl)
return;
@@ -978,29 +982,29 @@ static void snd_emu10k1_pcm_mixer_notify1(emu10k1_t *emu, snd_kcontrol_t *kctl,
snd_ctl_build_ioff(&id, kctl, idx));
}
-static void snd_emu10k1_pcm_mixer_notify(emu10k1_t *emu, int idx, int activate)
+static void snd_emu10k1_pcm_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate)
{
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_routing, idx, activate);
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_volume, idx, activate);
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_attn, idx, activate);
}
-static void snd_emu10k1_pcm_efx_mixer_notify(emu10k1_t *emu, int idx, int activate)
+static void snd_emu10k1_pcm_efx_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate)
{
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_routing, idx, activate);
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_volume, idx, activate);
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_attn, idx, activate);
}
-static void snd_emu10k1_pcm_free_substream(snd_pcm_runtime_t *runtime)
+static void snd_emu10k1_pcm_free_substream(struct snd_pcm_runtime *runtime)
{
kfree(runtime->private_data);
}
-static int snd_emu10k1_efx_playback_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_efx_playback_close(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- emu10k1_pcm_mixer_t *mix;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_pcm_mixer *mix;
int i;
for (i=0; i < NUM_EFX_PLAYBACK; i++) {
@@ -1011,12 +1015,12 @@ static int snd_emu10k1_efx_playback_close(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_efx_playback_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_efx_playback_open(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- emu10k1_pcm_t *epcm;
- emu10k1_pcm_mixer_t *mix;
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_pcm *epcm;
+ struct snd_emu10k1_pcm_mixer *mix;
+ struct snd_pcm_runtime *runtime = substream->runtime;
int i;
epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
@@ -1044,12 +1048,12 @@ static int snd_emu10k1_efx_playback_open(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- emu10k1_pcm_t *epcm;
- emu10k1_pcm_mixer_t *mix;
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_pcm *epcm;
+ struct snd_emu10k1_pcm_mixer *mix;
+ struct snd_pcm_runtime *runtime = substream->runtime;
int i, err;
epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
@@ -1081,21 +1085,21 @@ static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_playback_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_playback_close(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[substream->number];
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_pcm_mixer *mix = &emu->pcm_mixer[substream->number];
mix->epcm = NULL;
snd_emu10k1_pcm_mixer_notify(emu, substream->number, 0);
return 0;
}
-static int snd_emu10k1_capture_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_open(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm;
epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
if (epcm == NULL)
@@ -1118,20 +1122,20 @@ static int snd_emu10k1_capture_open(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_capture_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_close(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
emu->capture_interrupt = NULL;
emu->pcm_capture_substream = NULL;
return 0;
}
-static int snd_emu10k1_capture_mic_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_mic_open(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- emu10k1_pcm_t *epcm;
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_pcm *epcm;
+ struct snd_pcm_runtime *runtime = substream->runtime;
epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
if (epcm == NULL)
@@ -1156,20 +1160,20 @@ static int snd_emu10k1_capture_mic_open(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_capture_mic_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_mic_close(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
emu->capture_interrupt = NULL;
emu->pcm_capture_mic_substream = NULL;
return 0;
}
-static int snd_emu10k1_capture_efx_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_efx_open(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- emu10k1_pcm_t *epcm;
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_pcm *epcm;
+ struct snd_pcm_runtime *runtime = substream->runtime;
int nefx = emu->audigy ? 64 : 32;
int idx;
@@ -1206,16 +1210,16 @@ static int snd_emu10k1_capture_efx_open(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_capture_efx_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_efx_close(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
emu->capture_interrupt = NULL;
emu->pcm_capture_efx_substream = NULL;
return 0;
}
-static snd_pcm_ops_t snd_emu10k1_playback_ops = {
+static struct snd_pcm_ops snd_emu10k1_playback_ops = {
.open = snd_emu10k1_playback_open,
.close = snd_emu10k1_playback_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -1227,7 +1231,7 @@ static snd_pcm_ops_t snd_emu10k1_playback_ops = {
.page = snd_pcm_sgbuf_ops_page,
};
-static snd_pcm_ops_t snd_emu10k1_capture_ops = {
+static struct snd_pcm_ops snd_emu10k1_capture_ops = {
.open = snd_emu10k1_capture_open,
.close = snd_emu10k1_capture_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -1239,7 +1243,7 @@ static snd_pcm_ops_t snd_emu10k1_capture_ops = {
};
/* EFX playback */
-static snd_pcm_ops_t snd_emu10k1_efx_playback_ops = {
+static struct snd_pcm_ops snd_emu10k1_efx_playback_ops = {
.open = snd_emu10k1_efx_playback_open,
.close = snd_emu10k1_efx_playback_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -1251,10 +1255,10 @@ static snd_pcm_ops_t snd_emu10k1_efx_playback_ops = {
.page = snd_pcm_sgbuf_ops_page,
};
-int __devinit snd_emu10k1_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm)
+int __devinit snd_emu10k1_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm)
{
- snd_pcm_t *pcm;
- snd_pcm_substream_t *substream;
+ struct snd_pcm *pcm;
+ struct snd_pcm_substream *substream;
int err;
if (rpcm)
@@ -1286,10 +1290,10 @@ int __devinit snd_emu10k1_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm)
return 0;
}
-int __devinit snd_emu10k1_pcm_multi(emu10k1_t * emu, int device, snd_pcm_t ** rpcm)
+int __devinit snd_emu10k1_pcm_multi(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm)
{
- snd_pcm_t *pcm;
- snd_pcm_substream_t *substream;
+ struct snd_pcm *pcm;
+ struct snd_pcm_substream *substream;
int err;
if (rpcm)
@@ -1318,7 +1322,7 @@ int __devinit snd_emu10k1_pcm_multi(emu10k1_t * emu, int device, snd_pcm_t ** rp
}
-static snd_pcm_ops_t snd_emu10k1_capture_mic_ops = {
+static struct snd_pcm_ops snd_emu10k1_capture_mic_ops = {
.open = snd_emu10k1_capture_mic_open,
.close = snd_emu10k1_capture_mic_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -1329,9 +1333,9 @@ static snd_pcm_ops_t snd_emu10k1_capture_mic_ops = {
.pointer = snd_emu10k1_capture_pointer,
};
-int __devinit snd_emu10k1_pcm_mic(emu10k1_t * emu, int device, snd_pcm_t ** rpcm)
+int __devinit snd_emu10k1_pcm_mic(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm)
{
- snd_pcm_t *pcm;
+ struct snd_pcm *pcm;
int err;
if (rpcm)
@@ -1355,9 +1359,9 @@ int __devinit snd_emu10k1_pcm_mic(emu10k1_t * emu, int device, snd_pcm_t ** rpcm
return 0;
}
-static int snd_emu10k1_pcm_efx_voices_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_pcm_efx_voices_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
int nefx = emu->audigy ? 64 : 32;
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = nefx;
@@ -1366,9 +1370,9 @@ static int snd_emu10k1_pcm_efx_voices_mask_info(snd_kcontrol_t *kcontrol, snd_ct
return 0;
}
-static int snd_emu10k1_pcm_efx_voices_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_pcm_efx_voices_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
int nefx = emu->audigy ? 64 : 32;
int idx;
@@ -1379,9 +1383,9 @@ static int snd_emu10k1_pcm_efx_voices_mask_get(snd_kcontrol_t * kcontrol, snd_ct
return 0;
}
-static int snd_emu10k1_pcm_efx_voices_mask_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_pcm_efx_voices_mask_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
unsigned int nval[2], bits;
int nefx = emu->audigy ? 64 : 32;
int nefxb = emu->audigy ? 7 : 6;
@@ -1410,7 +1414,7 @@ static int snd_emu10k1_pcm_efx_voices_mask_put(snd_kcontrol_t * kcontrol, snd_ct
return change;
}
-static snd_kcontrol_new_t snd_emu10k1_pcm_efx_voices_mask = {
+static struct snd_kcontrol_new snd_emu10k1_pcm_efx_voices_mask = {
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
.name = "Captured FX8010 Outputs",
.info = snd_emu10k1_pcm_efx_voices_mask_info,
@@ -1418,7 +1422,7 @@ static snd_kcontrol_new_t snd_emu10k1_pcm_efx_voices_mask = {
.put = snd_emu10k1_pcm_efx_voices_mask_put
};
-static snd_pcm_ops_t snd_emu10k1_capture_efx_ops = {
+static struct snd_pcm_ops snd_emu10k1_capture_efx_ops = {
.open = snd_emu10k1_capture_efx_open,
.close = snd_emu10k1_capture_efx_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -1435,9 +1439,9 @@ static snd_pcm_ops_t snd_emu10k1_capture_efx_ops = {
#define INITIAL_TRAM_SHIFT 14
#define INITIAL_TRAM_POS(size) ((((size) / 2) - INITIAL_TRAM_SHIFT) - 1)
-static void snd_emu10k1_fx8010_playback_irq(emu10k1_t *emu, void *private_data)
+static void snd_emu10k1_fx8010_playback_irq(struct snd_emu10k1 *emu, void *private_data)
{
- snd_pcm_substream_t *substream = private_data;
+ struct snd_pcm_substream *substream = private_data;
snd_pcm_period_elapsed(substream);
}
@@ -1461,11 +1465,11 @@ static void snd_emu10k1_fx8010_playback_tram_poke1(unsigned short *dst_left,
}
}
-static void fx8010_pb_trans_copy(snd_pcm_substream_t *substream,
- snd_pcm_indirect_t *rec, size_t bytes)
+static void fx8010_pb_trans_copy(struct snd_pcm_substream *substream,
+ struct snd_pcm_indirect *rec, size_t bytes)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
unsigned int tram_size = pcm->buffer_size;
unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data);
unsigned int frames = bytes >> 2, count;
@@ -1490,25 +1494,25 @@ static void fx8010_pb_trans_copy(snd_pcm_substream_t *substream,
pcm->tram_shift = tram_shift;
}
-static int snd_emu10k1_fx8010_playback_transfer(snd_pcm_substream_t *substream)
+static int snd_emu10k1_fx8010_playback_transfer(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec, fx8010_pb_trans_copy);
return 0;
}
-static int snd_emu10k1_fx8010_playback_hw_params(snd_pcm_substream_t * substream,
- snd_pcm_hw_params_t * hw_params)
+static int snd_emu10k1_fx8010_playback_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *hw_params)
{
return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
}
-static int snd_emu10k1_fx8010_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_emu10k1_fx8010_playback_hw_free(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
unsigned int i;
for (i = 0; i < pcm->channels; i++)
@@ -1517,11 +1521,11 @@ static int snd_emu10k1_fx8010_playback_hw_free(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_fx8010_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_emu10k1_fx8010_playback_prepare(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
unsigned int i;
// printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2);
@@ -1541,10 +1545,10 @@ static int snd_emu10k1_fx8010_playback_prepare(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_fx8010_playback_trigger(snd_pcm_substream_t * substream, int cmd)
+static int snd_emu10k1_fx8010_playback_trigger(struct snd_pcm_substream *substream, int cmd)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
int result = 0;
spin_lock(&emu->reg_lock);
@@ -1586,10 +1590,10 @@ static int snd_emu10k1_fx8010_playback_trigger(snd_pcm_substream_t * substream,
return result;
}
-static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
size_t ptr; /* byte pointer */
if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0))
@@ -1598,7 +1602,7 @@ static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(snd_pcm_substream_t
return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr);
}
-static snd_pcm_hardware_t snd_emu10k1_fx8010_playback =
+static struct snd_pcm_hardware snd_emu10k1_fx8010_playback =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
/* SNDRV_PCM_INFO_MMAP_VALID | */ SNDRV_PCM_INFO_PAUSE),
@@ -1616,11 +1620,11 @@ static snd_pcm_hardware_t snd_emu10k1_fx8010_playback =
.fifo_size = 0,
};
-static int snd_emu10k1_fx8010_playback_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_fx8010_playback_open(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
runtime->hw = snd_emu10k1_fx8010_playback;
runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels;
@@ -1635,10 +1639,10 @@ static int snd_emu10k1_fx8010_playback_open(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_emu10k1_fx8010_playback_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_fx8010_playback_close(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
spin_lock_irq(&emu->reg_lock);
pcm->opened = 0;
@@ -1646,7 +1650,7 @@ static int snd_emu10k1_fx8010_playback_close(snd_pcm_substream_t * substream)
return 0;
}
-static snd_pcm_ops_t snd_emu10k1_fx8010_playback_ops = {
+static struct snd_pcm_ops snd_emu10k1_fx8010_playback_ops = {
.open = snd_emu10k1_fx8010_playback_open,
.close = snd_emu10k1_fx8010_playback_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -1658,10 +1662,10 @@ static snd_pcm_ops_t snd_emu10k1_fx8010_playback_ops = {
.ack = snd_emu10k1_fx8010_playback_transfer,
};
-int __devinit snd_emu10k1_pcm_efx(emu10k1_t * emu, int device, snd_pcm_t ** rpcm)
+int __devinit snd_emu10k1_pcm_efx(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm)
{
- snd_pcm_t *pcm;
- snd_kcontrol_t *kctl;
+ struct snd_pcm *pcm;
+ struct snd_kcontrol *kctl;
int err;
if (rpcm)
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c
index 6cdee588d35d..b88137f91655 100644
--- a/sound/pci/emu10k1/emuproc.c
+++ b/sound/pci/emu10k1/emuproc.c
@@ -32,8 +32,8 @@
#include <sound/emu10k1.h>
#include "p16v.h"
-static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu,
- snd_info_buffer_t * buffer,
+static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu,
+ struct snd_info_buffer *buffer,
char *title,
int status_reg,
int rate_reg)
@@ -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,
- snd_info_buffer_t * buffer)
+static void snd_emu10k1_proc_read(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
/* FIXME - output names are in emufx.c too */
static char *creative_outs[32] = {
@@ -181,7 +181,7 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
/* 63 */ "FXBUS2_31"
};
- emu10k1_t *emu = entry->private_data;
+ struct snd_emu10k1 *emu = entry->private_data;
unsigned int val, val1;
int nefx = emu->audigy ? 64 : 32;
char **outputs = emu->audigy ? audigy_outs : creative_outs;
@@ -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]);
}
-static void snd_emu10k1_proc_spdif_read(snd_info_entry_t *entry,
- snd_info_buffer_t * buffer)
+static void snd_emu10k1_proc_spdif_read(struct snd_info_entry *entry,
+ 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, "Optical or Coax S/PDIF In", GPSCS, GPSRCS);
#if 0
@@ -246,11 +246,11 @@ static void snd_emu10k1_proc_spdif_read(snd_info_entry_t *entry,
#endif
}
-static void snd_emu10k1_proc_rates_read(snd_info_entry_t *entry,
- snd_info_buffer_t * buffer)
+static void snd_emu10k1_proc_rates_read(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
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;
val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0);
tmp = (val >> 16) & 0x8;
@@ -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,
- snd_info_buffer_t * buffer)
+static void snd_emu10k1_proc_acode_read(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
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, " Code dump :\n");
@@ -304,12 +304,13 @@ static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry,
#define TOTAL_SIZE_CODE (0x200*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,
unsigned long count, unsigned long pos)
{
long size;
- emu10k1_t *emu = entry->private_data;
+ struct snd_emu10k1 *emu = entry->private_data;
unsigned int offset;
int tram_addr = 0;
@@ -349,11 +350,11 @@ static long snd_emu10k1_fx8010_read(snd_info_entry_t *entry, void *file_private_
return 0;
}
-static void snd_emu10k1_proc_voices_read(snd_info_entry_t *entry,
- snd_info_buffer_t * buffer)
+static void snd_emu10k1_proc_voices_read(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
- emu10k1_t *emu = entry->private_data;
- emu10k1_voice_t *voice;
+ struct snd_emu10k1 *emu = entry->private_data;
+ struct snd_emu10k1_voice *voice;
int idx;
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,
}
#ifdef CONFIG_SND_DEBUG
-static void snd_emu_proc_io_reg_read(snd_info_entry_t *entry,
- snd_info_buffer_t * buffer)
+static void snd_emu_proc_io_reg_read(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
- emu10k1_t *emu = entry->private_data;
+ struct snd_emu10k1 *emu = entry->private_data;
unsigned long value;
unsigned long flags;
int i;
@@ -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,
- snd_info_buffer_t * buffer)
+static void snd_emu_proc_io_reg_write(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
- emu10k1_t *emu = entry->private_data;
+ struct snd_emu10k1 *emu = entry->private_data;
unsigned long flags;
char line[64];
u32 reg, val;
@@ -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 reg,
unsigned int chn)
@@ -421,7 +422,7 @@ static unsigned int snd_ptr_read(emu10k1_t * emu,
return val;
}
-static void snd_ptr_write(emu10k1_t *emu,
+static void snd_ptr_write(struct snd_emu10k1 *emu,
unsigned int iobase,
unsigned int reg,
unsigned int chn,
@@ -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,
- snd_info_buffer_t * buffer, int iobase, int offset, int length, int voices)
+static void snd_emu_proc_ptr_reg_read(struct snd_info_entry *entry,
+ 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;
int i,j;
if (offset+length > 0xa0) {
@@ -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,
- snd_info_buffer_t * buffer, int iobase)
+static void snd_emu_proc_ptr_reg_write(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer, int iobase)
{
- emu10k1_t *emu = entry->private_data;
+ struct snd_emu10k1 *emu = entry->private_data;
char line[64];
unsigned int reg, channel_id , val;
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,
}
}
-static void snd_emu_proc_ptr_reg_write00(snd_info_entry_t *entry,
- snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_write00(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
snd_emu_proc_ptr_reg_write(entry, buffer, 0);
}
-static void snd_emu_proc_ptr_reg_write20(snd_info_entry_t *entry,
- snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_write20(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
snd_emu_proc_ptr_reg_write(entry, buffer, 0x20);
}
-static void snd_emu_proc_ptr_reg_read00a(snd_info_entry_t *entry,
- snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_read00a(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
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,
- snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_read00b(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
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,
- snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_read20a(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
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,
- snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_read20b(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
{
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,
- snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_read20c(struct snd_info_entry *entry,
+ struct snd_info_buffer * buffer)
{
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 = {
.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
if (! snd_card_proc_new(emu->card, "io_regs", &entry)) {
snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_io_reg_read);
diff --git a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c
index b9d3ae0dcab7..5d116dd7403b 100644
--- a/sound/pci/emu10k1/io.c
+++ b/sound/pci/emu10k1/io.c
@@ -30,7 +30,7 @@
#include <sound/core.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 int regptr, val;
@@ -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 long flags;
@@ -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 chn)
{
@@ -107,7 +107,7 @@ unsigned int snd_emu10k1_ptr20_read(emu10k1_t * emu,
return val;
}
-void snd_emu10k1_ptr20_write(emu10k1_t *emu,
+void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu,
unsigned int reg,
unsigned int chn,
unsigned int data)
@@ -123,7 +123,7 @@ void snd_emu10k1_ptr20_write(emu10k1_t *emu,
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 int enable;
@@ -134,7 +134,7 @@ void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb)
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 int enable;
@@ -145,7 +145,7 @@ void snd_emu10k1_intr_disable(emu10k1_t *emu, unsigned int intrenb)
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 int val;
@@ -165,7 +165,7 @@ void snd_emu10k1_voice_intr_enable(emu10k1_t *emu, unsigned int voicenum)
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 int val;
@@ -185,7 +185,7 @@ void snd_emu10k1_voice_intr_disable(emu10k1_t *emu, unsigned int voicenum)
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;
@@ -202,7 +202,7 @@ void snd_emu10k1_voice_intr_ack(emu10k1_t *emu, unsigned int voicenum)
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 int val;
@@ -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);
}
-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 int val;
@@ -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);
}
-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;
@@ -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);
}
-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 int sol;
@@ -279,7 +279,7 @@ void snd_emu10k1_voice_set_loop_stop(emu10k1_t *emu, unsigned int voicenum)
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 int sol;
@@ -299,7 +299,7 @@ void snd_emu10k1_voice_clear_loop_stop(emu10k1_t *emu, unsigned int voicenum)
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;
unsigned int newtime = 0, curtime;
@@ -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 short val;
@@ -331,9 +331,9 @@ unsigned short snd_emu10k1_ac97_read(ac97_t *ac97, unsigned short reg)
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;
spin_lock_irqsave(&emu->emu_lock, flags);
diff --git a/sound/pci/emu10k1/irq.c b/sound/pci/emu10k1/irq.c
index 594ea063b140..a8b31286b6db 100644
--- a/sound/pci/emu10k1/irq.c
+++ b/sound/pci/emu10k1/irq.c
@@ -32,7 +32,7 @@
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;
int handled = 0;
@@ -56,7 +56,7 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
int voice;
int voice_max = status & IPR_CHANNELNUMBERMASK;
u32 val;
- emu10k1_voice_t *pvoice = emu->voices;
+ struct snd_emu10k1_voice *pvoice = emu->voices;
val = snd_emu10k1_ptr_read(emu, CLIPL, 0);
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)
if (status & IPR_P16V) {
while ((status2 = inl(emu->port + IPR2)) != 0) {
u32 mask = INTE2_PLAYBACK_CH_0_LOOP; /* Full Loop */
- emu10k1_voice_t *pvoice = &(emu->p16v_voices[0]);
- emu10k1_voice_t *cvoice = &(emu->p16v_capture_voice);
+ struct snd_emu10k1_voice *pvoice = &(emu->p16v_voices[0]);
+ struct snd_emu10k1_voice *cvoice = &(emu->p16v_capture_voice);
//printk(KERN_INFO "status2=0x%x\n", status2);
orig_status2 = status2;
diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c
index d42e4aeaa73a..68c795c03109 100644
--- a/sound/pci/emu10k1/memory.c
+++ b/sound/pci/emu10k1/memory.c
@@ -48,7 +48,7 @@
#define set_silent_ptb(emu,page) __set_ptb_entry(emu,page,emu->silent_page.addr)
#else
/* fill PTB entries -- we need to fill UNIT_PAGES entries */
-static inline void set_ptb_entry(emu10k1_t *emu, int page, dma_addr_t addr)
+static inline void set_ptb_entry(struct snd_emu10k1 *emu, int page, dma_addr_t addr)
{
int i;
page *= UNIT_PAGES;
@@ -57,7 +57,7 @@ static inline void set_ptb_entry(emu10k1_t *emu, int page, dma_addr_t addr)
addr += EMUPAGESIZE;
}
}
-static inline void set_silent_ptb(emu10k1_t *emu, int page)
+static inline void set_silent_ptb(struct snd_emu10k1 *emu, int page)
{
int i;
page *= UNIT_PAGES;
@@ -70,14 +70,14 @@ static inline void set_silent_ptb(emu10k1_t *emu, int page)
/*
*/
-static int synth_alloc_pages(emu10k1_t *hw, emu10k1_memblk_t *blk);
-static int synth_free_pages(emu10k1_t *hw, emu10k1_memblk_t *blk);
+static int synth_alloc_pages(struct snd_emu10k1 *hw, struct snd_emu10k1_memblk *blk);
+static int synth_free_pages(struct snd_emu10k1 *hw, struct snd_emu10k1_memblk *blk);
-#define get_emu10k1_memblk(l,member) list_entry(l, emu10k1_memblk_t, member)
+#define get_emu10k1_memblk(l,member) list_entry(l, struct snd_emu10k1_memblk, member)
/* initialize emu10k1 part */
-static void emu10k1_memblk_init(emu10k1_memblk_t *blk)
+static void emu10k1_memblk_init(struct snd_emu10k1_memblk *blk)
{
blk->mapped_page = -1;
INIT_LIST_HEAD(&blk->mapped_link);
@@ -96,7 +96,7 @@ static void emu10k1_memblk_init(emu10k1_memblk_t *blk)
* in nextp
* if not found, return a negative error code.
*/
-static int search_empty_map_area(emu10k1_t *emu, int npages, struct list_head **nextp)
+static int search_empty_map_area(struct snd_emu10k1 *emu, int npages, struct list_head **nextp)
{
int page = 0, found_page = -ENOMEM;
int max_size = npages;
@@ -105,7 +105,7 @@ static int search_empty_map_area(emu10k1_t *emu, int npages, struct list_head **
struct list_head *pos;
list_for_each (pos, &emu->mapped_link_head) {
- emu10k1_memblk_t *blk = get_emu10k1_memblk(pos, mapped_link);
+ struct snd_emu10k1_memblk *blk = get_emu10k1_memblk(pos, mapped_link);
snd_assert(blk->mapped_page >= 0, continue);
size = blk->mapped_page - page;
if (size == npages) {
@@ -134,7 +134,7 @@ static int search_empty_map_area(emu10k1_t *emu, int npages, struct list_head **
*
* call with memblk_lock held
*/
-static int map_memblk(emu10k1_t *emu, emu10k1_memblk_t *blk)
+static int map_memblk(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
{
int page, pg;
struct list_head *next;
@@ -161,11 +161,11 @@ static int map_memblk(emu10k1_t *emu, emu10k1_memblk_t *blk)
*
* call with memblk_lock held
*/
-static int unmap_memblk(emu10k1_t *emu, emu10k1_memblk_t *blk)
+static int unmap_memblk(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
{
int start_page, end_page, mpage, pg;
struct list_head *p;
- emu10k1_memblk_t *q;
+ struct snd_emu10k1_memblk *q;
/* calculate the expected size of empty region */
if ((p = blk->mapped_link.prev) != &emu->mapped_link_head) {
@@ -197,11 +197,11 @@ static int unmap_memblk(emu10k1_t *emu, emu10k1_memblk_t *blk)
*
* unlike synth_alloc the memory block is aligned to the page start
*/
-static emu10k1_memblk_t *
-search_empty(emu10k1_t *emu, int size)
+static struct snd_emu10k1_memblk *
+search_empty(struct snd_emu10k1 *emu, int size)
{
struct list_head *p;
- emu10k1_memblk_t *blk;
+ struct snd_emu10k1_memblk *blk;
int page, psize;
psize = get_aligned_page(size + PAGE_SIZE -1);
@@ -217,7 +217,7 @@ search_empty(emu10k1_t *emu, int size)
__found_pages:
/* create a new memory block */
- blk = (emu10k1_memblk_t *)__snd_util_memblk_new(emu->memhdr, psize << PAGE_SHIFT, p->prev);
+ blk = (struct snd_emu10k1_memblk *)__snd_util_memblk_new(emu->memhdr, psize << PAGE_SHIFT, p->prev);
if (blk == NULL)
return NULL;
blk->mem.offset = aligned_page_offset(page); /* set aligned offset */
@@ -229,7 +229,7 @@ __found_pages:
/*
* check if the given pointer is valid for pages
*/
-static int is_valid_page(emu10k1_t *emu, dma_addr_t addr)
+static int is_valid_page(struct snd_emu10k1 *emu, dma_addr_t addr)
{
if (addr & ~emu->dma_mask) {
snd_printk(KERN_ERR "max memory size is 0x%lx (addr = 0x%lx)!!\n", emu->dma_mask, (unsigned long)addr);
@@ -248,12 +248,12 @@ static int is_valid_page(emu10k1_t *emu, dma_addr_t addr)
* if no empty pages are found, tries to release unsed memory blocks
* and retry the mapping.
*/
-int snd_emu10k1_memblk_map(emu10k1_t *emu, emu10k1_memblk_t *blk)
+int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
{
int err;
int size;
struct list_head *p, *nextp;
- emu10k1_memblk_t *deleted;
+ struct snd_emu10k1_memblk *deleted;
unsigned long flags;
spin_lock_irqsave(&emu->memblk_lock, flags);
@@ -288,13 +288,13 @@ int snd_emu10k1_memblk_map(emu10k1_t *emu, emu10k1_memblk_t *blk)
/*
* page allocation for DMA
*/
-snd_util_memblk_t *
-snd_emu10k1_alloc_pages(emu10k1_t *emu, snd_pcm_substream_t *substream)
+struct snd_util_memblk *
+snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
- snd_util_memhdr_t *hdr;
- emu10k1_memblk_t *blk;
+ struct snd_util_memhdr *hdr;
+ struct snd_emu10k1_memblk *blk;
int page, err, idx;
snd_assert(emu, return NULL);
@@ -336,19 +336,19 @@ snd_emu10k1_alloc_pages(emu10k1_t *emu, snd_pcm_substream_t *substream)
blk->map_locked = 1; /* do not unmap this block! */
err = snd_emu10k1_memblk_map(emu, blk);
if (err < 0) {
- __snd_util_mem_free(hdr, (snd_util_memblk_t *)blk);
+ __snd_util_mem_free(hdr, (struct snd_util_memblk *)blk);
up(&hdr->block_mutex);
return NULL;
}
up(&hdr->block_mutex);
- return (snd_util_memblk_t *)blk;
+ return (struct snd_util_memblk *)blk;
}
/*
* release DMA buffer from page table
*/
-int snd_emu10k1_free_pages(emu10k1_t *emu, snd_util_memblk_t *blk)
+int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk)
{
snd_assert(emu && blk, return -EINVAL);
return snd_emu10k1_synth_free(emu, blk);
@@ -363,26 +363,26 @@ int snd_emu10k1_free_pages(emu10k1_t *emu, snd_util_memblk_t *blk)
/*
* allocate a synth sample area
*/
-snd_util_memblk_t *
-snd_emu10k1_synth_alloc(emu10k1_t *hw, unsigned int size)
+struct snd_util_memblk *
+snd_emu10k1_synth_alloc(struct snd_emu10k1 *hw, unsigned int size)
{
- emu10k1_memblk_t *blk;
- snd_util_memhdr_t *hdr = hw->memhdr;
+ struct snd_emu10k1_memblk *blk;
+ struct snd_util_memhdr *hdr = hw->memhdr;
down(&hdr->block_mutex);
- blk = (emu10k1_memblk_t *)__snd_util_mem_alloc(hdr, size);
+ blk = (struct snd_emu10k1_memblk *)__snd_util_mem_alloc(hdr, size);
if (blk == NULL) {
up(&hdr->block_mutex);
return NULL;
}
if (synth_alloc_pages(hw, blk)) {
- __snd_util_mem_free(hdr, (snd_util_memblk_t *)blk);
+ __snd_util_mem_free(hdr, (struct snd_util_memblk *)blk);
up(&hdr->block_mutex);
return NULL;
}
snd_emu10k1_memblk_map(hw, blk);
up(&hdr->block_mutex);
- return (snd_util_memblk_t *)blk;
+ return (struct snd_util_memblk *)blk;
}
@@ -390,10 +390,10 @@ snd_emu10k1_synth_alloc(emu10k1_t *hw, unsigned int size)
* free a synth sample area
*/
int
-snd_emu10k1_synth_free(emu10k1_t *emu, snd_util_memblk_t *memblk)
+snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *memblk)
{
- snd_util_memhdr_t *hdr = emu->memhdr;
- emu10k1_memblk_t *blk = (emu10k1_memblk_t *)memblk;
+ struct snd_util_memhdr *hdr = emu->memhdr;
+ struct snd_emu10k1_memblk *blk = (struct snd_emu10k1_memblk *)memblk;
unsigned long flags;
down(&hdr->block_mutex);
@@ -409,10 +409,12 @@ snd_emu10k1_synth_free(emu10k1_t *emu, snd_util_memblk_t *memblk)
/* check new allocation range */
-static void get_single_page_range(snd_util_memhdr_t *hdr, emu10k1_memblk_t *blk, int *first_page_ret, int *last_page_ret)
+static void get_single_page_range(struct snd_util_memhdr *hdr,
+ struct snd_emu10k1_memblk *blk,
+ int *first_page_ret, int *last_page_ret)
{
struct list_head *p;
- emu10k1_memblk_t *q;
+ struct snd_emu10k1_memblk *q;
int first_page, last_page;
first_page = blk->first_page;
if ((p = blk->mem.list.prev) != &hdr->block) {
@@ -433,7 +435,7 @@ static void get_single_page_range(snd_util_memhdr_t *hdr, emu10k1_memblk_t *blk,
/*
* allocate kernel pages
*/
-static int synth_alloc_pages(emu10k1_t *emu, emu10k1_memblk_t *blk)
+static int synth_alloc_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
{
int page, first_page, last_page;
struct snd_dma_buffer dmab;
@@ -472,7 +474,7 @@ __fail:
/*
* free pages
*/
-static int synth_free_pages(emu10k1_t *emu, emu10k1_memblk_t *blk)
+static int synth_free_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
{
int page, first_page, last_page;
struct snd_dma_buffer dmab;
@@ -495,7 +497,7 @@ static int synth_free_pages(emu10k1_t *emu, emu10k1_memblk_t *blk)
}
/* calculate buffer pointer from offset address */
-static inline void *offset_ptr(emu10k1_t *emu, int page, int offset)
+static inline void *offset_ptr(struct snd_emu10k1 *emu, int page, int offset)
{
char *ptr;
snd_assert(page >= 0 && page < emu->max_cache_pages, return NULL);
@@ -511,11 +513,12 @@ static inline void *offset_ptr(emu10k1_t *emu, int page, int offset)
/*
* bzero(blk + offset, size)
*/
-int snd_emu10k1_synth_bzero(emu10k1_t *emu, snd_util_memblk_t *blk, int offset, int size)
+int snd_emu10k1_synth_bzero(struct snd_emu10k1 *emu, struct snd_util_memblk *blk,
+ int offset, int size)
{
int page, nextofs, end_offset, temp, temp1;
void *ptr;
- emu10k1_memblk_t *p = (emu10k1_memblk_t *)blk;
+ struct snd_emu10k1_memblk *p = (struct snd_emu10k1_memblk *)blk;
offset += blk->offset & (PAGE_SIZE - 1);
end_offset = offset + size;
@@ -538,11 +541,12 @@ int snd_emu10k1_synth_bzero(emu10k1_t *emu, snd_util_memblk_t *blk, int offset,
/*
* copy_from_user(blk + offset, data, size)
*/
-int snd_emu10k1_synth_copy_from_user(emu10k1_t *emu, snd_util_memblk_t *blk, int offset, const char __user *data, int size)
+int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk,
+ int offset, const char __user *data, int size)
{
int page, nextofs, end_offset, temp, temp1;
void *ptr;
- emu10k1_memblk_t *p = (emu10k1_memblk_t *)blk;
+ struct snd_emu10k1_memblk *p = (struct snd_emu10k1_memblk *)blk;
offset += blk->offset & (PAGE_SIZE - 1);
end_offset = offset + size;
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c
index 3b456007ba2a..90470de8bb8e 100644
--- a/sound/pci/emu10k1/p16v.c
+++ b/sound/pci/emu10k1/p16v.c
@@ -121,7 +121,7 @@
*/
/* hardware definition */
-static snd_pcm_hardware_t snd_p16v_playback_hw = {
+static struct snd_pcm_hardware snd_p16v_playback_hw = {
.info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -140,7 +140,7 @@ static snd_pcm_hardware_t snd_p16v_playback_hw = {
.fifo_size = 0,
};
-static snd_pcm_hardware_t snd_p16v_capture_hw = {
+static struct snd_pcm_hardware snd_p16v_capture_hw = {
.info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -159,9 +159,9 @@ static snd_pcm_hardware_t snd_p16v_capture_hw = {
.fifo_size = 0,
};
-static void snd_p16v_pcm_free_substream(snd_pcm_runtime_t *runtime)
+static void snd_p16v_pcm_free_substream(struct snd_pcm_runtime *runtime)
{
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
if (epcm) {
//snd_printk("epcm free: %p\n", epcm);
@@ -170,12 +170,12 @@ static void snd_p16v_pcm_free_substream(snd_pcm_runtime_t *runtime)
}
/* open_playback callback */
-static int snd_p16v_pcm_open_playback_channel(snd_pcm_substream_t *substream, int channel_id)
+static int snd_p16v_pcm_open_playback_channel(struct snd_pcm_substream *substream, int channel_id)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- emu10k1_voice_t *channel = &(emu->p16v_voices[channel_id]);
- emu10k1_pcm_t *epcm;
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_voice *channel = &(emu->p16v_voices[channel_id]);
+ struct snd_emu10k1_pcm *epcm;
+ struct snd_pcm_runtime *runtime = substream->runtime;
int err;
epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
@@ -206,12 +206,12 @@ static int snd_p16v_pcm_open_playback_channel(snd_pcm_substream_t *substream, in
return 0;
}
/* open_capture callback */
-static int snd_p16v_pcm_open_capture_channel(snd_pcm_substream_t *substream, int channel_id)
+static int snd_p16v_pcm_open_capture_channel(struct snd_pcm_substream *substream, int channel_id)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- emu10k1_voice_t *channel = &(emu->p16v_capture_voice);
- emu10k1_pcm_t *epcm;
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_emu10k1_voice *channel = &(emu->p16v_capture_voice);
+ struct snd_emu10k1_pcm *epcm;
+ struct snd_pcm_runtime *runtime = substream->runtime;
int err;
epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
@@ -244,41 +244,41 @@ static int snd_p16v_pcm_open_capture_channel(snd_pcm_substream_t *substream, int
/* close callback */
-static int snd_p16v_pcm_close_playback(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_close_playback(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- //snd_pcm_runtime_t *runtime = substream->runtime;
- //emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ //struct snd_pcm_runtime *runtime = substream->runtime;
+ //struct snd_emu10k1_pcm *epcm = runtime->private_data;
emu->p16v_voices[substream->pcm->device - emu->p16v_device_offset].use=0;
/* FIXME: maybe zero others */
return 0;
}
/* close callback */
-static int snd_p16v_pcm_close_capture(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_close_capture(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- //snd_pcm_runtime_t *runtime = substream->runtime;
- //emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ //struct snd_pcm_runtime *runtime = substream->runtime;
+ //struct snd_emu10k1_pcm *epcm = runtime->private_data;
emu->p16v_capture_voice.use=0;
/* FIXME: maybe zero others */
return 0;
}
-static int snd_p16v_pcm_open_playback_front(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_open_playback_front(struct snd_pcm_substream *substream)
{
return snd_p16v_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL);
}
-static int snd_p16v_pcm_open_capture(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_open_capture(struct snd_pcm_substream *substream)
{
// Only using channel 0 for now, but the card has 2 channels.
return snd_p16v_pcm_open_capture_channel(substream, 0);
}
/* hw_params callback */
-static int snd_p16v_pcm_hw_params_playback(snd_pcm_substream_t *substream,
- snd_pcm_hw_params_t * hw_params)
+static int snd_p16v_pcm_hw_params_playback(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *hw_params)
{
int result;
result = snd_pcm_lib_malloc_pages(substream,
@@ -287,8 +287,8 @@ static int snd_p16v_pcm_hw_params_playback(snd_pcm_substream_t *substream,
}
/* hw_params callback */
-static int snd_p16v_pcm_hw_params_capture(snd_pcm_substream_t *substream,
- snd_pcm_hw_params_t * hw_params)
+static int snd_p16v_pcm_hw_params_capture(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *hw_params)
{
int result;
result = snd_pcm_lib_malloc_pages(substream,
@@ -298,7 +298,7 @@ static int snd_p16v_pcm_hw_params_capture(snd_pcm_substream_t *substream,
/* hw_free callback */
-static int snd_p16v_pcm_hw_free_playback(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_hw_free_playback(struct snd_pcm_substream *substream)
{
int result;
result = snd_pcm_lib_free_pages(substream);
@@ -306,7 +306,7 @@ static int snd_p16v_pcm_hw_free_playback(snd_pcm_substream_t *substream)
}
/* hw_free callback */
-static int snd_p16v_pcm_hw_free_capture(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_hw_free_capture(struct snd_pcm_substream *substream)
{
int result;
result = snd_pcm_lib_free_pages(substream);
@@ -315,10 +315,10 @@ static int snd_p16v_pcm_hw_free_capture(snd_pcm_substream_t *substream)
/* prepare playback callback */
-static int snd_p16v_pcm_prepare_playback(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_prepare_playback(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
int channel = substream->pcm->device - emu->p16v_device_offset;
u32 *table_base = (u32 *)(emu->p16v_buffer.area+(8*16*channel));
u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size);
@@ -364,10 +364,10 @@ static int snd_p16v_pcm_prepare_playback(snd_pcm_substream_t *substream)
}
/* prepare capture callback */
-static int snd_p16v_pcm_prepare_capture(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_prepare_capture(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
int channel = substream->pcm->device - emu->p16v_device_offset;
u32 tmp;
//printk("prepare capture:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size, frames_to_bytes(runtime, 1));
@@ -398,7 +398,7 @@ static int snd_p16v_pcm_prepare_capture(snd_pcm_substream_t *substream)
return 0;
}
-static void snd_p16v_intr_enable(emu10k1_t *emu, unsigned int intrenb)
+static void snd_p16v_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb)
{
unsigned long flags;
unsigned int enable;
@@ -409,7 +409,7 @@ static void snd_p16v_intr_enable(emu10k1_t *emu, unsigned int intrenb)
spin_unlock_irqrestore(&emu->emu_lock, flags);
}
-static void snd_p16v_intr_disable(emu10k1_t *emu, unsigned int intrenb)
+static void snd_p16v_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb)
{
unsigned long flags;
unsigned int disable;
@@ -421,16 +421,16 @@ static void snd_p16v_intr_disable(emu10k1_t *emu, unsigned int intrenb)
}
/* trigger_playback callback */
-static int snd_p16v_pcm_trigger_playback(snd_pcm_substream_t *substream,
+static int snd_p16v_pcm_trigger_playback(struct snd_pcm_substream *substream,
int cmd)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime;
- emu10k1_pcm_t *epcm;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime;
+ struct snd_emu10k1_pcm *epcm;
int channel;
int result = 0;
struct list_head *pos;
- snd_pcm_substream_t *s;
+ struct snd_pcm_substream *s;
u32 basic = 0;
u32 inte = 0;
int running=0;
@@ -474,12 +474,12 @@ static int snd_p16v_pcm_trigger_playback(snd_pcm_substream_t *substream,
}
/* trigger_capture callback */
-static int snd_p16v_pcm_trigger_capture(snd_pcm_substream_t *substream,
+static int snd_p16v_pcm_trigger_capture(struct snd_pcm_substream *substream,
int cmd)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
int channel = 0;
int result = 0;
u32 inte = INTE2_CAPTURE_CH_0_LOOP | INTE2_CAPTURE_CH_0_HALF_LOOP;
@@ -505,11 +505,11 @@ static int snd_p16v_pcm_trigger_capture(snd_pcm_substream_t *substream,
/* pointer_playback callback */
static snd_pcm_uframes_t
-snd_p16v_pcm_pointer_playback(snd_pcm_substream_t *substream)
+snd_p16v_pcm_pointer_playback(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
snd_pcm_uframes_t ptr, ptr1, ptr2,ptr3,ptr4 = 0;
int channel = substream->pcm->device - emu->p16v_device_offset;
if (!epcm->running)
@@ -530,11 +530,11 @@ snd_p16v_pcm_pointer_playback(snd_pcm_substream_t *substream)
/* pointer_capture callback */
static snd_pcm_uframes_t
-snd_p16v_pcm_pointer_capture(snd_pcm_substream_t *substream)
+snd_p16v_pcm_pointer_capture(struct snd_pcm_substream *substream)
{
- emu10k1_t *emu = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- emu10k1_pcm_t *epcm = runtime->private_data;
+ struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_emu10k1_pcm *epcm = runtime->private_data;
snd_pcm_uframes_t ptr, ptr1, ptr2 = 0;
int channel = 0;
@@ -554,7 +554,7 @@ snd_p16v_pcm_pointer_capture(snd_pcm_substream_t *substream)
}
/* operators */
-static snd_pcm_ops_t snd_p16v_playback_front_ops = {
+static struct snd_pcm_ops snd_p16v_playback_front_ops = {
.open = snd_p16v_pcm_open_playback_front,
.close = snd_p16v_pcm_close_playback,
.ioctl = snd_pcm_lib_ioctl,
@@ -565,7 +565,7 @@ static snd_pcm_ops_t snd_p16v_playback_front_ops = {
.pointer = snd_p16v_pcm_pointer_playback,
};
-static snd_pcm_ops_t snd_p16v_capture_ops = {
+static struct snd_pcm_ops snd_p16v_capture_ops = {
.open = snd_p16v_pcm_open_capture,
.close = snd_p16v_pcm_close_capture,
.ioctl = snd_pcm_lib_ioctl,
@@ -577,7 +577,7 @@ static snd_pcm_ops_t snd_p16v_capture_ops = {
};
-int snd_p16v_free(emu10k1_t *chip)
+int snd_p16v_free(struct snd_emu10k1 *chip)
{
// release the data
if (chip->p16v_buffer.area) {
@@ -587,10 +587,10 @@ int snd_p16v_free(emu10k1_t *chip)
return 0;
}
-int snd_p16v_pcm(emu10k1_t *emu, int device, snd_pcm_t **rpcm)
+int snd_p16v_pcm(struct snd_emu10k1 *emu, int device, struct snd_pcm **rpcm)
{
- snd_pcm_t *pcm;
- snd_pcm_substream_t *substream;
+ struct snd_pcm *pcm;
+ struct snd_pcm_substream *substream;
int err;
int capture=1;
@@ -641,7 +641,7 @@ int snd_p16v_pcm(emu10k1_t *emu, int device, snd_pcm_t **rpcm)
return 0;
}
-static int snd_p16v_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_p16v_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
@@ -650,10 +650,10 @@ static int snd_p16v_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
return 0;
}
-static int snd_p16v_volume_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol, int reg, int high_low)
+static int snd_p16v_volume_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol, int reg, int high_low)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
u32 value;
value = snd_emu10k1_ptr20_read(emu, reg, high_low);
@@ -667,71 +667,71 @@ static int snd_p16v_volume_get(snd_kcontrol_t * kcontrol,
return 0;
}
-static int snd_p16v_volume_get_spdif_front(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_spdif_front(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 0;
int reg = PLAYBACK_VOLUME_MIXER7;
return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_get_spdif_center_lfe(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_spdif_center_lfe(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 1;
int reg = PLAYBACK_VOLUME_MIXER7;
return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_get_spdif_unknown(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_spdif_unknown(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 0;
int reg = PLAYBACK_VOLUME_MIXER8;
return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_get_spdif_rear(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_spdif_rear(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 1;
int reg = PLAYBACK_VOLUME_MIXER8;
return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_get_analog_front(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_analog_front(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 0;
int reg = PLAYBACK_VOLUME_MIXER9;
return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_get_analog_center_lfe(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_analog_center_lfe(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 1;
int reg = PLAYBACK_VOLUME_MIXER9;
return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_get_analog_rear(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_analog_rear(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 1;
int reg = PLAYBACK_VOLUME_MIXER10;
return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_get_analog_unknown(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_analog_unknown(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 0;
int reg = PLAYBACK_VOLUME_MIXER10;
return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol, int reg, int high_low)
+static int snd_p16v_volume_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol, int reg, int high_low)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
u32 value;
value = snd_emu10k1_ptr20_read(emu, reg, 0);
//value = value & 0xffff;
@@ -746,71 +746,71 @@ static int snd_p16v_volume_put(snd_kcontrol_t * kcontrol,
return 1;
}
-static int snd_p16v_volume_put_spdif_front(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_spdif_front(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 0;
int reg = PLAYBACK_VOLUME_MIXER7;
return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_put_spdif_center_lfe(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_spdif_center_lfe(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 1;
int reg = PLAYBACK_VOLUME_MIXER7;
return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_put_spdif_unknown(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_spdif_unknown(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 0;
int reg = PLAYBACK_VOLUME_MIXER8;
return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_put_spdif_rear(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_spdif_rear(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 1;
int reg = PLAYBACK_VOLUME_MIXER8;
return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_put_analog_front(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_analog_front(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 0;
int reg = PLAYBACK_VOLUME_MIXER9;
return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_put_analog_center_lfe(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_analog_center_lfe(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 1;
int reg = PLAYBACK_VOLUME_MIXER9;
return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_put_analog_rear(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_analog_rear(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 1;
int reg = PLAYBACK_VOLUME_MIXER10;
return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
}
-static int snd_p16v_volume_put_analog_unknown(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_analog_unknown(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
int high_low = 0;
int reg = PLAYBACK_VOLUME_MIXER10;
return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
}
-static snd_kcontrol_new_t snd_p16v_volume_control_analog_front =
+static struct snd_kcontrol_new snd_p16v_volume_control_analog_front =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "HD Analog Front Playback Volume",
@@ -819,7 +819,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_analog_front =
.put = snd_p16v_volume_put_analog_front
};
-static snd_kcontrol_new_t snd_p16v_volume_control_analog_center_lfe =
+static struct snd_kcontrol_new snd_p16v_volume_control_analog_center_lfe =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "HD Analog Center/LFE Playback Volume",
@@ -828,7 +828,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_analog_center_lfe =
.put = snd_p16v_volume_put_analog_center_lfe
};
-static snd_kcontrol_new_t snd_p16v_volume_control_analog_unknown =
+static struct snd_kcontrol_new snd_p16v_volume_control_analog_unknown =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "HD Analog Unknown Playback Volume",
@@ -837,7 +837,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_analog_unknown =
.put = snd_p16v_volume_put_analog_unknown
};
-static snd_kcontrol_new_t snd_p16v_volume_control_analog_rear =
+static struct snd_kcontrol_new snd_p16v_volume_control_analog_rear =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "HD Analog Rear Playback Volume",
@@ -846,7 +846,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_analog_rear =
.put = snd_p16v_volume_put_analog_rear
};
-static snd_kcontrol_new_t snd_p16v_volume_control_spdif_front =
+static struct snd_kcontrol_new snd_p16v_volume_control_spdif_front =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "HD SPDIF Front Playback Volume",
@@ -855,7 +855,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_spdif_front =
.put = snd_p16v_volume_put_spdif_front
};
-static snd_kcontrol_new_t snd_p16v_volume_control_spdif_center_lfe =
+static struct snd_kcontrol_new snd_p16v_volume_control_spdif_center_lfe =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "HD SPDIF Center/LFE Playback Volume",
@@ -864,7 +864,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_spdif_center_lfe =
.put = snd_p16v_volume_put_spdif_center_lfe
};
-static snd_kcontrol_new_t snd_p16v_volume_control_spdif_unknown =
+static struct snd_kcontrol_new snd_p16v_volume_control_spdif_unknown =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "HD SPDIF Unknown Playback Volume",
@@ -873,7 +873,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_spdif_unknown =
.put = snd_p16v_volume_put_spdif_unknown
};
-static snd_kcontrol_new_t snd_p16v_volume_control_spdif_rear =
+static struct snd_kcontrol_new snd_p16v_volume_control_spdif_rear =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "HD SPDIF Rear Playback Volume",
@@ -882,7 +882,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_spdif_rear =
.put = snd_p16v_volume_put_spdif_rear
};
-static int snd_p16v_capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_p16v_capture_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
static char *texts[8] = { "SPDIF", "I2S", "SRC48", "SRCMulti_SPDIF", "SRCMulti_I2S", "CDIF", "FX", "AC97" };
@@ -895,19 +895,19 @@ static int snd_p16v_capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i
return 0;
}
-static int snd_p16v_capture_source_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_capture_source_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
ucontrol->value.enumerated.item[0] = emu->p16v_capture_source;
return 0;
}
-static int snd_p16v_capture_source_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_capture_source_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
unsigned int val;
int change = 0;
u32 mask;
@@ -924,7 +924,7 @@ static int snd_p16v_capture_source_put(snd_kcontrol_t * kcontrol,
return change;
}
-static snd_kcontrol_new_t snd_p16v_capture_source __devinitdata =
+static struct snd_kcontrol_new snd_p16v_capture_source __devinitdata =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "HD source Capture",
@@ -933,7 +933,7 @@ static snd_kcontrol_new_t snd_p16v_capture_source __devinitdata =
.put = snd_p16v_capture_source_put
};
-static int snd_p16v_capture_channel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_p16v_capture_channel_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
static char *texts[4] = { "0", "1", "2", "3", };
@@ -946,19 +946,19 @@ static int snd_p16v_capture_channel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_
return 0;
}
-static int snd_p16v_capture_channel_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_capture_channel_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
ucontrol->value.enumerated.item[0] = emu->p16v_capture_channel;
return 0;
}
-static int snd_p16v_capture_channel_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
{
- emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
unsigned int val;
int change = 0;
u32 tmp;
@@ -973,7 +973,7 @@ static int snd_p16v_capture_channel_put(snd_kcontrol_t * kcontrol,
return change;
}
-static snd_kcontrol_new_t snd_p16v_capture_channel __devinitdata =
+static struct snd_kcontrol_new snd_p16v_capture_channel __devinitdata =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "HD channel Capture",
@@ -982,11 +982,11 @@ static snd_kcontrol_new_t snd_p16v_capture_channel __devinitdata =
.put = snd_p16v_capture_channel_put
};
-int snd_p16v_mixer(emu10k1_t *emu)
+int snd_p16v_mixer(struct snd_emu10k1 *emu)
{
int err;
- snd_kcontrol_t *kctl;
- snd_card_t *card = emu->card;
+ struct snd_kcontrol *kctl;
+ struct snd_card *card = emu->card;
if ((kctl = snd_ctl_new1(&snd_p16v_volume_control_analog_front, emu)) == NULL)
return -ENOMEM;
if ((err = snd_ctl_add(card, kctl)))
diff --git a/sound/pci/emu10k1/timer.c b/sound/pci/emu10k1/timer.c
index d2e364607c1d..6295b2dca785 100644
--- a/sound/pci/emu10k1/timer.c
+++ b/sound/pci/emu10k1/timer.c
@@ -30,9 +30,9 @@
#include <sound/core.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 int delay;
@@ -47,9 +47,9 @@ static int snd_emu10k1_timer_start(snd_timer_t *timer)
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;
emu = snd_timer_chip(timer);
@@ -59,7 +59,7 @@ static int snd_emu10k1_timer_stop(snd_timer_t *timer)
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)
{
*num = 1;
@@ -67,7 +67,7 @@ static int snd_emu10k1_timer_precise_resolution(snd_timer_t *timer,
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,
.resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */
.ticks = 1024,
@@ -76,10 +76,10 @@ static struct _snd_timer_hardware snd_emu10k1_timer_hw = {
.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;
- snd_timer_id_t tid;
+ struct snd_timer *timer = NULL;
+ struct snd_timer_id tid;
int err;
tid.dev_class = SNDRV_TIMER_CLASS_CARD;
diff --git a/sound/pci/emu10k1/voice.c b/sound/pci/emu10k1/voice.c
index d251d3440eec..56ffb7dc3ee2 100644
--- a/sound/pci/emu10k1/voice.c
+++ b/sound/pci/emu10k1/voice.c
@@ -45,9 +45,10 @@
* --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;
*rvoice = NULL;
@@ -105,7 +106,8 @@ static int voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int number, em
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;
int result;
@@ -123,7 +125,7 @@ int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int numbe
if (emu->get_synth_voice) {
result = emu->get_synth_voice(emu);
if (result >= 0) {
- emu10k1_voice_t *pvoice = &emu->voices[result];
+ struct snd_emu10k1_voice *pvoice = &emu->voices[result];
pvoice->interrupt = NULL;
pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0;
pvoice->epcm = NULL;
@@ -137,7 +139,8 @@ int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int numbe
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;