提交 af26367f 编写于 作者: T Takashi Iwai 提交者: Jaroslav Kysela

[ALSA] Remove xxx_t typedefs: VXdriver

Remove xxx_t typedefs from the VXdriver codes
(vx_core support, vx222 and vxpocket).
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 9f38945f
......@@ -36,9 +36,6 @@
struct firmware;
struct device;
typedef struct snd_vx_core vx_core_t;
typedef struct vx_pipe vx_pipe_t;
#define VX_DRIVER_VERSION 0x010000 /* 1.0.0 */
/*
......@@ -76,7 +73,7 @@ struct vx_pipe {
int channels;
unsigned int differed_type;
pcx_time_t pcx_time;
snd_pcm_substream_t *substream;
struct snd_pcm_substream *substream;
int hbuf_size; /* H-buffer size in bytes */
int buffer_bytes; /* the ALSA pcm buffer size in bytes */
......@@ -88,36 +85,38 @@ struct vx_pipe {
u64 cur_count; /* current sample position (for playback) */
unsigned int references; /* an output pipe may be used for monitoring and/or playback */
vx_pipe_t *monitoring_pipe; /* pointer to the monitoring pipe (capture pipe only)*/
struct vx_pipe *monitoring_pipe; /* pointer to the monitoring pipe (capture pipe only)*/
struct tasklet_struct start_tq;
};
struct vx_core;
struct snd_vx_ops {
/* low-level i/o */
unsigned char (*in8)(vx_core_t *chip, int reg);
unsigned int (*in32)(vx_core_t *chip, int reg);
void (*out8)(vx_core_t *chip, int reg, unsigned char val);
void (*out32)(vx_core_t *chip, int reg, unsigned int val);
unsigned char (*in8)(struct vx_core *chip, int reg);
unsigned int (*in32)(struct vx_core *chip, int reg);
void (*out8)(struct vx_core *chip, int reg, unsigned char val);
void (*out32)(struct vx_core *chip, int reg, unsigned int val);
/* irq */
int (*test_and_ack)(vx_core_t *chip);
void (*validate_irq)(vx_core_t *chip, int enable);
int (*test_and_ack)(struct vx_core *chip);
void (*validate_irq)(struct vx_core *chip, int enable);
/* codec */
void (*write_codec)(vx_core_t *chip, int codec, unsigned int data);
void (*akm_write)(vx_core_t *chip, int reg, unsigned int data);
void (*reset_codec)(vx_core_t *chip);
void (*change_audio_source)(vx_core_t *chip, int src);
void (*set_clock_source)(vx_core_t *chp, int src);
void (*write_codec)(struct vx_core *chip, int codec, unsigned int data);
void (*akm_write)(struct vx_core *chip, int reg, unsigned int data);
void (*reset_codec)(struct vx_core *chip);
void (*change_audio_source)(struct vx_core *chip, int src);
void (*set_clock_source)(struct vx_core *chp, int src);
/* chip init */
int (*load_dsp)(vx_core_t *chip, int idx, const struct firmware *fw);
void (*reset_dsp)(vx_core_t *chip);
void (*reset_board)(vx_core_t *chip, int cold_reset);
int (*add_controls)(vx_core_t *chip);
int (*load_dsp)(struct vx_core *chip, int idx, const struct firmware *fw);
void (*reset_dsp)(struct vx_core *chip);
void (*reset_board)(struct vx_core *chip, int cold_reset);
int (*add_controls)(struct vx_core *chip);
/* pcm */
void (*dma_write)(vx_core_t *chip, snd_pcm_runtime_t *runtime,
vx_pipe_t *pipe, int count);
void (*dma_read)(vx_core_t *chip, snd_pcm_runtime_t *runtime,
vx_pipe_t *pipe, int count);
void (*dma_write)(struct vx_core *chip, struct snd_pcm_runtime *runtime,
struct vx_pipe *pipe, int count);
void (*dma_read)(struct vx_core *chip, struct snd_pcm_runtime *runtime,
struct vx_pipe *pipe, int count);
};
struct snd_vx_hardware {
......@@ -158,10 +157,10 @@ enum {
/* min/max values for analog output for old codecs */
#define VX_ANALOG_OUT_LEVEL_MAX 0xe3
struct snd_vx_core {
struct vx_core {
/* ALSA stuff */
snd_card_t *card;
snd_pcm_t *pcm[VX_MAX_CODECS];
struct snd_card *card;
struct snd_pcm *pcm[VX_MAX_CODECS];
int type; /* VX_TYPE_XXX */
int irq;
......@@ -179,7 +178,7 @@ struct snd_vx_core {
unsigned int pcm_running;
struct device *dev;
snd_hwdep_t *hwdep;
struct snd_hwdep *hwdep;
struct vx_rmh irq_rmh; /* RMH used in interrupts */
......@@ -216,14 +215,14 @@ struct snd_vx_core {
/*
* constructor
*/
vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw,
struct snd_vx_ops *ops, int extra_size);
int snd_vx_setup_firmware(vx_core_t *chip);
int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *dsp);
int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *dsp);
int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp);
struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw,
struct snd_vx_ops *ops, int extra_size);
int snd_vx_setup_firmware(struct vx_core *chip);
int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *dsp);
int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *dsp);
int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp);
void snd_vx_free_firmware(vx_core_t *chip);
void snd_vx_free_firmware(struct vx_core *chip);
/*
* interrupt handler; exported for pcmcia
......@@ -233,37 +232,37 @@ irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs);
/*
* lowlevel functions
*/
static inline int vx_test_and_ack(vx_core_t *chip)
static inline int vx_test_and_ack(struct vx_core *chip)
{
snd_assert(chip->ops->test_and_ack, return -ENXIO);
return chip->ops->test_and_ack(chip);
}
static inline void vx_validate_irq(vx_core_t *chip, int enable)
static inline void vx_validate_irq(struct vx_core *chip, int enable)
{
snd_assert(chip->ops->validate_irq, return);
chip->ops->validate_irq(chip, enable);
}
static inline unsigned char snd_vx_inb(vx_core_t *chip, int reg)
static inline unsigned char snd_vx_inb(struct vx_core *chip, int reg)
{
snd_assert(chip->ops->in8, return 0);
return chip->ops->in8(chip, reg);
}
static inline unsigned int snd_vx_inl(vx_core_t *chip, int reg)
static inline unsigned int snd_vx_inl(struct vx_core *chip, int reg)
{
snd_assert(chip->ops->in32, return 0);
return chip->ops->in32(chip, reg);
}
static inline void snd_vx_outb(vx_core_t *chip, int reg, unsigned char val)
static inline void snd_vx_outb(struct vx_core *chip, int reg, unsigned char val)
{
snd_assert(chip->ops->out8, return);
chip->ops->out8(chip, reg, val);
}
static inline void snd_vx_outl(vx_core_t *chip, int reg, unsigned int val)
static inline void snd_vx_outl(struct vx_core *chip, int reg, unsigned int val)
{
snd_assert(chip->ops->out32, return);
chip->ops->out32(chip, reg, val);
......@@ -274,25 +273,25 @@ static inline void snd_vx_outl(vx_core_t *chip, int reg, unsigned int val)
#define vx_inl(chip,reg) snd_vx_inl(chip, VX_##reg)
#define vx_outl(chip,reg,val) snd_vx_outl(chip, VX_##reg,val)
static inline void vx_reset_dsp(vx_core_t *chip)
static inline void vx_reset_dsp(struct vx_core *chip)
{
snd_assert(chip->ops->reset_dsp, return);
chip->ops->reset_dsp(chip);
}
int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh);
int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh);
int vx_send_rih(vx_core_t *chip, int cmd);
int vx_send_rih_nolock(vx_core_t *chip, int cmd);
int vx_send_msg(struct vx_core *chip, struct vx_rmh *rmh);
int vx_send_msg_nolock(struct vx_core *chip, struct vx_rmh *rmh);
int vx_send_rih(struct vx_core *chip, int cmd);
int vx_send_rih_nolock(struct vx_core *chip, int cmd);
void vx_reset_codec(vx_core_t *chip, int cold_reset);
void vx_reset_codec(struct vx_core *chip, int cold_reset);
/*
* check the bit on the specified register
* returns zero if a bit matches, or a negative error code.
* exported for vxpocket driver
*/
int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time);
int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time);
#define vx_check_isr(chip,mask,bit,time) snd_vx_check_reg_bit(chip, VX_ISR, mask, bit, time)
#define vx_wait_isr_bit(chip,bit) vx_check_isr(chip, bit, bit, 200)
#define vx_wait_for_rx_full(chip) vx_wait_isr_bit(chip, ISR_RX_FULL)
......@@ -301,15 +300,15 @@ int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time);
/*
* pseudo-DMA transfer
*/
static inline void vx_pseudo_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
vx_pipe_t *pipe, int count)
static inline void vx_pseudo_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
struct vx_pipe *pipe, int count)
{
snd_assert(chip->ops->dma_write, return);
chip->ops->dma_write(chip, runtime, pipe, count);
}
static inline void vx_pseudo_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
vx_pipe_t *pipe, int count)
static inline void vx_pseudo_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
struct vx_pipe *pipe, int count)
{
snd_assert(chip->ops->dma_read, return);
chip->ops->dma_read(chip, runtime, pipe, count);
......@@ -327,24 +326,24 @@ static inline void vx_pseudo_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtim
/*
* pcm stuff
*/
int snd_vx_pcm_new(vx_core_t *chip);
void vx_pcm_update_intr(vx_core_t *chip, unsigned int events);
int snd_vx_pcm_new(struct vx_core *chip);
void vx_pcm_update_intr(struct vx_core *chip, unsigned int events);
/*
* mixer stuff
*/
int snd_vx_mixer_new(vx_core_t *chip);
void vx_toggle_dac_mute(vx_core_t *chip, int mute);
int vx_sync_audio_source(vx_core_t *chip);
int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active);
int snd_vx_mixer_new(struct vx_core *chip);
void vx_toggle_dac_mute(struct vx_core *chip, int mute);
int vx_sync_audio_source(struct vx_core *chip);
int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active);
/*
* IEC958 & clock stuff
*/
void vx_set_iec958_status(vx_core_t *chip, unsigned int bits);
int vx_set_clock(vx_core_t *chip, unsigned int freq);
void vx_set_internal_clock(vx_core_t *chip, unsigned int freq);
int vx_change_frequency(vx_core_t *chip);
void vx_set_iec958_status(struct vx_core *chip, unsigned int bits);
int vx_set_clock(struct vx_core *chip, unsigned int freq);
void vx_set_internal_clock(struct vx_core *chip, unsigned int freq);
int vx_change_frequency(struct vx_core *chip);
/*
......
......@@ -49,7 +49,7 @@ MODULE_LICENSE("GPL");
*
* returns zero if a bit matches, or a negative error code.
*/
int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time)
int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time)
{
unsigned long end_time = jiffies + (time * HZ + 999) / 1000;
#ifdef CONFIG_SND_DEBUG
......@@ -78,7 +78,7 @@ int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time)
* returns 0 if successful, or a negative error code.
*
*/
static int vx_send_irq_dsp(vx_core_t *chip, int num)
static int vx_send_irq_dsp(struct vx_core *chip, int num)
{
int nirq;
......@@ -99,7 +99,7 @@ static int vx_send_irq_dsp(vx_core_t *chip, int num)
*
* returns 0 if successful, or a negative error code.
*/
static int vx_reset_chk(vx_core_t *chip)
static int vx_reset_chk(struct vx_core *chip)
{
/* Reset irq CHK */
if (vx_send_irq_dsp(chip, IRQ_RESET_CHK) < 0)
......@@ -118,7 +118,7 @@ static int vx_reset_chk(vx_core_t *chip)
* the error code can be VX-specific, retrieved via vx_get_error().
* NB: call with spinlock held!
*/
static int vx_transfer_end(vx_core_t *chip, int cmd)
static int vx_transfer_end(struct vx_core *chip, int cmd)
{
int err;
......@@ -156,7 +156,7 @@ static int vx_transfer_end(vx_core_t *chip, int cmd)
* the error code can be VX-specific, retrieved via vx_get_error().
* NB: call with spinlock held!
*/
static int vx_read_status(vx_core_t *chip, struct vx_rmh *rmh)
static int vx_read_status(struct vx_core *chip, struct vx_rmh *rmh)
{
int i, err, val, size;
......@@ -236,7 +236,7 @@ static int vx_read_status(vx_core_t *chip, struct vx_rmh *rmh)
*
* this function doesn't call spinlock at all.
*/
int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh)
int vx_send_msg_nolock(struct vx_core *chip, struct vx_rmh *rmh)
{
int i, err;
......@@ -341,7 +341,7 @@ int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh)
* returns 0 if successful, or a negative error code.
* see vx_send_msg_nolock().
*/
int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh)
int vx_send_msg(struct vx_core *chip, struct vx_rmh *rmh)
{
unsigned long flags;
int err;
......@@ -364,7 +364,7 @@ int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh)
*
* unlike RMH, no command is sent to DSP.
*/
int vx_send_rih_nolock(vx_core_t *chip, int cmd)
int vx_send_rih_nolock(struct vx_core *chip, int cmd)
{
int err;
......@@ -401,7 +401,7 @@ int vx_send_rih_nolock(vx_core_t *chip, int cmd)
*
* see vx_send_rih_nolock().
*/
int vx_send_rih(vx_core_t *chip, int cmd)
int vx_send_rih(struct vx_core *chip, int cmd)
{
unsigned long flags;
int err;
......@@ -418,7 +418,7 @@ int vx_send_rih(vx_core_t *chip, int cmd)
* snd_vx_boot_xilinx - boot up the xilinx interface
* @boot: the boot record to load
*/
int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *boot)
int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *boot)
{
unsigned int i;
int no_fillup = vx_has_new_dsp(chip);
......@@ -470,7 +470,7 @@ int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *boot)
*
* called from irq handler only
*/
static int vx_test_irq_src(vx_core_t *chip, unsigned int *ret)
static int vx_test_irq_src(struct vx_core *chip, unsigned int *ret)
{
int err;
......@@ -491,7 +491,7 @@ static int vx_test_irq_src(vx_core_t *chip, unsigned int *ret)
*/
static void vx_interrupt(unsigned long private_data)
{
vx_core_t *chip = (vx_core_t *) private_data;
struct vx_core *chip = (struct vx_core *) private_data;
unsigned int events;
if (chip->chip_status & VX_STAT_IS_STALE)
......@@ -535,7 +535,7 @@ static void vx_interrupt(unsigned long private_data)
*/
irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs)
{
vx_core_t *chip = dev;
struct vx_core *chip = dev;
if (! (chip->chip_status & VX_STAT_CHIP_INIT) ||
(chip->chip_status & VX_STAT_IS_STALE))
......@@ -548,7 +548,7 @@ irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs)
/*
*/
static void vx_reset_board(vx_core_t *chip, int cold_reset)
static void vx_reset_board(struct vx_core *chip, int cold_reset)
{
snd_assert(chip->ops->reset_board, return);
......@@ -587,9 +587,9 @@ static void vx_reset_board(vx_core_t *chip, int cold_reset)
* proc interface
*/
static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
static void vx_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{
vx_core_t *chip = entry->private_data;
struct vx_core *chip = entry->private_data;
static char *audio_src_vxp[] = { "Line", "Mic", "Digital" };
static char *audio_src_vx2[] = { "Analog", "Analog", "Digital" };
static char *clock_mode[] = { "Auto", "Internal", "External" };
......@@ -630,9 +630,9 @@ static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
chip->ibl.granularity);
}
static void vx_proc_init(vx_core_t *chip)
static void vx_proc_init(struct vx_core *chip)
{
snd_info_entry_t *entry;
struct snd_info_entry *entry;
if (! snd_card_proc_new(chip->card, "vx-status", &entry))
snd_info_set_text_ops(entry, chip, 1024, vx_proc_read);
......@@ -642,7 +642,7 @@ static void vx_proc_init(vx_core_t *chip)
/**
* snd_vx_dsp_boot - load the DSP boot
*/
int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *boot)
int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *boot)
{
int err;
int cold_reset = !(chip->chip_status & VX_STAT_DEVICE_INIT);
......@@ -660,7 +660,7 @@ int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *boot)
/**
* snd_vx_dsp_load - load the DSP image
*/
int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp)
int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp)
{
unsigned int i;
int err;
......@@ -709,9 +709,9 @@ int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp)
/*
* suspend
*/
static int snd_vx_suspend(snd_card_t *card, pm_message_t state)
static int snd_vx_suspend(struct snd_card *card, pm_message_t state)
{
vx_core_t *chip = card->pm_private_data;
struct vx_core *chip = card->pm_private_data;
unsigned int i;
snd_assert(chip, return -EINVAL);
......@@ -726,9 +726,9 @@ static int snd_vx_suspend(snd_card_t *card, pm_message_t state)
/*
* resume
*/
static int snd_vx_resume(snd_card_t *card)
static int snd_vx_resume(struct snd_card *card)
{
vx_core_t *chip = card->pm_private_data;
struct vx_core *chip = card->pm_private_data;
int i, err;
snd_assert(chip, return -EINVAL);
......@@ -754,7 +754,7 @@ static int snd_vx_resume(snd_card_t *card)
#endif
/**
* snd_vx_create - constructor for vx_core_t
* snd_vx_create - constructor for struct vx_core
* @hw: hardware specific record
*
* this function allocates the instance and prepare for the hardware
......@@ -762,11 +762,11 @@ static int snd_vx_resume(snd_card_t *card)
*
* return the instance pointer if successful, NULL in error.
*/
vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw,
struct snd_vx_ops *ops,
int extra_size)
struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw,
struct snd_vx_ops *ops,
int extra_size)
{
vx_core_t *chip;
struct vx_core *chip;
snd_assert(card && hw && ops, return NULL);
......
......@@ -30,7 +30,7 @@
#ifdef SND_VX_FW_LOADER
int snd_vx_setup_firmware(vx_core_t *chip)
int snd_vx_setup_firmware(struct vx_core *chip)
{
static char *fw_files[VX_TYPE_NUMS][4] = {
[VX_TYPE_BOARD] = {
......@@ -95,7 +95,7 @@ int snd_vx_setup_firmware(vx_core_t *chip)
}
/* exported */
void snd_vx_free_firmware(vx_core_t *chip)
void snd_vx_free_firmware(struct vx_core *chip)
{
#ifdef CONFIG_PM
int i;
......@@ -106,17 +106,18 @@ void snd_vx_free_firmware(vx_core_t *chip)
#else /* old style firmware loading */
static int vx_hwdep_open(snd_hwdep_t *hw, struct file *file)
static int vx_hwdep_open(struct snd_hwdep *hw, struct file *file)
{
return 0;
}
static int vx_hwdep_release(snd_hwdep_t *hw, struct file *file)
static int vx_hwdep_release(struct snd_hwdep *hw, struct file *file)
{
return 0;
}
static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info)
static int vx_hwdep_dsp_status(struct snd_hwdep *hw,
struct snd_hwdep_dsp_status *info)
{
static char *type_ids[VX_TYPE_NUMS] = {
[VX_TYPE_BOARD] = "vxboard",
......@@ -125,7 +126,7 @@ static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info)
[VX_TYPE_VXPOCKET] = "vxpocket",
[VX_TYPE_VXP440] = "vxp440",
};
vx_core_t *vx = hw->private_data;
struct vx_core *vx = hw->private_data;
snd_assert(type_ids[vx->type], return -EINVAL);
strcpy(info->id, type_ids[vx->type]);
......@@ -147,9 +148,10 @@ static void free_fw(const struct firmware *fw)
}
}
static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
static int vx_hwdep_dsp_load(struct snd_hwdep *hw,
struct snd_hwdep_dsp_image *dsp)
{
vx_core_t *vx = hw->private_data;
struct vx_core *vx = hw->private_data;
int index, err;
struct firmware *fw;
......@@ -216,10 +218,10 @@ static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
/* exported */
int snd_vx_setup_firmware(vx_core_t *chip)
int snd_vx_setup_firmware(struct vx_core *chip)
{
int err;
snd_hwdep_t *hw;
struct snd_hwdep *hw;
if ((err = snd_hwdep_new(chip->card, SND_VX_HWDEP_ID, 0, &hw)) < 0)
return err;
......@@ -238,7 +240,7 @@ int snd_vx_setup_firmware(vx_core_t *chip)
}
/* exported */
void snd_vx_free_firmware(vx_core_t *chip)
void snd_vx_free_firmware(struct vx_core *chip)
{
#ifdef CONFIG_PM
int i;
......
此差异已折叠。
此差异已折叠。
......@@ -31,7 +31,7 @@
* vx_modify_board_clock - tell the board that its clock has been modified
* @sync: DSP needs to resynchronize its FIFO
*/
static int vx_modify_board_clock(vx_core_t *chip, int sync)
static int vx_modify_board_clock(struct vx_core *chip, int sync)
{
struct vx_rmh rmh;
......@@ -45,7 +45,7 @@ static int vx_modify_board_clock(vx_core_t *chip, int sync)
/*
* vx_modify_board_inputs - resync audio inputs
*/
static int vx_modify_board_inputs(vx_core_t *chip)
static int vx_modify_board_inputs(struct vx_core *chip)
{
struct vx_rmh rmh;
......@@ -59,7 +59,7 @@ static int vx_modify_board_inputs(vx_core_t *chip)
* @index: the bit index
* returns 0 or 1.
*/
static int vx_read_one_cbit(vx_core_t *chip, int index)
static int vx_read_one_cbit(struct vx_core *chip, int index)
{
unsigned long flags;
int val;
......@@ -82,7 +82,7 @@ static int vx_read_one_cbit(vx_core_t *chip, int index)
* @index: the bit index
* @val: bit value, 0 or 1
*/
static void vx_write_one_cbit(vx_core_t *chip, int index, int val)
static void vx_write_one_cbit(struct vx_core *chip, int index, int val)
{
unsigned long flags;
val = !!val; /* 0 or 1 */
......@@ -104,7 +104,7 @@ static void vx_write_one_cbit(vx_core_t *chip, int index, int val)
* returns the frequency of UER, or 0 if not sync,
* or a negative error code.
*/
static int vx_read_uer_status(vx_core_t *chip, int *mode)
static int vx_read_uer_status(struct vx_core *chip, int *mode)
{
int val, freq;
......@@ -160,7 +160,7 @@ static int vx_read_uer_status(vx_core_t *chip, int *mode)
* default : HexFreq = (dword) ((double) 28224000 / (double) (Frequency*4)) - 0x000001FF
*/
static int vx_calc_clock_from_freq(vx_core_t *chip, int freq)
static int vx_calc_clock_from_freq(struct vx_core *chip, int freq)
{
int hexfreq;
......@@ -187,7 +187,7 @@ static int vx_calc_clock_from_freq(vx_core_t *chip, int freq)
* vx_change_clock_source - change the clock source
* @source: the new source
*/
static void vx_change_clock_source(vx_core_t *chip, int source)
static void vx_change_clock_source(struct vx_core *chip, int source)
{
unsigned long flags;
......@@ -205,7 +205,7 @@ static void vx_change_clock_source(vx_core_t *chip, int source)
/*
* set the internal clock
*/
void vx_set_internal_clock(vx_core_t *chip, unsigned int freq)
void vx_set_internal_clock(struct vx_core *chip, unsigned int freq)
{
int clock;
unsigned long flags;
......@@ -228,7 +228,7 @@ void vx_set_internal_clock(vx_core_t *chip, unsigned int freq)
* set the iec958 status bits
* @bits: 32-bit status bits
*/
void vx_set_iec958_status(vx_core_t *chip, unsigned int bits)
void vx_set_iec958_status(struct vx_core *chip, unsigned int bits)
{
int i;
......@@ -243,7 +243,7 @@ void vx_set_iec958_status(vx_core_t *chip, unsigned int bits)
/*
* vx_set_clock - change the clock and audio source if necessary
*/
int vx_set_clock(vx_core_t *chip, unsigned int freq)
int vx_set_clock(struct vx_core *chip, unsigned int freq)
{
int src_changed = 0;
......@@ -285,7 +285,7 @@ int vx_set_clock(vx_core_t *chip, unsigned int freq)
/*
* vx_change_frequency - called from interrupt handler
*/
int vx_change_frequency(vx_core_t *chip)
int vx_change_frequency(struct vx_core *chip)
{
int freq;
......
......@@ -108,7 +108,7 @@ static struct snd_vx_hardware vx222_mic_hw = {
/*
*/
static int snd_vx222_free(vx_core_t *chip)
static int snd_vx222_free(struct vx_core *chip)
{
struct snd_vx222 *vx = (struct snd_vx222 *)chip;
......@@ -121,21 +121,21 @@ static int snd_vx222_free(vx_core_t *chip)
return 0;
}
static int snd_vx222_dev_free(snd_device_t *device)
static int snd_vx222_dev_free(struct snd_device *device)
{
vx_core_t *chip = device->device_data;
struct vx_core *chip = device->device_data;
return snd_vx222_free(chip);
}
static int __devinit snd_vx222_create(snd_card_t *card, struct pci_dev *pci,
static int __devinit snd_vx222_create(struct snd_card *card, struct pci_dev *pci,
struct snd_vx_hardware *hw,
struct snd_vx222 **rchip)
{
vx_core_t *chip;
struct vx_core *chip;
struct snd_vx222 *vx;
int i, err;
static snd_device_ops_t ops = {
static struct snd_device_ops ops = {
.dev_free = snd_vx222_dev_free,
};
struct snd_vx_ops *vx_ops;
......@@ -147,7 +147,7 @@ static int __devinit snd_vx222_create(snd_card_t *card, struct pci_dev *pci,
vx_ops = hw->type == VX_TYPE_BOARD ? &vx222_old_ops : &vx222_ops;
chip = snd_vx_create(card, hw, vx_ops,
sizeof(struct snd_vx222) - sizeof(vx_core_t));
sizeof(struct snd_vx222) - sizeof(struct vx_core));
if (! chip) {
pci_disable_device(pci);
return -ENOMEM;
......@@ -186,7 +186,7 @@ static int __devinit snd_vx222_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
static int dev;
snd_card_t *card;
struct snd_card *card;
struct snd_vx_hardware *hw;
struct snd_vx222 *vx;
int err;
......
......@@ -25,7 +25,7 @@
struct snd_vx222 {
vx_core_t core;
struct vx_core core;
/* h/w config; for PLX and for DSP */
struct pci_dev *pci;
......
......@@ -82,7 +82,7 @@ static int vx2_reg_index[VX_REG_MAX] = {
[VX_GPIOC] = 0, /* on the PLX */
};
static inline unsigned long vx2_reg_addr(vx_core_t *_chip, int reg)
static inline unsigned long vx2_reg_addr(struct vx_core *_chip, int reg)
{
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
return chip->port[vx2_reg_index[reg]] + vx2_reg_offset[reg];
......@@ -92,7 +92,7 @@ static inline unsigned long vx2_reg_addr(vx_core_t *_chip, int reg)
* snd_vx_inb - read a byte from the register
* @offset: register enum
*/
static unsigned char vx2_inb(vx_core_t *chip, int offset)
static unsigned char vx2_inb(struct vx_core *chip, int offset)
{
return inb(vx2_reg_addr(chip, offset));
}
......@@ -102,7 +102,7 @@ static unsigned char vx2_inb(vx_core_t *chip, int offset)
* @offset: the register offset
* @val: the value to write
*/
static void vx2_outb(vx_core_t *chip, int offset, unsigned char val)
static void vx2_outb(struct vx_core *chip, int offset, unsigned char val)
{
outb(val, vx2_reg_addr(chip, offset));
//printk("outb: %x -> %x\n", val, vx2_reg_addr(chip, offset));
......@@ -112,7 +112,7 @@ static void vx2_outb(vx_core_t *chip, int offset, unsigned char val)
* snd_vx_inl - read a 32bit word from the register
* @offset: register enum
*/
static unsigned int vx2_inl(vx_core_t *chip, int offset)
static unsigned int vx2_inl(struct vx_core *chip, int offset)
{
return inl(vx2_reg_addr(chip, offset));
}
......@@ -122,7 +122,7 @@ static unsigned int vx2_inl(vx_core_t *chip, int offset)
* @offset: the register enum
* @val: the value to write
*/
static void vx2_outl(vx_core_t *chip, int offset, unsigned int val)
static void vx2_outl(struct vx_core *chip, int offset, unsigned int val)
{
// printk("outl: %x -> %x\n", val, vx2_reg_addr(chip, offset));
outl(val, vx2_reg_addr(chip, offset));
......@@ -132,13 +132,13 @@ static void vx2_outl(vx_core_t *chip, int offset, unsigned int val)
* redefine macros to call directly
*/
#undef vx_inb
#define vx_inb(chip,reg) vx2_inb((vx_core_t*)(chip), VX_##reg)
#define vx_inb(chip,reg) vx2_inb((struct vx_core*)(chip), VX_##reg)
#undef vx_outb
#define vx_outb(chip,reg,val) vx2_outb((vx_core_t*)(chip), VX_##reg, val)
#define vx_outb(chip,reg,val) vx2_outb((struct vx_core*)(chip), VX_##reg, val)
#undef vx_inl
#define vx_inl(chip,reg) vx2_inl((vx_core_t*)(chip), VX_##reg)
#define vx_inl(chip,reg) vx2_inl((struct vx_core*)(chip), VX_##reg)
#undef vx_outl
#define vx_outl(chip,reg,val) vx2_outl((vx_core_t*)(chip), VX_##reg, val)
#define vx_outl(chip,reg,val) vx2_outl((struct vx_core*)(chip), VX_##reg, val)
/*
......@@ -147,7 +147,7 @@ static void vx2_outl(vx_core_t *chip, int offset, unsigned int val)
#define XX_DSP_RESET_WAIT_TIME 2 /* ms */
static void vx2_reset_dsp(vx_core_t *_chip)
static void vx2_reset_dsp(struct vx_core *_chip)
{
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
......@@ -162,7 +162,7 @@ static void vx2_reset_dsp(vx_core_t *_chip)
}
static int vx2_test_xilinx(vx_core_t *_chip)
static int vx2_test_xilinx(struct vx_core *_chip)
{
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
unsigned int data;
......@@ -219,7 +219,7 @@ static int vx2_test_xilinx(vx_core_t *_chip)
* vx_setup_pseudo_dma - set up the pseudo dma read/write mode.
* @do_write: 0 = read, 1 = set up for DMA write
*/
static void vx2_setup_pseudo_dma(vx_core_t *chip, int do_write)
static void vx2_setup_pseudo_dma(struct vx_core *chip, int do_write)
{
/* Interrupt mode and HREQ pin enabled for host transmit data transfers
* (in case of the use of the pseudo-dma facility).
......@@ -235,7 +235,7 @@ static void vx2_setup_pseudo_dma(vx_core_t *chip, int do_write)
/*
* vx_release_pseudo_dma - disable the pseudo-DMA mode
*/
static inline void vx2_release_pseudo_dma(vx_core_t *chip)
static inline void vx2_release_pseudo_dma(struct vx_core *chip)
{
/* HREQ pin disabled. */
vx_outl(chip, ICR, 0);
......@@ -244,8 +244,8 @@ static inline void vx2_release_pseudo_dma(vx_core_t *chip)
/* pseudo-dma write */
static void vx2_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
vx_pipe_t *pipe, int count)
static void vx2_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
struct vx_pipe *pipe, int count)
{
unsigned long port = vx2_reg_addr(chip, VX_DMA);
int offset = pipe->hw_ptr;
......@@ -282,8 +282,8 @@ static void vx2_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
/* pseudo dma read */
static void vx2_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
vx_pipe_t *pipe, int count)
static void vx2_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
struct vx_pipe *pipe, int count)
{
int offset = pipe->hw_ptr;
u32 *addr = (u32 *)(runtime->dma_area + offset);
......@@ -321,7 +321,7 @@ static void vx2_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
/*
* transfer counts bits to PLX
*/
static int put_xilinx_data(vx_core_t *chip, unsigned int port, unsigned int counts, unsigned char data)
static int put_xilinx_data(struct vx_core *chip, unsigned int port, unsigned int counts, unsigned char data)
{
unsigned int i;
......@@ -353,7 +353,7 @@ static int put_xilinx_data(vx_core_t *chip, unsigned int port, unsigned int coun
/*
* load the xilinx image
*/
static int vx2_load_xilinx_binary(vx_core_t *chip, const struct firmware *xilinx)
static int vx2_load_xilinx_binary(struct vx_core *chip, const struct firmware *xilinx)
{
unsigned int i;
unsigned int port;
......@@ -400,7 +400,7 @@ static int vx2_load_xilinx_binary(vx_core_t *chip, const struct firmware *xilinx
/*
* load the boot/dsp images
*/
static int vx2_load_dsp(vx_core_t *vx, int index, const struct firmware *dsp)
static int vx2_load_dsp(struct vx_core *vx, int index, const struct firmware *dsp)
{
int err;
......@@ -432,7 +432,7 @@ static int vx2_load_dsp(vx_core_t *vx, int index, const struct firmware *dsp)
*
* spinlock held!
*/
static int vx2_test_and_ack(vx_core_t *chip)
static int vx2_test_and_ack(struct vx_core *chip)
{
/* not booted yet? */
if (! (chip->chip_status & VX_STAT_XILINX_LOADED))
......@@ -463,7 +463,7 @@ static int vx2_test_and_ack(vx_core_t *chip)
/*
* vx_validate_irq - enable/disable IRQ
*/
static void vx2_validate_irq(vx_core_t *_chip, int enable)
static void vx2_validate_irq(struct vx_core *_chip, int enable)
{
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
......@@ -484,7 +484,7 @@ static void vx2_validate_irq(vx_core_t *_chip, int enable)
/*
* write an AKM codec data (24bit)
*/
static void vx2_write_codec_reg(vx_core_t *chip, unsigned int data)
static void vx2_write_codec_reg(struct vx_core *chip, unsigned int data)
{
unsigned int i;
......@@ -660,7 +660,7 @@ static const u8 vx2_akm_gains_lut[VX2_AKM_LEVEL_MAX+1] = {
/*
* pseudo-codec write entry
*/
static void vx2_write_akm(vx_core_t *chip, int reg, unsigned int data)
static void vx2_write_akm(struct vx_core *chip, int reg, unsigned int data)
{
unsigned int val;
......@@ -695,7 +695,7 @@ static void vx2_write_akm(vx_core_t *chip, int reg, unsigned int data)
/*
* write codec bit for old VX222 board
*/
static void vx2_old_write_codec_bit(vx_core_t *chip, int codec, unsigned int data)
static void vx2_old_write_codec_bit(struct vx_core *chip, int codec, unsigned int data)
{
int i;
......@@ -713,7 +713,7 @@ static void vx2_old_write_codec_bit(vx_core_t *chip, int codec, unsigned int dat
/*
* reset codec bit
*/
static void vx2_reset_codec(vx_core_t *_chip)
static void vx2_reset_codec(struct vx_core *_chip)
{
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
......@@ -755,7 +755,7 @@ static void vx2_reset_codec(vx_core_t *_chip)
/*
* change the audio source
*/
static void vx2_change_audio_source(vx_core_t *_chip, int src)
static void vx2_change_audio_source(struct vx_core *_chip, int src)
{
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
......@@ -774,7 +774,7 @@ static void vx2_change_audio_source(vx_core_t *_chip, int src)
/*
* set the clock source
*/
static void vx2_set_clock_source(vx_core_t *_chip, int source)
static void vx2_set_clock_source(struct vx_core *_chip, int source)
{
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
......@@ -788,7 +788,7 @@ static void vx2_set_clock_source(vx_core_t *_chip, int source)
/*
* reset the board
*/
static void vx2_reset_board(vx_core_t *_chip, int cold_reset)
static void vx2_reset_board(struct vx_core *_chip, int cold_reset)
{
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
......@@ -848,7 +848,7 @@ static void vx2_set_input_level(struct snd_vx222 *chip)
*/
/* input levels */
static int vx_input_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
static int vx_input_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
......@@ -857,9 +857,9 @@ static int vx_input_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *ui
return 0;
}
static int vx_input_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int vx_input_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
down(&_chip->mixer_mutex);
ucontrol->value.integer.value[0] = chip->input_level[0];
......@@ -868,9 +868,9 @@ static int vx_input_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
return 0;
}
static int vx_input_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int vx_input_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
down(&_chip->mixer_mutex);
if (chip->input_level[0] != ucontrol->value.integer.value[0] ||
......@@ -886,7 +886,7 @@ static int vx_input_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
}
/* mic level */
static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
static int vx_mic_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 1;
......@@ -895,17 +895,17 @@ static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
return 0;
}
static int vx_mic_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
ucontrol->value.integer.value[0] = chip->mic_level;
return 0;
}
static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
down(&_chip->mixer_mutex);
if (chip->mic_level != ucontrol->value.integer.value[0]) {
......@@ -918,7 +918,7 @@ static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
return 0;
}
static snd_kcontrol_new_t vx_control_input_level = {
static struct snd_kcontrol_new vx_control_input_level = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Capture Volume",
.info = vx_input_level_info,
......@@ -926,7 +926,7 @@ static snd_kcontrol_new_t vx_control_input_level = {
.put = vx_input_level_put,
};
static snd_kcontrol_new_t vx_control_mic_level = {
static struct snd_kcontrol_new vx_control_mic_level = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Mic Capture Volume",
.info = vx_mic_level_info,
......@@ -938,7 +938,7 @@ static snd_kcontrol_new_t vx_control_mic_level = {
* FIXME: compressor/limiter implementation is missing yet...
*/
static int vx2_add_mic_controls(vx_core_t *_chip)
static int vx2_add_mic_controls(struct vx_core *_chip)
{
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
int err;
......
......@@ -31,7 +31,7 @@
/*
* mic level control (for VXPocket)
*/
static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
static int vx_mic_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 1;
......@@ -40,17 +40,17 @@ static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
return 0;
}
static int vx_mic_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
ucontrol->value.integer.value[0] = chip->mic_level;
return 0;
}
static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
down(&_chip->mixer_mutex);
if (chip->mic_level != ucontrol->value.integer.value[0]) {
......@@ -63,7 +63,7 @@ static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
return 0;
}
static snd_kcontrol_new_t vx_control_mic_level = {
static struct snd_kcontrol_new vx_control_mic_level = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Mic Capture Volume",
.info = vx_mic_level_info,
......@@ -74,7 +74,7 @@ static snd_kcontrol_new_t vx_control_mic_level = {
/*
* mic boost level control (for VXP440)
*/
static int vx_mic_boost_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
static int vx_mic_boost_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1;
......@@ -83,17 +83,17 @@ static int vx_mic_boost_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
return 0;
}
static int vx_mic_boost_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int vx_mic_boost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
ucontrol->value.integer.value[0] = chip->mic_level;
return 0;
}
static int vx_mic_boost_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int vx_mic_boost_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
down(&_chip->mixer_mutex);
if (chip->mic_level != ucontrol->value.integer.value[0]) {
......@@ -106,7 +106,7 @@ static int vx_mic_boost_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
return 0;
}
static snd_kcontrol_new_t vx_control_mic_boost = {
static struct snd_kcontrol_new vx_control_mic_boost = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Mic Boost",
.info = vx_mic_boost_info,
......@@ -115,7 +115,7 @@ static snd_kcontrol_new_t vx_control_mic_boost = {
};
int vxp_add_mic_controls(vx_core_t *_chip)
int vxp_add_mic_controls(struct vx_core *_chip)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
int err;
......
......@@ -49,7 +49,7 @@ static int vxp_reg_offset[VX_REG_MAX] = {
};
static inline unsigned long vxp_reg_addr(vx_core_t *_chip, int reg)
static inline unsigned long vxp_reg_addr(struct vx_core *_chip, int reg)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
return chip->port + vxp_reg_offset[reg];
......@@ -59,7 +59,7 @@ static inline unsigned long vxp_reg_addr(vx_core_t *_chip, int reg)
* snd_vx_inb - read a byte from the register
* @offset: register offset
*/
static unsigned char vxp_inb(vx_core_t *chip, int offset)
static unsigned char vxp_inb(struct vx_core *chip, int offset)
{
return inb(vxp_reg_addr(chip, offset));
}
......@@ -69,7 +69,7 @@ static unsigned char vxp_inb(vx_core_t *chip, int offset)
* @offset: the register offset
* @val: the value to write
*/
static void vxp_outb(vx_core_t *chip, int offset, unsigned char val)
static void vxp_outb(struct vx_core *chip, int offset, unsigned char val)
{
outb(val, vxp_reg_addr(chip, offset));
}
......@@ -78,9 +78,9 @@ static void vxp_outb(vx_core_t *chip, int offset, unsigned char val)
* redefine macros to call directly
*/
#undef vx_inb
#define vx_inb(chip,reg) vxp_inb((vx_core_t*)(chip), VX_##reg)
#define vx_inb(chip,reg) vxp_inb((struct vx_core *)(chip), VX_##reg)
#undef vx_outb
#define vx_outb(chip,reg,val) vxp_outb((vx_core_t*)(chip), VX_##reg,val)
#define vx_outb(chip,reg,val) vxp_outb((struct vx_core *)(chip), VX_##reg,val)
/*
......@@ -88,7 +88,7 @@ static void vxp_outb(vx_core_t *chip, int offset, unsigned char val)
*
* returns zero if a magic word is detected, or a negative error code.
*/
static int vx_check_magic(vx_core_t *chip)
static int vx_check_magic(struct vx_core *chip)
{
unsigned long end_time = jiffies + HZ / 5;
int c;
......@@ -109,7 +109,7 @@ static int vx_check_magic(vx_core_t *chip)
#define XX_DSP_RESET_WAIT_TIME 2 /* ms */
static void vxp_reset_dsp(vx_core_t *_chip)
static void vxp_reset_dsp(struct vx_core *_chip)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
......@@ -127,7 +127,7 @@ static void vxp_reset_dsp(vx_core_t *_chip)
/*
* reset codec bit
*/
static void vxp_reset_codec(vx_core_t *_chip)
static void vxp_reset_codec(struct vx_core *_chip)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
......@@ -146,7 +146,7 @@ static void vxp_reset_codec(vx_core_t *_chip)
* vx_load_xilinx_binary - load the xilinx binary image
* the binary image is the binary array converted from the bitstream file.
*/
static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw)
static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *fw)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
unsigned int i;
......@@ -244,7 +244,7 @@ static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw)
/*
* vxp_load_dsp - load_dsp callback
*/
static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw)
static int vxp_load_dsp(struct vx_core *vx, int index, const struct firmware *fw)
{
int err;
......@@ -279,7 +279,7 @@ static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw)
*
* spinlock held!
*/
static int vxp_test_and_ack(vx_core_t *_chip)
static int vxp_test_and_ack(struct vx_core *_chip)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
......@@ -306,7 +306,7 @@ static int vxp_test_and_ack(vx_core_t *_chip)
/*
* vx_validate_irq - enable/disable IRQ
*/
static void vxp_validate_irq(vx_core_t *_chip, int enable)
static void vxp_validate_irq(struct vx_core *_chip, int enable)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
......@@ -322,7 +322,7 @@ static void vxp_validate_irq(vx_core_t *_chip, int enable)
* vx_setup_pseudo_dma - set up the pseudo dma read/write mode.
* @do_write: 0 = read, 1 = set up for DMA write
*/
static void vx_setup_pseudo_dma(vx_core_t *_chip, int do_write)
static void vx_setup_pseudo_dma(struct vx_core *_chip, int do_write)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
......@@ -342,7 +342,7 @@ static void vx_setup_pseudo_dma(vx_core_t *_chip, int do_write)
/*
* vx_release_pseudo_dma - disable the pseudo-DMA mode
*/
static void vx_release_pseudo_dma(vx_core_t *_chip)
static void vx_release_pseudo_dma(struct vx_core *_chip)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
......@@ -362,8 +362,8 @@ static void vx_release_pseudo_dma(vx_core_t *_chip)
* data size must be aligned to 6 bytes to ensure the 24bit alignment on DSP.
* NB: call with a certain lock!
*/
static void vxp_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
vx_pipe_t *pipe, int count)
static void vxp_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
struct vx_pipe *pipe, int count)
{
long port = vxp_reg_addr(chip, VX_DMA);
int offset = pipe->hw_ptr;
......@@ -401,8 +401,8 @@ static void vxp_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
* the read length must be aligned to 6 bytes, as well as write.
* NB: call with a certain lock!
*/
static void vxp_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
vx_pipe_t *pipe, int count)
static void vxp_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
struct vx_pipe *pipe, int count)
{
struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
long port = vxp_reg_addr(chip, VX_DMA);
......@@ -442,7 +442,7 @@ static void vxp_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
/*
* write a codec data (24bit)
*/
static void vxp_write_codec_reg(vx_core_t *chip, int codec, unsigned int data)
static void vxp_write_codec_reg(struct vx_core *chip, int codec, unsigned int data)
{
int i;
......@@ -465,7 +465,7 @@ static void vxp_write_codec_reg(vx_core_t *chip, int codec, unsigned int data)
* vx_set_mic_boost - set mic boost level (on vxp440 only)
* @boost: 0 = 20dB, 1 = +38dB
*/
void vx_set_mic_boost(vx_core_t *chip, int boost)
void vx_set_mic_boost(struct vx_core *chip, int boost)
{
struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
unsigned long flags;
......@@ -508,7 +508,7 @@ static int vx_compute_mic_level(int level)
* vx_set_mic_level - set mic level (on vxpocket only)
* @level: the mic level = 0 - 8 (max)
*/
void vx_set_mic_level(vx_core_t *chip, int level)
void vx_set_mic_level(struct vx_core *chip, int level)
{
struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
unsigned long flags;
......@@ -528,7 +528,7 @@ void vx_set_mic_level(vx_core_t *chip, int level)
/*
* change the input audio source
*/
static void vxp_change_audio_source(vx_core_t *_chip, int src)
static void vxp_change_audio_source(struct vx_core *_chip, int src)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
......@@ -568,7 +568,7 @@ static void vxp_change_audio_source(vx_core_t *_chip, int src)
* change the clock source
* source = INTERNAL_QUARTZ or UER_SYNC
*/
static void vxp_set_clock_source(vx_core_t *_chip, int source)
static void vxp_set_clock_source(struct vx_core *_chip, int source)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
......@@ -583,7 +583,7 @@ static void vxp_set_clock_source(vx_core_t *_chip, int source)
/*
* reset the board
*/
static void vxp_reset_board(vx_core_t *_chip, int cold_reset)
static void vxp_reset_board(struct vx_core *_chip, int cold_reset)
{
struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
......
......@@ -83,9 +83,9 @@ static void vxpocket_release(dev_link_t *link)
/*
* destructor, called from snd_card_free_in_thread()
*/
static int snd_vxpocket_dev_free(snd_device_t *device)
static int snd_vxpocket_dev_free(struct snd_device *device)
{
vx_core_t *chip = device->device_data;
struct vx_core *chip = device->device_data;
snd_vx_free_firmware(chip);
kfree(chip);
......@@ -142,19 +142,19 @@ static struct snd_vx_hardware vxp440_hw = {
/*
* create vxpocket instance
*/
static struct snd_vxpocket *snd_vxpocket_new(snd_card_t *card, int ibl)
static struct snd_vxpocket *snd_vxpocket_new(struct snd_card *card, int ibl)
{
client_reg_t client_reg; /* Register with cardmgr */
dev_link_t *link; /* Info for cardmgr */
vx_core_t *chip;
struct vx_core *chip;
struct snd_vxpocket *vxp;
int ret;
static snd_device_ops_t ops = {
static struct snd_device_ops ops = {
.dev_free = snd_vxpocket_dev_free,
};
chip = snd_vx_create(card, &vxpocket_hw, &snd_vxpocket_ops,
sizeof(struct snd_vxpocket) - sizeof(vx_core_t));
sizeof(struct snd_vxpocket) - sizeof(struct vx_core));
if (! chip)
return NULL;
......@@ -218,10 +218,10 @@ static struct snd_vxpocket *snd_vxpocket_new(snd_card_t *card, int ibl)
*
* returns 0 if successful, or a negative error code.
*/
static int snd_vxpocket_assign_resources(vx_core_t *chip, int port, int irq)
static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq)
{
int err;
snd_card_t *card = chip->card;
struct snd_card *card = chip->card;
struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
snd_printdd(KERN_DEBUG "vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq);
......@@ -250,7 +250,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
static void vxpocket_config(dev_link_t *link)
{
client_handle_t handle = link->handle;
vx_core_t *chip = link->priv;
struct vx_core *chip = link->priv;
struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
tuple_t tuple;
cisparse_t *parse;
......@@ -324,7 +324,7 @@ static void vxpocket_config(dev_link_t *link)
static int vxpocket_event(event_t event, int priority, event_callback_args_t *args)
{
dev_link_t *link = args->client_data;
vx_core_t *chip = link->priv;
struct vx_core *chip = link->priv;
switch (event) {
case CS_EVENT_CARD_REMOVAL:
......@@ -379,7 +379,7 @@ static int vxpocket_event(event_t event, int priority, event_callback_args_t *ar
*/
static dev_link_t *vxpocket_attach(void)
{
snd_card_t *card;
struct snd_card *card;
struct snd_vxpocket *vxp;
int i;
......@@ -421,14 +421,14 @@ static dev_link_t *vxpocket_attach(void)
static void vxpocket_detach(dev_link_t *link)
{
struct snd_vxpocket *vxp;
vx_core_t *chip;
struct vx_core *chip;
dev_link_t **linkp;
if (! link)
return;
vxp = link->priv;
chip = (vx_core_t *)vxp;
chip = (struct vx_core *)vxp;
card_alloc &= ~(1 << vxp->index);
/* Remove the interface data from the linked list */
......
......@@ -30,7 +30,7 @@
struct snd_vxpocket {
vx_core_t core;
struct vx_core core;
unsigned long port;
......@@ -48,10 +48,10 @@ struct snd_vxpocket {
extern struct snd_vx_ops snd_vxpocket_ops;
void vx_set_mic_boost(vx_core_t *chip, int boost);
void vx_set_mic_level(vx_core_t *chip, int level);
void vx_set_mic_boost(struct vx_core *chip, int boost);
void vx_set_mic_level(struct vx_core *chip, int level);
int vxp_add_mic_controls(vx_core_t *chip);
int vxp_add_mic_controls(struct vx_core *chip);
/* Constants used to access the CDSP register (0x08). */
#define CDSP_MAGIC 0xA7 /* magic value (for read) */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册