diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 14:17:19 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 12:18:08 +0100 |
commit | 97f02e05f246a2346275c1c93a3079e8933e74b2 (patch) | |
tree | 218d0a71f8bdeb5e6d2660339c29c46dab1adaa7 /sound/i2c/other | |
parent | a42dd420bea7a5cd130162183d95f640c299a337 (diff) | |
download | op-kernel-dev-97f02e05f246a2346275c1c93a3079e8933e74b2.zip op-kernel-dev-97f02e05f246a2346275c1c93a3079e8933e74b2.tar.gz |
[ALSA] Remove xxx_t typedefs: I2C drivers
Remove xxx_t typedefs from the i2c drivers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/i2c/other')
-rw-r--r-- | sound/i2c/other/ak4114.c | 122 | ||||
-rw-r--r-- | sound/i2c/other/ak4117.c | 122 | ||||
-rw-r--r-- | sound/i2c/other/ak4xxx-adda.c | 49 | ||||
-rw-r--r-- | sound/i2c/other/tea575x-tuner.c | 8 |
4 files changed, 155 insertions, 146 deletions
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c index d351b3a..12ffffc 100644 --- a/sound/i2c/other/ak4114.c +++ b/sound/i2c/other/ak4114.c @@ -37,7 +37,7 @@ MODULE_LICENSE("GPL"); static void ak4114_stats(void *); -static void reg_write(ak4114_t *ak4114, unsigned char reg, unsigned char val) +static void reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char val) { ak4114->write(ak4114->private_data, reg, val); if (reg <= AK4114_REG_INT1_MASK) @@ -46,13 +46,13 @@ static void reg_write(ak4114_t *ak4114, unsigned char reg, unsigned char val) ak4114->txcsb[reg-AK4114_REG_RXCSB0] = val; } -static inline unsigned char reg_read(ak4114_t *ak4114, unsigned char reg) +static inline unsigned char reg_read(struct ak4114 *ak4114, unsigned char reg) { return ak4114->read(ak4114->private_data, reg); } #if 0 -static void reg_dump(ak4114_t *ak4114) +static void reg_dump(struct ak4114 *ak4114) { int i; @@ -62,7 +62,7 @@ static void reg_dump(ak4114_t *ak4114) } #endif -static void snd_ak4114_free(ak4114_t *chip) +static void snd_ak4114_free(struct ak4114 *chip) { chip->init = 1; /* don't schedule new work */ mb(); @@ -73,22 +73,22 @@ static void snd_ak4114_free(ak4114_t *chip) kfree(chip); } -static int snd_ak4114_dev_free(snd_device_t *device) +static int snd_ak4114_dev_free(struct snd_device *device) { - ak4114_t *chip = device->device_data; + struct ak4114 *chip = device->device_data; snd_ak4114_free(chip); return 0; } -int snd_ak4114_create(snd_card_t *card, +int snd_ak4114_create(struct snd_card *card, ak4114_read_t *read, ak4114_write_t *write, unsigned char pgm[7], unsigned char txcsb[5], - void *private_data, ak4114_t **r_ak4114) + void *private_data, struct ak4114 **r_ak4114) { - ak4114_t *chip; + struct ak4114 *chip; int err = 0; unsigned char reg; - static snd_device_ops_t ops = { + static struct snd_device_ops ops = { .dev_free = snd_ak4114_dev_free, }; @@ -129,7 +129,7 @@ int snd_ak4114_create(snd_card_t *card, return err < 0 ? err : -EIO; } -void snd_ak4114_reg_write(ak4114_t *chip, unsigned char reg, unsigned char mask, unsigned char val) +void snd_ak4114_reg_write(struct ak4114 *chip, unsigned char reg, unsigned char mask, unsigned char val) { if (reg <= AK4114_REG_INT1_MASK) reg_write(chip, reg, (chip->regmap[reg] & ~mask) | val); @@ -137,7 +137,7 @@ void snd_ak4114_reg_write(ak4114_t *chip, unsigned char reg, unsigned char mask, reg_write(chip, reg, (chip->txcsb[reg] & ~mask) | val); } -void snd_ak4114_reinit(ak4114_t *chip) +void snd_ak4114_reinit(struct ak4114 *chip) { unsigned char old = chip->regmap[AK4114_REG_PWRDN], reg; @@ -176,8 +176,8 @@ static unsigned int external_rate(unsigned char rcs1) } } -static int snd_ak4114_in_error_info(snd_kcontrol_t *kcontrol, - snd_ctl_elem_info_t *uinfo) +static int snd_ak4114_in_error_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; @@ -186,10 +186,10 @@ static int snd_ak4114_in_error_info(snd_kcontrol_t *kcontrol, return 0; } -static int snd_ak4114_in_error_get(snd_kcontrol_t *kcontrol, - snd_ctl_elem_value_t *ucontrol) +static int snd_ak4114_in_error_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4114_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4114 *chip = snd_kcontrol_chip(kcontrol); long *ptr; spin_lock_irq(&chip->lock); @@ -200,8 +200,8 @@ static int snd_ak4114_in_error_get(snd_kcontrol_t *kcontrol, return 0; } -static int snd_ak4114_in_bit_info(snd_kcontrol_t *kcontrol, - snd_ctl_elem_info_t *uinfo) +static int snd_ak4114_in_bit_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 1; @@ -210,10 +210,10 @@ static int snd_ak4114_in_bit_info(snd_kcontrol_t *kcontrol, return 0; } -static int snd_ak4114_in_bit_get(snd_kcontrol_t *kcontrol, - snd_ctl_elem_value_t *ucontrol) +static int snd_ak4114_in_bit_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4114_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4114 *chip = snd_kcontrol_chip(kcontrol); unsigned char reg = kcontrol->private_value & 0xff; unsigned char bit = (kcontrol->private_value >> 8) & 0xff; unsigned char inv = (kcontrol->private_value >> 31) & 1; @@ -222,8 +222,8 @@ static int snd_ak4114_in_bit_get(snd_kcontrol_t *kcontrol, return 0; } -static int snd_ak4114_rate_info(snd_kcontrol_t *kcontrol, - snd_ctl_elem_info_t *uinfo) +static int snd_ak4114_rate_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; @@ -232,26 +232,26 @@ static int snd_ak4114_rate_info(snd_kcontrol_t *kcontrol, return 0; } -static int snd_ak4114_rate_get(snd_kcontrol_t *kcontrol, - snd_ctl_elem_value_t *ucontrol) +static int snd_ak4114_rate_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4114_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4114 *chip = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = external_rate(reg_read(chip, AK4114_REG_RCS1)); return 0; } -static int snd_ak4114_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_ak4114_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->count = 1; return 0; } -static int snd_ak4114_spdif_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_ak4114_spdif_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4114_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4114 *chip = snd_kcontrol_chip(kcontrol); unsigned i; for (i = 0; i < AK4114_REG_RXCSB_SIZE; i++) @@ -259,10 +259,10 @@ static int snd_ak4114_spdif_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_ak4114_spdif_playback_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_ak4114_spdif_playback_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4114_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4114 *chip = snd_kcontrol_chip(kcontrol); unsigned i; for (i = 0; i < AK4114_REG_TXCSB_SIZE; i++) @@ -270,10 +270,10 @@ static int snd_ak4114_spdif_playback_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_ak4114_spdif_playback_put(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_ak4114_spdif_playback_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4114_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4114 *chip = snd_kcontrol_chip(kcontrol); unsigned i; for (i = 0; i < AK4114_REG_TXCSB_SIZE; i++) @@ -281,21 +281,21 @@ static int snd_ak4114_spdif_playback_put(snd_kcontrol_t * kcontrol, return 0; } -static int snd_ak4114_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_ak4114_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->count = 1; return 0; } -static int snd_ak4114_spdif_mask_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_ak4114_spdif_mask_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { memset(ucontrol->value.iec958.status, 0xff, AK4114_REG_RXCSB_SIZE); return 0; } -static int snd_ak4114_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_ak4114_spdif_pinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->value.integer.min = 0; @@ -304,10 +304,10 @@ static int snd_ak4114_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t return 0; } -static int snd_ak4114_spdif_pget(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_ak4114_spdif_pget(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4114_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4114 *chip = snd_kcontrol_chip(kcontrol); unsigned short tmp; ucontrol->value.integer.value[0] = 0xf8f2; @@ -319,17 +319,17 @@ static int snd_ak4114_spdif_pget(snd_kcontrol_t * kcontrol, return 0; } -static int snd_ak4114_spdif_qinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_ak4114_spdif_qinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES; uinfo->count = AK4114_REG_QSUB_SIZE; return 0; } -static int snd_ak4114_spdif_qget(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_ak4114_spdif_qget(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4114_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4114 *chip = snd_kcontrol_chip(kcontrol); unsigned i; for (i = 0; i < AK4114_REG_QSUB_SIZE; i++) @@ -338,14 +338,14 @@ static int snd_ak4114_spdif_qget(snd_kcontrol_t * kcontrol, } /* Don't forget to change AK4114_CONTROLS define!!! */ -static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = { +static struct snd_kcontrol_new snd_ak4114_iec958_controls[] = { { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = "IEC958 Parity Errors", .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .info = snd_ak4114_in_error_info, .get = snd_ak4114_in_error_get, - .private_value = offsetof(ak4114_t, parity_errors), + .private_value = offsetof(struct ak4114, parity_errors), }, { .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -353,7 +353,7 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = { .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .info = snd_ak4114_in_error_info, .get = snd_ak4114_in_error_get, - .private_value = offsetof(ak4114_t, v_bit_errors), + .private_value = offsetof(struct ak4114, v_bit_errors), }, { .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -361,7 +361,7 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = { .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .info = snd_ak4114_in_error_info, .get = snd_ak4114_in_error_get, - .private_value = offsetof(ak4114_t, ccrc_errors), + .private_value = offsetof(struct ak4114, ccrc_errors), }, { .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -369,7 +369,7 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = { .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .info = snd_ak4114_in_error_info, .get = snd_ak4114_in_error_get, - .private_value = offsetof(ak4114_t, qcrc_errors), + .private_value = offsetof(struct ak4114, qcrc_errors), }, { .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -447,11 +447,11 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = { } }; -int snd_ak4114_build(ak4114_t *ak4114, - snd_pcm_substream_t *ply_substream, - snd_pcm_substream_t *cap_substream) +int snd_ak4114_build(struct ak4114 *ak4114, + struct snd_pcm_substream *ply_substream, + struct snd_pcm_substream *cap_substream) { - snd_kcontrol_t *kctl; + struct snd_kcontrol *kctl; unsigned int idx; int err; @@ -482,7 +482,7 @@ int snd_ak4114_build(ak4114_t *ak4114, return 0; } -int snd_ak4114_external_rate(ak4114_t *ak4114) +int snd_ak4114_external_rate(struct ak4114 *ak4114) { unsigned char rcs1; @@ -490,9 +490,9 @@ int snd_ak4114_external_rate(ak4114_t *ak4114) return external_rate(rcs1); } -int snd_ak4114_check_rate_and_errors(ak4114_t *ak4114, unsigned int flags) +int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags) { - snd_pcm_runtime_t *runtime = ak4114->capture_substream ? ak4114->capture_substream->runtime : NULL; + struct snd_pcm_runtime *runtime = ak4114->capture_substream ? ak4114->capture_substream->runtime : NULL; unsigned long _flags; int res = 0; unsigned char rcs0, rcs1; @@ -563,7 +563,7 @@ int snd_ak4114_check_rate_and_errors(ak4114_t *ak4114, unsigned int flags) static void ak4114_stats(void *data) { - ak4114_t *chip = (ak4114_t *)data; + struct ak4114 *chip = (struct ak4114 *)data; if (chip->init) return; diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c index 35b4584..4e45952 100644 --- a/sound/i2c/other/ak4117.c +++ b/sound/i2c/other/ak4117.c @@ -37,20 +37,20 @@ MODULE_LICENSE("GPL"); static void snd_ak4117_timer(unsigned long data); -static void reg_write(ak4117_t *ak4117, unsigned char reg, unsigned char val) +static void reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char val) { ak4117->write(ak4117->private_data, reg, val); if (reg < sizeof(ak4117->regmap)) ak4117->regmap[reg] = val; } -static inline unsigned char reg_read(ak4117_t *ak4117, unsigned char reg) +static inline unsigned char reg_read(struct ak4117 *ak4117, unsigned char reg) { return ak4117->read(ak4117->private_data, reg); } #if 0 -static void reg_dump(ak4117_t *ak4117) +static void reg_dump(struct ak4117 *ak4117) { int i; @@ -60,26 +60,26 @@ static void reg_dump(ak4117_t *ak4117) } #endif -static void snd_ak4117_free(ak4117_t *chip) +static void snd_ak4117_free(struct ak4117 *chip) { del_timer(&chip->timer); kfree(chip); } -static int snd_ak4117_dev_free(snd_device_t *device) +static int snd_ak4117_dev_free(struct snd_device *device) { - ak4117_t *chip = device->device_data; + struct ak4117 *chip = device->device_data; snd_ak4117_free(chip); return 0; } -int snd_ak4117_create(snd_card_t *card, ak4117_read_t *read, ak4117_write_t *write, - unsigned char pgm[5], void *private_data, ak4117_t **r_ak4117) +int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write, + unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117) { - ak4117_t *chip; + struct ak4117 *chip; int err = 0; unsigned char reg; - static snd_device_ops_t ops = { + static struct snd_device_ops ops = { .dev_free = snd_ak4117_dev_free, }; @@ -115,14 +115,14 @@ int snd_ak4117_create(snd_card_t *card, ak4117_read_t *read, ak4117_write_t *wri return err < 0 ? err : -EIO; } -void snd_ak4117_reg_write(ak4117_t *chip, unsigned char reg, unsigned char mask, unsigned char val) +void snd_ak4117_reg_write(struct ak4117 *chip, unsigned char reg, unsigned char mask, unsigned char val) { if (reg >= 5) return; reg_write(chip, reg, (chip->regmap[reg] & ~mask) | val); } -void snd_ak4117_reinit(ak4117_t *chip) +void snd_ak4117_reinit(struct ak4117 *chip) { unsigned char old = chip->regmap[AK4117_REG_PWRDN], reg; @@ -157,8 +157,8 @@ static unsigned int external_rate(unsigned char rcs1) } } -static int snd_ak4117_in_error_info(snd_kcontrol_t *kcontrol, - snd_ctl_elem_info_t *uinfo) +static int snd_ak4117_in_error_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; @@ -167,10 +167,10 @@ static int snd_ak4117_in_error_info(snd_kcontrol_t *kcontrol, return 0; } -static int snd_ak4117_in_error_get(snd_kcontrol_t *kcontrol, - snd_ctl_elem_value_t *ucontrol) +static int snd_ak4117_in_error_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4117_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4117 *chip = snd_kcontrol_chip(kcontrol); long *ptr; spin_lock_irq(&chip->lock); @@ -181,8 +181,8 @@ static int snd_ak4117_in_error_get(snd_kcontrol_t *kcontrol, return 0; } -static int snd_ak4117_in_bit_info(snd_kcontrol_t *kcontrol, - snd_ctl_elem_info_t *uinfo) +static int snd_ak4117_in_bit_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 1; @@ -191,10 +191,10 @@ static int snd_ak4117_in_bit_info(snd_kcontrol_t *kcontrol, return 0; } -static int snd_ak4117_in_bit_get(snd_kcontrol_t *kcontrol, - snd_ctl_elem_value_t *ucontrol) +static int snd_ak4117_in_bit_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4117_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4117 *chip = snd_kcontrol_chip(kcontrol); unsigned char reg = kcontrol->private_value & 0xff; unsigned char bit = (kcontrol->private_value >> 8) & 0xff; unsigned char inv = (kcontrol->private_value >> 31) & 1; @@ -203,8 +203,8 @@ static int snd_ak4117_in_bit_get(snd_kcontrol_t *kcontrol, return 0; } -static int snd_ak4117_rx_info(snd_kcontrol_t *kcontrol, - snd_ctl_elem_info_t *uinfo) +static int snd_ak4117_rx_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; @@ -213,19 +213,19 @@ static int snd_ak4117_rx_info(snd_kcontrol_t *kcontrol, return 0; } -static int snd_ak4117_rx_get(snd_kcontrol_t *kcontrol, - snd_ctl_elem_value_t *ucontrol) +static int snd_ak4117_rx_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4117_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4117 *chip = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = (chip->regmap[AK4117_REG_IO] & AK4117_IPS) ? 1 : 0; return 0; } -static int snd_ak4117_rx_put(snd_kcontrol_t *kcontrol, - snd_ctl_elem_value_t *ucontrol) +static int snd_ak4117_rx_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4117_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4117 *chip = snd_kcontrol_chip(kcontrol); int change; u8 old_val; @@ -238,8 +238,8 @@ static int snd_ak4117_rx_put(snd_kcontrol_t *kcontrol, return change; } -static int snd_ak4117_rate_info(snd_kcontrol_t *kcontrol, - snd_ctl_elem_info_t *uinfo) +static int snd_ak4117_rate_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; @@ -248,26 +248,26 @@ static int snd_ak4117_rate_info(snd_kcontrol_t *kcontrol, return 0; } -static int snd_ak4117_rate_get(snd_kcontrol_t *kcontrol, - snd_ctl_elem_value_t *ucontrol) +static int snd_ak4117_rate_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4117_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4117 *chip = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = external_rate(reg_read(chip, AK4117_REG_RCS1)); return 0; } -static int snd_ak4117_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_ak4117_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->count = 1; return 0; } -static int snd_ak4117_spdif_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_ak4117_spdif_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4117_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4117 *chip = snd_kcontrol_chip(kcontrol); unsigned i; for (i = 0; i < AK4117_REG_RXCSB_SIZE; i++) @@ -275,21 +275,21 @@ static int snd_ak4117_spdif_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_ak4117_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_ak4117_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->count = 1; return 0; } -static int snd_ak4117_spdif_mask_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_ak4117_spdif_mask_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { memset(ucontrol->value.iec958.status, 0xff, AK4117_REG_RXCSB_SIZE); return 0; } -static int snd_ak4117_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_ak4117_spdif_pinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->value.integer.min = 0; @@ -298,10 +298,10 @@ static int snd_ak4117_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t return 0; } -static int snd_ak4117_spdif_pget(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_ak4117_spdif_pget(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4117_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4117 *chip = snd_kcontrol_chip(kcontrol); unsigned short tmp; ucontrol->value.integer.value[0] = 0xf8f2; @@ -313,17 +313,17 @@ static int snd_ak4117_spdif_pget(snd_kcontrol_t * kcontrol, return 0; } -static int snd_ak4117_spdif_qinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_ak4117_spdif_qinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES; uinfo->count = AK4117_REG_QSUB_SIZE; return 0; } -static int snd_ak4117_spdif_qget(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_ak4117_spdif_qget(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - ak4117_t *chip = snd_kcontrol_chip(kcontrol); + struct ak4117 *chip = snd_kcontrol_chip(kcontrol); unsigned i; for (i = 0; i < AK4117_REG_QSUB_SIZE; i++) @@ -332,14 +332,14 @@ static int snd_ak4117_spdif_qget(snd_kcontrol_t * kcontrol, } /* Don't forget to change AK4117_CONTROLS define!!! */ -static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = { +static struct snd_kcontrol_new snd_ak4117_iec958_controls[] = { { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = "IEC958 Parity Errors", .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .info = snd_ak4117_in_error_info, .get = snd_ak4117_in_error_get, - .private_value = offsetof(ak4117_t, parity_errors), + .private_value = offsetof(struct ak4117, parity_errors), }, { .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -347,7 +347,7 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = { .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .info = snd_ak4117_in_error_info, .get = snd_ak4117_in_error_get, - .private_value = offsetof(ak4117_t, v_bit_errors), + .private_value = offsetof(struct ak4117, v_bit_errors), }, { .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -355,7 +355,7 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = { .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .info = snd_ak4117_in_error_info, .get = snd_ak4117_in_error_get, - .private_value = offsetof(ak4117_t, ccrc_errors), + .private_value = offsetof(struct ak4117, ccrc_errors), }, { .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -363,7 +363,7 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = { .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .info = snd_ak4117_in_error_info, .get = snd_ak4117_in_error_get, - .private_value = offsetof(ak4117_t, qcrc_errors), + .private_value = offsetof(struct ak4117, qcrc_errors), }, { .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -434,9 +434,9 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = { } }; -int snd_ak4117_build(ak4117_t *ak4117, snd_pcm_substream_t *cap_substream) +int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *cap_substream) { - snd_kcontrol_t *kctl; + struct snd_kcontrol *kctl; unsigned int idx; int err; @@ -456,7 +456,7 @@ int snd_ak4117_build(ak4117_t *ak4117, snd_pcm_substream_t *cap_substream) return 0; } -int snd_ak4117_external_rate(ak4117_t *ak4117) +int snd_ak4117_external_rate(struct ak4117 *ak4117) { unsigned char rcs1; @@ -464,9 +464,9 @@ int snd_ak4117_external_rate(ak4117_t *ak4117) return external_rate(rcs1); } -int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags) +int snd_ak4117_check_rate_and_errors(struct ak4117 *ak4117, unsigned int flags) { - snd_pcm_runtime_t *runtime = ak4117->substream ? ak4117->substream->runtime : NULL; + struct snd_pcm_runtime *runtime = ak4117->substream ? ak4117->substream->runtime : NULL; unsigned long _flags; int res = 0; unsigned char rcs0, rcs1, rcs2; @@ -542,7 +542,7 @@ int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags) static void snd_ak4117_timer(unsigned long data) { - ak4117_t *chip = (ak4117_t *)data; + struct ak4117 *chip = (struct ak4117 *)data; if (chip->init) return; diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c index db2b727..045e32a 100644 --- a/sound/i2c/other/ak4xxx-adda.c +++ b/sound/i2c/other/ak4xxx-adda.c @@ -34,7 +34,7 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>, Takashi Iwai <tiwai@suse.de>"); MODULE_DESCRIPTION("Routines for control of AK452x / AK43xx AD/DA converters"); MODULE_LICENSE("GPL"); -void snd_akm4xxx_write(akm4xxx_t *ak, int chip, unsigned char reg, unsigned char val) +void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val) { ak->ops.lock(ak, chip); ak->ops.write(ak, chip, reg, val); @@ -58,7 +58,7 @@ void snd_akm4xxx_write(akm4xxx_t *ak, int chip, unsigned char reg, unsigned char * * assert the reset operation and restores the register values to the chips. */ -void snd_akm4xxx_reset(akm4xxx_t *ak, int state) +void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state) { unsigned int chip; unsigned char reg; @@ -109,7 +109,7 @@ void snd_akm4xxx_reset(akm4xxx_t *ak, int state) /* * initialize all the ak4xxx chips */ -void snd_akm4xxx_init(akm4xxx_t *ak) +void snd_akm4xxx_init(struct snd_akm4xxx *ak) { static unsigned char inits_ak4524[] = { 0x00, 0x07, /* 0: all power up */ @@ -247,7 +247,8 @@ void snd_akm4xxx_init(akm4xxx_t *ak) #define AK_COMPOSE(chip,addr,shift,mask) (((chip) << 8) | (addr) | ((shift) << 16) | ((mask) << 24)) #define AK_INVERT (1<<23) -static int snd_akm4xxx_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_akm4xxx_volume_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) { unsigned int mask = AK_GET_MASK(kcontrol->private_value); @@ -258,9 +259,10 @@ static int snd_akm4xxx_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t return 0; } -static int snd_akm4xxx_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int snd_akm4xxx_volume_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); + struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int invert = AK_GET_INVERT(kcontrol->private_value); @@ -271,9 +273,10 @@ static int snd_akm4xxx_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t return 0; } -static int snd_akm4xxx_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int snd_akm4xxx_volume_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); + struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int invert = AK_GET_INVERT(kcontrol->private_value); @@ -289,7 +292,8 @@ static int snd_akm4xxx_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t return change; } -static int snd_akm4xxx_ipga_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_akm4xxx_ipga_gain_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; @@ -298,18 +302,20 @@ static int snd_akm4xxx_ipga_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf return 0; } -static int snd_akm4xxx_ipga_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int snd_akm4xxx_ipga_gain_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); + struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); ucontrol->value.integer.value[0] = snd_akm4xxx_get_ipga(ak, chip, addr) & 0x7f; return 0; } -static int snd_akm4xxx_ipga_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int snd_akm4xxx_ipga_gain_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); + struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); unsigned char nval = (ucontrol->value.integer.value[0] % 37) | 0x80; @@ -319,7 +325,8 @@ static int snd_akm4xxx_ipga_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_valu return change; } -static int snd_akm4xxx_deemphasis_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +static int snd_akm4xxx_deemphasis_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) { static char *texts[4] = { "44.1kHz", "Off", "48kHz", "32kHz", @@ -333,9 +340,10 @@ static int snd_akm4xxx_deemphasis_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_in return 0; } -static int snd_akm4xxx_deemphasis_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +static int snd_akm4xxx_deemphasis_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); + struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int shift = AK_GET_SHIFT(kcontrol->private_value); @@ -343,9 +351,10 @@ static int snd_akm4xxx_deemphasis_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_va return 0; } -static int snd_akm4xxx_deemphasis_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int snd_akm4xxx_deemphasis_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); + struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int shift = AK_GET_SHIFT(kcontrol->private_value); @@ -363,10 +372,10 @@ static int snd_akm4xxx_deemphasis_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_val * build AK4xxx controls */ -int snd_akm4xxx_build_controls(akm4xxx_t *ak) +int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak) { unsigned int idx, num_emphs; - snd_kcontrol_t *ctl; + struct snd_kcontrol *ctl; int err; ctl = kmalloc(sizeof(*ctl), GFP_KERNEL); diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index 0f05a2b..4c2fd14 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c @@ -58,7 +58,7 @@ MODULE_LICENSE("GPL"); * lowlevel part */ -static void snd_tea575x_set_freq(tea575x_t *tea) +static void snd_tea575x_set_freq(struct snd_tea575x *tea) { unsigned long freq; @@ -89,7 +89,7 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long data) { struct video_device *dev = video_devdata(file); - tea575x_t *tea = video_get_drvdata(dev); + struct snd_tea575x *tea = video_get_drvdata(dev); void __user *arg = (void __user *)data; switch(cmd) { @@ -175,7 +175,7 @@ static void snd_tea575x_release(struct video_device *vfd) /* * initialize all the tea575x chips */ -void snd_tea575x_init(tea575x_t *tea) +void snd_tea575x_init(struct snd_tea575x *tea) { unsigned int val; @@ -209,7 +209,7 @@ void snd_tea575x_init(tea575x_t *tea) snd_tea575x_set_freq(tea); } -void snd_tea575x_exit(tea575x_t *tea) +void snd_tea575x_exit(struct snd_tea575x *tea) { if (tea->vd_registered) { video_unregister_device(&tea->vd); |