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

[ALSA] Remove xxx_t typedefs: PCI CA0106

Modules: CA0106 driver

Remove xxx_t typedefs from the PCI CA0106 driver.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 2fd16874
...@@ -554,37 +554,35 @@ ...@@ -554,37 +554,35 @@
#include "ca_midi.h" #include "ca_midi.h"
typedef struct snd_ca0106_channel ca0106_channel_t; struct snd_ca0106;
typedef struct snd_ca0106 ca0106_t;
typedef struct snd_ca0106_pcm ca0106_pcm_t;
struct snd_ca0106_channel { struct snd_ca0106_channel {
ca0106_t *emu; struct snd_ca0106 *emu;
int number; int number;
int use; int use;
void (*interrupt)(ca0106_t *emu, ca0106_channel_t *channel); void (*interrupt)(struct snd_ca0106 *emu, struct snd_ca0106_channel *channel);
ca0106_pcm_t *epcm; struct snd_ca0106_pcm *epcm;
}; };
struct snd_ca0106_pcm { struct snd_ca0106_pcm {
ca0106_t *emu; struct snd_ca0106 *emu;
snd_pcm_substream_t *substream; struct snd_pcm_substream *substream;
int channel_id; int channel_id;
unsigned short running; unsigned short running;
}; };
typedef struct { struct snd_ca0106_details {
u32 serial; u32 serial;
char * name; char * name;
int ac97; int ac97;
int gpio_type; int gpio_type;
int i2c_adc; int i2c_adc;
} ca0106_details_t; };
// definition of the chip-specific record // definition of the chip-specific record
struct snd_ca0106 { struct snd_ca0106 {
snd_card_t *card; struct snd_card *card;
ca0106_details_t *details; struct snd_ca0106_details *details;
struct pci_dev *pci; struct pci_dev *pci;
unsigned long port; unsigned long port;
...@@ -597,11 +595,11 @@ struct snd_ca0106 { ...@@ -597,11 +595,11 @@ struct snd_ca0106 {
spinlock_t emu_lock; spinlock_t emu_lock;
ac97_t *ac97; struct snd_ac97 *ac97;
snd_pcm_t *pcm; struct snd_pcm *pcm;
ca0106_channel_t playback_channels[4]; struct snd_ca0106_channel playback_channels[4];
ca0106_channel_t capture_channels[4]; struct snd_ca0106_channel capture_channels[4];
u32 spdif_bits[4]; /* s/pdif out setup */ u32 spdif_bits[4]; /* s/pdif out setup */
int spdif_enable; int spdif_enable;
int capture_source; int capture_source;
...@@ -609,22 +607,22 @@ struct snd_ca0106 { ...@@ -609,22 +607,22 @@ struct snd_ca0106 {
struct snd_dma_buffer buffer; struct snd_dma_buffer buffer;
ca_midi_t midi; struct snd_ca_midi midi;
ca_midi_t midi2; struct snd_ca_midi midi2;
}; };
int __devinit snd_ca0106_mixer(ca0106_t *emu); int snd_ca0106_mixer(struct snd_ca0106 *emu);
int __devinit snd_ca0106_proc_init(ca0106_t * emu); int snd_ca0106_proc_init(struct snd_ca0106 * emu);
unsigned int snd_ca0106_ptr_read(ca0106_t * emu, unsigned int snd_ca0106_ptr_read(struct snd_ca0106 * emu,
unsigned int reg, unsigned int reg,
unsigned int chn); unsigned int chn);
void snd_ca0106_ptr_write(ca0106_t *emu, void snd_ca0106_ptr_write(struct snd_ca0106 *emu,
unsigned int reg, unsigned int reg,
unsigned int chn, unsigned int chn,
unsigned int data); unsigned int data);
int snd_ca0106_i2c_write(ca0106_t *emu, u32 reg, u32 value); int snd_ca0106_i2c_write(struct snd_ca0106 *emu, u32 reg, u32 value);
...@@ -164,7 +164,7 @@ MODULE_PARM_DESC(enable, "Enable the CA0106 soundcard."); ...@@ -164,7 +164,7 @@ MODULE_PARM_DESC(enable, "Enable the CA0106 soundcard.");
#include "ca0106.h" #include "ca0106.h"
static ca0106_details_t ca0106_chip_details[] = { static struct snd_ca0106_details ca0106_chip_details[] = {
/* AudigyLS[SB0310] */ /* AudigyLS[SB0310] */
{ .serial = 0x10021102, { .serial = 0x10021102,
.name = "AudigyLS [SB0310]", .name = "AudigyLS [SB0310]",
...@@ -201,7 +201,7 @@ static ca0106_details_t ca0106_chip_details[] = { ...@@ -201,7 +201,7 @@ static ca0106_details_t ca0106_chip_details[] = {
}; };
/* hardware definition */ /* hardware definition */
static snd_pcm_hardware_t snd_ca0106_playback_hw = { static struct snd_pcm_hardware snd_ca0106_playback_hw = {
.info = (SNDRV_PCM_INFO_MMAP | .info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_BLOCK_TRANSFER |
...@@ -221,7 +221,7 @@ static snd_pcm_hardware_t snd_ca0106_playback_hw = { ...@@ -221,7 +221,7 @@ static snd_pcm_hardware_t snd_ca0106_playback_hw = {
.fifo_size = 0, .fifo_size = 0,
}; };
static snd_pcm_hardware_t snd_ca0106_capture_hw = { static struct snd_pcm_hardware snd_ca0106_capture_hw = {
.info = (SNDRV_PCM_INFO_MMAP | .info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_BLOCK_TRANSFER |
...@@ -241,7 +241,7 @@ static snd_pcm_hardware_t snd_ca0106_capture_hw = { ...@@ -241,7 +241,7 @@ static snd_pcm_hardware_t snd_ca0106_capture_hw = {
.fifo_size = 0, .fifo_size = 0,
}; };
unsigned int snd_ca0106_ptr_read(ca0106_t * emu, unsigned int snd_ca0106_ptr_read(struct snd_ca0106 * emu,
unsigned int reg, unsigned int reg,
unsigned int chn) unsigned int chn)
{ {
...@@ -257,7 +257,7 @@ unsigned int snd_ca0106_ptr_read(ca0106_t * emu, ...@@ -257,7 +257,7 @@ unsigned int snd_ca0106_ptr_read(ca0106_t * emu,
return val; return val;
} }
void snd_ca0106_ptr_write(ca0106_t *emu, void snd_ca0106_ptr_write(struct snd_ca0106 *emu,
unsigned int reg, unsigned int reg,
unsigned int chn, unsigned int chn,
unsigned int data) unsigned int data)
...@@ -273,7 +273,7 @@ void snd_ca0106_ptr_write(ca0106_t *emu, ...@@ -273,7 +273,7 @@ void snd_ca0106_ptr_write(ca0106_t *emu,
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
int snd_ca0106_i2c_write(ca0106_t *emu, int snd_ca0106_i2c_write(struct snd_ca0106 *emu,
u32 reg, u32 reg,
u32 value) u32 value)
{ {
...@@ -325,7 +325,7 @@ int snd_ca0106_i2c_write(ca0106_t *emu, ...@@ -325,7 +325,7 @@ int snd_ca0106_i2c_write(ca0106_t *emu,
} }
static void snd_ca0106_intr_enable(ca0106_t *emu, unsigned int intrenb) static void snd_ca0106_intr_enable(struct snd_ca0106 *emu, unsigned int intrenb)
{ {
unsigned long flags; unsigned long flags;
unsigned int enable; unsigned int enable;
...@@ -336,7 +336,7 @@ static void snd_ca0106_intr_enable(ca0106_t *emu, unsigned int intrenb) ...@@ -336,7 +336,7 @@ static void snd_ca0106_intr_enable(ca0106_t *emu, unsigned int intrenb)
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
static void snd_ca0106_intr_disable(ca0106_t *emu, unsigned int intrenb) static void snd_ca0106_intr_disable(struct snd_ca0106 *emu, unsigned int intrenb)
{ {
unsigned long flags; unsigned long flags;
unsigned int enable; unsigned int enable;
...@@ -348,18 +348,19 @@ static void snd_ca0106_intr_disable(ca0106_t *emu, unsigned int intrenb) ...@@ -348,18 +348,19 @@ static void snd_ca0106_intr_disable(ca0106_t *emu, unsigned int intrenb)
} }
static void snd_ca0106_pcm_free_substream(snd_pcm_runtime_t *runtime) static void snd_ca0106_pcm_free_substream(struct snd_pcm_runtime *runtime)
{ {
kfree(runtime->private_data); kfree(runtime->private_data);
} }
/* open_playback callback */ /* open_playback callback */
static int snd_ca0106_pcm_open_playback_channel(snd_pcm_substream_t *substream, int channel_id) static int snd_ca0106_pcm_open_playback_channel(struct snd_pcm_substream *substream,
int channel_id)
{ {
ca0106_t *chip = snd_pcm_substream_chip(substream); struct snd_ca0106 *chip = snd_pcm_substream_chip(substream);
ca0106_channel_t *channel = &(chip->playback_channels[channel_id]); struct snd_ca0106_channel *channel = &(chip->playback_channels[channel_id]);
ca0106_pcm_t *epcm; struct snd_ca0106_pcm *epcm;
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
int err; int err;
epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
...@@ -390,43 +391,44 @@ static int snd_ca0106_pcm_open_playback_channel(snd_pcm_substream_t *substream, ...@@ -390,43 +391,44 @@ static int snd_ca0106_pcm_open_playback_channel(snd_pcm_substream_t *substream,
} }
/* close callback */ /* close callback */
static int snd_ca0106_pcm_close_playback(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_close_playback(struct snd_pcm_substream *substream)
{ {
ca0106_t *chip = snd_pcm_substream_chip(substream); struct snd_ca0106 *chip = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
ca0106_pcm_t *epcm = runtime->private_data; struct snd_ca0106_pcm *epcm = runtime->private_data;
chip->playback_channels[epcm->channel_id].use=0; chip->playback_channels[epcm->channel_id].use = 0;
/* FIXME: maybe zero others */ /* FIXME: maybe zero others */
return 0; return 0;
} }
static int snd_ca0106_pcm_open_playback_front(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_open_playback_front(struct snd_pcm_substream *substream)
{ {
return snd_ca0106_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL); return snd_ca0106_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL);
} }
static int snd_ca0106_pcm_open_playback_center_lfe(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_open_playback_center_lfe(struct snd_pcm_substream *substream)
{ {
return snd_ca0106_pcm_open_playback_channel(substream, PCM_CENTER_LFE_CHANNEL); return snd_ca0106_pcm_open_playback_channel(substream, PCM_CENTER_LFE_CHANNEL);
} }
static int snd_ca0106_pcm_open_playback_unknown(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_open_playback_unknown(struct snd_pcm_substream *substream)
{ {
return snd_ca0106_pcm_open_playback_channel(substream, PCM_UNKNOWN_CHANNEL); return snd_ca0106_pcm_open_playback_channel(substream, PCM_UNKNOWN_CHANNEL);
} }
static int snd_ca0106_pcm_open_playback_rear(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_open_playback_rear(struct snd_pcm_substream *substream)
{ {
return snd_ca0106_pcm_open_playback_channel(substream, PCM_REAR_CHANNEL); return snd_ca0106_pcm_open_playback_channel(substream, PCM_REAR_CHANNEL);
} }
/* open_capture callback */ /* open_capture callback */
static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, int channel_id) static int snd_ca0106_pcm_open_capture_channel(struct snd_pcm_substream *substream,
int channel_id)
{ {
ca0106_t *chip = snd_pcm_substream_chip(substream); struct snd_ca0106 *chip = snd_pcm_substream_chip(substream);
ca0106_channel_t *channel = &(chip->capture_channels[channel_id]); struct snd_ca0106_channel *channel = &(chip->capture_channels[channel_id]);
ca0106_pcm_t *epcm; struct snd_ca0106_pcm *epcm;
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
int err; int err;
epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
...@@ -459,70 +461,70 @@ static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, i ...@@ -459,70 +461,70 @@ static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, i
} }
/* close callback */ /* close callback */
static int snd_ca0106_pcm_close_capture(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_close_capture(struct snd_pcm_substream *substream)
{ {
ca0106_t *chip = snd_pcm_substream_chip(substream); struct snd_ca0106 *chip = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
ca0106_pcm_t *epcm = runtime->private_data; struct snd_ca0106_pcm *epcm = runtime->private_data;
chip->capture_channels[epcm->channel_id].use=0; chip->capture_channels[epcm->channel_id].use = 0;
/* FIXME: maybe zero others */ /* FIXME: maybe zero others */
return 0; return 0;
} }
static int snd_ca0106_pcm_open_0_capture(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_open_0_capture(struct snd_pcm_substream *substream)
{ {
return snd_ca0106_pcm_open_capture_channel(substream, 0); return snd_ca0106_pcm_open_capture_channel(substream, 0);
} }
static int snd_ca0106_pcm_open_1_capture(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_open_1_capture(struct snd_pcm_substream *substream)
{ {
return snd_ca0106_pcm_open_capture_channel(substream, 1); return snd_ca0106_pcm_open_capture_channel(substream, 1);
} }
static int snd_ca0106_pcm_open_2_capture(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_open_2_capture(struct snd_pcm_substream *substream)
{ {
return snd_ca0106_pcm_open_capture_channel(substream, 2); return snd_ca0106_pcm_open_capture_channel(substream, 2);
} }
static int snd_ca0106_pcm_open_3_capture(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_open_3_capture(struct snd_pcm_substream *substream)
{ {
return snd_ca0106_pcm_open_capture_channel(substream, 3); return snd_ca0106_pcm_open_capture_channel(substream, 3);
} }
/* hw_params callback */ /* hw_params callback */
static int snd_ca0106_pcm_hw_params_playback(snd_pcm_substream_t *substream, static int snd_ca0106_pcm_hw_params_playback(struct snd_pcm_substream *substream,
snd_pcm_hw_params_t * hw_params) struct snd_pcm_hw_params *hw_params)
{ {
return snd_pcm_lib_malloc_pages(substream, return snd_pcm_lib_malloc_pages(substream,
params_buffer_bytes(hw_params)); params_buffer_bytes(hw_params));
} }
/* hw_free callback */ /* hw_free callback */
static int snd_ca0106_pcm_hw_free_playback(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_hw_free_playback(struct snd_pcm_substream *substream)
{ {
return snd_pcm_lib_free_pages(substream); return snd_pcm_lib_free_pages(substream);
} }
/* hw_params callback */ /* hw_params callback */
static int snd_ca0106_pcm_hw_params_capture(snd_pcm_substream_t *substream, static int snd_ca0106_pcm_hw_params_capture(struct snd_pcm_substream *substream,
snd_pcm_hw_params_t * hw_params) struct snd_pcm_hw_params *hw_params)
{ {
return snd_pcm_lib_malloc_pages(substream, return snd_pcm_lib_malloc_pages(substream,
params_buffer_bytes(hw_params)); params_buffer_bytes(hw_params));
} }
/* hw_free callback */ /* hw_free callback */
static int snd_ca0106_pcm_hw_free_capture(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_hw_free_capture(struct snd_pcm_substream *substream)
{ {
return snd_pcm_lib_free_pages(substream); return snd_pcm_lib_free_pages(substream);
} }
/* prepare playback callback */ /* prepare playback callback */
static int snd_ca0106_pcm_prepare_playback(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_prepare_playback(struct snd_pcm_substream *substream)
{ {
ca0106_t *emu = snd_pcm_substream_chip(substream); struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
ca0106_pcm_t *epcm = runtime->private_data; struct snd_ca0106_pcm *epcm = runtime->private_data;
int channel = epcm->channel_id; int channel = epcm->channel_id;
u32 *table_base = (u32 *)(emu->buffer.area+(8*16*channel)); u32 *table_base = (u32 *)(emu->buffer.area+(8*16*channel));
u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size); u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size);
...@@ -619,11 +621,11 @@ static int snd_ca0106_pcm_prepare_playback(snd_pcm_substream_t *substream) ...@@ -619,11 +621,11 @@ static int snd_ca0106_pcm_prepare_playback(snd_pcm_substream_t *substream)
} }
/* prepare capture callback */ /* prepare capture callback */
static int snd_ca0106_pcm_prepare_capture(snd_pcm_substream_t *substream) static int snd_ca0106_pcm_prepare_capture(struct snd_pcm_substream *substream)
{ {
ca0106_t *emu = snd_pcm_substream_chip(substream); struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
ca0106_pcm_t *epcm = runtime->private_data; struct snd_ca0106_pcm *epcm = runtime->private_data;
int channel = epcm->channel_id; int channel = epcm->channel_id;
u32 hcfg_mask = HCFG_CAPTURE_S32_LE; u32 hcfg_mask = HCFG_CAPTURE_S32_LE;
u32 hcfg_set = 0x00000000; u32 hcfg_set = 0x00000000;
...@@ -690,16 +692,16 @@ static int snd_ca0106_pcm_prepare_capture(snd_pcm_substream_t *substream) ...@@ -690,16 +692,16 @@ static int snd_ca0106_pcm_prepare_capture(snd_pcm_substream_t *substream)
} }
/* trigger_playback callback */ /* trigger_playback callback */
static int snd_ca0106_pcm_trigger_playback(snd_pcm_substream_t *substream, static int snd_ca0106_pcm_trigger_playback(struct snd_pcm_substream *substream,
int cmd) int cmd)
{ {
ca0106_t *emu = snd_pcm_substream_chip(substream); struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime; struct snd_pcm_runtime *runtime;
ca0106_pcm_t *epcm; struct snd_ca0106_pcm *epcm;
int channel; int channel;
int result = 0; int result = 0;
struct list_head *pos; struct list_head *pos;
snd_pcm_substream_t *s; struct snd_pcm_substream *s;
u32 basic = 0; u32 basic = 0;
u32 extended = 0; u32 extended = 0;
int running=0; int running=0;
...@@ -743,12 +745,12 @@ static int snd_ca0106_pcm_trigger_playback(snd_pcm_substream_t *substream, ...@@ -743,12 +745,12 @@ static int snd_ca0106_pcm_trigger_playback(snd_pcm_substream_t *substream,
} }
/* trigger_capture callback */ /* trigger_capture callback */
static int snd_ca0106_pcm_trigger_capture(snd_pcm_substream_t *substream, static int snd_ca0106_pcm_trigger_capture(struct snd_pcm_substream *substream,
int cmd) int cmd)
{ {
ca0106_t *emu = snd_pcm_substream_chip(substream); struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
ca0106_pcm_t *epcm = runtime->private_data; struct snd_ca0106_pcm *epcm = runtime->private_data;
int channel = epcm->channel_id; int channel = epcm->channel_id;
int result = 0; int result = 0;
...@@ -772,11 +774,11 @@ static int snd_ca0106_pcm_trigger_capture(snd_pcm_substream_t *substream, ...@@ -772,11 +774,11 @@ static int snd_ca0106_pcm_trigger_capture(snd_pcm_substream_t *substream,
/* pointer_playback callback */ /* pointer_playback callback */
static snd_pcm_uframes_t static snd_pcm_uframes_t
snd_ca0106_pcm_pointer_playback(snd_pcm_substream_t *substream) snd_ca0106_pcm_pointer_playback(struct snd_pcm_substream *substream)
{ {
ca0106_t *emu = snd_pcm_substream_chip(substream); struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
ca0106_pcm_t *epcm = runtime->private_data; struct snd_ca0106_pcm *epcm = runtime->private_data;
snd_pcm_uframes_t ptr, ptr1, ptr2,ptr3,ptr4 = 0; snd_pcm_uframes_t ptr, ptr1, ptr2,ptr3,ptr4 = 0;
int channel = epcm->channel_id; int channel = epcm->channel_id;
...@@ -799,11 +801,11 @@ snd_ca0106_pcm_pointer_playback(snd_pcm_substream_t *substream) ...@@ -799,11 +801,11 @@ snd_ca0106_pcm_pointer_playback(snd_pcm_substream_t *substream)
/* pointer_capture callback */ /* pointer_capture callback */
static snd_pcm_uframes_t static snd_pcm_uframes_t
snd_ca0106_pcm_pointer_capture(snd_pcm_substream_t *substream) snd_ca0106_pcm_pointer_capture(struct snd_pcm_substream *substream)
{ {
ca0106_t *emu = snd_pcm_substream_chip(substream); struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
ca0106_pcm_t *epcm = runtime->private_data; struct snd_ca0106_pcm *epcm = runtime->private_data;
snd_pcm_uframes_t ptr, ptr1, ptr2 = 0; snd_pcm_uframes_t ptr, ptr1, ptr2 = 0;
int channel = channel=epcm->channel_id; int channel = channel=epcm->channel_id;
...@@ -821,7 +823,7 @@ snd_ca0106_pcm_pointer_capture(snd_pcm_substream_t *substream) ...@@ -821,7 +823,7 @@ snd_ca0106_pcm_pointer_capture(snd_pcm_substream_t *substream)
} }
/* operators */ /* operators */
static snd_pcm_ops_t snd_ca0106_playback_front_ops = { static struct snd_pcm_ops snd_ca0106_playback_front_ops = {
.open = snd_ca0106_pcm_open_playback_front, .open = snd_ca0106_pcm_open_playback_front,
.close = snd_ca0106_pcm_close_playback, .close = snd_ca0106_pcm_close_playback,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -832,7 +834,7 @@ static snd_pcm_ops_t snd_ca0106_playback_front_ops = { ...@@ -832,7 +834,7 @@ static snd_pcm_ops_t snd_ca0106_playback_front_ops = {
.pointer = snd_ca0106_pcm_pointer_playback, .pointer = snd_ca0106_pcm_pointer_playback,
}; };
static snd_pcm_ops_t snd_ca0106_capture_0_ops = { static struct snd_pcm_ops snd_ca0106_capture_0_ops = {
.open = snd_ca0106_pcm_open_0_capture, .open = snd_ca0106_pcm_open_0_capture,
.close = snd_ca0106_pcm_close_capture, .close = snd_ca0106_pcm_close_capture,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -843,7 +845,7 @@ static snd_pcm_ops_t snd_ca0106_capture_0_ops = { ...@@ -843,7 +845,7 @@ static snd_pcm_ops_t snd_ca0106_capture_0_ops = {
.pointer = snd_ca0106_pcm_pointer_capture, .pointer = snd_ca0106_pcm_pointer_capture,
}; };
static snd_pcm_ops_t snd_ca0106_capture_1_ops = { static struct snd_pcm_ops snd_ca0106_capture_1_ops = {
.open = snd_ca0106_pcm_open_1_capture, .open = snd_ca0106_pcm_open_1_capture,
.close = snd_ca0106_pcm_close_capture, .close = snd_ca0106_pcm_close_capture,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -854,7 +856,7 @@ static snd_pcm_ops_t snd_ca0106_capture_1_ops = { ...@@ -854,7 +856,7 @@ static snd_pcm_ops_t snd_ca0106_capture_1_ops = {
.pointer = snd_ca0106_pcm_pointer_capture, .pointer = snd_ca0106_pcm_pointer_capture,
}; };
static snd_pcm_ops_t snd_ca0106_capture_2_ops = { static struct snd_pcm_ops snd_ca0106_capture_2_ops = {
.open = snd_ca0106_pcm_open_2_capture, .open = snd_ca0106_pcm_open_2_capture,
.close = snd_ca0106_pcm_close_capture, .close = snd_ca0106_pcm_close_capture,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -865,7 +867,7 @@ static snd_pcm_ops_t snd_ca0106_capture_2_ops = { ...@@ -865,7 +867,7 @@ static snd_pcm_ops_t snd_ca0106_capture_2_ops = {
.pointer = snd_ca0106_pcm_pointer_capture, .pointer = snd_ca0106_pcm_pointer_capture,
}; };
static snd_pcm_ops_t snd_ca0106_capture_3_ops = { static struct snd_pcm_ops snd_ca0106_capture_3_ops = {
.open = snd_ca0106_pcm_open_3_capture, .open = snd_ca0106_pcm_open_3_capture,
.close = snd_ca0106_pcm_close_capture, .close = snd_ca0106_pcm_close_capture,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -876,7 +878,7 @@ static snd_pcm_ops_t snd_ca0106_capture_3_ops = { ...@@ -876,7 +878,7 @@ static snd_pcm_ops_t snd_ca0106_capture_3_ops = {
.pointer = snd_ca0106_pcm_pointer_capture, .pointer = snd_ca0106_pcm_pointer_capture,
}; };
static snd_pcm_ops_t snd_ca0106_playback_center_lfe_ops = { static struct snd_pcm_ops snd_ca0106_playback_center_lfe_ops = {
.open = snd_ca0106_pcm_open_playback_center_lfe, .open = snd_ca0106_pcm_open_playback_center_lfe,
.close = snd_ca0106_pcm_close_playback, .close = snd_ca0106_pcm_close_playback,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -887,7 +889,7 @@ static snd_pcm_ops_t snd_ca0106_playback_center_lfe_ops = { ...@@ -887,7 +889,7 @@ static snd_pcm_ops_t snd_ca0106_playback_center_lfe_ops = {
.pointer = snd_ca0106_pcm_pointer_playback, .pointer = snd_ca0106_pcm_pointer_playback,
}; };
static snd_pcm_ops_t snd_ca0106_playback_unknown_ops = { static struct snd_pcm_ops snd_ca0106_playback_unknown_ops = {
.open = snd_ca0106_pcm_open_playback_unknown, .open = snd_ca0106_pcm_open_playback_unknown,
.close = snd_ca0106_pcm_close_playback, .close = snd_ca0106_pcm_close_playback,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -898,7 +900,7 @@ static snd_pcm_ops_t snd_ca0106_playback_unknown_ops = { ...@@ -898,7 +900,7 @@ static snd_pcm_ops_t snd_ca0106_playback_unknown_ops = {
.pointer = snd_ca0106_pcm_pointer_playback, .pointer = snd_ca0106_pcm_pointer_playback,
}; };
static snd_pcm_ops_t snd_ca0106_playback_rear_ops = { static struct snd_pcm_ops snd_ca0106_playback_rear_ops = {
.open = snd_ca0106_pcm_open_playback_rear, .open = snd_ca0106_pcm_open_playback_rear,
.close = snd_ca0106_pcm_close_playback, .close = snd_ca0106_pcm_close_playback,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -910,10 +912,10 @@ static snd_pcm_ops_t snd_ca0106_playback_rear_ops = { ...@@ -910,10 +912,10 @@ static snd_pcm_ops_t snd_ca0106_playback_rear_ops = {
}; };
static unsigned short snd_ca0106_ac97_read(ac97_t *ac97, static unsigned short snd_ca0106_ac97_read(struct snd_ac97 *ac97,
unsigned short reg) unsigned short reg)
{ {
ca0106_t *emu = ac97->private_data; struct snd_ca0106 *emu = ac97->private_data;
unsigned long flags; unsigned long flags;
unsigned short val; unsigned short val;
...@@ -924,10 +926,10 @@ static unsigned short snd_ca0106_ac97_read(ac97_t *ac97, ...@@ -924,10 +926,10 @@ static unsigned short snd_ca0106_ac97_read(ac97_t *ac97,
return val; return val;
} }
static void snd_ca0106_ac97_write(ac97_t *ac97, static void snd_ca0106_ac97_write(struct snd_ac97 *ac97,
unsigned short reg, unsigned short val) unsigned short reg, unsigned short val)
{ {
ca0106_t *emu = ac97->private_data; struct snd_ca0106 *emu = ac97->private_data;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&emu->emu_lock, flags); spin_lock_irqsave(&emu->emu_lock, flags);
...@@ -936,12 +938,12 @@ static void snd_ca0106_ac97_write(ac97_t *ac97, ...@@ -936,12 +938,12 @@ static void snd_ca0106_ac97_write(ac97_t *ac97,
spin_unlock_irqrestore(&emu->emu_lock, flags); spin_unlock_irqrestore(&emu->emu_lock, flags);
} }
static int snd_ca0106_ac97(ca0106_t *chip) static int snd_ca0106_ac97(struct snd_ca0106 *chip)
{ {
ac97_bus_t *pbus; struct snd_ac97_bus *pbus;
ac97_template_t ac97; struct snd_ac97_template ac97;
int err; int err;
static ac97_bus_ops_t ops = { static struct snd_ac97_bus_ops ops = {
.write = snd_ca0106_ac97_write, .write = snd_ca0106_ac97_write,
.read = snd_ca0106_ac97_read, .read = snd_ca0106_ac97_read,
}; };
...@@ -956,7 +958,7 @@ static int snd_ca0106_ac97(ca0106_t *chip) ...@@ -956,7 +958,7 @@ static int snd_ca0106_ac97(ca0106_t *chip)
return snd_ac97_mixer(pbus, &ac97, &chip->ac97); return snd_ac97_mixer(pbus, &ac97, &chip->ac97);
} }
static int snd_ca0106_free(ca0106_t *chip) static int snd_ca0106_free(struct snd_ca0106 *chip)
{ {
if (chip->res_port != NULL) { /* avoid access to already used hardware */ if (chip->res_port != NULL) { /* avoid access to already used hardware */
// disable interrupts // disable interrupts
...@@ -989,9 +991,9 @@ static int snd_ca0106_free(ca0106_t *chip) ...@@ -989,9 +991,9 @@ static int snd_ca0106_free(ca0106_t *chip)
return 0; return 0;
} }
static int snd_ca0106_dev_free(snd_device_t *device) static int snd_ca0106_dev_free(struct snd_device *device)
{ {
ca0106_t *chip = device->device_data; struct snd_ca0106 *chip = device->device_data;
return snd_ca0106_free(chip); return snd_ca0106_free(chip);
} }
...@@ -1000,14 +1002,13 @@ static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id, ...@@ -1000,14 +1002,13 @@ static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id,
{ {
unsigned int status; unsigned int status;
ca0106_t *chip = dev_id; struct snd_ca0106 *chip = dev_id;
int i; int i;
int mask; int mask;
unsigned int stat76; unsigned int stat76;
ca0106_channel_t *pchannel; struct snd_ca0106_channel *pchannel;
status = inl(chip->port + IPR); status = inl(chip->port + IPR);
if (! status) if (! status)
return IRQ_NONE; return IRQ_NONE;
...@@ -1059,10 +1060,10 @@ static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id, ...@@ -1059,10 +1060,10 @@ static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id,
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static int __devinit snd_ca0106_pcm(ca0106_t *emu, int device, snd_pcm_t **rpcm) static int __devinit snd_ca0106_pcm(struct snd_ca0106 *emu, int device, struct snd_pcm **rpcm)
{ {
snd_pcm_t *pcm; struct snd_pcm *pcm;
snd_pcm_substream_t *substream; struct snd_pcm_substream *substream;
int err; int err;
if (rpcm) if (rpcm)
...@@ -1122,15 +1123,15 @@ static int __devinit snd_ca0106_pcm(ca0106_t *emu, int device, snd_pcm_t **rpcm) ...@@ -1122,15 +1123,15 @@ static int __devinit snd_ca0106_pcm(ca0106_t *emu, int device, snd_pcm_t **rpcm)
return 0; return 0;
} }
static int __devinit snd_ca0106_create(snd_card_t *card, static int __devinit snd_ca0106_create(struct snd_card *card,
struct pci_dev *pci, struct pci_dev *pci,
ca0106_t **rchip) struct snd_ca0106 **rchip)
{ {
ca0106_t *chip; struct snd_ca0106 *chip;
ca0106_details_t *c; struct snd_ca0106_details *c;
int err; int err;
int ch; int ch;
static snd_device_ops_t ops = { static struct snd_device_ops ops = {
.dev_free = snd_ca0106_dev_free, .dev_free = snd_ca0106_dev_free,
}; };
...@@ -1314,39 +1315,40 @@ static int __devinit snd_ca0106_create(snd_card_t *card, ...@@ -1314,39 +1315,40 @@ static int __devinit snd_ca0106_create(snd_card_t *card,
} }
static void ca0106_midi_interrupt_enable(ca_midi_t *midi, int intr) static void ca0106_midi_interrupt_enable(struct snd_ca_midi *midi, int intr)
{ {
snd_ca0106_intr_enable((ca0106_t *)(midi->dev_id), intr); snd_ca0106_intr_enable((struct snd_ca0106 *)(midi->dev_id), intr);
} }
static void ca0106_midi_interrupt_disable(ca_midi_t *midi, int intr) static void ca0106_midi_interrupt_disable(struct snd_ca_midi *midi, int intr)
{ {
snd_ca0106_intr_disable((ca0106_t *)(midi->dev_id), intr); snd_ca0106_intr_disable((struct snd_ca0106 *)(midi->dev_id), intr);
} }
static unsigned char ca0106_midi_read(ca_midi_t *midi, int idx) static unsigned char ca0106_midi_read(struct snd_ca_midi *midi, int idx)
{ {
return (unsigned char)snd_ca0106_ptr_read((ca0106_t *)(midi->dev_id), midi->port + idx, 0); return (unsigned char)snd_ca0106_ptr_read((struct snd_ca0106 *)(midi->dev_id),
midi->port + idx, 0);
} }
static void ca0106_midi_write(ca_midi_t *midi, int data, int idx) static void ca0106_midi_write(struct snd_ca_midi *midi, int data, int idx)
{ {
snd_ca0106_ptr_write((ca0106_t *)(midi->dev_id), midi->port + idx, 0, data); snd_ca0106_ptr_write((struct snd_ca0106 *)(midi->dev_id), midi->port + idx, 0, data);
} }
static snd_card_t *ca0106_dev_id_card(void *dev_id) static struct snd_card *ca0106_dev_id_card(void *dev_id)
{ {
return ((ca0106_t *)dev_id)->card; return ((struct snd_ca0106 *)dev_id)->card;
} }
static int ca0106_dev_id_port(void *dev_id) static int ca0106_dev_id_port(void *dev_id)
{ {
return ((ca0106_t *)dev_id)->port; return ((struct snd_ca0106 *)dev_id)->port;
} }
static int __devinit snd_ca0106_midi(ca0106_t *chip, unsigned int channel) static int __devinit snd_ca0106_midi(struct snd_ca0106 *chip, unsigned int channel)
{ {
ca_midi_t *midi; struct snd_ca_midi *midi;
char *name; char *name;
int err; int err;
...@@ -1399,8 +1401,8 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci, ...@@ -1399,8 +1401,8 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) const struct pci_device_id *pci_id)
{ {
static int dev; static int dev;
snd_card_t *card; struct snd_card *card;
ca0106_t *chip; struct snd_ca0106 *chip;
int err; int err;
if (dev >= SNDRV_CARDS) if (dev >= SNDRV_CARDS)
......
...@@ -73,7 +73,8 @@ ...@@ -73,7 +73,8 @@
#include "ca0106.h" #include "ca0106.h"
static int snd_ca0106_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1; uinfo->count = 1;
...@@ -82,19 +83,19 @@ static int snd_ca0106_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i ...@@ -82,19 +83,19 @@ static int snd_ca0106_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i
return 0; return 0;
} }
static int snd_ca0106_shared_spdif_get(snd_kcontrol_t * kcontrol, static int snd_ca0106_shared_spdif_get(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
ca0106_t *emu = snd_kcontrol_chip(kcontrol); struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
ucontrol->value.enumerated.item[0] = emu->spdif_enable; ucontrol->value.enumerated.item[0] = emu->spdif_enable;
return 0; return 0;
} }
static int snd_ca0106_shared_spdif_put(snd_kcontrol_t * kcontrol, static int snd_ca0106_shared_spdif_put(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
ca0106_t *emu = snd_kcontrol_chip(kcontrol); struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
unsigned int val; unsigned int val;
int change = 0; int change = 0;
u32 mask; u32 mask;
...@@ -125,7 +126,8 @@ static int snd_ca0106_shared_spdif_put(snd_kcontrol_t * kcontrol, ...@@ -125,7 +126,8 @@ static int snd_ca0106_shared_spdif_put(snd_kcontrol_t * kcontrol,
return change; return change;
} }
static int snd_ca0106_capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) static int snd_ca0106_capture_source_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ {
static char *texts[6] = { static char *texts[6] = {
"SPDIF out", "i2s mixer out", "SPDIF in", "i2s in", "AC97 in", "SRC out" "SPDIF out", "i2s mixer out", "SPDIF in", "i2s in", "AC97 in", "SRC out"
...@@ -140,19 +142,19 @@ static int snd_ca0106_capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem ...@@ -140,19 +142,19 @@ static int snd_ca0106_capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem
return 0; return 0;
} }
static int snd_ca0106_capture_source_get(snd_kcontrol_t * kcontrol, static int snd_ca0106_capture_source_get(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
ca0106_t *emu = snd_kcontrol_chip(kcontrol); struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
ucontrol->value.enumerated.item[0] = emu->capture_source; ucontrol->value.enumerated.item[0] = emu->capture_source;
return 0; return 0;
} }
static int snd_ca0106_capture_source_put(snd_kcontrol_t * kcontrol, static int snd_ca0106_capture_source_put(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
ca0106_t *emu = snd_kcontrol_chip(kcontrol); struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
unsigned int val; unsigned int val;
int change = 0; int change = 0;
u32 mask; u32 mask;
...@@ -169,7 +171,8 @@ static int snd_ca0106_capture_source_put(snd_kcontrol_t * kcontrol, ...@@ -169,7 +171,8 @@ static int snd_ca0106_capture_source_put(snd_kcontrol_t * kcontrol,
return change; return change;
} }
static int snd_ca0106_capture_mic_line_in_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) static int snd_ca0106_capture_mic_line_in_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ {
static char *texts[2] = { "Line in", "Mic in" }; static char *texts[2] = { "Line in", "Mic in" };
...@@ -182,19 +185,19 @@ static int snd_ca0106_capture_mic_line_in_info(snd_kcontrol_t *kcontrol, snd_ctl ...@@ -182,19 +185,19 @@ static int snd_ca0106_capture_mic_line_in_info(snd_kcontrol_t *kcontrol, snd_ctl
return 0; return 0;
} }
static int snd_ca0106_capture_mic_line_in_get(snd_kcontrol_t * kcontrol, static int snd_ca0106_capture_mic_line_in_get(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
ca0106_t *emu = snd_kcontrol_chip(kcontrol); struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
ucontrol->value.enumerated.item[0] = emu->capture_mic_line_in; ucontrol->value.enumerated.item[0] = emu->capture_mic_line_in;
return 0; return 0;
} }
static int snd_ca0106_capture_mic_line_in_put(snd_kcontrol_t * kcontrol, static int snd_ca0106_capture_mic_line_in_put(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
ca0106_t *emu = snd_kcontrol_chip(kcontrol); struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
unsigned int val; unsigned int val;
int change = 0; int change = 0;
u32 tmp; u32 tmp;
...@@ -219,7 +222,7 @@ static int snd_ca0106_capture_mic_line_in_put(snd_kcontrol_t * kcontrol, ...@@ -219,7 +222,7 @@ static int snd_ca0106_capture_mic_line_in_put(snd_kcontrol_t * kcontrol,
return change; return change;
} }
static snd_kcontrol_new_t snd_ca0106_capture_mic_line_in __devinitdata = static struct snd_kcontrol_new snd_ca0106_capture_mic_line_in __devinitdata =
{ {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Mic/Line in Capture", .name = "Mic/Line in Capture",
...@@ -228,17 +231,18 @@ static snd_kcontrol_new_t snd_ca0106_capture_mic_line_in __devinitdata = ...@@ -228,17 +231,18 @@ static snd_kcontrol_new_t snd_ca0106_capture_mic_line_in __devinitdata =
.put = snd_ca0106_capture_mic_line_in_put .put = snd_ca0106_capture_mic_line_in_put
}; };
static int snd_ca0106_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) static int snd_ca0106_spdif_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
uinfo->count = 1; uinfo->count = 1;
return 0; return 0;
} }
static int snd_ca0106_spdif_get(snd_kcontrol_t * kcontrol, static int snd_ca0106_spdif_get(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
ca0106_t *emu = snd_kcontrol_chip(kcontrol); struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff; ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff;
...@@ -248,8 +252,8 @@ static int snd_ca0106_spdif_get(snd_kcontrol_t * kcontrol, ...@@ -248,8 +252,8 @@ static int snd_ca0106_spdif_get(snd_kcontrol_t * kcontrol,
return 0; return 0;
} }
static int snd_ca0106_spdif_get_mask(snd_kcontrol_t * kcontrol, static int snd_ca0106_spdif_get_mask(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
ucontrol->value.iec958.status[0] = 0xff; ucontrol->value.iec958.status[0] = 0xff;
ucontrol->value.iec958.status[1] = 0xff; ucontrol->value.iec958.status[1] = 0xff;
...@@ -258,10 +262,10 @@ static int snd_ca0106_spdif_get_mask(snd_kcontrol_t * kcontrol, ...@@ -258,10 +262,10 @@ static int snd_ca0106_spdif_get_mask(snd_kcontrol_t * kcontrol,
return 0; return 0;
} }
static int snd_ca0106_spdif_put(snd_kcontrol_t * kcontrol, static int snd_ca0106_spdif_put(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
ca0106_t *emu = snd_kcontrol_chip(kcontrol); struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
int change; int change;
unsigned int val; unsigned int val;
...@@ -278,7 +282,8 @@ static int snd_ca0106_spdif_put(snd_kcontrol_t * kcontrol, ...@@ -278,7 +282,8 @@ static int snd_ca0106_spdif_put(snd_kcontrol_t * kcontrol,
return change; return change;
} }
static int snd_ca0106_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) static int snd_ca0106_volume_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2; uinfo->count = 2;
...@@ -287,10 +292,10 @@ static int snd_ca0106_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t ...@@ -287,10 +292,10 @@ static int snd_ca0106_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
return 0; return 0;
} }
static int snd_ca0106_volume_get(snd_kcontrol_t * kcontrol, static int snd_ca0106_volume_get(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
ca0106_t *emu = snd_kcontrol_chip(kcontrol); struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
unsigned int value; unsigned int value;
int channel_id, reg; int channel_id, reg;
...@@ -303,10 +308,10 @@ static int snd_ca0106_volume_get(snd_kcontrol_t * kcontrol, ...@@ -303,10 +308,10 @@ static int snd_ca0106_volume_get(snd_kcontrol_t * kcontrol,
return 0; return 0;
} }
static int snd_ca0106_volume_put(snd_kcontrol_t * kcontrol, static int snd_ca0106_volume_put(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
ca0106_t *emu = snd_kcontrol_chip(kcontrol); struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
unsigned int oval, nval; unsigned int oval, nval;
int channel_id, reg; int channel_id, reg;
...@@ -334,7 +339,7 @@ static int snd_ca0106_volume_put(snd_kcontrol_t * kcontrol, ...@@ -334,7 +339,7 @@ static int snd_ca0106_volume_put(snd_kcontrol_t * kcontrol,
} }
static snd_kcontrol_new_t snd_ca0106_volume_ctls[] __devinitdata = { static struct snd_kcontrol_new snd_ca0106_volume_ctls[] __devinitdata = {
CA_VOLUME("Analog Front Playback Volume", CA_VOLUME("Analog Front Playback Volume",
CONTROL_FRONT_CHANNEL, PLAYBACK_VOLUME2), CONTROL_FRONT_CHANNEL, PLAYBACK_VOLUME2),
CA_VOLUME("Analog Rear Playback Volume", CA_VOLUME("Analog Rear Playback Volume",
...@@ -388,18 +393,18 @@ static snd_kcontrol_new_t snd_ca0106_volume_ctls[] __devinitdata = { ...@@ -388,18 +393,18 @@ static snd_kcontrol_new_t snd_ca0106_volume_ctls[] __devinitdata = {
}, },
}; };
static int __devinit remove_ctl(snd_card_t *card, const char *name) static int __devinit 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)); memset(&id, 0, sizeof(id));
strcpy(id.name, name); strcpy(id.name, name);
id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
return snd_ctl_remove_id(card, &id); return snd_ctl_remove_id(card, &id);
} }
static snd_kcontrol_t __devinit *ctl_find(snd_card_t *card, const char *name) static struct snd_kcontrol __devinit *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)); memset(&sid, 0, sizeof(sid));
/* FIXME: strcpy is bad. */ /* FIXME: strcpy is bad. */
strcpy(sid.name, name); strcpy(sid.name, name);
...@@ -407,9 +412,9 @@ static snd_kcontrol_t __devinit *ctl_find(snd_card_t *card, const char *name) ...@@ -407,9 +412,9 @@ static snd_kcontrol_t __devinit *ctl_find(snd_card_t *card, const char *name)
return snd_ctl_find_id(card, &sid); return snd_ctl_find_id(card, &sid);
} }
static int __devinit rename_ctl(snd_card_t *card, const char *src, const char *dst) static int __devinit 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) { if (kctl) {
strcpy(kctl->id.name, dst); strcpy(kctl->id.name, dst);
return 0; return 0;
...@@ -417,10 +422,10 @@ static int __devinit rename_ctl(snd_card_t *card, const char *src, const char *d ...@@ -417,10 +422,10 @@ static int __devinit rename_ctl(snd_card_t *card, const char *src, const char *d
return -ENOENT; return -ENOENT;
} }
int __devinit snd_ca0106_mixer(ca0106_t *emu) int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu)
{ {
int i, err; int i, err;
snd_card_t *card = emu->card; struct snd_card *card = emu->card;
char **c; char **c;
static char *ca0106_remove_ctls[] = { static char *ca0106_remove_ctls[] = {
"Master Mono Playback Switch", "Master Mono Playback Switch",
......
...@@ -97,7 +97,7 @@ static struct snd_ca0106_category_str snd_ca0106_con_category[] = { ...@@ -97,7 +97,7 @@ static struct snd_ca0106_category_str snd_ca0106_con_category[] = {
}; };
static void snd_ca0106_proc_dump_iec958( snd_info_buffer_t *buffer, u32 value) static void snd_ca0106_proc_dump_iec958( struct snd_info_buffer *buffer, u32 value)
{ {
int i; int i;
u32 status[4]; u32 status[4];
...@@ -271,10 +271,10 @@ static void snd_ca0106_proc_dump_iec958( snd_info_buffer_t *buffer, u32 value) ...@@ -271,10 +271,10 @@ static void snd_ca0106_proc_dump_iec958( snd_info_buffer_t *buffer, u32 value)
} }
} }
static void snd_ca0106_proc_iec958(snd_info_entry_t *entry, static void snd_ca0106_proc_iec958(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
ca0106_t *emu = entry->private_data; struct snd_ca0106 *emu = entry->private_data;
u32 value; u32 value;
value = snd_ca0106_ptr_read(emu, SAMPLE_RATE_TRACKER_STATUS, 0); value = snd_ca0106_ptr_read(emu, SAMPLE_RATE_TRACKER_STATUS, 0);
...@@ -293,10 +293,10 @@ static void snd_ca0106_proc_iec958(snd_info_entry_t *entry, ...@@ -293,10 +293,10 @@ static void snd_ca0106_proc_iec958(snd_info_entry_t *entry,
snd_iprintf(buffer, "\n"); snd_iprintf(buffer, "\n");
} }
static void snd_ca0106_proc_reg_write32(snd_info_entry_t *entry, static void snd_ca0106_proc_reg_write32(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
ca0106_t *emu = entry->private_data; struct snd_ca0106 *emu = entry->private_data;
unsigned long flags; unsigned long flags;
char line[64]; char line[64];
u32 reg, val; u32 reg, val;
...@@ -311,10 +311,10 @@ static void snd_ca0106_proc_reg_write32(snd_info_entry_t *entry, ...@@ -311,10 +311,10 @@ static void snd_ca0106_proc_reg_write32(snd_info_entry_t *entry,
} }
} }
static void snd_ca0106_proc_reg_read32(snd_info_entry_t *entry, static void snd_ca0106_proc_reg_read32(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
ca0106_t *emu = entry->private_data; struct snd_ca0106 *emu = entry->private_data;
unsigned long value; unsigned long value;
unsigned long flags; unsigned long flags;
int i; int i;
...@@ -327,10 +327,10 @@ static void snd_ca0106_proc_reg_read32(snd_info_entry_t *entry, ...@@ -327,10 +327,10 @@ static void snd_ca0106_proc_reg_read32(snd_info_entry_t *entry,
} }
} }
static void snd_ca0106_proc_reg_read16(snd_info_entry_t *entry, static void snd_ca0106_proc_reg_read16(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
ca0106_t *emu = entry->private_data; struct snd_ca0106 *emu = entry->private_data;
unsigned int value; unsigned int value;
unsigned long flags; unsigned long flags;
int i; int i;
...@@ -343,10 +343,10 @@ static void snd_ca0106_proc_reg_read16(snd_info_entry_t *entry, ...@@ -343,10 +343,10 @@ static void snd_ca0106_proc_reg_read16(snd_info_entry_t *entry,
} }
} }
static void snd_ca0106_proc_reg_read8(snd_info_entry_t *entry, static void snd_ca0106_proc_reg_read8(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
ca0106_t *emu = entry->private_data; struct snd_ca0106 *emu = entry->private_data;
unsigned int value; unsigned int value;
unsigned long flags; unsigned long flags;
int i; int i;
...@@ -359,10 +359,10 @@ static void snd_ca0106_proc_reg_read8(snd_info_entry_t *entry, ...@@ -359,10 +359,10 @@ static void snd_ca0106_proc_reg_read8(snd_info_entry_t *entry,
} }
} }
static void snd_ca0106_proc_reg_read1(snd_info_entry_t *entry, static void snd_ca0106_proc_reg_read1(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
ca0106_t *emu = entry->private_data; struct snd_ca0106 *emu = entry->private_data;
unsigned long value; unsigned long value;
int i,j; int i,j;
...@@ -377,10 +377,10 @@ static void snd_ca0106_proc_reg_read1(snd_info_entry_t *entry, ...@@ -377,10 +377,10 @@ static void snd_ca0106_proc_reg_read1(snd_info_entry_t *entry,
} }
} }
static void snd_ca0106_proc_reg_read2(snd_info_entry_t *entry, static void snd_ca0106_proc_reg_read2(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
ca0106_t *emu = entry->private_data; struct snd_ca0106 *emu = entry->private_data;
unsigned long value; unsigned long value;
int i,j; int i,j;
...@@ -395,10 +395,10 @@ static void snd_ca0106_proc_reg_read2(snd_info_entry_t *entry, ...@@ -395,10 +395,10 @@ static void snd_ca0106_proc_reg_read2(snd_info_entry_t *entry,
} }
} }
static void snd_ca0106_proc_reg_write(snd_info_entry_t *entry, static void snd_ca0106_proc_reg_write(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
ca0106_t *emu = entry->private_data; struct snd_ca0106 *emu = entry->private_data;
char line[64]; char line[64];
unsigned int reg, channel_id , val; unsigned int reg, channel_id , val;
while (!snd_info_get_line(buffer, line, sizeof(line))) { while (!snd_info_get_line(buffer, line, sizeof(line))) {
...@@ -409,10 +409,10 @@ static void snd_ca0106_proc_reg_write(snd_info_entry_t *entry, ...@@ -409,10 +409,10 @@ static void snd_ca0106_proc_reg_write(snd_info_entry_t *entry,
} }
} }
static void snd_ca0106_proc_i2c_write(snd_info_entry_t *entry, static void snd_ca0106_proc_i2c_write(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
ca0106_t *emu = entry->private_data; struct snd_ca0106 *emu = entry->private_data;
char line[64]; char line[64];
unsigned int reg, val; unsigned int reg, val;
while (!snd_info_get_line(buffer, line, sizeof(line))) { while (!snd_info_get_line(buffer, line, sizeof(line))) {
...@@ -424,9 +424,9 @@ static void snd_ca0106_proc_i2c_write(snd_info_entry_t *entry, ...@@ -424,9 +424,9 @@ static void snd_ca0106_proc_i2c_write(snd_info_entry_t *entry,
} }
} }
int __devinit snd_ca0106_proc_init(ca0106_t * emu) int __devinit snd_ca0106_proc_init(struct snd_ca0106 * emu)
{ {
snd_info_entry_t *entry; struct snd_info_entry *entry;
if(! snd_card_proc_new(emu->card, "iec958", &entry)) if(! snd_card_proc_new(emu->card, "iec958", &entry))
snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_iec958); snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_iec958);
......
...@@ -40,18 +40,20 @@ ...@@ -40,18 +40,20 @@
#define ca_midi_input_avail(midi) (!(ca_midi_read_stat(midi) & midi->input_avail)) #define ca_midi_input_avail(midi) (!(ca_midi_read_stat(midi) & midi->input_avail))
#define ca_midi_output_ready(midi) (!(ca_midi_read_stat(midi) & midi->output_ready)) #define ca_midi_output_ready(midi) (!(ca_midi_read_stat(midi) & midi->output_ready))
static void ca_midi_clear_rx(ca_midi_t *midi) static void ca_midi_clear_rx(struct snd_ca_midi *midi)
{ {
int timeout = 100000; int timeout = 100000;
for (; timeout > 0 && ca_midi_input_avail(midi); timeout--) for (; timeout > 0 && ca_midi_input_avail(midi); timeout--)
ca_midi_read_data(midi); ca_midi_read_data(midi);
#ifdef CONFIG_SND_DEBUG #ifdef CONFIG_SND_DEBUG
if (timeout <= 0) if (timeout <= 0)
snd_printk(KERN_ERR "ca_midi_clear_rx: timeout (status = 0x%x)\n", ca_midi_read_stat(midi)); snd_printk(KERN_ERR "ca_midi_clear_rx: timeout (status = 0x%x)\n",
ca_midi_read_stat(midi));
#endif #endif
} }
static void ca_midi_interrupt(ca_midi_t *midi, unsigned int status) { static void ca_midi_interrupt(struct snd_ca_midi *midi, unsigned int status)
{
unsigned char byte; unsigned char byte;
if (midi->rmidi == NULL) { if (midi->rmidi == NULL) {
...@@ -86,7 +88,7 @@ static void ca_midi_interrupt(ca_midi_t *midi, unsigned int status) { ...@@ -86,7 +88,7 @@ static void ca_midi_interrupt(ca_midi_t *midi, unsigned int status) {
} }
static void ca_midi_cmd(ca_midi_t *midi, unsigned char cmd, int ack) static void ca_midi_cmd(struct snd_ca_midi *midi, unsigned char cmd, int ack)
{ {
unsigned long flags; unsigned long flags;
int timeout, ok; int timeout, ok;
...@@ -119,9 +121,9 @@ static void ca_midi_cmd(ca_midi_t *midi, unsigned char cmd, int ack) ...@@ -119,9 +121,9 @@ static void ca_midi_cmd(ca_midi_t *midi, unsigned char cmd, int ack)
ca_midi_read_data(midi)); ca_midi_read_data(midi));
} }
static int ca_midi_input_open(snd_rawmidi_substream_t * substream) static int ca_midi_input_open(struct snd_rawmidi_substream *substream)
{ {
ca_midi_t *midi = (ca_midi_t *)substream->rmidi->private_data; struct snd_ca_midi *midi = substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
snd_assert(midi->dev_id, return -ENXIO); snd_assert(midi->dev_id, return -ENXIO);
...@@ -138,9 +140,9 @@ static int ca_midi_input_open(snd_rawmidi_substream_t * substream) ...@@ -138,9 +140,9 @@ static int ca_midi_input_open(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static int ca_midi_output_open(snd_rawmidi_substream_t * substream) static int ca_midi_output_open(struct snd_rawmidi_substream *substream)
{ {
ca_midi_t *midi = (ca_midi_t *)substream->rmidi->private_data; struct snd_ca_midi *midi = substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
snd_assert(midi->dev_id, return -ENXIO); snd_assert(midi->dev_id, return -ENXIO);
...@@ -157,9 +159,9 @@ static int ca_midi_output_open(snd_rawmidi_substream_t * substream) ...@@ -157,9 +159,9 @@ static int ca_midi_output_open(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static int ca_midi_input_close(snd_rawmidi_substream_t * substream) static int ca_midi_input_close(struct snd_rawmidi_substream *substream)
{ {
ca_midi_t *midi = (ca_midi_t *)substream->rmidi->private_data; struct snd_ca_midi *midi = substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
snd_assert(midi->dev_id, return -ENXIO); snd_assert(midi->dev_id, return -ENXIO);
...@@ -176,9 +178,9 @@ static int ca_midi_input_close(snd_rawmidi_substream_t * substream) ...@@ -176,9 +178,9 @@ static int ca_midi_input_close(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static int ca_midi_output_close(snd_rawmidi_substream_t * substream) static int ca_midi_output_close(struct snd_rawmidi_substream *substream)
{ {
ca_midi_t *midi = (ca_midi_t *)substream->rmidi->private_data; struct snd_ca_midi *midi = substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
snd_assert(midi->dev_id, return -ENXIO); snd_assert(midi->dev_id, return -ENXIO);
...@@ -197,9 +199,9 @@ static int ca_midi_output_close(snd_rawmidi_substream_t * substream) ...@@ -197,9 +199,9 @@ static int ca_midi_output_close(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static void ca_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) static void ca_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
{ {
ca_midi_t *midi = (ca_midi_t *)substream->rmidi->private_data; struct snd_ca_midi *midi = substream->rmidi->private_data;
snd_assert(midi->dev_id, return); snd_assert(midi->dev_id, return);
if (up) { if (up) {
...@@ -209,9 +211,9 @@ static void ca_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) ...@@ -209,9 +211,9 @@ static void ca_midi_input_trigger(snd_rawmidi_substream_t * substream, int up)
} }
} }
static void ca_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) static void ca_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
{ {
ca_midi_t *midi = (ca_midi_t *)substream->rmidi->private_data; struct snd_ca_midi *midi = substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
snd_assert(midi->dev_id, return); snd_assert(midi->dev_id, return);
...@@ -246,21 +248,22 @@ static void ca_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) ...@@ -246,21 +248,22 @@ static void ca_midi_output_trigger(snd_rawmidi_substream_t * substream, int up)
} }
} }
static snd_rawmidi_ops_t ca_midi_output = static struct snd_rawmidi_ops ca_midi_output =
{ {
.open = ca_midi_output_open, .open = ca_midi_output_open,
.close = ca_midi_output_close, .close = ca_midi_output_close,
.trigger = ca_midi_output_trigger, .trigger = ca_midi_output_trigger,
}; };
static snd_rawmidi_ops_t ca_midi_input = static struct snd_rawmidi_ops ca_midi_input =
{ {
.open = ca_midi_input_open, .open = ca_midi_input_open,
.close = ca_midi_input_close, .close = ca_midi_input_close,
.trigger = ca_midi_input_trigger, .trigger = ca_midi_input_trigger,
}; };
static void ca_midi_free(ca_midi_t *midi) { static void ca_midi_free(struct snd_ca_midi *midi)
{
midi->interrupt = NULL; midi->interrupt = NULL;
midi->interrupt_enable = NULL; midi->interrupt_enable = NULL;
midi->interrupt_disable = NULL; midi->interrupt_disable = NULL;
...@@ -271,14 +274,14 @@ static void ca_midi_free(ca_midi_t *midi) { ...@@ -271,14 +274,14 @@ static void ca_midi_free(ca_midi_t *midi) {
midi->rmidi = NULL; midi->rmidi = NULL;
} }
static void ca_rmidi_free(snd_rawmidi_t *rmidi) static void ca_rmidi_free(struct snd_rawmidi *rmidi)
{ {
ca_midi_free((ca_midi_t *)rmidi->private_data); ca_midi_free(rmidi->private_data);
} }
int __devinit ca_midi_init(void *dev_id, ca_midi_t *midi, int device, char *name) int __devinit ca_midi_init(void *dev_id, struct snd_ca_midi *midi, int device, char *name)
{ {
snd_rawmidi_t *rmidi; struct snd_rawmidi *rmidi;
int err; int err;
if ((err = snd_rawmidi_new(midi->get_dev_id_card(midi->dev_id), name, device, 1, 1, &rmidi)) < 0) if ((err = snd_rawmidi_new(midi->get_dev_id_card(midi->dev_id), name, device, 1, 1, &rmidi)) < 0)
......
...@@ -29,12 +29,11 @@ ...@@ -29,12 +29,11 @@
#define CA_MIDI_MODE_INPUT MPU401_MODE_INPUT #define CA_MIDI_MODE_INPUT MPU401_MODE_INPUT
#define CA_MIDI_MODE_OUTPUT MPU401_MODE_OUTPUT #define CA_MIDI_MODE_OUTPUT MPU401_MODE_OUTPUT
typedef struct ca_midi ca_midi_t; struct snd_ca_midi {
struct ca_midi {
snd_rawmidi_t *rmidi; struct snd_rawmidi *rmidi;
snd_rawmidi_substream_t *substream_input; struct snd_rawmidi_substream *substream_input;
snd_rawmidi_substream_t *substream_output; struct snd_rawmidi_substream *substream_output;
void *dev_id; void *dev_id;
...@@ -52,18 +51,16 @@ struct ca_midi { ...@@ -52,18 +51,16 @@ struct ca_midi {
int input_avail, output_ready; int input_avail, output_ready;
int ack, reset, enter_uart; int ack, reset, enter_uart;
void (*interrupt)(ca_midi_t *midi, unsigned int status); void (*interrupt)(struct snd_ca_midi *midi, unsigned int status);
void (*interrupt_enable)(ca_midi_t *midi, int intr); void (*interrupt_enable)(struct snd_ca_midi *midi, int intr);
void (*interrupt_disable)(ca_midi_t *midi, int intr); void (*interrupt_disable)(struct snd_ca_midi *midi, int intr);
unsigned char (*read)(ca_midi_t *midi, int idx); unsigned char (*read)(struct snd_ca_midi *midi, int idx);
void (*write)(ca_midi_t *midi, int data, int idx); void (*write)(struct snd_ca_midi *midi, int data, int idx);
/* get info from dev_id */ /* get info from dev_id */
snd_card_t *(*get_dev_id_card)(void *dev_id); struct snd_card *(*get_dev_id_card)(void *dev_id);
int (*get_dev_id_port)(void *dev_id); int (*get_dev_id_port)(void *dev_id);
}; };
int __devinit ca_midi_init(void *card, ca_midi_t *midi, int device, char *name); int ca_midi_init(void *card, struct snd_ca_midi *midi, int device, char *name);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment