diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:46:59 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:18:42 -0500 |
commit | af26367f69a474ed809e4a59abb5855b47daaff4 (patch) | |
tree | 8ee9ec6449b3b51953cda3d546e90c064f963684 /sound/drivers/vx/vx_mixer.c | |
parent | 9f38945fab04a0a0ea50880fa634f9bfa28f6226 (diff) |
[ALSA] Remove xxx_t typedefs: VXdriver
Remove xxx_t typedefs from the VXdriver codes
(vx_core support, vx222 and vxpocket).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/vx/vx_mixer.c')
-rw-r--r-- | sound/drivers/vx/vx_mixer.c | 162 |
1 files changed, 81 insertions, 81 deletions
diff --git a/sound/drivers/vx/vx_mixer.c b/sound/drivers/vx/vx_mixer.c index 19fc68c23378..8ec2c605d2f0 100644 --- a/sound/drivers/vx/vx_mixer.c +++ b/sound/drivers/vx/vx_mixer.c | |||
@@ -30,7 +30,7 @@ | |||
30 | /* | 30 | /* |
31 | * write a codec data (24bit) | 31 | * write a codec data (24bit) |
32 | */ | 32 | */ |
33 | static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) | 33 | static void vx_write_codec_reg(struct vx_core *chip, int codec, unsigned int data) |
34 | { | 34 | { |
35 | unsigned long flags; | 35 | unsigned long flags; |
36 | 36 | ||
@@ -47,7 +47,7 @@ static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) | |||
47 | /* | 47 | /* |
48 | * Data type used to access the Codec | 48 | * Data type used to access the Codec |
49 | */ | 49 | */ |
50 | typedef union { | 50 | union vx_codec_data { |
51 | u32 l; | 51 | u32 l; |
52 | #ifdef SNDRV_BIG_ENDIAN | 52 | #ifdef SNDRV_BIG_ENDIAN |
53 | struct w { | 53 | struct w { |
@@ -72,7 +72,7 @@ typedef union { | |||
72 | u8 hh; | 72 | u8 hh; |
73 | } b; | 73 | } b; |
74 | #endif | 74 | #endif |
75 | } vx_codec_data_t; | 75 | }; |
76 | 76 | ||
77 | #define SET_CDC_DATA_SEL(di,s) ((di).b.mh = (u8) (s)) | 77 | #define SET_CDC_DATA_SEL(di,s) ((di).b.mh = (u8) (s)) |
78 | #define SET_CDC_DATA_REG(di,r) ((di).b.ml = (u8) (r)) | 78 | #define SET_CDC_DATA_REG(di,r) ((di).b.ml = (u8) (r)) |
@@ -85,9 +85,9 @@ typedef union { | |||
85 | * @reg: register index | 85 | * @reg: register index |
86 | * @val: data value | 86 | * @val: data value |
87 | */ | 87 | */ |
88 | static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val) | 88 | static void vx_set_codec_reg(struct vx_core *chip, int codec, int reg, int val) |
89 | { | 89 | { |
90 | vx_codec_data_t data; | 90 | union vx_codec_data data; |
91 | /* DAC control register */ | 91 | /* DAC control register */ |
92 | SET_CDC_DATA_INIT(data); | 92 | SET_CDC_DATA_INIT(data); |
93 | SET_CDC_DATA_REG(data, reg); | 93 | SET_CDC_DATA_REG(data, reg); |
@@ -102,7 +102,7 @@ static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val) | |||
102 | * @left: left output level, 0 = mute | 102 | * @left: left output level, 0 = mute |
103 | * @right: right output level | 103 | * @right: right output level |
104 | */ | 104 | */ |
105 | static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int right) | 105 | static void vx_set_analog_output_level(struct vx_core *chip, int codec, int left, int right) |
106 | { | 106 | { |
107 | left = chip->hw->output_level_max - left; | 107 | left = chip->hw->output_level_max - left; |
108 | right = chip->hw->output_level_max - right; | 108 | right = chip->hw->output_level_max - right; |
@@ -126,7 +126,7 @@ static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int | |||
126 | #define DAC_ATTEN_MIN 0x08 | 126 | #define DAC_ATTEN_MIN 0x08 |
127 | #define DAC_ATTEN_MAX 0x38 | 127 | #define DAC_ATTEN_MAX 0x38 |
128 | 128 | ||
129 | void vx_toggle_dac_mute(vx_core_t *chip, int mute) | 129 | void vx_toggle_dac_mute(struct vx_core *chip, int mute) |
130 | { | 130 | { |
131 | unsigned int i; | 131 | unsigned int i; |
132 | for (i = 0; i < chip->hw->num_codecs; i++) { | 132 | for (i = 0; i < chip->hw->num_codecs; i++) { |
@@ -141,7 +141,7 @@ void vx_toggle_dac_mute(vx_core_t *chip, int mute) | |||
141 | /* | 141 | /* |
142 | * vx_reset_codec - reset and initialize the codecs | 142 | * vx_reset_codec - reset and initialize the codecs |
143 | */ | 143 | */ |
144 | void vx_reset_codec(vx_core_t *chip, int cold_reset) | 144 | void vx_reset_codec(struct vx_core *chip, int cold_reset) |
145 | { | 145 | { |
146 | unsigned int i; | 146 | unsigned int i; |
147 | int port = chip->type >= VX_TYPE_VXPOCKET ? 0x75 : 0x65; | 147 | int port = chip->type >= VX_TYPE_VXPOCKET ? 0x75 : 0x65; |
@@ -175,7 +175,7 @@ void vx_reset_codec(vx_core_t *chip, int cold_reset) | |||
175 | * change the audio input source | 175 | * change the audio input source |
176 | * @src: the target source (VX_AUDIO_SRC_XXX) | 176 | * @src: the target source (VX_AUDIO_SRC_XXX) |
177 | */ | 177 | */ |
178 | static void vx_change_audio_source(vx_core_t *chip, int src) | 178 | static void vx_change_audio_source(struct vx_core *chip, int src) |
179 | { | 179 | { |
180 | unsigned long flags; | 180 | unsigned long flags; |
181 | 181 | ||
@@ -192,7 +192,7 @@ static void vx_change_audio_source(vx_core_t *chip, int src) | |||
192 | * change the audio source if necessary and possible | 192 | * change the audio source if necessary and possible |
193 | * returns 1 if the source is actually changed. | 193 | * returns 1 if the source is actually changed. |
194 | */ | 194 | */ |
195 | int vx_sync_audio_source(vx_core_t *chip) | 195 | int vx_sync_audio_source(struct vx_core *chip) |
196 | { | 196 | { |
197 | if (chip->audio_source_target == chip->audio_source || | 197 | if (chip->audio_source_target == chip->audio_source || |
198 | chip->pcm_running) | 198 | chip->pcm_running) |
@@ -217,7 +217,7 @@ struct vx_audio_level { | |||
217 | short monitor_level; | 217 | short monitor_level; |
218 | }; | 218 | }; |
219 | 219 | ||
220 | static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture, | 220 | static int vx_adjust_audio_level(struct vx_core *chip, int audio, int capture, |
221 | struct vx_audio_level *info) | 221 | struct vx_audio_level *info) |
222 | { | 222 | { |
223 | struct vx_rmh rmh; | 223 | struct vx_rmh rmh; |
@@ -256,7 +256,7 @@ static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture, | |||
256 | 256 | ||
257 | 257 | ||
258 | #if 0 // not used | 258 | #if 0 // not used |
259 | static int vx_read_audio_level(vx_core_t *chip, int audio, int capture, | 259 | static int vx_read_audio_level(struct vx_core *chip, int audio, int capture, |
260 | struct vx_audio_level *info) | 260 | struct vx_audio_level *info) |
261 | { | 261 | { |
262 | int err; | 262 | int err; |
@@ -283,7 +283,7 @@ static int vx_read_audio_level(vx_core_t *chip, int audio, int capture, | |||
283 | * set the monitoring level and mute state of the given audio | 283 | * set the monitoring level and mute state of the given audio |
284 | * no more static, because must be called from vx_pcm to demute monitoring | 284 | * no more static, because must be called from vx_pcm to demute monitoring |
285 | */ | 285 | */ |
286 | int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active) | 286 | int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active) |
287 | { | 287 | { |
288 | struct vx_audio_level info; | 288 | struct vx_audio_level info; |
289 | 289 | ||
@@ -301,7 +301,7 @@ int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active) | |||
301 | /* | 301 | /* |
302 | * set the mute status of the given audio | 302 | * set the mute status of the given audio |
303 | */ | 303 | */ |
304 | static int vx_set_audio_switch(vx_core_t *chip, int audio, int active) | 304 | static int vx_set_audio_switch(struct vx_core *chip, int audio, int active) |
305 | { | 305 | { |
306 | struct vx_audio_level info; | 306 | struct vx_audio_level info; |
307 | 307 | ||
@@ -315,7 +315,7 @@ static int vx_set_audio_switch(vx_core_t *chip, int audio, int active) | |||
315 | /* | 315 | /* |
316 | * set the mute status of the given audio | 316 | * set the mute status of the given audio |
317 | */ | 317 | */ |
318 | static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level) | 318 | static int vx_set_audio_gain(struct vx_core *chip, int audio, int capture, int level) |
319 | { | 319 | { |
320 | struct vx_audio_level info; | 320 | struct vx_audio_level info; |
321 | 321 | ||
@@ -329,7 +329,7 @@ static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level) | |||
329 | /* | 329 | /* |
330 | * reset all audio levels | 330 | * reset all audio levels |
331 | */ | 331 | */ |
332 | static void vx_reset_audio_levels(vx_core_t *chip) | 332 | static void vx_reset_audio_levels(struct vx_core *chip) |
333 | { | 333 | { |
334 | unsigned int i, c; | 334 | unsigned int i, c; |
335 | struct vx_audio_level info; | 335 | struct vx_audio_level info; |
@@ -375,7 +375,7 @@ struct vx_vu_meter { | |||
375 | * @capture: 0 = playback, 1 = capture operation | 375 | * @capture: 0 = playback, 1 = capture operation |
376 | * @info: the array of vx_vu_meter records (size = 2). | 376 | * @info: the array of vx_vu_meter records (size = 2). |
377 | */ | 377 | */ |
378 | static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct vx_vu_meter *info) | 378 | static int vx_get_audio_vu_meter(struct vx_core *chip, int audio, int capture, struct vx_vu_meter *info) |
379 | { | 379 | { |
380 | struct vx_rmh rmh; | 380 | struct vx_rmh rmh; |
381 | int i, err; | 381 | int i, err; |
@@ -413,9 +413,9 @@ static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct | |||
413 | /* | 413 | /* |
414 | * output level control | 414 | * output level control |
415 | */ | 415 | */ |
416 | static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 416 | static int vx_output_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
417 | { | 417 | { |
418 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 418 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
419 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 419 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
420 | uinfo->count = 2; | 420 | uinfo->count = 2; |
421 | uinfo->value.integer.min = 0; | 421 | uinfo->value.integer.min = 0; |
@@ -423,9 +423,9 @@ static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *u | |||
423 | return 0; | 423 | return 0; |
424 | } | 424 | } |
425 | 425 | ||
426 | static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 426 | static int vx_output_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
427 | { | 427 | { |
428 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 428 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
429 | int codec = kcontrol->id.index; | 429 | int codec = kcontrol->id.index; |
430 | down(&chip->mixer_mutex); | 430 | down(&chip->mixer_mutex); |
431 | ucontrol->value.integer.value[0] = chip->output_level[codec][0]; | 431 | ucontrol->value.integer.value[0] = chip->output_level[codec][0]; |
@@ -434,9 +434,9 @@ static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u | |||
434 | return 0; | 434 | return 0; |
435 | } | 435 | } |
436 | 436 | ||
437 | static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 437 | static int vx_output_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
438 | { | 438 | { |
439 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 439 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
440 | int codec = kcontrol->id.index; | 440 | int codec = kcontrol->id.index; |
441 | down(&chip->mixer_mutex); | 441 | down(&chip->mixer_mutex); |
442 | if (ucontrol->value.integer.value[0] != chip->output_level[codec][0] || | 442 | if (ucontrol->value.integer.value[0] != chip->output_level[codec][0] || |
@@ -453,7 +453,7 @@ static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u | |||
453 | return 0; | 453 | return 0; |
454 | } | 454 | } |
455 | 455 | ||
456 | static snd_kcontrol_new_t vx_control_output_level = { | 456 | static struct snd_kcontrol_new vx_control_output_level = { |
457 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 457 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
458 | .name = "Master Playback Volume", | 458 | .name = "Master Playback Volume", |
459 | .info = vx_output_level_info, | 459 | .info = vx_output_level_info, |
@@ -464,7 +464,7 @@ static snd_kcontrol_new_t vx_control_output_level = { | |||
464 | /* | 464 | /* |
465 | * audio source select | 465 | * audio source select |
466 | */ | 466 | */ |
467 | static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 467 | static int vx_audio_src_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
468 | { | 468 | { |
469 | static char *texts_mic[3] = { | 469 | static char *texts_mic[3] = { |
470 | "Digital", "Line", "Mic" | 470 | "Digital", "Line", "Mic" |
@@ -472,7 +472,7 @@ static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf | |||
472 | static char *texts_vx2[2] = { | 472 | static char *texts_vx2[2] = { |
473 | "Digital", "Analog" | 473 | "Digital", "Analog" |
474 | }; | 474 | }; |
475 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 475 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
476 | 476 | ||
477 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 477 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; |
478 | uinfo->count = 1; | 478 | uinfo->count = 1; |
@@ -492,16 +492,16 @@ static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf | |||
492 | return 0; | 492 | return 0; |
493 | } | 493 | } |
494 | 494 | ||
495 | static int vx_audio_src_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 495 | static int vx_audio_src_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
496 | { | 496 | { |
497 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 497 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
498 | ucontrol->value.enumerated.item[0] = chip->audio_source_target; | 498 | ucontrol->value.enumerated.item[0] = chip->audio_source_target; |
499 | return 0; | 499 | return 0; |
500 | } | 500 | } |
501 | 501 | ||
502 | static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 502 | static int vx_audio_src_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
503 | { | 503 | { |
504 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 504 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
505 | down(&chip->mixer_mutex); | 505 | down(&chip->mixer_mutex); |
506 | if (chip->audio_source_target != ucontrol->value.enumerated.item[0]) { | 506 | if (chip->audio_source_target != ucontrol->value.enumerated.item[0]) { |
507 | chip->audio_source_target = ucontrol->value.enumerated.item[0]; | 507 | chip->audio_source_target = ucontrol->value.enumerated.item[0]; |
@@ -513,7 +513,7 @@ static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon | |||
513 | return 0; | 513 | return 0; |
514 | } | 514 | } |
515 | 515 | ||
516 | static snd_kcontrol_new_t vx_control_audio_src = { | 516 | static struct snd_kcontrol_new vx_control_audio_src = { |
517 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 517 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
518 | .name = "Capture Source", | 518 | .name = "Capture Source", |
519 | .info = vx_audio_src_info, | 519 | .info = vx_audio_src_info, |
@@ -524,7 +524,7 @@ static snd_kcontrol_new_t vx_control_audio_src = { | |||
524 | /* | 524 | /* |
525 | * clock mode selection | 525 | * clock mode selection |
526 | */ | 526 | */ |
527 | static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 527 | static int vx_clock_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
528 | { | 528 | { |
529 | static char *texts[3] = { | 529 | static char *texts[3] = { |
530 | "Auto", "Internal", "External" | 530 | "Auto", "Internal", "External" |
@@ -540,16 +540,16 @@ static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin | |||
540 | return 0; | 540 | return 0; |
541 | } | 541 | } |
542 | 542 | ||
543 | static int vx_clock_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 543 | static int vx_clock_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
544 | { | 544 | { |
545 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 545 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
546 | ucontrol->value.enumerated.item[0] = chip->clock_mode; | 546 | ucontrol->value.enumerated.item[0] = chip->clock_mode; |
547 | return 0; | 547 | return 0; |
548 | } | 548 | } |
549 | 549 | ||
550 | static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 550 | static int vx_clock_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
551 | { | 551 | { |
552 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 552 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
553 | down(&chip->mixer_mutex); | 553 | down(&chip->mixer_mutex); |
554 | if (chip->clock_mode != ucontrol->value.enumerated.item[0]) { | 554 | if (chip->clock_mode != ucontrol->value.enumerated.item[0]) { |
555 | chip->clock_mode = ucontrol->value.enumerated.item[0]; | 555 | chip->clock_mode = ucontrol->value.enumerated.item[0]; |
@@ -561,7 +561,7 @@ static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
561 | return 0; | 561 | return 0; |
562 | } | 562 | } |
563 | 563 | ||
564 | static snd_kcontrol_new_t vx_control_clock_mode = { | 564 | static struct snd_kcontrol_new vx_control_clock_mode = { |
565 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 565 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
566 | .name = "Clock Mode", | 566 | .name = "Clock Mode", |
567 | .info = vx_clock_mode_info, | 567 | .info = vx_clock_mode_info, |
@@ -572,7 +572,7 @@ static snd_kcontrol_new_t vx_control_clock_mode = { | |||
572 | /* | 572 | /* |
573 | * Audio Gain | 573 | * Audio Gain |
574 | */ | 574 | */ |
575 | static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 575 | static int vx_audio_gain_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
576 | { | 576 | { |
577 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 577 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
578 | uinfo->count = 2; | 578 | uinfo->count = 2; |
@@ -581,9 +581,9 @@ static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin | |||
581 | return 0; | 581 | return 0; |
582 | } | 582 | } |
583 | 583 | ||
584 | static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 584 | static int vx_audio_gain_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
585 | { | 585 | { |
586 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 586 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
587 | int audio = kcontrol->private_value & 0xff; | 587 | int audio = kcontrol->private_value & 0xff; |
588 | int capture = (kcontrol->private_value >> 8) & 1; | 588 | int capture = (kcontrol->private_value >> 8) & 1; |
589 | 589 | ||
@@ -594,9 +594,9 @@ static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
594 | return 0; | 594 | return 0; |
595 | } | 595 | } |
596 | 596 | ||
597 | static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 597 | static int vx_audio_gain_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
598 | { | 598 | { |
599 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 599 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
600 | int audio = kcontrol->private_value & 0xff; | 600 | int audio = kcontrol->private_value & 0xff; |
601 | int capture = (kcontrol->private_value >> 8) & 1; | 601 | int capture = (kcontrol->private_value >> 8) & 1; |
602 | 602 | ||
@@ -612,9 +612,9 @@ static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
612 | return 0; | 612 | return 0; |
613 | } | 613 | } |
614 | 614 | ||
615 | static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 615 | static int vx_audio_monitor_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
616 | { | 616 | { |
617 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 617 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
618 | int audio = kcontrol->private_value & 0xff; | 618 | int audio = kcontrol->private_value & 0xff; |
619 | 619 | ||
620 | down(&chip->mixer_mutex); | 620 | down(&chip->mixer_mutex); |
@@ -624,9 +624,9 @@ static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * | |||
624 | return 0; | 624 | return 0; |
625 | } | 625 | } |
626 | 626 | ||
627 | static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 627 | static int vx_audio_monitor_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
628 | { | 628 | { |
629 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 629 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
630 | int audio = kcontrol->private_value & 0xff; | 630 | int audio = kcontrol->private_value & 0xff; |
631 | 631 | ||
632 | down(&chip->mixer_mutex); | 632 | down(&chip->mixer_mutex); |
@@ -643,7 +643,7 @@ static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * | |||
643 | return 0; | 643 | return 0; |
644 | } | 644 | } |
645 | 645 | ||
646 | static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 646 | static int vx_audio_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
647 | { | 647 | { |
648 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 648 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
649 | uinfo->count = 2; | 649 | uinfo->count = 2; |
@@ -652,9 +652,9 @@ static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo | |||
652 | return 0; | 652 | return 0; |
653 | } | 653 | } |
654 | 654 | ||
655 | static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 655 | static int vx_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
656 | { | 656 | { |
657 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 657 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
658 | int audio = kcontrol->private_value & 0xff; | 658 | int audio = kcontrol->private_value & 0xff; |
659 | 659 | ||
660 | down(&chip->mixer_mutex); | 660 | down(&chip->mixer_mutex); |
@@ -664,9 +664,9 @@ static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont | |||
664 | return 0; | 664 | return 0; |
665 | } | 665 | } |
666 | 666 | ||
667 | static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 667 | static int vx_audio_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
668 | { | 668 | { |
669 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 669 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
670 | int audio = kcontrol->private_value & 0xff; | 670 | int audio = kcontrol->private_value & 0xff; |
671 | 671 | ||
672 | down(&chip->mixer_mutex); | 672 | down(&chip->mixer_mutex); |
@@ -681,9 +681,9 @@ static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont | |||
681 | return 0; | 681 | return 0; |
682 | } | 682 | } |
683 | 683 | ||
684 | static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 684 | static int vx_monitor_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
685 | { | 685 | { |
686 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 686 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
687 | int audio = kcontrol->private_value & 0xff; | 687 | int audio = kcontrol->private_value & 0xff; |
688 | 688 | ||
689 | down(&chip->mixer_mutex); | 689 | down(&chip->mixer_mutex); |
@@ -693,9 +693,9 @@ static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
693 | return 0; | 693 | return 0; |
694 | } | 694 | } |
695 | 695 | ||
696 | static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 696 | static int vx_monitor_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
697 | { | 697 | { |
698 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 698 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
699 | int audio = kcontrol->private_value & 0xff; | 699 | int audio = kcontrol->private_value & 0xff; |
700 | 700 | ||
701 | down(&chip->mixer_mutex); | 701 | down(&chip->mixer_mutex); |
@@ -712,28 +712,28 @@ static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
712 | return 0; | 712 | return 0; |
713 | } | 713 | } |
714 | 714 | ||
715 | static snd_kcontrol_new_t vx_control_audio_gain = { | 715 | static struct snd_kcontrol_new vx_control_audio_gain = { |
716 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 716 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
717 | /* name will be filled later */ | 717 | /* name will be filled later */ |
718 | .info = vx_audio_gain_info, | 718 | .info = vx_audio_gain_info, |
719 | .get = vx_audio_gain_get, | 719 | .get = vx_audio_gain_get, |
720 | .put = vx_audio_gain_put | 720 | .put = vx_audio_gain_put |
721 | }; | 721 | }; |
722 | static snd_kcontrol_new_t vx_control_output_switch = { | 722 | static struct snd_kcontrol_new vx_control_output_switch = { |
723 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 723 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
724 | .name = "PCM Playback Switch", | 724 | .name = "PCM Playback Switch", |
725 | .info = vx_audio_sw_info, | 725 | .info = vx_audio_sw_info, |
726 | .get = vx_audio_sw_get, | 726 | .get = vx_audio_sw_get, |
727 | .put = vx_audio_sw_put | 727 | .put = vx_audio_sw_put |
728 | }; | 728 | }; |
729 | static snd_kcontrol_new_t vx_control_monitor_gain = { | 729 | static struct snd_kcontrol_new vx_control_monitor_gain = { |
730 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 730 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
731 | .name = "Monitoring Volume", | 731 | .name = "Monitoring Volume", |
732 | .info = vx_audio_gain_info, /* shared */ | 732 | .info = vx_audio_gain_info, /* shared */ |
733 | .get = vx_audio_monitor_get, | 733 | .get = vx_audio_monitor_get, |
734 | .put = vx_audio_monitor_put | 734 | .put = vx_audio_monitor_put |
735 | }; | 735 | }; |
736 | static snd_kcontrol_new_t vx_control_monitor_switch = { | 736 | static struct snd_kcontrol_new vx_control_monitor_switch = { |
737 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 737 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
738 | .name = "Monitoring Switch", | 738 | .name = "Monitoring Switch", |
739 | .info = vx_audio_sw_info, /* shared */ | 739 | .info = vx_audio_sw_info, /* shared */ |
@@ -745,16 +745,16 @@ static snd_kcontrol_new_t vx_control_monitor_switch = { | |||
745 | /* | 745 | /* |
746 | * IEC958 status bits | 746 | * IEC958 status bits |
747 | */ | 747 | */ |
748 | static int vx_iec958_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 748 | static int vx_iec958_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
749 | { | 749 | { |
750 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; | 750 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; |
751 | uinfo->count = 1; | 751 | uinfo->count = 1; |
752 | return 0; | 752 | return 0; |
753 | } | 753 | } |
754 | 754 | ||
755 | static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 755 | static int vx_iec958_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
756 | { | 756 | { |
757 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 757 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
758 | 758 | ||
759 | down(&chip->mixer_mutex); | 759 | down(&chip->mixer_mutex); |
760 | ucontrol->value.iec958.status[0] = (chip->uer_bits >> 0) & 0xff; | 760 | ucontrol->value.iec958.status[0] = (chip->uer_bits >> 0) & 0xff; |
@@ -765,7 +765,7 @@ static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro | |||
765 | return 0; | 765 | return 0; |
766 | } | 766 | } |
767 | 767 | ||
768 | static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) | 768 | static int vx_iec958_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
769 | { | 769 | { |
770 | ucontrol->value.iec958.status[0] = 0xff; | 770 | ucontrol->value.iec958.status[0] = 0xff; |
771 | ucontrol->value.iec958.status[1] = 0xff; | 771 | ucontrol->value.iec958.status[1] = 0xff; |
@@ -774,9 +774,9 @@ static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *u | |||
774 | return 0; | 774 | return 0; |
775 | } | 775 | } |
776 | 776 | ||
777 | static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 777 | static int vx_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
778 | { | 778 | { |
779 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 779 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
780 | unsigned int val; | 780 | unsigned int val; |
781 | 781 | ||
782 | val = (ucontrol->value.iec958.status[0] << 0) | | 782 | val = (ucontrol->value.iec958.status[0] << 0) | |
@@ -794,7 +794,7 @@ static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro | |||
794 | return 0; | 794 | return 0; |
795 | } | 795 | } |
796 | 796 | ||
797 | static snd_kcontrol_new_t vx_control_iec958_mask = { | 797 | static struct snd_kcontrol_new vx_control_iec958_mask = { |
798 | .access = SNDRV_CTL_ELEM_ACCESS_READ, | 798 | .access = SNDRV_CTL_ELEM_ACCESS_READ, |
799 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 799 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
800 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK), | 800 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK), |
@@ -802,7 +802,7 @@ static snd_kcontrol_new_t vx_control_iec958_mask = { | |||
802 | .get = vx_iec958_mask_get, | 802 | .get = vx_iec958_mask_get, |
803 | }; | 803 | }; |
804 | 804 | ||
805 | static snd_kcontrol_new_t vx_control_iec958 = { | 805 | static struct snd_kcontrol_new vx_control_iec958 = { |
806 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 806 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
807 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), | 807 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), |
808 | .info = vx_iec958_info, | 808 | .info = vx_iec958_info, |
@@ -818,7 +818,7 @@ static snd_kcontrol_new_t vx_control_iec958 = { | |||
818 | #define METER_MAX 0xff | 818 | #define METER_MAX 0xff |
819 | #define METER_SHIFT 16 | 819 | #define METER_SHIFT 16 |
820 | 820 | ||
821 | static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 821 | static int vx_vu_meter_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
822 | { | 822 | { |
823 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 823 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
824 | uinfo->count = 2; | 824 | uinfo->count = 2; |
@@ -827,9 +827,9 @@ static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo | |||
827 | return 0; | 827 | return 0; |
828 | } | 828 | } |
829 | 829 | ||
830 | static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 830 | static int vx_vu_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
831 | { | 831 | { |
832 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 832 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
833 | struct vx_vu_meter meter[2]; | 833 | struct vx_vu_meter meter[2]; |
834 | int audio = kcontrol->private_value & 0xff; | 834 | int audio = kcontrol->private_value & 0xff; |
835 | int capture = (kcontrol->private_value >> 8) & 1; | 835 | int capture = (kcontrol->private_value >> 8) & 1; |
@@ -840,9 +840,9 @@ static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont | |||
840 | return 0; | 840 | return 0; |
841 | } | 841 | } |
842 | 842 | ||
843 | static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 843 | static int vx_peak_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
844 | { | 844 | { |
845 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 845 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
846 | struct vx_vu_meter meter[2]; | 846 | struct vx_vu_meter meter[2]; |
847 | int audio = kcontrol->private_value & 0xff; | 847 | int audio = kcontrol->private_value & 0xff; |
848 | int capture = (kcontrol->private_value >> 8) & 1; | 848 | int capture = (kcontrol->private_value >> 8) & 1; |
@@ -853,7 +853,7 @@ static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
853 | return 0; | 853 | return 0; |
854 | } | 854 | } |
855 | 855 | ||
856 | static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 856 | static int vx_saturation_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
857 | { | 857 | { |
858 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 858 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
859 | uinfo->count = 2; | 859 | uinfo->count = 2; |
@@ -862,9 +862,9 @@ static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin | |||
862 | return 0; | 862 | return 0; |
863 | } | 863 | } |
864 | 864 | ||
865 | static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 865 | static int vx_saturation_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
866 | { | 866 | { |
867 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 867 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
868 | struct vx_vu_meter meter[2]; | 868 | struct vx_vu_meter meter[2]; |
869 | int audio = kcontrol->private_value & 0xff; | 869 | int audio = kcontrol->private_value & 0xff; |
870 | 870 | ||
@@ -874,7 +874,7 @@ static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
874 | return 0; | 874 | return 0; |
875 | } | 875 | } |
876 | 876 | ||
877 | static snd_kcontrol_new_t vx_control_vu_meter = { | 877 | static struct snd_kcontrol_new vx_control_vu_meter = { |
878 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 878 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
879 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 879 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
880 | /* name will be filled later */ | 880 | /* name will be filled later */ |
@@ -882,7 +882,7 @@ static snd_kcontrol_new_t vx_control_vu_meter = { | |||
882 | .get = vx_vu_meter_get, | 882 | .get = vx_vu_meter_get, |
883 | }; | 883 | }; |
884 | 884 | ||
885 | static snd_kcontrol_new_t vx_control_peak_meter = { | 885 | static struct snd_kcontrol_new vx_control_peak_meter = { |
886 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 886 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
887 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 887 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
888 | /* name will be filled later */ | 888 | /* name will be filled later */ |
@@ -890,7 +890,7 @@ static snd_kcontrol_new_t vx_control_peak_meter = { | |||
890 | .get = vx_peak_meter_get, | 890 | .get = vx_peak_meter_get, |
891 | }; | 891 | }; |
892 | 892 | ||
893 | static snd_kcontrol_new_t vx_control_saturation = { | 893 | static struct snd_kcontrol_new vx_control_saturation = { |
894 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 894 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
895 | .name = "Input Saturation", | 895 | .name = "Input Saturation", |
896 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 896 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
@@ -904,12 +904,12 @@ static snd_kcontrol_new_t vx_control_saturation = { | |||
904 | * | 904 | * |
905 | */ | 905 | */ |
906 | 906 | ||
907 | int snd_vx_mixer_new(vx_core_t *chip) | 907 | int snd_vx_mixer_new(struct vx_core *chip) |
908 | { | 908 | { |
909 | unsigned int i, c; | 909 | unsigned int i, c; |
910 | int err; | 910 | int err; |
911 | snd_kcontrol_new_t temp; | 911 | struct snd_kcontrol_new temp; |
912 | snd_card_t *card = chip->card; | 912 | struct snd_card *card = chip->card; |
913 | char name[32]; | 913 | char name[32]; |
914 | 914 | ||
915 | strcpy(card->mixername, card->driver); | 915 | strcpy(card->mixername, card->driver); |