diff options
| -rw-r--r-- | sound/pci/ice1712/wtm.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/pci/ice1712/wtm.c b/sound/pci/ice1712/wtm.c index c7ffafaa1c5c..6d3412f72855 100644 --- a/sound/pci/ice1712/wtm.c +++ b/sound/pci/ice1712/wtm.c | |||
| @@ -339,8 +339,14 @@ static int stac9460_adc_vol_put(struct snd_kcontrol *kcontrol, | |||
| 339 | /* | 339 | /* |
| 340 | * MIC / LINE switch fonction | 340 | * MIC / LINE switch fonction |
| 341 | */ | 341 | */ |
| 342 | static int stac9460_mic_sw_info(struct snd_kcontrol *kcontrol, | ||
| 343 | struct snd_ctl_elem_info *uinfo) | ||
| 344 | { | ||
| 345 | static const char * const texts[2] = { "Line In", "Mic" }; | ||
| 346 | |||
| 347 | return snd_ctl_enum_info(uinfo, 1, 2, texts); | ||
| 348 | } | ||
| 342 | 349 | ||
| 343 | #define stac9460_mic_sw_info snd_ctl_boolean_mono_info | ||
| 344 | 350 | ||
| 345 | static int stac9460_mic_sw_get(struct snd_kcontrol *kcontrol, | 351 | static int stac9460_mic_sw_get(struct snd_kcontrol *kcontrol, |
| 346 | struct snd_ctl_elem_value *ucontrol) | 352 | struct snd_ctl_elem_value *ucontrol) |
| @@ -354,7 +360,7 @@ static int stac9460_mic_sw_get(struct snd_kcontrol *kcontrol, | |||
| 354 | val = stac9460_get(ice, STAC946X_GENERAL_PURPOSE); | 360 | val = stac9460_get(ice, STAC946X_GENERAL_PURPOSE); |
| 355 | else | 361 | else |
| 356 | val = stac9460_2_get(ice, STAC946X_GENERAL_PURPOSE); | 362 | val = stac9460_2_get(ice, STAC946X_GENERAL_PURPOSE); |
| 357 | ucontrol->value.integer.value[0] = ~val>>7 & 0x1; | 363 | ucontrol->value.enumerated.item[0] = (val >> 7) & 0x1; |
| 358 | return 0; | 364 | return 0; |
| 359 | } | 365 | } |
| 360 | 366 | ||
| @@ -370,7 +376,7 @@ static int stac9460_mic_sw_put(struct snd_kcontrol *kcontrol, | |||
| 370 | old = stac9460_get(ice, STAC946X_GENERAL_PURPOSE); | 376 | old = stac9460_get(ice, STAC946X_GENERAL_PURPOSE); |
| 371 | else | 377 | else |
| 372 | old = stac9460_2_get(ice, STAC946X_GENERAL_PURPOSE); | 378 | old = stac9460_2_get(ice, STAC946X_GENERAL_PURPOSE); |
| 373 | new = (~ucontrol->value.integer.value[0] << 7 & 0x80) | (old & ~0x80); | 379 | new = (ucontrol->value.enumerated.item[0] << 7 & 0x80) | (old & ~0x80); |
| 374 | change = (new != old); | 380 | change = (new != old); |
| 375 | if (change) { | 381 | if (change) { |
| 376 | if (id == 0) | 382 | if (id == 0) |
| @@ -411,7 +417,7 @@ static struct snd_kcontrol_new stac9640_controls[] = { | |||
| 411 | }, | 417 | }, |
| 412 | { | 418 | { |
| 413 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 419 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
| 414 | .name = "MIC/Line switch", | 420 | .name = "MIC/Line Input Enum", |
| 415 | .count = 2, | 421 | .count = 2, |
| 416 | .info = stac9460_mic_sw_info, | 422 | .info = stac9460_mic_sw_info, |
| 417 | .get = stac9460_mic_sw_get, | 423 | .get = stac9460_mic_sw_get, |
