diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:59:52 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:19:11 -0500 |
commit | 6ca308d4edd51c4f34ffff94ae0bbf193087d89f (patch) | |
tree | 6bc0cb2ccacc6a4fd08cc35ecda4819e01f87af5 /sound/pci/ice1712/ews.c | |
parent | a98f90fd826913519c3f704ea24fb9bea1e0e494 (diff) |
[ALSA] Remove xxx_t typedefs: PCI ICE1712
Modules: ICE1712 driver
Remove xxx_t typedefs from the PCI ICE1712 driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712/ews.c')
-rw-r--r-- | sound/pci/ice1712/ews.c | 144 |
1 files changed, 72 insertions, 72 deletions
diff --git a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c index c8ec5cac3c17..2127d57da190 100644 --- a/sound/pci/ice1712/ews.c +++ b/sound/pci/ice1712/ews.c | |||
@@ -50,9 +50,9 @@ enum { | |||
50 | */ | 50 | */ |
51 | 51 | ||
52 | /* send SDA and SCL */ | 52 | /* send SDA and SCL */ |
53 | static void ewx_i2c_setlines(snd_i2c_bus_t *bus, int clk, int data) | 53 | static void ewx_i2c_setlines(struct snd_i2c_bus *bus, int clk, int data) |
54 | { | 54 | { |
55 | ice1712_t *ice = bus->private_data; | 55 | struct snd_ice1712 *ice = bus->private_data; |
56 | unsigned char tmp = 0; | 56 | unsigned char tmp = 0; |
57 | if (clk) | 57 | if (clk) |
58 | tmp |= ICE1712_EWX2496_SERIAL_CLOCK; | 58 | tmp |= ICE1712_EWX2496_SERIAL_CLOCK; |
@@ -62,15 +62,15 @@ static void ewx_i2c_setlines(snd_i2c_bus_t *bus, int clk, int data) | |||
62 | udelay(5); | 62 | udelay(5); |
63 | } | 63 | } |
64 | 64 | ||
65 | static int ewx_i2c_getclock(snd_i2c_bus_t *bus) | 65 | static int ewx_i2c_getclock(struct snd_i2c_bus *bus) |
66 | { | 66 | { |
67 | ice1712_t *ice = bus->private_data; | 67 | struct snd_ice1712 *ice = bus->private_data; |
68 | return snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & ICE1712_EWX2496_SERIAL_CLOCK ? 1 : 0; | 68 | return snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & ICE1712_EWX2496_SERIAL_CLOCK ? 1 : 0; |
69 | } | 69 | } |
70 | 70 | ||
71 | static int ewx_i2c_getdata(snd_i2c_bus_t *bus, int ack) | 71 | static int ewx_i2c_getdata(struct snd_i2c_bus *bus, int ack) |
72 | { | 72 | { |
73 | ice1712_t *ice = bus->private_data; | 73 | struct snd_ice1712 *ice = bus->private_data; |
74 | int bit; | 74 | int bit; |
75 | /* set RW pin to low */ | 75 | /* set RW pin to low */ |
76 | snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~ICE1712_EWX2496_RW); | 76 | snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~ICE1712_EWX2496_RW); |
@@ -85,9 +85,9 @@ static int ewx_i2c_getdata(snd_i2c_bus_t *bus, int ack) | |||
85 | return bit; | 85 | return bit; |
86 | } | 86 | } |
87 | 87 | ||
88 | static void ewx_i2c_start(snd_i2c_bus_t *bus) | 88 | static void ewx_i2c_start(struct snd_i2c_bus *bus) |
89 | { | 89 | { |
90 | ice1712_t *ice = bus->private_data; | 90 | struct snd_ice1712 *ice = bus->private_data; |
91 | unsigned char mask; | 91 | unsigned char mask; |
92 | 92 | ||
93 | snd_ice1712_save_gpio_status(ice); | 93 | snd_ice1712_save_gpio_status(ice); |
@@ -104,15 +104,15 @@ static void ewx_i2c_start(snd_i2c_bus_t *bus) | |||
104 | snd_ice1712_gpio_write_bits(ice, mask, mask); | 104 | snd_ice1712_gpio_write_bits(ice, mask, mask); |
105 | } | 105 | } |
106 | 106 | ||
107 | static void ewx_i2c_stop(snd_i2c_bus_t *bus) | 107 | static void ewx_i2c_stop(struct snd_i2c_bus *bus) |
108 | { | 108 | { |
109 | ice1712_t *ice = bus->private_data; | 109 | struct snd_ice1712 *ice = bus->private_data; |
110 | snd_ice1712_restore_gpio_status(ice); | 110 | snd_ice1712_restore_gpio_status(ice); |
111 | } | 111 | } |
112 | 112 | ||
113 | static void ewx_i2c_direction(snd_i2c_bus_t *bus, int clock, int data) | 113 | static void ewx_i2c_direction(struct snd_i2c_bus *bus, int clock, int data) |
114 | { | 114 | { |
115 | ice1712_t *ice = bus->private_data; | 115 | struct snd_ice1712 *ice = bus->private_data; |
116 | unsigned char mask = 0; | 116 | unsigned char mask = 0; |
117 | 117 | ||
118 | if (clock) | 118 | if (clock) |
@@ -125,7 +125,7 @@ static void ewx_i2c_direction(snd_i2c_bus_t *bus, int clock, int data) | |||
125 | snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~mask); | 125 | snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~mask); |
126 | } | 126 | } |
127 | 127 | ||
128 | static snd_i2c_bit_ops_t snd_ice1712_ewx_cs8427_bit_ops = { | 128 | static struct snd_i2c_bit_ops snd_ice1712_ewx_cs8427_bit_ops = { |
129 | .start = ewx_i2c_start, | 129 | .start = ewx_i2c_start, |
130 | .stop = ewx_i2c_stop, | 130 | .stop = ewx_i2c_stop, |
131 | .direction = ewx_i2c_direction, | 131 | .direction = ewx_i2c_direction, |
@@ -140,7 +140,7 @@ static snd_i2c_bit_ops_t snd_ice1712_ewx_cs8427_bit_ops = { | |||
140 | */ | 140 | */ |
141 | 141 | ||
142 | /* AK4524 chip select; address 0x48 bit 0-3 */ | 142 | /* AK4524 chip select; address 0x48 bit 0-3 */ |
143 | static int snd_ice1712_ews88mt_chip_select(ice1712_t *ice, int chip_mask) | 143 | static int snd_ice1712_ews88mt_chip_select(struct snd_ice1712 *ice, int chip_mask) |
144 | { | 144 | { |
145 | unsigned char data, ndata; | 145 | unsigned char data, ndata; |
146 | 146 | ||
@@ -162,9 +162,9 @@ static int snd_ice1712_ews88mt_chip_select(ice1712_t *ice, int chip_mask) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | /* start callback for EWS88MT, needs to select a certain chip mask */ | 164 | /* start callback for EWS88MT, needs to select a certain chip mask */ |
165 | static void ews88mt_ak4524_lock(akm4xxx_t *ak, int chip) | 165 | static void ews88mt_ak4524_lock(struct snd_akm4xxx *ak, int chip) |
166 | { | 166 | { |
167 | ice1712_t *ice = ak->private_data[0]; | 167 | struct snd_ice1712 *ice = ak->private_data[0]; |
168 | unsigned char tmp; | 168 | unsigned char tmp; |
169 | /* assert AK4524 CS */ | 169 | /* assert AK4524 CS */ |
170 | if (snd_ice1712_ews88mt_chip_select(ice, ~(1 << chip) & 0x0f) < 0) | 170 | if (snd_ice1712_ews88mt_chip_select(ice, ~(1 << chip) & 0x0f) < 0) |
@@ -179,18 +179,18 @@ static void ews88mt_ak4524_lock(akm4xxx_t *ak, int chip) | |||
179 | } | 179 | } |
180 | 180 | ||
181 | /* stop callback for EWS88MT, needs to deselect chip mask */ | 181 | /* stop callback for EWS88MT, needs to deselect chip mask */ |
182 | static void ews88mt_ak4524_unlock(akm4xxx_t *ak, int chip) | 182 | static void ews88mt_ak4524_unlock(struct snd_akm4xxx *ak, int chip) |
183 | { | 183 | { |
184 | ice1712_t *ice = ak->private_data[0]; | 184 | struct snd_ice1712 *ice = ak->private_data[0]; |
185 | snd_ice1712_restore_gpio_status(ice); | 185 | snd_ice1712_restore_gpio_status(ice); |
186 | udelay(1); | 186 | udelay(1); |
187 | snd_ice1712_ews88mt_chip_select(ice, 0x0f); | 187 | snd_ice1712_ews88mt_chip_select(ice, 0x0f); |
188 | } | 188 | } |
189 | 189 | ||
190 | /* start callback for EWX24/96 */ | 190 | /* start callback for EWX24/96 */ |
191 | static void ewx2496_ak4524_lock(akm4xxx_t *ak, int chip) | 191 | static void ewx2496_ak4524_lock(struct snd_akm4xxx *ak, int chip) |
192 | { | 192 | { |
193 | ice1712_t *ice = ak->private_data[0]; | 193 | struct snd_ice1712 *ice = ak->private_data[0]; |
194 | unsigned char tmp; | 194 | unsigned char tmp; |
195 | snd_ice1712_save_gpio_status(ice); | 195 | snd_ice1712_save_gpio_status(ice); |
196 | tmp = ICE1712_EWX2496_SERIAL_DATA | | 196 | tmp = ICE1712_EWX2496_SERIAL_DATA | |
@@ -203,10 +203,10 @@ static void ewx2496_ak4524_lock(akm4xxx_t *ak, int chip) | |||
203 | } | 203 | } |
204 | 204 | ||
205 | /* start callback for DMX 6fire */ | 205 | /* start callback for DMX 6fire */ |
206 | static void dmx6fire_ak4524_lock(akm4xxx_t *ak, int chip) | 206 | static void dmx6fire_ak4524_lock(struct snd_akm4xxx *ak, int chip) |
207 | { | 207 | { |
208 | struct snd_ak4xxx_private *priv = (void *)ak->private_value[0]; | 208 | struct snd_ak4xxx_private *priv = (void *)ak->private_value[0]; |
209 | ice1712_t *ice = ak->private_data[0]; | 209 | struct snd_ice1712 *ice = ak->private_data[0]; |
210 | unsigned char tmp; | 210 | unsigned char tmp; |
211 | snd_ice1712_save_gpio_status(ice); | 211 | snd_ice1712_save_gpio_status(ice); |
212 | tmp = priv->cs_mask = priv->cs_addr = (1 << chip) & ICE1712_6FIRE_AK4524_CS_MASK; | 212 | tmp = priv->cs_mask = priv->cs_addr = (1 << chip) & ICE1712_6FIRE_AK4524_CS_MASK; |
@@ -222,7 +222,7 @@ static void dmx6fire_ak4524_lock(akm4xxx_t *ak, int chip) | |||
222 | * CS8404 interface on EWS88MT/D | 222 | * CS8404 interface on EWS88MT/D |
223 | */ | 223 | */ |
224 | 224 | ||
225 | static void snd_ice1712_ews_cs8404_spdif_write(ice1712_t *ice, unsigned char bits) | 225 | static void snd_ice1712_ews_cs8404_spdif_write(struct snd_ice1712 *ice, unsigned char bits) |
226 | { | 226 | { |
227 | unsigned char bytes[2]; | 227 | unsigned char bytes[2]; |
228 | 228 | ||
@@ -251,12 +251,12 @@ static void snd_ice1712_ews_cs8404_spdif_write(ice1712_t *ice, unsigned char bit | |||
251 | /* | 251 | /* |
252 | */ | 252 | */ |
253 | 253 | ||
254 | static void ews88_spdif_default_get(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol) | 254 | static void ews88_spdif_default_get(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol) |
255 | { | 255 | { |
256 | snd_cs8404_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_bits); | 256 | snd_cs8404_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_bits); |
257 | } | 257 | } |
258 | 258 | ||
259 | static int ews88_spdif_default_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol) | 259 | static int ews88_spdif_default_put(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol) |
260 | { | 260 | { |
261 | unsigned int val; | 261 | unsigned int val; |
262 | int change; | 262 | int change; |
@@ -274,12 +274,12 @@ static int ews88_spdif_default_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontr | |||
274 | return change; | 274 | return change; |
275 | } | 275 | } |
276 | 276 | ||
277 | static void ews88_spdif_stream_get(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol) | 277 | static void ews88_spdif_stream_get(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol) |
278 | { | 278 | { |
279 | snd_cs8404_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_stream_bits); | 279 | snd_cs8404_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_stream_bits); |
280 | } | 280 | } |
281 | 281 | ||
282 | static int ews88_spdif_stream_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol) | 282 | static int ews88_spdif_stream_put(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol) |
283 | { | 283 | { |
284 | unsigned int val; | 284 | unsigned int val; |
285 | int change; | 285 | int change; |
@@ -299,13 +299,13 @@ static int ews88_spdif_stream_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontro | |||
299 | 299 | ||
300 | 300 | ||
301 | /* open callback */ | 301 | /* open callback */ |
302 | static void ews88_open_spdif(ice1712_t *ice, snd_pcm_substream_t * substream) | 302 | static void ews88_open_spdif(struct snd_ice1712 *ice, struct snd_pcm_substream *substream) |
303 | { | 303 | { |
304 | ice->spdif.cs8403_stream_bits = ice->spdif.cs8403_bits; | 304 | ice->spdif.cs8403_stream_bits = ice->spdif.cs8403_bits; |
305 | } | 305 | } |
306 | 306 | ||
307 | /* set up SPDIF for EWS88MT / EWS88D */ | 307 | /* set up SPDIF for EWS88MT / EWS88D */ |
308 | static void ews88_setup_spdif(ice1712_t *ice, int rate) | 308 | static void ews88_setup_spdif(struct snd_ice1712 *ice, int rate) |
309 | { | 309 | { |
310 | unsigned long flags; | 310 | unsigned long flags; |
311 | unsigned char tmp; | 311 | unsigned char tmp; |
@@ -332,7 +332,7 @@ static void ews88_setup_spdif(ice1712_t *ice, int rate) | |||
332 | 332 | ||
333 | /* | 333 | /* |
334 | */ | 334 | */ |
335 | static akm4xxx_t akm_ews88mt __devinitdata = { | 335 | static struct snd_akm4xxx akm_ews88mt __devinitdata = { |
336 | .num_adcs = 8, | 336 | .num_adcs = 8, |
337 | .num_dacs = 8, | 337 | .num_dacs = 8, |
338 | .type = SND_AK4524, | 338 | .type = SND_AK4524, |
@@ -354,7 +354,7 @@ static struct snd_ak4xxx_private akm_ews88mt_priv __devinitdata = { | |||
354 | .mask_flags = 0, | 354 | .mask_flags = 0, |
355 | }; | 355 | }; |
356 | 356 | ||
357 | static akm4xxx_t akm_ewx2496 __devinitdata = { | 357 | static struct snd_akm4xxx akm_ewx2496 __devinitdata = { |
358 | .num_adcs = 2, | 358 | .num_adcs = 2, |
359 | .num_dacs = 2, | 359 | .num_dacs = 2, |
360 | .type = SND_AK4524, | 360 | .type = SND_AK4524, |
@@ -375,7 +375,7 @@ static struct snd_ak4xxx_private akm_ewx2496_priv __devinitdata = { | |||
375 | .mask_flags = 0, | 375 | .mask_flags = 0, |
376 | }; | 376 | }; |
377 | 377 | ||
378 | static akm4xxx_t akm_6fire __devinitdata = { | 378 | static struct snd_akm4xxx akm_6fire __devinitdata = { |
379 | .num_adcs = 6, | 379 | .num_adcs = 6, |
380 | .num_dacs = 6, | 380 | .num_dacs = 6, |
381 | .type = SND_AK4524, | 381 | .type = SND_AK4524, |
@@ -406,12 +406,12 @@ static struct snd_ak4xxx_private akm_6fire_priv __devinitdata = { | |||
406 | #define PCF9554_REG_POLARITY 2 | 406 | #define PCF9554_REG_POLARITY 2 |
407 | #define PCF9554_REG_CONFIG 3 | 407 | #define PCF9554_REG_CONFIG 3 |
408 | 408 | ||
409 | static int snd_ice1712_6fire_write_pca(ice1712_t *ice, unsigned char reg, unsigned char data); | 409 | static int snd_ice1712_6fire_write_pca(struct snd_ice1712 *ice, unsigned char reg, unsigned char data); |
410 | 410 | ||
411 | static int __devinit snd_ice1712_ews_init(ice1712_t *ice) | 411 | static int __devinit snd_ice1712_ews_init(struct snd_ice1712 *ice) |
412 | { | 412 | { |
413 | int err; | 413 | int err; |
414 | akm4xxx_t *ak; | 414 | struct snd_akm4xxx *ak; |
415 | 415 | ||
416 | /* set the analog DACs */ | 416 | /* set the analog DACs */ |
417 | switch (ice->eeprom.subvendor) { | 417 | switch (ice->eeprom.subvendor) { |
@@ -507,7 +507,7 @@ static int __devinit snd_ice1712_ews_init(ice1712_t *ice) | |||
507 | } | 507 | } |
508 | 508 | ||
509 | /* analog section */ | 509 | /* analog section */ |
510 | ak = ice->akm = kmalloc(sizeof(akm4xxx_t), GFP_KERNEL); | 510 | ak = ice->akm = kmalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); |
511 | if (! ak) | 511 | if (! ak) |
512 | return -ENOMEM; | 512 | return -ENOMEM; |
513 | ice->akm_codecs = 1; | 513 | ice->akm_codecs = 1; |
@@ -536,7 +536,7 @@ static int __devinit snd_ice1712_ews_init(ice1712_t *ice) | |||
536 | */ | 536 | */ |
537 | 537 | ||
538 | /* i/o sensitivity - this callback is shared among other devices, too */ | 538 | /* i/o sensitivity - this callback is shared among other devices, too */ |
539 | static int snd_ice1712_ewx_io_sense_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo){ | 539 | static int snd_ice1712_ewx_io_sense_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo){ |
540 | 540 | ||
541 | static char *texts[2] = { | 541 | static char *texts[2] = { |
542 | "+4dBu", "-10dBV", | 542 | "+4dBu", "-10dBV", |
@@ -550,9 +550,9 @@ static int snd_ice1712_ewx_io_sense_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_ | |||
550 | return 0; | 550 | return 0; |
551 | } | 551 | } |
552 | 552 | ||
553 | static int snd_ice1712_ewx_io_sense_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 553 | static int snd_ice1712_ewx_io_sense_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
554 | { | 554 | { |
555 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 555 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
556 | unsigned char mask = kcontrol->private_value & 0xff; | 556 | unsigned char mask = kcontrol->private_value & 0xff; |
557 | 557 | ||
558 | snd_ice1712_save_gpio_status(ice); | 558 | snd_ice1712_save_gpio_status(ice); |
@@ -561,9 +561,9 @@ static int snd_ice1712_ewx_io_sense_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_ | |||
561 | return 0; | 561 | return 0; |
562 | } | 562 | } |
563 | 563 | ||
564 | static int snd_ice1712_ewx_io_sense_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 564 | static int snd_ice1712_ewx_io_sense_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
565 | { | 565 | { |
566 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 566 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
567 | unsigned char mask = kcontrol->private_value & 0xff; | 567 | unsigned char mask = kcontrol->private_value & 0xff; |
568 | int val, nval; | 568 | int val, nval; |
569 | 569 | ||
@@ -578,7 +578,7 @@ static int snd_ice1712_ewx_io_sense_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_ | |||
578 | return val != nval; | 578 | return val != nval; |
579 | } | 579 | } |
580 | 580 | ||
581 | static snd_kcontrol_new_t snd_ice1712_ewx2496_controls[] __devinitdata = { | 581 | static struct snd_kcontrol_new snd_ice1712_ewx2496_controls[] __devinitdata = { |
582 | { | 582 | { |
583 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 583 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
584 | .name = "Input Sensitivity Switch", | 584 | .name = "Input Sensitivity Switch", |
@@ -602,9 +602,9 @@ static snd_kcontrol_new_t snd_ice1712_ewx2496_controls[] __devinitdata = { | |||
602 | * EWS88MT specific controls | 602 | * EWS88MT specific controls |
603 | */ | 603 | */ |
604 | /* analog output sensitivity;; address 0x48 bit 6 */ | 604 | /* analog output sensitivity;; address 0x48 bit 6 */ |
605 | static int snd_ice1712_ews88mt_output_sense_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 605 | static int snd_ice1712_ews88mt_output_sense_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
606 | { | 606 | { |
607 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 607 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
608 | unsigned char data; | 608 | unsigned char data; |
609 | 609 | ||
610 | snd_i2c_lock(ice->i2c); | 610 | snd_i2c_lock(ice->i2c); |
@@ -618,9 +618,9 @@ static int snd_ice1712_ews88mt_output_sense_get(snd_kcontrol_t *kcontrol, snd_ct | |||
618 | } | 618 | } |
619 | 619 | ||
620 | /* analog output sensitivity;; address 0x48 bit 6 */ | 620 | /* analog output sensitivity;; address 0x48 bit 6 */ |
621 | static int snd_ice1712_ews88mt_output_sense_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 621 | static int snd_ice1712_ews88mt_output_sense_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
622 | { | 622 | { |
623 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 623 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
624 | unsigned char data, ndata; | 624 | unsigned char data, ndata; |
625 | 625 | ||
626 | snd_i2c_lock(ice->i2c); | 626 | snd_i2c_lock(ice->i2c); |
@@ -638,9 +638,9 @@ static int snd_ice1712_ews88mt_output_sense_put(snd_kcontrol_t *kcontrol, snd_ct | |||
638 | } | 638 | } |
639 | 639 | ||
640 | /* analog input sensitivity; address 0x46 */ | 640 | /* analog input sensitivity; address 0x46 */ |
641 | static int snd_ice1712_ews88mt_input_sense_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 641 | static int snd_ice1712_ews88mt_input_sense_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
642 | { | 642 | { |
643 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 643 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
644 | int channel = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 644 | int channel = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
645 | unsigned char data; | 645 | unsigned char data; |
646 | 646 | ||
@@ -657,9 +657,9 @@ static int snd_ice1712_ews88mt_input_sense_get(snd_kcontrol_t *kcontrol, snd_ctl | |||
657 | } | 657 | } |
658 | 658 | ||
659 | /* analog output sensitivity; address 0x46 */ | 659 | /* analog output sensitivity; address 0x46 */ |
660 | static int snd_ice1712_ews88mt_input_sense_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 660 | static int snd_ice1712_ews88mt_input_sense_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
661 | { | 661 | { |
662 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 662 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
663 | int channel = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 663 | int channel = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
664 | unsigned char data, ndata; | 664 | unsigned char data, ndata; |
665 | 665 | ||
@@ -678,7 +678,7 @@ static int snd_ice1712_ews88mt_input_sense_put(snd_kcontrol_t *kcontrol, snd_ctl | |||
678 | return ndata != data; | 678 | return ndata != data; |
679 | } | 679 | } |
680 | 680 | ||
681 | static snd_kcontrol_new_t snd_ice1712_ews88mt_input_sense __devinitdata = { | 681 | static struct snd_kcontrol_new snd_ice1712_ews88mt_input_sense __devinitdata = { |
682 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 682 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
683 | .name = "Input Sensitivity Switch", | 683 | .name = "Input Sensitivity Switch", |
684 | .info = snd_ice1712_ewx_io_sense_info, | 684 | .info = snd_ice1712_ewx_io_sense_info, |
@@ -687,7 +687,7 @@ static snd_kcontrol_new_t snd_ice1712_ews88mt_input_sense __devinitdata = { | |||
687 | .count = 8, | 687 | .count = 8, |
688 | }; | 688 | }; |
689 | 689 | ||
690 | static snd_kcontrol_new_t snd_ice1712_ews88mt_output_sense __devinitdata = { | 690 | static struct snd_kcontrol_new snd_ice1712_ews88mt_output_sense __devinitdata = { |
691 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 691 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
692 | .name = "Output Sensitivity Switch", | 692 | .name = "Output Sensitivity Switch", |
693 | .info = snd_ice1712_ewx_io_sense_info, | 693 | .info = snd_ice1712_ewx_io_sense_info, |
@@ -700,7 +700,7 @@ static snd_kcontrol_new_t snd_ice1712_ews88mt_output_sense __devinitdata = { | |||
700 | * EWS88D specific controls | 700 | * EWS88D specific controls |
701 | */ | 701 | */ |
702 | 702 | ||
703 | static int snd_ice1712_ews88d_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 703 | static int snd_ice1712_ews88d_control_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
704 | { | 704 | { |
705 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 705 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
706 | uinfo->count = 1; | 706 | uinfo->count = 1; |
@@ -709,9 +709,9 @@ static int snd_ice1712_ews88d_control_info(snd_kcontrol_t *kcontrol, snd_ctl_ele | |||
709 | return 0; | 709 | return 0; |
710 | } | 710 | } |
711 | 711 | ||
712 | static int snd_ice1712_ews88d_control_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 712 | static int snd_ice1712_ews88d_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
713 | { | 713 | { |
714 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 714 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
715 | int shift = kcontrol->private_value & 0xff; | 715 | int shift = kcontrol->private_value & 0xff; |
716 | int invert = (kcontrol->private_value >> 8) & 1; | 716 | int invert = (kcontrol->private_value >> 8) & 1; |
717 | unsigned char data[2]; | 717 | unsigned char data[2]; |
@@ -729,9 +729,9 @@ static int snd_ice1712_ews88d_control_get(snd_kcontrol_t *kcontrol, snd_ctl_elem | |||
729 | return 0; | 729 | return 0; |
730 | } | 730 | } |
731 | 731 | ||
732 | static int snd_ice1712_ews88d_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 732 | static int snd_ice1712_ews88d_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
733 | { | 733 | { |
734 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 734 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
735 | int shift = kcontrol->private_value & 0xff; | 735 | int shift = kcontrol->private_value & 0xff; |
736 | int invert = (kcontrol->private_value >> 8) & 1; | 736 | int invert = (kcontrol->private_value >> 8) & 1; |
737 | unsigned char data[2], ndata[2]; | 737 | unsigned char data[2], ndata[2]; |
@@ -769,7 +769,7 @@ static int snd_ice1712_ews88d_control_put(snd_kcontrol_t * kcontrol, snd_ctl_ele | |||
769 | .private_value = xshift | (xinvert << 8),\ | 769 | .private_value = xshift | (xinvert << 8),\ |
770 | } | 770 | } |
771 | 771 | ||
772 | static snd_kcontrol_new_t snd_ice1712_ews88d_controls[] __devinitdata = { | 772 | static struct snd_kcontrol_new snd_ice1712_ews88d_controls[] __devinitdata = { |
773 | EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "IEC958 Input Optical", 0, 1, 0), /* inverted */ | 773 | EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "IEC958 Input Optical", 0, 1, 0), /* inverted */ |
774 | EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "ADAT Output Optical", 1, 0, 0), | 774 | EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "ADAT Output Optical", 1, 0, 0), |
775 | EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "ADAT External Master Clock", 2, 0, 0), | 775 | EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "ADAT External Master Clock", 2, 0, 0), |
@@ -782,7 +782,7 @@ static snd_kcontrol_new_t snd_ice1712_ews88d_controls[] __devinitdata = { | |||
782 | * DMX 6Fire specific controls | 782 | * DMX 6Fire specific controls |
783 | */ | 783 | */ |
784 | 784 | ||
785 | static int snd_ice1712_6fire_read_pca(ice1712_t *ice, unsigned char reg) | 785 | static int snd_ice1712_6fire_read_pca(struct snd_ice1712 *ice, unsigned char reg) |
786 | { | 786 | { |
787 | unsigned char byte; | 787 | unsigned char byte; |
788 | snd_i2c_lock(ice->i2c); | 788 | snd_i2c_lock(ice->i2c); |
@@ -798,7 +798,7 @@ static int snd_ice1712_6fire_read_pca(ice1712_t *ice, unsigned char reg) | |||
798 | return byte; | 798 | return byte; |
799 | } | 799 | } |
800 | 800 | ||
801 | static int snd_ice1712_6fire_write_pca(ice1712_t *ice, unsigned char reg, unsigned char data) | 801 | static int snd_ice1712_6fire_write_pca(struct snd_ice1712 *ice, unsigned char reg, unsigned char data) |
802 | { | 802 | { |
803 | unsigned char bytes[2]; | 803 | unsigned char bytes[2]; |
804 | snd_i2c_lock(ice->i2c); | 804 | snd_i2c_lock(ice->i2c); |
@@ -812,7 +812,7 @@ static int snd_ice1712_6fire_write_pca(ice1712_t *ice, unsigned char reg, unsign | |||
812 | return 0; | 812 | return 0; |
813 | } | 813 | } |
814 | 814 | ||
815 | static int snd_ice1712_6fire_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 815 | static int snd_ice1712_6fire_control_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
816 | { | 816 | { |
817 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 817 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
818 | uinfo->count = 1; | 818 | uinfo->count = 1; |
@@ -821,9 +821,9 @@ static int snd_ice1712_6fire_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem | |||
821 | return 0; | 821 | return 0; |
822 | } | 822 | } |
823 | 823 | ||
824 | static int snd_ice1712_6fire_control_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 824 | static int snd_ice1712_6fire_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
825 | { | 825 | { |
826 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 826 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
827 | int shift = kcontrol->private_value & 0xff; | 827 | int shift = kcontrol->private_value & 0xff; |
828 | int invert = (kcontrol->private_value >> 8) & 1; | 828 | int invert = (kcontrol->private_value >> 8) & 1; |
829 | int data; | 829 | int data; |
@@ -837,9 +837,9 @@ static int snd_ice1712_6fire_control_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_ | |||
837 | return 0; | 837 | return 0; |
838 | } | 838 | } |
839 | 839 | ||
840 | static int snd_ice1712_6fire_control_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 840 | static int snd_ice1712_6fire_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
841 | { | 841 | { |
842 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 842 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
843 | int shift = kcontrol->private_value & 0xff; | 843 | int shift = kcontrol->private_value & 0xff; |
844 | int invert = (kcontrol->private_value >> 8) & 1; | 844 | int invert = (kcontrol->private_value >> 8) & 1; |
845 | int data, ndata; | 845 | int data, ndata; |
@@ -858,7 +858,7 @@ static int snd_ice1712_6fire_control_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_ | |||
858 | return 0; | 858 | return 0; |
859 | } | 859 | } |
860 | 860 | ||
861 | static int snd_ice1712_6fire_select_input_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 861 | static int snd_ice1712_6fire_select_input_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
862 | { | 862 | { |
863 | static char *texts[4] = { | 863 | static char *texts[4] = { |
864 | "Internal", "Front Input", "Rear Input", "Wave Table" | 864 | "Internal", "Front Input", "Rear Input", "Wave Table" |
@@ -872,9 +872,9 @@ static int snd_ice1712_6fire_select_input_info(snd_kcontrol_t *kcontrol, snd_ctl | |||
872 | return 0; | 872 | return 0; |
873 | } | 873 | } |
874 | 874 | ||
875 | static int snd_ice1712_6fire_select_input_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 875 | static int snd_ice1712_6fire_select_input_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
876 | { | 876 | { |
877 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 877 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
878 | int data; | 878 | int data; |
879 | 879 | ||
880 | if ((data = snd_ice1712_6fire_read_pca(ice, PCF9554_REG_OUTPUT)) < 0) | 880 | if ((data = snd_ice1712_6fire_read_pca(ice, PCF9554_REG_OUTPUT)) < 0) |
@@ -883,9 +883,9 @@ static int snd_ice1712_6fire_select_input_get(snd_kcontrol_t *kcontrol, snd_ctl_ | |||
883 | return 0; | 883 | return 0; |
884 | } | 884 | } |
885 | 885 | ||
886 | static int snd_ice1712_6fire_select_input_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 886 | static int snd_ice1712_6fire_select_input_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
887 | { | 887 | { |
888 | ice1712_t *ice = snd_kcontrol_chip(kcontrol); | 888 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
889 | int data, ndata; | 889 | int data, ndata; |
890 | 890 | ||
891 | if ((data = snd_ice1712_6fire_read_pca(ice, PCF9554_REG_OUTPUT)) < 0) | 891 | if ((data = snd_ice1712_6fire_read_pca(ice, PCF9554_REG_OUTPUT)) < 0) |
@@ -909,7 +909,7 @@ static int snd_ice1712_6fire_select_input_put(snd_kcontrol_t *kcontrol, snd_ctl_ | |||
909 | .private_value = xshift | (xinvert << 8),\ | 909 | .private_value = xshift | (xinvert << 8),\ |
910 | } | 910 | } |
911 | 911 | ||
912 | static snd_kcontrol_new_t snd_ice1712_6fire_controls[] __devinitdata = { | 912 | static struct snd_kcontrol_new snd_ice1712_6fire_controls[] __devinitdata = { |
913 | { | 913 | { |
914 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 914 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
915 | .name = "Analog Input Select", | 915 | .name = "Analog Input Select", |
@@ -925,7 +925,7 @@ static snd_kcontrol_new_t snd_ice1712_6fire_controls[] __devinitdata = { | |||
925 | }; | 925 | }; |
926 | 926 | ||
927 | 927 | ||
928 | static int __devinit snd_ice1712_ews_add_controls(ice1712_t *ice) | 928 | static int __devinit snd_ice1712_ews_add_controls(struct snd_ice1712 *ice) |
929 | { | 929 | { |
930 | unsigned int idx; | 930 | unsigned int idx; |
931 | int err; | 931 | int err; |