aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ac97
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:44:47 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:41 -0500
commit9f38945fab04a0a0ea50880fa634f9bfa28f6226 (patch)
tree7f09c129ce5199bdc0834456e09460f1df81427f /sound/pci/ac97
parent11ff5c62b1327cc7bdcfcf66b4b718495fea0043 (diff)
[ALSA] Remove xxx_t typedefs: AK4531 codec
Modules: AK4531 codec Remove xxx_t typedefs from the AK4531 codec support code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ac97')
-rw-r--r--sound/pci/ac97/ak4531_codec.c59
1 files changed, 30 insertions, 29 deletions
diff --git a/sound/pci/ac97/ak4531_codec.c b/sound/pci/ac97/ak4531_codec.c
index 4032c5748370..088d8dc336be 100644
--- a/sound/pci/ac97/ak4531_codec.c
+++ b/sound/pci/ac97/ak4531_codec.c
@@ -30,7 +30,7 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
30MODULE_DESCRIPTION("Universal routines for AK4531 codec"); 30MODULE_DESCRIPTION("Universal routines for AK4531 codec");
31MODULE_LICENSE("GPL"); 31MODULE_LICENSE("GPL");
32 32
33static void snd_ak4531_proc_init(snd_card_t * card, ak4531_t * ak4531); 33static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531);
34 34
35/* 35/*
36 * 36 *
@@ -38,7 +38,7 @@ static void snd_ak4531_proc_init(snd_card_t * card, ak4531_t * ak4531);
38 38
39#if 0 39#if 0
40 40
41static void snd_ak4531_dump(ak4531_t *ak4531) 41static void snd_ak4531_dump(struct snd_ak4531 *ak4531)
42{ 42{
43 int idx; 43 int idx;
44 44
@@ -58,7 +58,7 @@ static void snd_ak4531_dump(ak4531_t *ak4531)
58 .get = snd_ak4531_get_single, .put = snd_ak4531_put_single, \ 58 .get = snd_ak4531_get_single, .put = snd_ak4531_put_single, \
59 .private_value = reg | (shift << 16) | (mask << 24) | (invert << 22) } 59 .private_value = reg | (shift << 16) | (mask << 24) | (invert << 22) }
60 60
61static int snd_ak4531_info_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) 61static int snd_ak4531_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
62{ 62{
63 int mask = (kcontrol->private_value >> 24) & 0xff; 63 int mask = (kcontrol->private_value >> 24) & 0xff;
64 64
@@ -69,9 +69,9 @@ static int snd_ak4531_info_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t
69 return 0; 69 return 0;
70} 70}
71 71
72static int snd_ak4531_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 72static int snd_ak4531_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
73{ 73{
74 ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol); 74 struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
75 int reg = kcontrol->private_value & 0xff; 75 int reg = kcontrol->private_value & 0xff;
76 int shift = (kcontrol->private_value >> 16) & 0x07; 76 int shift = (kcontrol->private_value >> 16) & 0x07;
77 int mask = (kcontrol->private_value >> 24) & 0xff; 77 int mask = (kcontrol->private_value >> 24) & 0xff;
@@ -88,9 +88,9 @@ static int snd_ak4531_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
88 return 0; 88 return 0;
89} 89}
90 90
91static int snd_ak4531_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 91static int snd_ak4531_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
92{ 92{
93 ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol); 93 struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
94 int reg = kcontrol->private_value & 0xff; 94 int reg = kcontrol->private_value & 0xff;
95 int shift = (kcontrol->private_value >> 16) & 0x07; 95 int shift = (kcontrol->private_value >> 16) & 0x07;
96 int mask = (kcontrol->private_value >> 24) & 0xff; 96 int mask = (kcontrol->private_value >> 24) & 0xff;
@@ -117,7 +117,7 @@ static int snd_ak4531_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
117 .get = snd_ak4531_get_double, .put = snd_ak4531_put_double, \ 117 .get = snd_ak4531_get_double, .put = snd_ak4531_put_double, \
118 .private_value = left_reg | (right_reg << 8) | (left_shift << 16) | (right_shift << 19) | (mask << 24) | (invert << 22) } 118 .private_value = left_reg | (right_reg << 8) | (left_shift << 16) | (right_shift << 19) | (mask << 24) | (invert << 22) }
119 119
120static int snd_ak4531_info_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) 120static int snd_ak4531_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
121{ 121{
122 int mask = (kcontrol->private_value >> 24) & 0xff; 122 int mask = (kcontrol->private_value >> 24) & 0xff;
123 123
@@ -128,9 +128,9 @@ static int snd_ak4531_info_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t
128 return 0; 128 return 0;
129} 129}
130 130
131static int snd_ak4531_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 131static int snd_ak4531_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
132{ 132{
133 ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol); 133 struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
134 int left_reg = kcontrol->private_value & 0xff; 134 int left_reg = kcontrol->private_value & 0xff;
135 int right_reg = (kcontrol->private_value >> 8) & 0xff; 135 int right_reg = (kcontrol->private_value >> 8) & 0xff;
136 int left_shift = (kcontrol->private_value >> 16) & 0x07; 136 int left_shift = (kcontrol->private_value >> 16) & 0x07;
@@ -152,9 +152,9 @@ static int snd_ak4531_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
152 return 0; 152 return 0;
153} 153}
154 154
155static int snd_ak4531_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 155static int snd_ak4531_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
156{ 156{
157 ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol); 157 struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
158 int left_reg = kcontrol->private_value & 0xff; 158 int left_reg = kcontrol->private_value & 0xff;
159 int right_reg = (kcontrol->private_value >> 8) & 0xff; 159 int right_reg = (kcontrol->private_value >> 8) & 0xff;
160 int left_shift = (kcontrol->private_value >> 16) & 0x07; 160 int left_shift = (kcontrol->private_value >> 16) & 0x07;
@@ -194,7 +194,7 @@ static int snd_ak4531_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
194 .get = snd_ak4531_get_input_sw, .put = snd_ak4531_put_input_sw, \ 194 .get = snd_ak4531_get_input_sw, .put = snd_ak4531_put_input_sw, \
195 .private_value = reg1 | (reg2 << 8) | (left_shift << 16) | (right_shift << 24) } 195 .private_value = reg1 | (reg2 << 8) | (left_shift << 16) | (right_shift << 24) }
196 196
197static int snd_ak4531_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) 197static int snd_ak4531_info_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
198{ 198{
199 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 199 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
200 uinfo->count = 4; 200 uinfo->count = 4;
@@ -203,9 +203,9 @@ static int snd_ak4531_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_info
203 return 0; 203 return 0;
204} 204}
205 205
206static int snd_ak4531_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 206static int snd_ak4531_get_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
207{ 207{
208 ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol); 208 struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
209 int reg1 = kcontrol->private_value & 0xff; 209 int reg1 = kcontrol->private_value & 0xff;
210 int reg2 = (kcontrol->private_value >> 8) & 0xff; 210 int reg2 = (kcontrol->private_value >> 8) & 0xff;
211 int left_shift = (kcontrol->private_value >> 16) & 0x0f; 211 int left_shift = (kcontrol->private_value >> 16) & 0x0f;
@@ -220,9 +220,9 @@ static int snd_ak4531_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
220 return 0; 220 return 0;
221} 221}
222 222
223static int snd_ak4531_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 223static int snd_ak4531_put_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
224{ 224{
225 ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol); 225 struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
226 int reg1 = kcontrol->private_value & 0xff; 226 int reg1 = kcontrol->private_value & 0xff;
227 int reg2 = (kcontrol->private_value >> 8) & 0xff; 227 int reg2 = (kcontrol->private_value >> 8) & 0xff;
228 int left_shift = (kcontrol->private_value >> 16) & 0x0f; 228 int left_shift = (kcontrol->private_value >> 16) & 0x0f;
@@ -244,7 +244,7 @@ static int snd_ak4531_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
244 return change; 244 return change;
245} 245}
246 246
247static snd_kcontrol_new_t snd_ak4531_controls[] = { 247static struct snd_kcontrol_new snd_ak4531_controls[] = {
248 248
249AK4531_DOUBLE("Master Playback Switch", 0, AK4531_LMASTER, AK4531_RMASTER, 7, 7, 1, 1), 249AK4531_DOUBLE("Master Playback Switch", 0, AK4531_LMASTER, AK4531_RMASTER, 7, 7, 1, 1),
250AK4531_DOUBLE("Master Playback Volume", 0, AK4531_LMASTER, AK4531_RMASTER, 0, 0, 0x1f, 1), 250AK4531_DOUBLE("Master Playback Volume", 0, AK4531_LMASTER, AK4531_RMASTER, 0, 0, 0x1f, 1),
@@ -300,7 +300,7 @@ AK4531_SINGLE("AD Input Select", 0, AK4531_AD_IN, 0, 1, 0),
300AK4531_SINGLE("Mic Boost (+30dB)", 0, AK4531_MIC_GAIN, 0, 1, 0) 300AK4531_SINGLE("Mic Boost (+30dB)", 0, AK4531_MIC_GAIN, 0, 1, 0)
301}; 301};
302 302
303static int snd_ak4531_free(ak4531_t *ak4531) 303static int snd_ak4531_free(struct snd_ak4531 *ak4531)
304{ 304{
305 if (ak4531) { 305 if (ak4531) {
306 if (ak4531->private_free) 306 if (ak4531->private_free)
@@ -310,9 +310,9 @@ static int snd_ak4531_free(ak4531_t *ak4531)
310 return 0; 310 return 0;
311} 311}
312 312
313static int snd_ak4531_dev_free(snd_device_t *device) 313static int snd_ak4531_dev_free(struct snd_device *device)
314{ 314{
315 ak4531_t *ak4531 = device->device_data; 315 struct snd_ak4531 *ak4531 = device->device_data;
316 return snd_ak4531_free(ak4531); 316 return snd_ak4531_free(ak4531);
317} 317}
318 318
@@ -345,12 +345,13 @@ static u8 snd_ak4531_initial_map[0x19 + 1] = {
345 0x01 /* 19: Mic Amp Setup */ 345 0x01 /* 19: Mic Amp Setup */
346}; 346};
347 347
348int snd_ak4531_mixer(snd_card_t * card, ak4531_t * _ak4531, ak4531_t ** rak4531) 348int snd_ak4531_mixer(struct snd_card *card, struct snd_ak4531 *_ak4531,
349 struct snd_ak4531 **rak4531)
349{ 350{
350 unsigned int idx; 351 unsigned int idx;
351 int err; 352 int err;
352 ak4531_t * ak4531; 353 struct snd_ak4531 *ak4531;
353 static snd_device_ops_t ops = { 354 static struct snd_device_ops ops = {
354 .dev_free = snd_ak4531_dev_free, 355 .dev_free = snd_ak4531_dev_free,
355 }; 356 };
356 357
@@ -398,10 +399,10 @@ int snd_ak4531_mixer(snd_card_t * card, ak4531_t * _ak4531, ak4531_t ** rak4531)
398 399
399 */ 400 */
400 401
401static void snd_ak4531_proc_read(snd_info_entry_t *entry, 402static void snd_ak4531_proc_read(struct snd_info_entry *entry,
402 snd_info_buffer_t * buffer) 403 struct snd_info_buffer *buffer)
403{ 404{
404 ak4531_t *ak4531 = entry->private_data; 405 struct snd_ak4531 *ak4531 = entry->private_data;
405 406
406 snd_iprintf(buffer, "Asahi Kasei AK4531\n\n"); 407 snd_iprintf(buffer, "Asahi Kasei AK4531\n\n");
407 snd_iprintf(buffer, "Recording source : %s\n" 408 snd_iprintf(buffer, "Recording source : %s\n"
@@ -410,9 +411,9 @@ static void snd_ak4531_proc_read(snd_info_entry_t *entry,
410 ak4531->regs[AK4531_MIC_GAIN] & 1 ? "+30dB" : "+0dB"); 411 ak4531->regs[AK4531_MIC_GAIN] & 1 ? "+30dB" : "+0dB");
411} 412}
412 413
413static void snd_ak4531_proc_init(snd_card_t * card, ak4531_t * ak4531) 414static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531)
414{ 415{
415 snd_info_entry_t *entry; 416 struct snd_info_entry *entry;
416 417
417 if (! snd_card_proc_new(card, "ak4531", &entry)) 418 if (! snd_card_proc_new(card, "ak4531", &entry))
418 snd_info_set_text_ops(entry, ak4531, 1024, snd_ak4531_proc_read); 419 snd_info_set_text_ops(entry, ak4531, 1024, snd_ak4531_proc_read);