diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 14:46:59 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 12:18:42 +0100 |
commit | af26367f69a474ed809e4a59abb5855b47daaff4 (patch) | |
tree | 8ee9ec6449b3b51953cda3d546e90c064f963684 /sound/drivers/vx | |
parent | 9f38945fab04a0a0ea50880fa634f9bfa28f6226 (diff) |
[ALSA] Remove xxx_t typedefs: VXdriver
Remove xxx_t typedefs from the VXdriver codes
(vx_core support, vx222 and vxpocket).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/vx')
-rw-r--r-- | sound/drivers/vx/vx_core.c | 58 | ||||
-rw-r--r-- | sound/drivers/vx/vx_hwdep.c | 24 | ||||
-rw-r--r-- | sound/drivers/vx/vx_mixer.c | 162 | ||||
-rw-r--r-- | sound/drivers/vx/vx_pcm.c | 200 | ||||
-rw-r--r-- | sound/drivers/vx/vx_uer.c | 22 |
5 files changed, 244 insertions, 222 deletions
diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c index e6e4cf99741..5abf4235177 100644 --- a/sound/drivers/vx/vx_core.c +++ b/sound/drivers/vx/vx_core.c @@ -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); diff --git a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c index c4993b004c4..d837783fb53 100644 --- a/sound/drivers/vx/vx_hwdep.c +++ b/sound/drivers/vx/vx_hwdep.c @@ -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; diff --git a/sound/drivers/vx/vx_mixer.c b/sound/drivers/vx/vx_mixer.c index 19fc68c2337..8ec2c605d2f 100644 --- a/sound/drivers/vx/vx_mixer.c +++ b/sound/drivers/vx/vx_mixer.c @@ -30,7 +30,7 @@ /* * write a codec data (24bit) */ -static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) +static void vx_write_codec_reg(struct vx_core *chip, int codec, unsigned int data) { unsigned long flags; @@ -47,7 +47,7 @@ static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) /* * Data type used to access the Codec */ -typedef union { +union vx_codec_data { u32 l; #ifdef SNDRV_BIG_ENDIAN struct w { @@ -72,7 +72,7 @@ typedef union { u8 hh; } b; #endif -} vx_codec_data_t; +}; #define SET_CDC_DATA_SEL(di,s) ((di).b.mh = (u8) (s)) #define SET_CDC_DATA_REG(di,r) ((di).b.ml = (u8) (r)) @@ -85,9 +85,9 @@ typedef union { * @reg: register index * @val: data value */ -static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val) +static void vx_set_codec_reg(struct vx_core *chip, int codec, int reg, int val) { - vx_codec_data_t data; + union vx_codec_data data; /* DAC control register */ SET_CDC_DATA_INIT(data); SET_CDC_DATA_REG(data, reg); @@ -102,7 +102,7 @@ static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val) * @left: left output level, 0 = mute * @right: right output level */ -static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int right) +static void vx_set_analog_output_level(struct vx_core *chip, int codec, int left, int right) { left = chip->hw->output_level_max - left; right = chip->hw->output_level_max - right; @@ -126,7 +126,7 @@ static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int #define DAC_ATTEN_MIN 0x08 #define DAC_ATTEN_MAX 0x38 -void vx_toggle_dac_mute(vx_core_t *chip, int mute) +void vx_toggle_dac_mute(struct vx_core *chip, int mute) { unsigned int i; for (i = 0; i < chip->hw->num_codecs; i++) { @@ -141,7 +141,7 @@ void vx_toggle_dac_mute(vx_core_t *chip, int mute) /* * vx_reset_codec - reset and initialize the codecs */ -void vx_reset_codec(vx_core_t *chip, int cold_reset) +void vx_reset_codec(struct vx_core *chip, int cold_reset) { unsigned int i; int port = chip->type >= VX_TYPE_VXPOCKET ? 0x75 : 0x65; @@ -175,7 +175,7 @@ void vx_reset_codec(vx_core_t *chip, int cold_reset) * change the audio input source * @src: the target source (VX_AUDIO_SRC_XXX) */ -static void vx_change_audio_source(vx_core_t *chip, int src) +static void vx_change_audio_source(struct vx_core *chip, int src) { unsigned long flags; @@ -192,7 +192,7 @@ static void vx_change_audio_source(vx_core_t *chip, int src) * change the audio source if necessary and possible * returns 1 if the source is actually changed. */ -int vx_sync_audio_source(vx_core_t *chip) +int vx_sync_audio_source(struct vx_core *chip) { if (chip->audio_source_target == chip->audio_source || chip->pcm_running) @@ -217,7 +217,7 @@ struct vx_audio_level { short monitor_level; }; -static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture, +static int vx_adjust_audio_level(struct vx_core *chip, int audio, int capture, struct vx_audio_level *info) { struct vx_rmh rmh; @@ -256,7 +256,7 @@ static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture, #if 0 // not used -static int vx_read_audio_level(vx_core_t *chip, int audio, int capture, +static int vx_read_audio_level(struct vx_core *chip, int audio, int capture, struct vx_audio_level *info) { int err; @@ -283,7 +283,7 @@ static int vx_read_audio_level(vx_core_t *chip, int audio, int capture, * set the monitoring level and mute state of the given audio * no more static, because must be called from vx_pcm to demute monitoring */ -int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active) +int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active) { struct vx_audio_level info; @@ -301,7 +301,7 @@ int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active) /* * set the mute status of the given audio */ -static int vx_set_audio_switch(vx_core_t *chip, int audio, int active) +static int vx_set_audio_switch(struct vx_core *chip, int audio, int active) { struct vx_audio_level info; @@ -315,7 +315,7 @@ static int vx_set_audio_switch(vx_core_t *chip, int audio, int active) /* * set the mute status of the given audio */ -static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level) +static int vx_set_audio_gain(struct vx_core *chip, int audio, int capture, int level) { struct vx_audio_level info; @@ -329,7 +329,7 @@ static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level) /* * reset all audio levels */ -static void vx_reset_audio_levels(vx_core_t *chip) +static void vx_reset_audio_levels(struct vx_core *chip) { unsigned int i, c; struct vx_audio_level info; @@ -375,7 +375,7 @@ struct vx_vu_meter { * @capture: 0 = playback, 1 = capture operation * @info: the array of vx_vu_meter records (size = 2). */ -static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct vx_vu_meter *info) +static int vx_get_audio_vu_meter(struct vx_core *chip, int audio, int capture, struct vx_vu_meter *info) { struct vx_rmh rmh; int i, err; @@ -413,9 +413,9 @@ static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct /* * output level control */ -static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +static int vx_output_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { - vx_core_t *chip = snd_kcontrol_chip(kcontrol); + struct vx_core *chip = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.integer.min = 0; @@ -423,9 +423,9 @@ static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *u return 0; } -static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_output_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); int codec = kcontrol->id.index; down(&chip->mixer_mutex); ucontrol->value.integer.value[0] = chip->output_level[codec][0]; @@ -434,9 +434,9 @@ static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u return 0; } -static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_output_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); int codec = kcontrol->id.index; down(&chip->mixer_mutex); if (ucontrol->value.integer.value[0] != chip->output_level[codec][0] || @@ -453,7 +453,7 @@ static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u return 0; } -static snd_kcontrol_new_t vx_control_output_level = { +static struct snd_kcontrol_new vx_control_output_level = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Master Playback Volume", .info = vx_output_level_info, @@ -464,7 +464,7 @@ static snd_kcontrol_new_t vx_control_output_level = { /* * audio source select */ -static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +static int vx_audio_src_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static char *texts_mic[3] = { "Digital", "Line", "Mic" @@ -472,7 +472,7 @@ static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf static char *texts_vx2[2] = { "Digital", "Analog" }; - vx_core_t *chip = snd_kcontrol_chip(kcontrol); + struct vx_core *chip = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = 1; @@ -492,16 +492,16 @@ static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf return 0; } -static int vx_audio_src_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_audio_src_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); ucontrol->value.enumerated.item[0] = chip->audio_source_target; return 0; } -static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_audio_src_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); down(&chip->mixer_mutex); if (chip->audio_source_target != ucontrol->value.enumerated.item[0]) { chip->audio_source_target = ucontrol->value.enumerated.item[0]; @@ -513,7 +513,7 @@ static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon return 0; } -static snd_kcontrol_new_t vx_control_audio_src = { +static struct snd_kcontrol_new vx_control_audio_src = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Capture Source", .info = vx_audio_src_info, @@ -524,7 +524,7 @@ static snd_kcontrol_new_t vx_control_audio_src = { /* * clock mode selection */ -static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +static int vx_clock_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static char *texts[3] = { "Auto", "Internal", "External" @@ -540,16 +540,16 @@ static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin return 0; } -static int vx_clock_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_clock_mode_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); ucontrol->value.enumerated.item[0] = chip->clock_mode; return 0; } -static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_clock_mode_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); down(&chip->mixer_mutex); if (chip->clock_mode != ucontrol->value.enumerated.item[0]) { chip->clock_mode = ucontrol->value.enumerated.item[0]; @@ -561,7 +561,7 @@ static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco return 0; } -static snd_kcontrol_new_t vx_control_clock_mode = { +static struct snd_kcontrol_new vx_control_clock_mode = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Clock Mode", .info = vx_clock_mode_info, @@ -572,7 +572,7 @@ static snd_kcontrol_new_t vx_control_clock_mode = { /* * Audio Gain */ -static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +static int vx_audio_gain_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; @@ -581,9 +581,9 @@ static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin return 0; } -static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_audio_gain_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); int audio = kcontrol->private_value & 0xff; int capture = (kcontrol->private_value >> 8) & 1; @@ -594,9 +594,9 @@ static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco return 0; } -static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_audio_gain_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); int audio = kcontrol->private_value & 0xff; int capture = (kcontrol->private_value >> 8) & 1; @@ -612,9 +612,9 @@ static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco return 0; } -static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_audio_monitor_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); int audio = kcontrol->private_value & 0xff; down(&chip->mixer_mutex); @@ -624,9 +624,9 @@ static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * return 0; } -static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_audio_monitor_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); int audio = kcontrol->private_value & 0xff; down(&chip->mixer_mutex); @@ -643,7 +643,7 @@ static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * return 0; } -static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +static int vx_audio_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 2; @@ -652,9 +652,9 @@ static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo return 0; } -static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_audio_sw_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); int audio = kcontrol->private_value & 0xff; down(&chip->mixer_mutex); @@ -664,9 +664,9 @@ static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont return 0; } -static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_audio_sw_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); int audio = kcontrol->private_value & 0xff; down(&chip->mixer_mutex); @@ -681,9 +681,9 @@ static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont return 0; } -static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_monitor_sw_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); int audio = kcontrol->private_value & 0xff; down(&chip->mixer_mutex); @@ -693,9 +693,9 @@ static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco return 0; } -static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_monitor_sw_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); int audio = kcontrol->private_value & 0xff; down(&chip->mixer_mutex); @@ -712,28 +712,28 @@ static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco return 0; } -static snd_kcontrol_new_t vx_control_audio_gain = { +static struct snd_kcontrol_new vx_control_audio_gain = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* name will be filled later */ .info = vx_audio_gain_info, .get = vx_audio_gain_get, .put = vx_audio_gain_put }; -static snd_kcontrol_new_t vx_control_output_switch = { +static struct snd_kcontrol_new vx_control_output_switch = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "PCM Playback Switch", .info = vx_audio_sw_info, .get = vx_audio_sw_get, .put = vx_audio_sw_put }; -static snd_kcontrol_new_t vx_control_monitor_gain = { +static struct snd_kcontrol_new vx_control_monitor_gain = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Monitoring Volume", .info = vx_audio_gain_info, /* shared */ .get = vx_audio_monitor_get, .put = vx_audio_monitor_put }; -static snd_kcontrol_new_t vx_control_monitor_switch = { +static struct snd_kcontrol_new vx_control_monitor_switch = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Monitoring Switch", .info = vx_audio_sw_info, /* shared */ @@ -745,16 +745,16 @@ static snd_kcontrol_new_t vx_control_monitor_switch = { /* * IEC958 status bits */ -static int vx_iec958_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +static int vx_iec958_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->count = 1; return 0; } -static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_iec958_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); down(&chip->mixer_mutex); ucontrol->value.iec958.status[0] = (chip->uer_bits >> 0) & 0xff; @@ -765,7 +765,7 @@ static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro return 0; } -static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_iec958_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { ucontrol->value.iec958.status[0] = 0xff; ucontrol->value.iec958.status[1] = 0xff; @@ -774,9 +774,9 @@ static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *u return 0; } -static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_iec958_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); unsigned int val; val = (ucontrol->value.iec958.status[0] << 0) | @@ -794,7 +794,7 @@ static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro return 0; } -static snd_kcontrol_new_t vx_control_iec958_mask = { +static struct snd_kcontrol_new vx_control_iec958_mask = { .access = SNDRV_CTL_ELEM_ACCESS_READ, .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK), @@ -802,7 +802,7 @@ static snd_kcontrol_new_t vx_control_iec958_mask = { .get = vx_iec958_mask_get, }; -static snd_kcontrol_new_t vx_control_iec958 = { +static struct snd_kcontrol_new vx_control_iec958 = { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), .info = vx_iec958_info, @@ -818,7 +818,7 @@ static snd_kcontrol_new_t vx_control_iec958 = { #define METER_MAX 0xff #define METER_SHIFT 16 -static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +static int vx_vu_meter_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; @@ -827,9 +827,9 @@ static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo return 0; } -static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_vu_meter_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 vx_vu_meter meter[2]; int audio = kcontrol->private_value & 0xff; int capture = (kcontrol->private_value >> 8) & 1; @@ -840,9 +840,9 @@ static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont return 0; } -static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_peak_meter_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 vx_vu_meter meter[2]; int audio = kcontrol->private_value & 0xff; int capture = (kcontrol->private_value >> 8) & 1; @@ -853,7 +853,7 @@ static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco return 0; } -static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +static int vx_saturation_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 2; @@ -862,9 +862,9 @@ static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin return 0; } -static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_saturation_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 vx_vu_meter meter[2]; int audio = kcontrol->private_value & 0xff; @@ -874,7 +874,7 @@ static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco return 0; } -static snd_kcontrol_new_t vx_control_vu_meter = { +static struct snd_kcontrol_new vx_control_vu_meter = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, /* name will be filled later */ @@ -882,7 +882,7 @@ static snd_kcontrol_new_t vx_control_vu_meter = { .get = vx_vu_meter_get, }; -static snd_kcontrol_new_t vx_control_peak_meter = { +static struct snd_kcontrol_new vx_control_peak_meter = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, /* name will be filled later */ @@ -890,7 +890,7 @@ static snd_kcontrol_new_t vx_control_peak_meter = { .get = vx_peak_meter_get, }; -static snd_kcontrol_new_t vx_control_saturation = { +static struct snd_kcontrol_new vx_control_saturation = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Input Saturation", .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, @@ -904,12 +904,12 @@ static snd_kcontrol_new_t vx_control_saturation = { * */ -int snd_vx_mixer_new(vx_core_t *chip) +int snd_vx_mixer_new(struct vx_core *chip) { unsigned int i, c; int err; - snd_kcontrol_new_t temp; - snd_card_t *card = chip->card; + struct snd_kcontrol_new temp; + struct snd_card *card = chip->card; char name[32]; strcpy(card->mixername, card->driver); diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index 2b46758fe86..464109e421d 100644 --- a/sound/drivers/vx/vx_pcm.c +++ b/sound/drivers/vx/vx_pcm.c @@ -61,7 +61,8 @@ */ /* get the physical page pointer on the given offset */ -static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned long offset) +static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs, + unsigned long offset) { void *pageptr = subs->runtime->dma_area + offset; return vmalloc_to_page(pageptr); @@ -72,9 +73,9 @@ static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned * called from hw_params * NOTE: this may be called not only once per pcm open! */ -static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size) +static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t size) { - snd_pcm_runtime_t *runtime = subs->runtime; + struct snd_pcm_runtime *runtime = subs->runtime; if (runtime->dma_area) { /* already allocated */ if (runtime->dma_bytes >= size) @@ -94,9 +95,9 @@ static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size) * called from hw_free callback * NOTE: this may be called not only once per pcm open! */ -static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs) +static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs) { - snd_pcm_runtime_t *runtime = subs->runtime; + struct snd_pcm_runtime *runtime = subs->runtime; if (runtime->dma_area) { vfree(runtime->dma_area); runtime->dma_area = NULL; @@ -108,7 +109,8 @@ static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs) /* * read three pending pcm bytes via inb() */ -static void vx_pcm_read_per_bytes(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe) +static void vx_pcm_read_per_bytes(struct vx_core *chip, struct snd_pcm_runtime *runtime, + struct vx_pipe *pipe) { int offset = pipe->hw_ptr; unsigned char *buf = (unsigned char *)(runtime->dma_area + offset); @@ -135,7 +137,8 @@ static void vx_pcm_read_per_bytes(vx_core_t *chip, snd_pcm_runtime_t *runtime, v * @pc_time: the pointer for the PC-time to set * @dsp_time: the pointer for RMH status time array */ -static void vx_set_pcx_time(vx_core_t *chip, pcx_time_t *pc_time, unsigned int *dsp_time) +static void vx_set_pcx_time(struct vx_core *chip, pcx_time_t *pc_time, + unsigned int *dsp_time) { dsp_time[0] = (unsigned int)((*pc_time) >> 24) & PCX_TIME_HI_MASK; dsp_time[1] = (unsigned int)(*pc_time) & MASK_DSP_WORD; @@ -151,7 +154,8 @@ static void vx_set_pcx_time(vx_core_t *chip, pcx_time_t *pc_time, unsigned int * * * returns the increase of the command length. */ -static int vx_set_differed_time(vx_core_t *chip, struct vx_rmh *rmh, vx_pipe_t *pipe) +static int vx_set_differed_time(struct vx_core *chip, struct vx_rmh *rmh, + struct vx_pipe *pipe) { /* Update The length added to the RMH command by the timestamp */ if (! (pipe->differed_type & DC_DIFFERED_DELAY)) @@ -184,7 +188,8 @@ static int vx_set_differed_time(vx_core_t *chip, struct vx_rmh *rmh, vx_pipe_t * * @pipe: the affected pipe * @data: format bitmask */ -static int vx_set_stream_format(vx_core_t *chip, vx_pipe_t *pipe, unsigned int data) +static int vx_set_stream_format(struct vx_core *chip, struct vx_pipe *pipe, + unsigned int data) { struct vx_rmh rmh; @@ -210,8 +215,8 @@ static int vx_set_stream_format(vx_core_t *chip, vx_pipe_t *pipe, unsigned int d * * returns 0 if successful, or a negative error code. */ -static int vx_set_format(vx_core_t *chip, vx_pipe_t *pipe, - snd_pcm_runtime_t *runtime) +static int vx_set_format(struct vx_core *chip, struct vx_pipe *pipe, + struct snd_pcm_runtime *runtime) { unsigned int header = HEADER_FMT_BASE; @@ -239,7 +244,7 @@ static int vx_set_format(vx_core_t *chip, vx_pipe_t *pipe, /* * set / query the IBL size */ -static int vx_set_ibl(vx_core_t *chip, struct vx_ibl_info *info) +static int vx_set_ibl(struct vx_core *chip, struct vx_ibl_info *info) { int err; struct vx_rmh rmh; @@ -269,7 +274,7 @@ static int vx_set_ibl(vx_core_t *chip, struct vx_ibl_info *info) * * called from trigger callback only */ -static int vx_get_pipe_state(vx_core_t *chip, vx_pipe_t *pipe, int *state) +static int vx_get_pipe_state(struct vx_core *chip, struct vx_pipe *pipe, int *state) { int err; struct vx_rmh rmh; @@ -294,7 +299,7 @@ static int vx_get_pipe_state(vx_core_t *chip, vx_pipe_t *pipe, int *state) * you'll need to disconnect the host to get back to the * normal mode. */ -static int vx_query_hbuffer_size(vx_core_t *chip, vx_pipe_t *pipe) +static int vx_query_hbuffer_size(struct vx_core *chip, struct vx_pipe *pipe) { int result; struct vx_rmh rmh; @@ -318,7 +323,7 @@ static int vx_query_hbuffer_size(vx_core_t *chip, vx_pipe_t *pipe) * * called from trigger callback only */ -static int vx_pipe_can_start(vx_core_t *chip, vx_pipe_t *pipe) +static int vx_pipe_can_start(struct vx_core *chip, struct vx_pipe *pipe) { int err; struct vx_rmh rmh; @@ -339,7 +344,7 @@ static int vx_pipe_can_start(vx_core_t *chip, vx_pipe_t *pipe) * vx_conf_pipe - tell the pipe to stand by and wait for IRQA. * @pipe: the pipe to be configured */ -static int vx_conf_pipe(vx_core_t *chip, vx_pipe_t *pipe) +static int vx_conf_pipe(struct vx_core *chip, struct vx_pipe *pipe) { struct vx_rmh rmh; @@ -353,7 +358,7 @@ static int vx_conf_pipe(vx_core_t *chip, vx_pipe_t *pipe) /* * vx_send_irqa - trigger IRQA */ -static int vx_send_irqa(vx_core_t *chip) +static int vx_send_irqa(struct vx_core *chip) { struct vx_rmh rmh; @@ -378,7 +383,7 @@ static int vx_send_irqa(vx_core_t *chip) * called from trigger callback only * */ -static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state) +static int vx_toggle_pipe(struct vx_core *chip, struct vx_pipe *pipe, int state) { int err, i, cur_state; @@ -431,7 +436,7 @@ static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state) * * called from trigger callback only */ -static int vx_stop_pipe(vx_core_t *chip, vx_pipe_t *pipe) +static int vx_stop_pipe(struct vx_core *chip, struct vx_pipe *pipe) { struct vx_rmh rmh; vx_init_rmh(&rmh, CMD_STOP_PIPE); @@ -449,12 +454,12 @@ static int vx_stop_pipe(vx_core_t *chip, vx_pipe_t *pipe) * * return 0 on success, or a negative error code. */ -static int vx_alloc_pipe(vx_core_t *chip, int capture, +static int vx_alloc_pipe(struct vx_core *chip, int capture, int audioid, int num_audio, - vx_pipe_t **pipep) + struct vx_pipe **pipep) { int err; - vx_pipe_t *pipe; + struct vx_pipe *pipe; struct vx_rmh rmh; int data_mode; @@ -499,7 +504,7 @@ static int vx_alloc_pipe(vx_core_t *chip, int capture, * vx_free_pipe - release a pipe * @pipe: pipe to be released */ -static int vx_free_pipe(vx_core_t *chip, vx_pipe_t *pipe) +static int vx_free_pipe(struct vx_core *chip, struct vx_pipe *pipe) { struct vx_rmh rmh; @@ -517,7 +522,7 @@ static int vx_free_pipe(vx_core_t *chip, vx_pipe_t *pipe) * * called from trigger callback only */ -static int vx_start_stream(vx_core_t *chip, vx_pipe_t *pipe) +static int vx_start_stream(struct vx_core *chip, struct vx_pipe *pipe) { struct vx_rmh rmh; @@ -533,7 +538,7 @@ static int vx_start_stream(vx_core_t *chip, vx_pipe_t *pipe) * * called from trigger callback only */ -static int vx_stop_stream(vx_core_t *chip, vx_pipe_t *pipe) +static int vx_stop_stream(struct vx_core *chip, struct vx_pipe *pipe) { struct vx_rmh rmh; @@ -547,11 +552,12 @@ static int vx_stop_stream(vx_core_t *chip, vx_pipe_t *pipe) * playback hw information */ -static snd_pcm_hardware_t vx_pcm_playback_hw = { +static struct snd_pcm_hardware vx_pcm_playback_hw = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ /*SNDRV_PCM_INFO_RESUME*/), - .formats = /*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE, + .formats = (/*SNDRV_PCM_FMTBIT_U8 |*/ + SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE), .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, .rate_min = 5000, .rate_max = 48000, @@ -571,11 +577,11 @@ static void vx_pcm_delayed_start(unsigned long arg); /* * vx_pcm_playback_open - open callback for playback */ -static int vx_pcm_playback_open(snd_pcm_substream_t *subs) +static int vx_pcm_playback_open(struct snd_pcm_substream *subs) { - snd_pcm_runtime_t *runtime = subs->runtime; - vx_core_t *chip = snd_pcm_substream_chip(subs); - vx_pipe_t *pipe = NULL; + struct snd_pcm_runtime *runtime = subs->runtime; + struct vx_core *chip = snd_pcm_substream_chip(subs); + struct vx_pipe *pipe = NULL; unsigned int audio; int err; @@ -615,10 +621,10 @@ static int vx_pcm_playback_open(snd_pcm_substream_t *subs) /* * vx_pcm_playback_close - close callback for playback */ -static int vx_pcm_playback_close(snd_pcm_substream_t *subs) +static int vx_pcm_playback_close(struct snd_pcm_substream *subs) { - vx_core_t *chip = snd_pcm_substream_chip(subs); - vx_pipe_t *pipe; + struct vx_core *chip = snd_pcm_substream_chip(subs); + struct vx_pipe *pipe; if (! subs->runtime->private_data) return -EINVAL; @@ -641,7 +647,7 @@ static int vx_pcm_playback_close(snd_pcm_substream_t *subs) * * NB: call with a certain lock. */ -static int vx_notify_end_of_buffer(vx_core_t *chip, vx_pipe_t *pipe) +static int vx_notify_end_of_buffer(struct vx_core *chip, struct vx_pipe *pipe) { int err; struct vx_rmh rmh; /* use a temporary rmh here */ @@ -669,7 +675,9 @@ static int vx_notify_end_of_buffer(vx_core_t *chip, vx_pipe_t *pipe) * * return 0 if ok. */ -static int vx_pcm_playback_transfer_chunk(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe, int size) +static int vx_pcm_playback_transfer_chunk(struct vx_core *chip, + struct snd_pcm_runtime *runtime, + struct vx_pipe *pipe, int size) { int space, err = 0; @@ -705,7 +713,9 @@ static int vx_pcm_playback_transfer_chunk(vx_core_t *chip, snd_pcm_runtime_t *ru * so that the caller can check the total transferred size later * (to call snd_pcm_period_elapsed). */ -static int vx_update_pipe_position(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe) +static int vx_update_pipe_position(struct vx_core *chip, + struct snd_pcm_runtime *runtime, + struct vx_pipe *pipe) { struct vx_rmh rmh; int err, update; @@ -731,10 +741,12 @@ static int vx_update_pipe_position(vx_core_t *chip, snd_pcm_runtime_t *runtime, * transfer the pending playback buffer data to DSP * called from interrupt handler */ -static void vx_pcm_playback_transfer(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe, int nchunks) +static void vx_pcm_playback_transfer(struct vx_core *chip, + struct snd_pcm_substream *subs, + struct vx_pipe *pipe, int nchunks) { int i, err; - snd_pcm_runtime_t *runtime = subs->runtime; + struct snd_pcm_runtime *runtime = subs->runtime; if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE)) return; @@ -749,10 +761,12 @@ static void vx_pcm_playback_transfer(vx_core_t *chip, snd_pcm_substream_t *subs, * update the playback position and call snd_pcm_period_elapsed() if necessary * called from interrupt handler */ -static void vx_pcm_playback_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe) +static void vx_pcm_playback_update(struct vx_core *chip, + struct snd_pcm_substream *subs, + struct vx_pipe *pipe) { int err; - snd_pcm_runtime_t *runtime = subs->runtime; + struct snd_pcm_runtime *runtime = subs->runtime; if (pipe->running && ! (chip->chip_status & VX_STAT_IS_STALE)) { if ((err = vx_update_pipe_position(chip, runtime, pipe)) < 0) @@ -771,9 +785,9 @@ static void vx_pcm_playback_update(vx_core_t *chip, snd_pcm_substream_t *subs, v */ static void vx_pcm_delayed_start(unsigned long arg) { - snd_pcm_substream_t *subs = (snd_pcm_substream_t *)arg; - vx_core_t *chip = subs->pcm->private_data; - vx_pipe_t *pipe = subs->runtime->private_data; + struct snd_pcm_substream *subs = (struct snd_pcm_substream *)arg; + struct vx_core *chip = subs->pcm->private_data; + struct vx_pipe *pipe = subs->runtime->private_data; int err; /* printk( KERN_DEBUG "DDDD tasklet delayed start jiffies = %ld\n", jiffies);*/ @@ -792,10 +806,10 @@ static void vx_pcm_delayed_start(unsigned long arg) /* * vx_pcm_playback_trigger - trigger callback for playback */ -static int vx_pcm_trigger(snd_pcm_substream_t *subs, int cmd) +static int vx_pcm_trigger(struct snd_pcm_substream *subs, int cmd) { - vx_core_t *chip = snd_pcm_substream_chip(subs); - vx_pipe_t *pipe = subs->runtime->private_data; + struct vx_core *chip = snd_pcm_substream_chip(subs); + struct vx_pipe *pipe = subs->runtime->private_data; int err; if (chip->chip_status & VX_STAT_IS_STALE) @@ -839,18 +853,18 @@ static int vx_pcm_trigger(snd_pcm_substream_t *subs, int cmd) /* * vx_pcm_playback_pointer - pointer callback for playback */ -static snd_pcm_uframes_t vx_pcm_playback_pointer(snd_pcm_substream_t *subs) +static snd_pcm_uframes_t vx_pcm_playback_pointer(struct snd_pcm_substream *subs) { - snd_pcm_runtime_t *runtime = subs->runtime; - vx_pipe_t *pipe = runtime->private_data; + struct snd_pcm_runtime *runtime = subs->runtime; + struct vx_pipe *pipe = runtime->private_data; return pipe->position; } /* * vx_pcm_hw_params - hw_params callback for playback and capture */ -static int vx_pcm_hw_params(snd_pcm_substream_t *subs, - snd_pcm_hw_params_t *hw_params) +static int vx_pcm_hw_params(struct snd_pcm_substream *subs, + struct snd_pcm_hw_params *hw_params) { return snd_pcm_alloc_vmalloc_buffer(subs, params_buffer_bytes(hw_params)); } @@ -858,7 +872,7 @@ static int vx_pcm_hw_params(snd_pcm_substream_t *subs, /* * vx_pcm_hw_free - hw_free callback for playback and capture */ -static int vx_pcm_hw_free(snd_pcm_substream_t *subs) +static int vx_pcm_hw_free(struct snd_pcm_substream *subs) { return snd_pcm_free_vmalloc_buffer(subs); } @@ -866,11 +880,11 @@ static int vx_pcm_hw_free(snd_pcm_substream_t *subs) /* * vx_pcm_prepare - prepare callback for playback and capture */ -static int vx_pcm_prepare(snd_pcm_substream_t *subs) +static int vx_pcm_prepare(struct snd_pcm_substream *subs) { - vx_core_t *chip = snd_pcm_substream_chip(subs); - snd_pcm_runtime_t *runtime = subs->runtime; - vx_pipe_t *pipe = runtime->private_data; + struct vx_core *chip = snd_pcm_substream_chip(subs); + struct snd_pcm_runtime *runtime = subs->runtime; + struct vx_pipe *pipe = runtime->private_data; int err, data_mode; // int max_size, nchunks; @@ -897,7 +911,8 @@ static int vx_pcm_prepare(snd_pcm_substream_t *subs) } if (chip->pcm_running && chip->freq != runtime->rate) { - snd_printk(KERN_ERR "vx: cannot set different clock %d from the current %d\n", runtime->rate, chip->freq); + snd_printk(KERN_ERR "vx: cannot set different clock %d " + "from the current %d\n", runtime->rate, chip->freq); return -EINVAL; } vx_set_clock(chip, runtime->rate); @@ -930,7 +945,7 @@ static int vx_pcm_prepare(snd_pcm_substream_t *subs) /* * operators for PCM playback */ -static snd_pcm_ops_t vx_pcm_playback_ops = { +static struct snd_pcm_ops vx_pcm_playback_ops = { .open = vx_pcm_playback_open, .close = vx_pcm_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -947,11 +962,12 @@ static snd_pcm_ops_t vx_pcm_playback_ops = { * playback hw information */ -static snd_pcm_hardware_t vx_pcm_capture_hw = { +static struct snd_pcm_hardware vx_pcm_capture_hw = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ /*SNDRV_PCM_INFO_RESUME*/), - .formats = /*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE, + .formats = (/*SNDRV_PCM_FMTBIT_U8 |*/ + SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE), .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, .rate_min = 5000, .rate_max = 48000, @@ -969,12 +985,12 @@ static snd_pcm_hardware_t vx_pcm_capture_hw = { /* * vx_pcm_capture_open - open callback for capture */ -static int vx_pcm_capture_open(snd_pcm_substream_t *subs) +static int vx_pcm_capture_open(struct snd_pcm_substream *subs) { - snd_pcm_runtime_t *runtime = subs->runtime; - vx_core_t *chip = snd_pcm_substream_chip(subs); - vx_pipe_t *pipe; - vx_pipe_t *pipe_out_monitoring = NULL; + struct snd_pcm_runtime *runtime = subs->runtime; + struct vx_core *chip = snd_pcm_substream_chip(subs); + struct vx_pipe *pipe; + struct vx_pipe *pipe_out_monitoring = NULL; unsigned int audio; int err; @@ -1005,9 +1021,11 @@ static int vx_pcm_capture_open(snd_pcm_substream_t *subs) if an output pipe is available, it's audios still may need to be unmuted. hence we'll have to call a mixer entry point. */ - vx_set_monitor_level(chip, audio, chip->audio_monitor[audio], chip->audio_monitor_active[audio]); + vx_set_monitor_level(chip, audio, chip->audio_monitor[audio], + chip->audio_monitor_active[audio]); /* assuming stereo */ - vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1], chip->audio_monitor_active[audio+1]); + vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1], + chip->audio_monitor_active[audio+1]); } pipe->monitoring_pipe = pipe_out_monitoring; /* default value NULL */ @@ -1026,11 +1044,11 @@ static int vx_pcm_capture_open(snd_pcm_substream_t *subs) /* * vx_pcm_capture_close - close callback for capture */ -static int vx_pcm_capture_close(snd_pcm_substream_t *subs) +static int vx_pcm_capture_close(struct snd_pcm_substream *subs) { - vx_core_t *chip = snd_pcm_substream_chip(subs); - vx_pipe_t *pipe; - vx_pipe_t *pipe_out_monitoring; + struct vx_core *chip = snd_pcm_substream_chip(subs); + struct vx_pipe *pipe; + struct vx_pipe *pipe_out_monitoring; if (! subs->runtime->private_data) return -EINVAL; @@ -1062,10 +1080,11 @@ static int vx_pcm_capture_close(snd_pcm_substream_t *subs) /* * vx_pcm_capture_update - update the capture buffer */ -static void vx_pcm_capture_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe) +static void vx_pcm_capture_update(struct vx_core *chip, struct snd_pcm_substream *subs, + struct vx_pipe *pipe) { int size, space, count; - snd_pcm_runtime_t *runtime = subs->runtime; + struct snd_pcm_runtime *runtime = subs->runtime; if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE)) return; @@ -1135,17 +1154,17 @@ static void vx_pcm_capture_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx /* * vx_pcm_capture_pointer - pointer callback for capture */ -static snd_pcm_uframes_t vx_pcm_capture_pointer(snd_pcm_substream_t *subs) +static snd_pcm_uframes_t vx_pcm_capture_pointer(struct snd_pcm_substream *subs) { - snd_pcm_runtime_t *runtime = subs->runtime; - vx_pipe_t *pipe = runtime->private_data; + struct snd_pcm_runtime *runtime = subs->runtime; + struct vx_pipe *pipe = runtime->private_data; return bytes_to_frames(runtime, pipe->hw_ptr); } /* * operators for PCM capture */ -static snd_pcm_ops_t vx_pcm_capture_ops = { +static struct snd_pcm_ops vx_pcm_capture_ops = { .open = vx_pcm_capture_open, .close = vx_pcm_capture_close, .ioctl = snd_pcm_lib_ioctl, @@ -1161,10 +1180,10 @@ static snd_pcm_ops_t vx_pcm_capture_ops = { /* * interrupt handler for pcm streams */ -void vx_pcm_update_intr(vx_core_t *chip, unsigned int events) +void vx_pcm_update_intr(struct vx_core *chip, unsigned int events) { unsigned int i; - vx_pipe_t *pipe; + struct vx_pipe *pipe; #define EVENT_MASK (END_OF_BUFFER_EVENTS_PENDING|ASYNC_EVENTS_PENDING) @@ -1218,7 +1237,7 @@ void vx_pcm_update_intr(vx_core_t *chip, unsigned int events) /* * vx_init_audio_io - check the availabe audio i/o and allocate pipe arrays */ -static int vx_init_audio_io(vx_core_t *chip) +static int vx_init_audio_io(struct vx_core *chip) { struct vx_rmh rmh; int preferred; @@ -1234,19 +1253,20 @@ static int vx_init_audio_io(vx_core_t *chip) chip->audio_info = rmh.Stat[1]; /* allocate pipes */ - chip->playback_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_outs, GFP_KERNEL); - chip->capture_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_ins, GFP_KERNEL); + chip->playback_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_outs, GFP_KERNEL); + chip->capture_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_ins, GFP_KERNEL); if (! chip->playback_pipes || ! chip->capture_pipes) return -ENOMEM; - memset(chip->playback_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_outs); - memset(chip->capture_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_ins); + memset(chip->playback_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_outs); + memset(chip->capture_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_ins); preferred = chip->ibl.size; chip->ibl.size = 0; vx_set_ibl(chip, &chip->ibl); /* query the info */ if (preferred > 0) { - chip->ibl.size = ((preferred + chip->ibl.granularity - 1) / chip->ibl.granularity) * chip->ibl.granularity; + chip->ibl.size = ((preferred + chip->ibl.granularity - 1) / + chip->ibl.granularity) * chip->ibl.granularity; if (chip->ibl.size > chip->ibl.max_size) chip->ibl.size = chip->ibl.max_size; } else @@ -1260,9 +1280,9 @@ static int vx_init_audio_io(vx_core_t *chip) /* * free callback for pcm */ -static void snd_vx_pcm_free(snd_pcm_t *pcm) +static void snd_vx_pcm_free(struct snd_pcm *pcm) { - vx_core_t *chip = pcm->private_data; + struct vx_core *chip = pcm->private_data; chip->pcm[pcm->device] = NULL; kfree(chip->playback_pipes); chip->playback_pipes = NULL; @@ -1273,9 +1293,9 @@ static void snd_vx_pcm_free(snd_pcm_t *pcm) /* * snd_vx_pcm_new - create and initialize a pcm */ -int snd_vx_pcm_new(vx_core_t *chip) +int snd_vx_pcm_new(struct vx_core *chip) { - snd_pcm_t *pcm; + struct snd_pcm *pcm; unsigned int i; int err; diff --git a/sound/drivers/vx/vx_uer.c b/sound/drivers/vx/vx_uer.c index 4fc38bde34f..7400306b7f2 100644 --- a/sound/drivers/vx/vx_uer.c +++ b/sound/drivers/vx/vx_uer.c @@ -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; |