aboutsummaryrefslogtreecommitdiffstats
path: root/sound/i2c/other
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:17:19 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:08 -0500
commit97f02e05f246a2346275c1c93a3079e8933e74b2 (patch)
tree218d0a71f8bdeb5e6d2660339c29c46dab1adaa7 /sound/i2c/other
parenta42dd420bea7a5cd130162183d95f640c299a337 (diff)
[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.c122
-rw-r--r--sound/i2c/other/ak4117.c122
-rw-r--r--sound/i2c/other/ak4xxx-adda.c49
-rw-r--r--sound/i2c/other/tea575x-tuner.c8
4 files changed, 155 insertions, 146 deletions
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c
index d351b3aa1916..12ffffc9e814 100644
--- a/sound/i2c/other/ak4114.c
+++ b/sound/i2c/other/ak4114.c
@@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
37 37
38static void ak4114_stats(void *); 38static void ak4114_stats(void *);
39 39
40static void reg_write(ak4114_t *ak4114, unsigned char reg, unsigned char val) 40static void reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char val)
41{ 41{
42 ak4114->write(ak4114->private_data, reg, val); 42 ak4114->write(ak4114->private_data, reg, val);
43 if (reg <= AK4114_REG_INT1_MASK) 43 if (reg <= AK4114_REG_INT1_MASK)
@@ -46,13 +46,13 @@ static void reg_write(ak4114_t *ak4114, unsigned char reg, unsigned char val)
46 ak4114->txcsb[reg-AK4114_REG_RXCSB0] = val; 46 ak4114->txcsb[reg-AK4114_REG_RXCSB0] = val;
47} 47}
48 48
49static inline unsigned char reg_read(ak4114_t *ak4114, unsigned char reg) 49static inline unsigned char reg_read(struct ak4114 *ak4114, unsigned char reg)
50{ 50{
51 return ak4114->read(ak4114->private_data, reg); 51 return ak4114->read(ak4114->private_data, reg);
52} 52}
53 53
54#if 0 54#if 0
55static void reg_dump(ak4114_t *ak4114) 55static void reg_dump(struct ak4114 *ak4114)
56{ 56{
57 int i; 57 int i;
58 58
@@ -62,7 +62,7 @@ static void reg_dump(ak4114_t *ak4114)
62} 62}
63#endif 63#endif
64 64
65static void snd_ak4114_free(ak4114_t *chip) 65static void snd_ak4114_free(struct ak4114 *chip)
66{ 66{
67 chip->init = 1; /* don't schedule new work */ 67 chip->init = 1; /* don't schedule new work */
68 mb(); 68 mb();
@@ -73,22 +73,22 @@ static void snd_ak4114_free(ak4114_t *chip)
73 kfree(chip); 73 kfree(chip);
74} 74}
75 75
76static int snd_ak4114_dev_free(snd_device_t *device) 76static int snd_ak4114_dev_free(struct snd_device *device)
77{ 77{
78 ak4114_t *chip = device->device_data; 78 struct ak4114 *chip = device->device_data;
79 snd_ak4114_free(chip); 79 snd_ak4114_free(chip);
80 return 0; 80 return 0;
81} 81}
82 82
83int snd_ak4114_create(snd_card_t *card, 83int snd_ak4114_create(struct snd_card *card,
84 ak4114_read_t *read, ak4114_write_t *write, 84 ak4114_read_t *read, ak4114_write_t *write,
85 unsigned char pgm[7], unsigned char txcsb[5], 85 unsigned char pgm[7], unsigned char txcsb[5],
86 void *private_data, ak4114_t **r_ak4114) 86 void *private_data, struct ak4114 **r_ak4114)
87{ 87{
88 ak4114_t *chip; 88 struct ak4114 *chip;
89 int err = 0; 89 int err = 0;
90 unsigned char reg; 90 unsigned char reg;
91 static snd_device_ops_t ops = { 91 static struct snd_device_ops ops = {
92 .dev_free = snd_ak4114_dev_free, 92 .dev_free = snd_ak4114_dev_free,
93 }; 93 };
94 94
@@ -129,7 +129,7 @@ int snd_ak4114_create(snd_card_t *card,
129 return err < 0 ? err : -EIO; 129 return err < 0 ? err : -EIO;
130} 130}
131 131
132void snd_ak4114_reg_write(ak4114_t *chip, unsigned char reg, unsigned char mask, unsigned char val) 132void snd_ak4114_reg_write(struct ak4114 *chip, unsigned char reg, unsigned char mask, unsigned char val)
133{ 133{
134 if (reg <= AK4114_REG_INT1_MASK) 134 if (reg <= AK4114_REG_INT1_MASK)
135 reg_write(chip, reg, (chip->regmap[reg] & ~mask) | val); 135 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,
137 reg_write(chip, reg, (chip->txcsb[reg] & ~mask) | val); 137 reg_write(chip, reg, (chip->txcsb[reg] & ~mask) | val);
138} 138}
139 139
140void snd_ak4114_reinit(ak4114_t *chip) 140void snd_ak4114_reinit(struct ak4114 *chip)
141{ 141{
142 unsigned char old = chip->regmap[AK4114_REG_PWRDN], reg; 142 unsigned char old = chip->regmap[AK4114_REG_PWRDN], reg;
143 143
@@ -176,8 +176,8 @@ static unsigned int external_rate(unsigned char rcs1)
176 } 176 }
177} 177}
178 178
179static int snd_ak4114_in_error_info(snd_kcontrol_t *kcontrol, 179static int snd_ak4114_in_error_info(struct snd_kcontrol *kcontrol,
180 snd_ctl_elem_info_t *uinfo) 180 struct snd_ctl_elem_info *uinfo)
181{ 181{
182 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 182 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
183 uinfo->count = 1; 183 uinfo->count = 1;
@@ -186,10 +186,10 @@ static int snd_ak4114_in_error_info(snd_kcontrol_t *kcontrol,
186 return 0; 186 return 0;
187} 187}
188 188
189static int snd_ak4114_in_error_get(snd_kcontrol_t *kcontrol, 189static int snd_ak4114_in_error_get(struct snd_kcontrol *kcontrol,
190 snd_ctl_elem_value_t *ucontrol) 190 struct snd_ctl_elem_value *ucontrol)
191{ 191{
192 ak4114_t *chip = snd_kcontrol_chip(kcontrol); 192 struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
193 long *ptr; 193 long *ptr;
194 194
195 spin_lock_irq(&chip->lock); 195 spin_lock_irq(&chip->lock);
@@ -200,8 +200,8 @@ static int snd_ak4114_in_error_get(snd_kcontrol_t *kcontrol,
200 return 0; 200 return 0;
201} 201}
202 202
203static int snd_ak4114_in_bit_info(snd_kcontrol_t *kcontrol, 203static int snd_ak4114_in_bit_info(struct snd_kcontrol *kcontrol,
204 snd_ctl_elem_info_t *uinfo) 204 struct snd_ctl_elem_info *uinfo)
205{ 205{
206 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 206 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
207 uinfo->count = 1; 207 uinfo->count = 1;
@@ -210,10 +210,10 @@ static int snd_ak4114_in_bit_info(snd_kcontrol_t *kcontrol,
210 return 0; 210 return 0;
211} 211}
212 212
213static int snd_ak4114_in_bit_get(snd_kcontrol_t *kcontrol, 213static int snd_ak4114_in_bit_get(struct snd_kcontrol *kcontrol,
214 snd_ctl_elem_value_t *ucontrol) 214 struct snd_ctl_elem_value *ucontrol)
215{ 215{
216 ak4114_t *chip = snd_kcontrol_chip(kcontrol); 216 struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
217 unsigned char reg = kcontrol->private_value & 0xff; 217 unsigned char reg = kcontrol->private_value & 0xff;
218 unsigned char bit = (kcontrol->private_value >> 8) & 0xff; 218 unsigned char bit = (kcontrol->private_value >> 8) & 0xff;
219 unsigned char inv = (kcontrol->private_value >> 31) & 1; 219 unsigned char inv = (kcontrol->private_value >> 31) & 1;
@@ -222,8 +222,8 @@ static int snd_ak4114_in_bit_get(snd_kcontrol_t *kcontrol,
222 return 0; 222 return 0;
223} 223}
224 224
225static int snd_ak4114_rate_info(snd_kcontrol_t *kcontrol, 225static int snd_ak4114_rate_info(struct snd_kcontrol *kcontrol,
226 snd_ctl_elem_info_t *uinfo) 226 struct snd_ctl_elem_info *uinfo)
227{ 227{
228 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 228 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
229 uinfo->count = 1; 229 uinfo->count = 1;
@@ -232,26 +232,26 @@ static int snd_ak4114_rate_info(snd_kcontrol_t *kcontrol,
232 return 0; 232 return 0;
233} 233}
234 234
235static int snd_ak4114_rate_get(snd_kcontrol_t *kcontrol, 235static int snd_ak4114_rate_get(struct snd_kcontrol *kcontrol,
236 snd_ctl_elem_value_t *ucontrol) 236 struct snd_ctl_elem_value *ucontrol)
237{ 237{
238 ak4114_t *chip = snd_kcontrol_chip(kcontrol); 238 struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
239 239
240 ucontrol->value.integer.value[0] = external_rate(reg_read(chip, AK4114_REG_RCS1)); 240 ucontrol->value.integer.value[0] = external_rate(reg_read(chip, AK4114_REG_RCS1));
241 return 0; 241 return 0;
242} 242}
243 243
244static int snd_ak4114_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 244static int snd_ak4114_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
245{ 245{
246 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 246 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
247 uinfo->count = 1; 247 uinfo->count = 1;
248 return 0; 248 return 0;
249} 249}
250 250
251static int snd_ak4114_spdif_get(snd_kcontrol_t * kcontrol, 251static int snd_ak4114_spdif_get(struct snd_kcontrol *kcontrol,
252 snd_ctl_elem_value_t * ucontrol) 252 struct snd_ctl_elem_value *ucontrol)
253{ 253{
254 ak4114_t *chip = snd_kcontrol_chip(kcontrol); 254 struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
255 unsigned i; 255 unsigned i;
256 256
257 for (i = 0; i < AK4114_REG_RXCSB_SIZE; i++) 257 for (i = 0; i < AK4114_REG_RXCSB_SIZE; i++)
@@ -259,10 +259,10 @@ static int snd_ak4114_spdif_get(snd_kcontrol_t * kcontrol,
259 return 0; 259 return 0;
260} 260}
261 261
262static int snd_ak4114_spdif_playback_get(snd_kcontrol_t * kcontrol, 262static int snd_ak4114_spdif_playback_get(struct snd_kcontrol *kcontrol,
263 snd_ctl_elem_value_t * ucontrol) 263 struct snd_ctl_elem_value *ucontrol)
264{ 264{
265 ak4114_t *chip = snd_kcontrol_chip(kcontrol); 265 struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
266 unsigned i; 266 unsigned i;
267 267
268 for (i = 0; i < AK4114_REG_TXCSB_SIZE; i++) 268 for (i = 0; i < AK4114_REG_TXCSB_SIZE; i++)
@@ -270,10 +270,10 @@ static int snd_ak4114_spdif_playback_get(snd_kcontrol_t * kcontrol,
270 return 0; 270 return 0;
271} 271}
272 272
273static int snd_ak4114_spdif_playback_put(snd_kcontrol_t * kcontrol, 273static int snd_ak4114_spdif_playback_put(struct snd_kcontrol *kcontrol,
274 snd_ctl_elem_value_t * ucontrol) 274 struct snd_ctl_elem_value *ucontrol)
275{ 275{
276 ak4114_t *chip = snd_kcontrol_chip(kcontrol); 276 struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
277 unsigned i; 277 unsigned i;
278 278
279 for (i = 0; i < AK4114_REG_TXCSB_SIZE; i++) 279 for (i = 0; i < AK4114_REG_TXCSB_SIZE; i++)
@@ -281,21 +281,21 @@ static int snd_ak4114_spdif_playback_put(snd_kcontrol_t * kcontrol,
281 return 0; 281 return 0;
282} 282}
283 283
284static int snd_ak4114_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 284static int snd_ak4114_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
285{ 285{
286 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 286 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
287 uinfo->count = 1; 287 uinfo->count = 1;
288 return 0; 288 return 0;
289} 289}
290 290
291static int snd_ak4114_spdif_mask_get(snd_kcontrol_t * kcontrol, 291static int snd_ak4114_spdif_mask_get(struct snd_kcontrol *kcontrol,
292 snd_ctl_elem_value_t * ucontrol) 292 struct snd_ctl_elem_value *ucontrol)
293{ 293{
294 memset(ucontrol->value.iec958.status, 0xff, AK4114_REG_RXCSB_SIZE); 294 memset(ucontrol->value.iec958.status, 0xff, AK4114_REG_RXCSB_SIZE);
295 return 0; 295 return 0;
296} 296}
297 297
298static int snd_ak4114_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 298static int snd_ak4114_spdif_pinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
299{ 299{
300 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 300 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
301 uinfo->value.integer.min = 0; 301 uinfo->value.integer.min = 0;
@@ -304,10 +304,10 @@ static int snd_ak4114_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
304 return 0; 304 return 0;
305} 305}
306 306
307static int snd_ak4114_spdif_pget(snd_kcontrol_t * kcontrol, 307static int snd_ak4114_spdif_pget(struct snd_kcontrol *kcontrol,
308 snd_ctl_elem_value_t * ucontrol) 308 struct snd_ctl_elem_value *ucontrol)
309{ 309{
310 ak4114_t *chip = snd_kcontrol_chip(kcontrol); 310 struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
311 unsigned short tmp; 311 unsigned short tmp;
312 312
313 ucontrol->value.integer.value[0] = 0xf8f2; 313 ucontrol->value.integer.value[0] = 0xf8f2;
@@ -319,17 +319,17 @@ static int snd_ak4114_spdif_pget(snd_kcontrol_t * kcontrol,
319 return 0; 319 return 0;
320} 320}
321 321
322static int snd_ak4114_spdif_qinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 322static int snd_ak4114_spdif_qinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
323{ 323{
324 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES; 324 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
325 uinfo->count = AK4114_REG_QSUB_SIZE; 325 uinfo->count = AK4114_REG_QSUB_SIZE;
326 return 0; 326 return 0;
327} 327}
328 328
329static int snd_ak4114_spdif_qget(snd_kcontrol_t * kcontrol, 329static int snd_ak4114_spdif_qget(struct snd_kcontrol *kcontrol,
330 snd_ctl_elem_value_t * ucontrol) 330 struct snd_ctl_elem_value *ucontrol)
331{ 331{
332 ak4114_t *chip = snd_kcontrol_chip(kcontrol); 332 struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
333 unsigned i; 333 unsigned i;
334 334
335 for (i = 0; i < AK4114_REG_QSUB_SIZE; i++) 335 for (i = 0; i < AK4114_REG_QSUB_SIZE; i++)
@@ -338,14 +338,14 @@ static int snd_ak4114_spdif_qget(snd_kcontrol_t * kcontrol,
338} 338}
339 339
340/* Don't forget to change AK4114_CONTROLS define!!! */ 340/* Don't forget to change AK4114_CONTROLS define!!! */
341static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = { 341static struct snd_kcontrol_new snd_ak4114_iec958_controls[] = {
342{ 342{
343 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 343 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
344 .name = "IEC958 Parity Errors", 344 .name = "IEC958 Parity Errors",
345 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 345 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
346 .info = snd_ak4114_in_error_info, 346 .info = snd_ak4114_in_error_info,
347 .get = snd_ak4114_in_error_get, 347 .get = snd_ak4114_in_error_get,
348 .private_value = offsetof(ak4114_t, parity_errors), 348 .private_value = offsetof(struct ak4114, parity_errors),
349}, 349},
350{ 350{
351 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 351 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -353,7 +353,7 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = {
353 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 353 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
354 .info = snd_ak4114_in_error_info, 354 .info = snd_ak4114_in_error_info,
355 .get = snd_ak4114_in_error_get, 355 .get = snd_ak4114_in_error_get,
356 .private_value = offsetof(ak4114_t, v_bit_errors), 356 .private_value = offsetof(struct ak4114, v_bit_errors),
357}, 357},
358{ 358{
359 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 359 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -361,7 +361,7 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = {
361 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 361 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
362 .info = snd_ak4114_in_error_info, 362 .info = snd_ak4114_in_error_info,
363 .get = snd_ak4114_in_error_get, 363 .get = snd_ak4114_in_error_get,
364 .private_value = offsetof(ak4114_t, ccrc_errors), 364 .private_value = offsetof(struct ak4114, ccrc_errors),
365}, 365},
366{ 366{
367 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 367 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -369,7 +369,7 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = {
369 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 369 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
370 .info = snd_ak4114_in_error_info, 370 .info = snd_ak4114_in_error_info,
371 .get = snd_ak4114_in_error_get, 371 .get = snd_ak4114_in_error_get,
372 .private_value = offsetof(ak4114_t, qcrc_errors), 372 .private_value = offsetof(struct ak4114, qcrc_errors),
373}, 373},
374{ 374{
375 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 375 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -447,11 +447,11 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = {
447} 447}
448}; 448};
449 449
450int snd_ak4114_build(ak4114_t *ak4114, 450int snd_ak4114_build(struct ak4114 *ak4114,
451 snd_pcm_substream_t *ply_substream, 451 struct snd_pcm_substream *ply_substream,
452 snd_pcm_substream_t *cap_substream) 452 struct snd_pcm_substream *cap_substream)
453{ 453{
454 snd_kcontrol_t *kctl; 454 struct snd_kcontrol *kctl;
455 unsigned int idx; 455 unsigned int idx;
456 int err; 456 int err;
457 457
@@ -482,7 +482,7 @@ int snd_ak4114_build(ak4114_t *ak4114,
482 return 0; 482 return 0;
483} 483}
484 484
485int snd_ak4114_external_rate(ak4114_t *ak4114) 485int snd_ak4114_external_rate(struct ak4114 *ak4114)
486{ 486{
487 unsigned char rcs1; 487 unsigned char rcs1;
488 488
@@ -490,9 +490,9 @@ int snd_ak4114_external_rate(ak4114_t *ak4114)
490 return external_rate(rcs1); 490 return external_rate(rcs1);
491} 491}
492 492
493int snd_ak4114_check_rate_and_errors(ak4114_t *ak4114, unsigned int flags) 493int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags)
494{ 494{
495 snd_pcm_runtime_t *runtime = ak4114->capture_substream ? ak4114->capture_substream->runtime : NULL; 495 struct snd_pcm_runtime *runtime = ak4114->capture_substream ? ak4114->capture_substream->runtime : NULL;
496 unsigned long _flags; 496 unsigned long _flags;
497 int res = 0; 497 int res = 0;
498 unsigned char rcs0, rcs1; 498 unsigned char rcs0, rcs1;
@@ -563,7 +563,7 @@ int snd_ak4114_check_rate_and_errors(ak4114_t *ak4114, unsigned int flags)
563 563
564static void ak4114_stats(void *data) 564static void ak4114_stats(void *data)
565{ 565{
566 ak4114_t *chip = (ak4114_t *)data; 566 struct ak4114 *chip = (struct ak4114 *)data;
567 567
568 if (chip->init) 568 if (chip->init)
569 return; 569 return;
diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c
index 35b4584483a3..4e45952dd95a 100644
--- a/sound/i2c/other/ak4117.c
+++ b/sound/i2c/other/ak4117.c
@@ -37,20 +37,20 @@ MODULE_LICENSE("GPL");
37 37
38static void snd_ak4117_timer(unsigned long data); 38static void snd_ak4117_timer(unsigned long data);
39 39
40static void reg_write(ak4117_t *ak4117, unsigned char reg, unsigned char val) 40static void reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char val)
41{ 41{
42 ak4117->write(ak4117->private_data, reg, val); 42 ak4117->write(ak4117->private_data, reg, val);
43 if (reg < sizeof(ak4117->regmap)) 43 if (reg < sizeof(ak4117->regmap))
44 ak4117->regmap[reg] = val; 44 ak4117->regmap[reg] = val;
45} 45}
46 46
47static inline unsigned char reg_read(ak4117_t *ak4117, unsigned char reg) 47static inline unsigned char reg_read(struct ak4117 *ak4117, unsigned char reg)
48{ 48{
49 return ak4117->read(ak4117->private_data, reg); 49 return ak4117->read(ak4117->private_data, reg);
50} 50}
51 51
52#if 0 52#if 0
53static void reg_dump(ak4117_t *ak4117) 53static void reg_dump(struct ak4117 *ak4117)
54{ 54{
55 int i; 55 int i;
56 56
@@ -60,26 +60,26 @@ static void reg_dump(ak4117_t *ak4117)
60} 60}
61#endif 61#endif
62 62
63static void snd_ak4117_free(ak4117_t *chip) 63static void snd_ak4117_free(struct ak4117 *chip)
64{ 64{
65 del_timer(&chip->timer); 65 del_timer(&chip->timer);
66 kfree(chip); 66 kfree(chip);
67} 67}
68 68
69static int snd_ak4117_dev_free(snd_device_t *device) 69static int snd_ak4117_dev_free(struct snd_device *device)
70{ 70{
71 ak4117_t *chip = device->device_data; 71 struct ak4117 *chip = device->device_data;
72 snd_ak4117_free(chip); 72 snd_ak4117_free(chip);
73 return 0; 73 return 0;
74} 74}
75 75
76int snd_ak4117_create(snd_card_t *card, ak4117_read_t *read, ak4117_write_t *write, 76int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write,
77 unsigned char pgm[5], void *private_data, ak4117_t **r_ak4117) 77 unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117)
78{ 78{
79 ak4117_t *chip; 79 struct ak4117 *chip;
80 int err = 0; 80 int err = 0;
81 unsigned char reg; 81 unsigned char reg;
82 static snd_device_ops_t ops = { 82 static struct snd_device_ops ops = {
83 .dev_free = snd_ak4117_dev_free, 83 .dev_free = snd_ak4117_dev_free,
84 }; 84 };
85 85
@@ -115,14 +115,14 @@ int snd_ak4117_create(snd_card_t *card, ak4117_read_t *read, ak4117_write_t *wri
115 return err < 0 ? err : -EIO; 115 return err < 0 ? err : -EIO;
116} 116}
117 117
118void snd_ak4117_reg_write(ak4117_t *chip, unsigned char reg, unsigned char mask, unsigned char val) 118void snd_ak4117_reg_write(struct ak4117 *chip, unsigned char reg, unsigned char mask, unsigned char val)
119{ 119{
120 if (reg >= 5) 120 if (reg >= 5)
121 return; 121 return;
122 reg_write(chip, reg, (chip->regmap[reg] & ~mask) | val); 122 reg_write(chip, reg, (chip->regmap[reg] & ~mask) | val);
123} 123}
124 124
125void snd_ak4117_reinit(ak4117_t *chip) 125void snd_ak4117_reinit(struct ak4117 *chip)
126{ 126{
127 unsigned char old = chip->regmap[AK4117_REG_PWRDN], reg; 127 unsigned char old = chip->regmap[AK4117_REG_PWRDN], reg;
128 128
@@ -157,8 +157,8 @@ static unsigned int external_rate(unsigned char rcs1)
157 } 157 }
158} 158}
159 159
160static int snd_ak4117_in_error_info(snd_kcontrol_t *kcontrol, 160static int snd_ak4117_in_error_info(struct snd_kcontrol *kcontrol,
161 snd_ctl_elem_info_t *uinfo) 161 struct snd_ctl_elem_info *uinfo)
162{ 162{
163 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 163 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
164 uinfo->count = 1; 164 uinfo->count = 1;
@@ -167,10 +167,10 @@ static int snd_ak4117_in_error_info(snd_kcontrol_t *kcontrol,
167 return 0; 167 return 0;
168} 168}
169 169
170static int snd_ak4117_in_error_get(snd_kcontrol_t *kcontrol, 170static int snd_ak4117_in_error_get(struct snd_kcontrol *kcontrol,
171 snd_ctl_elem_value_t *ucontrol) 171 struct snd_ctl_elem_value *ucontrol)
172{ 172{
173 ak4117_t *chip = snd_kcontrol_chip(kcontrol); 173 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
174 long *ptr; 174 long *ptr;
175 175
176 spin_lock_irq(&chip->lock); 176 spin_lock_irq(&chip->lock);
@@ -181,8 +181,8 @@ static int snd_ak4117_in_error_get(snd_kcontrol_t *kcontrol,
181 return 0; 181 return 0;
182} 182}
183 183
184static int snd_ak4117_in_bit_info(snd_kcontrol_t *kcontrol, 184static int snd_ak4117_in_bit_info(struct snd_kcontrol *kcontrol,
185 snd_ctl_elem_info_t *uinfo) 185 struct snd_ctl_elem_info *uinfo)
186{ 186{
187 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 187 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
188 uinfo->count = 1; 188 uinfo->count = 1;
@@ -191,10 +191,10 @@ static int snd_ak4117_in_bit_info(snd_kcontrol_t *kcontrol,
191 return 0; 191 return 0;
192} 192}
193 193
194static int snd_ak4117_in_bit_get(snd_kcontrol_t *kcontrol, 194static int snd_ak4117_in_bit_get(struct snd_kcontrol *kcontrol,
195 snd_ctl_elem_value_t *ucontrol) 195 struct snd_ctl_elem_value *ucontrol)
196{ 196{
197 ak4117_t *chip = snd_kcontrol_chip(kcontrol); 197 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
198 unsigned char reg = kcontrol->private_value & 0xff; 198 unsigned char reg = kcontrol->private_value & 0xff;
199 unsigned char bit = (kcontrol->private_value >> 8) & 0xff; 199 unsigned char bit = (kcontrol->private_value >> 8) & 0xff;
200 unsigned char inv = (kcontrol->private_value >> 31) & 1; 200 unsigned char inv = (kcontrol->private_value >> 31) & 1;
@@ -203,8 +203,8 @@ static int snd_ak4117_in_bit_get(snd_kcontrol_t *kcontrol,
203 return 0; 203 return 0;
204} 204}
205 205
206static int snd_ak4117_rx_info(snd_kcontrol_t *kcontrol, 206static int snd_ak4117_rx_info(struct snd_kcontrol *kcontrol,
207 snd_ctl_elem_info_t *uinfo) 207 struct snd_ctl_elem_info *uinfo)
208{ 208{
209 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 209 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
210 uinfo->count = 1; 210 uinfo->count = 1;
@@ -213,19 +213,19 @@ static int snd_ak4117_rx_info(snd_kcontrol_t *kcontrol,
213 return 0; 213 return 0;
214} 214}
215 215
216static int snd_ak4117_rx_get(snd_kcontrol_t *kcontrol, 216static int snd_ak4117_rx_get(struct snd_kcontrol *kcontrol,
217 snd_ctl_elem_value_t *ucontrol) 217 struct snd_ctl_elem_value *ucontrol)
218{ 218{
219 ak4117_t *chip = snd_kcontrol_chip(kcontrol); 219 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
220 220
221 ucontrol->value.integer.value[0] = (chip->regmap[AK4117_REG_IO] & AK4117_IPS) ? 1 : 0; 221 ucontrol->value.integer.value[0] = (chip->regmap[AK4117_REG_IO] & AK4117_IPS) ? 1 : 0;
222 return 0; 222 return 0;
223} 223}
224 224
225static int snd_ak4117_rx_put(snd_kcontrol_t *kcontrol, 225static int snd_ak4117_rx_put(struct snd_kcontrol *kcontrol,
226 snd_ctl_elem_value_t *ucontrol) 226 struct snd_ctl_elem_value *ucontrol)
227{ 227{
228 ak4117_t *chip = snd_kcontrol_chip(kcontrol); 228 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
229 int change; 229 int change;
230 u8 old_val; 230 u8 old_val;
231 231
@@ -238,8 +238,8 @@ static int snd_ak4117_rx_put(snd_kcontrol_t *kcontrol,
238 return change; 238 return change;
239} 239}
240 240
241static int snd_ak4117_rate_info(snd_kcontrol_t *kcontrol, 241static int snd_ak4117_rate_info(struct snd_kcontrol *kcontrol,
242 snd_ctl_elem_info_t *uinfo) 242 struct snd_ctl_elem_info *uinfo)
243{ 243{
244 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 244 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
245 uinfo->count = 1; 245 uinfo->count = 1;
@@ -248,26 +248,26 @@ static int snd_ak4117_rate_info(snd_kcontrol_t *kcontrol,
248 return 0; 248 return 0;
249} 249}
250 250
251static int snd_ak4117_rate_get(snd_kcontrol_t *kcontrol, 251static int snd_ak4117_rate_get(struct snd_kcontrol *kcontrol,
252 snd_ctl_elem_value_t *ucontrol) 252 struct snd_ctl_elem_value *ucontrol)
253{ 253{
254 ak4117_t *chip = snd_kcontrol_chip(kcontrol); 254 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
255 255
256 ucontrol->value.integer.value[0] = external_rate(reg_read(chip, AK4117_REG_RCS1)); 256 ucontrol->value.integer.value[0] = external_rate(reg_read(chip, AK4117_REG_RCS1));
257 return 0; 257 return 0;
258} 258}
259 259
260static int snd_ak4117_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 260static int snd_ak4117_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
261{ 261{
262 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 262 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
263 uinfo->count = 1; 263 uinfo->count = 1;
264 return 0; 264 return 0;
265} 265}
266 266
267static int snd_ak4117_spdif_get(snd_kcontrol_t * kcontrol, 267static int snd_ak4117_spdif_get(struct snd_kcontrol *kcontrol,
268 snd_ctl_elem_value_t * ucontrol) 268 struct snd_ctl_elem_value *ucontrol)
269{ 269{
270 ak4117_t *chip = snd_kcontrol_chip(kcontrol); 270 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
271 unsigned i; 271 unsigned i;
272 272
273 for (i = 0; i < AK4117_REG_RXCSB_SIZE; i++) 273 for (i = 0; i < AK4117_REG_RXCSB_SIZE; i++)
@@ -275,21 +275,21 @@ static int snd_ak4117_spdif_get(snd_kcontrol_t * kcontrol,
275 return 0; 275 return 0;
276} 276}
277 277
278static int snd_ak4117_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 278static int snd_ak4117_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
279{ 279{
280 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 280 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
281 uinfo->count = 1; 281 uinfo->count = 1;
282 return 0; 282 return 0;
283} 283}
284 284
285static int snd_ak4117_spdif_mask_get(snd_kcontrol_t * kcontrol, 285static int snd_ak4117_spdif_mask_get(struct snd_kcontrol *kcontrol,
286 snd_ctl_elem_value_t * ucontrol) 286 struct snd_ctl_elem_value *ucontrol)
287{ 287{
288 memset(ucontrol->value.iec958.status, 0xff, AK4117_REG_RXCSB_SIZE); 288 memset(ucontrol->value.iec958.status, 0xff, AK4117_REG_RXCSB_SIZE);
289 return 0; 289 return 0;
290} 290}
291 291
292static int snd_ak4117_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 292static int snd_ak4117_spdif_pinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
293{ 293{
294 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 294 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
295 uinfo->value.integer.min = 0; 295 uinfo->value.integer.min = 0;
@@ -298,10 +298,10 @@ static int snd_ak4117_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
298 return 0; 298 return 0;
299} 299}
300 300
301static int snd_ak4117_spdif_pget(snd_kcontrol_t * kcontrol, 301static int snd_ak4117_spdif_pget(struct snd_kcontrol *kcontrol,
302 snd_ctl_elem_value_t * ucontrol) 302 struct snd_ctl_elem_value *ucontrol)
303{ 303{
304 ak4117_t *chip = snd_kcontrol_chip(kcontrol); 304 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
305 unsigned short tmp; 305 unsigned short tmp;
306 306
307 ucontrol->value.integer.value[0] = 0xf8f2; 307 ucontrol->value.integer.value[0] = 0xf8f2;
@@ -313,17 +313,17 @@ static int snd_ak4117_spdif_pget(snd_kcontrol_t * kcontrol,
313 return 0; 313 return 0;
314} 314}
315 315
316static int snd_ak4117_spdif_qinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 316static int snd_ak4117_spdif_qinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
317{ 317{
318 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES; 318 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
319 uinfo->count = AK4117_REG_QSUB_SIZE; 319 uinfo->count = AK4117_REG_QSUB_SIZE;
320 return 0; 320 return 0;
321} 321}
322 322
323static int snd_ak4117_spdif_qget(snd_kcontrol_t * kcontrol, 323static int snd_ak4117_spdif_qget(struct snd_kcontrol *kcontrol,
324 snd_ctl_elem_value_t * ucontrol) 324 struct snd_ctl_elem_value *ucontrol)
325{ 325{
326 ak4117_t *chip = snd_kcontrol_chip(kcontrol); 326 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
327 unsigned i; 327 unsigned i;
328 328
329 for (i = 0; i < AK4117_REG_QSUB_SIZE; i++) 329 for (i = 0; i < AK4117_REG_QSUB_SIZE; i++)
@@ -332,14 +332,14 @@ static int snd_ak4117_spdif_qget(snd_kcontrol_t * kcontrol,
332} 332}
333 333
334/* Don't forget to change AK4117_CONTROLS define!!! */ 334/* Don't forget to change AK4117_CONTROLS define!!! */
335static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = { 335static struct snd_kcontrol_new snd_ak4117_iec958_controls[] = {
336{ 336{
337 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 337 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
338 .name = "IEC958 Parity Errors", 338 .name = "IEC958 Parity Errors",
339 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 339 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
340 .info = snd_ak4117_in_error_info, 340 .info = snd_ak4117_in_error_info,
341 .get = snd_ak4117_in_error_get, 341 .get = snd_ak4117_in_error_get,
342 .private_value = offsetof(ak4117_t, parity_errors), 342 .private_value = offsetof(struct ak4117, parity_errors),
343}, 343},
344{ 344{
345 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 345 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -347,7 +347,7 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = {
347 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 347 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
348 .info = snd_ak4117_in_error_info, 348 .info = snd_ak4117_in_error_info,
349 .get = snd_ak4117_in_error_get, 349 .get = snd_ak4117_in_error_get,
350 .private_value = offsetof(ak4117_t, v_bit_errors), 350 .private_value = offsetof(struct ak4117, v_bit_errors),
351}, 351},
352{ 352{
353 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 353 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -355,7 +355,7 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = {
355 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 355 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
356 .info = snd_ak4117_in_error_info, 356 .info = snd_ak4117_in_error_info,
357 .get = snd_ak4117_in_error_get, 357 .get = snd_ak4117_in_error_get,
358 .private_value = offsetof(ak4117_t, ccrc_errors), 358 .private_value = offsetof(struct ak4117, ccrc_errors),
359}, 359},
360{ 360{
361 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 361 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -363,7 +363,7 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = {
363 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 363 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
364 .info = snd_ak4117_in_error_info, 364 .info = snd_ak4117_in_error_info,
365 .get = snd_ak4117_in_error_get, 365 .get = snd_ak4117_in_error_get,
366 .private_value = offsetof(ak4117_t, qcrc_errors), 366 .private_value = offsetof(struct ak4117, qcrc_errors),
367}, 367},
368{ 368{
369 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 369 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -434,9 +434,9 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = {
434} 434}
435}; 435};
436 436
437int snd_ak4117_build(ak4117_t *ak4117, snd_pcm_substream_t *cap_substream) 437int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *cap_substream)
438{ 438{
439 snd_kcontrol_t *kctl; 439 struct snd_kcontrol *kctl;
440 unsigned int idx; 440 unsigned int idx;
441 int err; 441 int err;
442 442
@@ -456,7 +456,7 @@ int snd_ak4117_build(ak4117_t *ak4117, snd_pcm_substream_t *cap_substream)
456 return 0; 456 return 0;
457} 457}
458 458
459int snd_ak4117_external_rate(ak4117_t *ak4117) 459int snd_ak4117_external_rate(struct ak4117 *ak4117)
460{ 460{
461 unsigned char rcs1; 461 unsigned char rcs1;
462 462
@@ -464,9 +464,9 @@ int snd_ak4117_external_rate(ak4117_t *ak4117)
464 return external_rate(rcs1); 464 return external_rate(rcs1);
465} 465}
466 466
467int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags) 467int snd_ak4117_check_rate_and_errors(struct ak4117 *ak4117, unsigned int flags)
468{ 468{
469 snd_pcm_runtime_t *runtime = ak4117->substream ? ak4117->substream->runtime : NULL; 469 struct snd_pcm_runtime *runtime = ak4117->substream ? ak4117->substream->runtime : NULL;
470 unsigned long _flags; 470 unsigned long _flags;
471 int res = 0; 471 int res = 0;
472 unsigned char rcs0, rcs1, rcs2; 472 unsigned char rcs0, rcs1, rcs2;
@@ -542,7 +542,7 @@ int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags)
542 542
543static void snd_ak4117_timer(unsigned long data) 543static void snd_ak4117_timer(unsigned long data)
544{ 544{
545 ak4117_t *chip = (ak4117_t *)data; 545 struct ak4117 *chip = (struct ak4117 *)data;
546 546
547 if (chip->init) 547 if (chip->init)
548 return; 548 return;
diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c
index db2b7274a9d6..045e32a311e0 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>");
34MODULE_DESCRIPTION("Routines for control of AK452x / AK43xx AD/DA converters"); 34MODULE_DESCRIPTION("Routines for control of AK452x / AK43xx AD/DA converters");
35MODULE_LICENSE("GPL"); 35MODULE_LICENSE("GPL");
36 36
37void snd_akm4xxx_write(akm4xxx_t *ak, int chip, unsigned char reg, unsigned char val) 37void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val)
38{ 38{
39 ak->ops.lock(ak, chip); 39 ak->ops.lock(ak, chip);
40 ak->ops.write(ak, chip, reg, val); 40 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
58 * 58 *
59 * assert the reset operation and restores the register values to the chips. 59 * assert the reset operation and restores the register values to the chips.
60 */ 60 */
61void snd_akm4xxx_reset(akm4xxx_t *ak, int state) 61void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state)
62{ 62{
63 unsigned int chip; 63 unsigned int chip;
64 unsigned char reg; 64 unsigned char reg;
@@ -109,7 +109,7 @@ void snd_akm4xxx_reset(akm4xxx_t *ak, int state)
109/* 109/*
110 * initialize all the ak4xxx chips 110 * initialize all the ak4xxx chips
111 */ 111 */
112void snd_akm4xxx_init(akm4xxx_t *ak) 112void snd_akm4xxx_init(struct snd_akm4xxx *ak)
113{ 113{
114 static unsigned char inits_ak4524[] = { 114 static unsigned char inits_ak4524[] = {
115 0x00, 0x07, /* 0: all power up */ 115 0x00, 0x07, /* 0: all power up */
@@ -247,7 +247,8 @@ void snd_akm4xxx_init(akm4xxx_t *ak)
247#define AK_COMPOSE(chip,addr,shift,mask) (((chip) << 8) | (addr) | ((shift) << 16) | ((mask) << 24)) 247#define AK_COMPOSE(chip,addr,shift,mask) (((chip) << 8) | (addr) | ((shift) << 16) | ((mask) << 24))
248#define AK_INVERT (1<<23) 248#define AK_INVERT (1<<23)
249 249
250static int snd_akm4xxx_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 250static int snd_akm4xxx_volume_info(struct snd_kcontrol *kcontrol,
251 struct snd_ctl_elem_info *uinfo)
251{ 252{
252 unsigned int mask = AK_GET_MASK(kcontrol->private_value); 253 unsigned int mask = AK_GET_MASK(kcontrol->private_value);
253 254
@@ -258,9 +259,10 @@ static int snd_akm4xxx_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
258 return 0; 259 return 0;
259} 260}
260 261
261static int snd_akm4xxx_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 262static int snd_akm4xxx_volume_get(struct snd_kcontrol *kcontrol,
263 struct snd_ctl_elem_value *ucontrol)
262{ 264{
263 akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); 265 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
264 int chip = AK_GET_CHIP(kcontrol->private_value); 266 int chip = AK_GET_CHIP(kcontrol->private_value);
265 int addr = AK_GET_ADDR(kcontrol->private_value); 267 int addr = AK_GET_ADDR(kcontrol->private_value);
266 int invert = AK_GET_INVERT(kcontrol->private_value); 268 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
271 return 0; 273 return 0;
272} 274}
273 275
274static int snd_akm4xxx_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 276static int snd_akm4xxx_volume_put(struct snd_kcontrol *kcontrol,
277 struct snd_ctl_elem_value *ucontrol)
275{ 278{
276 akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); 279 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
277 int chip = AK_GET_CHIP(kcontrol->private_value); 280 int chip = AK_GET_CHIP(kcontrol->private_value);
278 int addr = AK_GET_ADDR(kcontrol->private_value); 281 int addr = AK_GET_ADDR(kcontrol->private_value);
279 int invert = AK_GET_INVERT(kcontrol->private_value); 282 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
289 return change; 292 return change;
290} 293}
291 294
292static int snd_akm4xxx_ipga_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 295static int snd_akm4xxx_ipga_gain_info(struct snd_kcontrol *kcontrol,
296 struct snd_ctl_elem_info *uinfo)
293{ 297{
294 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 298 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
295 uinfo->count = 1; 299 uinfo->count = 1;
@@ -298,18 +302,20 @@ static int snd_akm4xxx_ipga_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
298 return 0; 302 return 0;
299} 303}
300 304
301static int snd_akm4xxx_ipga_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 305static int snd_akm4xxx_ipga_gain_get(struct snd_kcontrol *kcontrol,
306 struct snd_ctl_elem_value *ucontrol)
302{ 307{
303 akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); 308 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
304 int chip = AK_GET_CHIP(kcontrol->private_value); 309 int chip = AK_GET_CHIP(kcontrol->private_value);
305 int addr = AK_GET_ADDR(kcontrol->private_value); 310 int addr = AK_GET_ADDR(kcontrol->private_value);
306 ucontrol->value.integer.value[0] = snd_akm4xxx_get_ipga(ak, chip, addr) & 0x7f; 311 ucontrol->value.integer.value[0] = snd_akm4xxx_get_ipga(ak, chip, addr) & 0x7f;
307 return 0; 312 return 0;
308} 313}
309 314
310static int snd_akm4xxx_ipga_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 315static int snd_akm4xxx_ipga_gain_put(struct snd_kcontrol *kcontrol,
316 struct snd_ctl_elem_value *ucontrol)
311{ 317{
312 akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); 318 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
313 int chip = AK_GET_CHIP(kcontrol->private_value); 319 int chip = AK_GET_CHIP(kcontrol->private_value);
314 int addr = AK_GET_ADDR(kcontrol->private_value); 320 int addr = AK_GET_ADDR(kcontrol->private_value);
315 unsigned char nval = (ucontrol->value.integer.value[0] % 37) | 0x80; 321 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
319 return change; 325 return change;
320} 326}
321 327
322static int snd_akm4xxx_deemphasis_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 328static int snd_akm4xxx_deemphasis_info(struct snd_kcontrol *kcontrol,
329 struct snd_ctl_elem_info *uinfo)
323{ 330{
324 static char *texts[4] = { 331 static char *texts[4] = {
325 "44.1kHz", "Off", "48kHz", "32kHz", 332 "44.1kHz", "Off", "48kHz", "32kHz",
@@ -333,9 +340,10 @@ static int snd_akm4xxx_deemphasis_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_in
333 return 0; 340 return 0;
334} 341}
335 342
336static int snd_akm4xxx_deemphasis_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 343static int snd_akm4xxx_deemphasis_get(struct snd_kcontrol *kcontrol,
344 struct snd_ctl_elem_value *ucontrol)
337{ 345{
338 akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); 346 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
339 int chip = AK_GET_CHIP(kcontrol->private_value); 347 int chip = AK_GET_CHIP(kcontrol->private_value);
340 int addr = AK_GET_ADDR(kcontrol->private_value); 348 int addr = AK_GET_ADDR(kcontrol->private_value);
341 int shift = AK_GET_SHIFT(kcontrol->private_value); 349 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
343 return 0; 351 return 0;
344} 352}
345 353
346static int snd_akm4xxx_deemphasis_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 354static int snd_akm4xxx_deemphasis_put(struct snd_kcontrol *kcontrol,
355 struct snd_ctl_elem_value *ucontrol)
347{ 356{
348 akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); 357 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
349 int chip = AK_GET_CHIP(kcontrol->private_value); 358 int chip = AK_GET_CHIP(kcontrol->private_value);
350 int addr = AK_GET_ADDR(kcontrol->private_value); 359 int addr = AK_GET_ADDR(kcontrol->private_value);
351 int shift = AK_GET_SHIFT(kcontrol->private_value); 360 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
363 * build AK4xxx controls 372 * build AK4xxx controls
364 */ 373 */
365 374
366int snd_akm4xxx_build_controls(akm4xxx_t *ak) 375int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak)
367{ 376{
368 unsigned int idx, num_emphs; 377 unsigned int idx, num_emphs;
369 snd_kcontrol_t *ctl; 378 struct snd_kcontrol *ctl;
370 int err; 379 int err;
371 380
372 ctl = kmalloc(sizeof(*ctl), GFP_KERNEL); 381 ctl = kmalloc(sizeof(*ctl), GFP_KERNEL);
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c
index 0f05a2b9a370..4c2fd14c1056 100644
--- a/sound/i2c/other/tea575x-tuner.c
+++ b/sound/i2c/other/tea575x-tuner.c
@@ -58,7 +58,7 @@ MODULE_LICENSE("GPL");
58 * lowlevel part 58 * lowlevel part
59 */ 59 */
60 60
61static void snd_tea575x_set_freq(tea575x_t *tea) 61static void snd_tea575x_set_freq(struct snd_tea575x *tea)
62{ 62{
63 unsigned long freq; 63 unsigned long freq;
64 64
@@ -89,7 +89,7 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
89 unsigned int cmd, unsigned long data) 89 unsigned int cmd, unsigned long data)
90{ 90{
91 struct video_device *dev = video_devdata(file); 91 struct video_device *dev = video_devdata(file);
92 tea575x_t *tea = video_get_drvdata(dev); 92 struct snd_tea575x *tea = video_get_drvdata(dev);
93 void __user *arg = (void __user *)data; 93 void __user *arg = (void __user *)data;
94 94
95 switch(cmd) { 95 switch(cmd) {
@@ -175,7 +175,7 @@ static void snd_tea575x_release(struct video_device *vfd)
175/* 175/*
176 * initialize all the tea575x chips 176 * initialize all the tea575x chips
177 */ 177 */
178void snd_tea575x_init(tea575x_t *tea) 178void snd_tea575x_init(struct snd_tea575x *tea)
179{ 179{
180 unsigned int val; 180 unsigned int val;
181 181
@@ -209,7 +209,7 @@ void snd_tea575x_init(tea575x_t *tea)
209 snd_tea575x_set_freq(tea); 209 snd_tea575x_set_freq(tea);
210} 210}
211 211
212void snd_tea575x_exit(tea575x_t *tea) 212void snd_tea575x_exit(struct snd_tea575x *tea)
213{ 213{
214 if (tea->vd_registered) { 214 if (tea->vd_registered) {
215 video_unregister_device(&tea->vd); 215 video_unregister_device(&tea->vd);