Commit f673dc829bc8a9805d82df14a3e08b94f3d6fd50
Committed by
Jaroslav Kysela
1 parent
e171613949
Exists in
master
and in
7 other branches
[ALSA] hda-codec - Revert volume knob controls in STAC codecs
Volume knob controls with STAC codecs seem to cause problems with some devices. Volumes change very slowly or silent suddenly. It's likely due to conflict between the software and the hardware volume knob setup. Since we'll have a virtual master control in future, it's safer to remove this control completely right now. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Showing 1 changed file with 0 additions and 48 deletions Side-by-side Diff
sound/pci/hda/patch_sigmatel.c
... | ... | @@ -374,42 +374,6 @@ |
374 | 374 | return 1; |
375 | 375 | } |
376 | 376 | |
377 | -static int stac92xx_volknob_info(struct snd_kcontrol *kcontrol, | |
378 | - struct snd_ctl_elem_info *uinfo) | |
379 | -{ | |
380 | - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | |
381 | - uinfo->count = 1; | |
382 | - uinfo->value.integer.min = 0; | |
383 | - uinfo->value.integer.max = 127; | |
384 | - return 0; | |
385 | -} | |
386 | - | |
387 | -static int stac92xx_volknob_get(struct snd_kcontrol *kcontrol, | |
388 | - struct snd_ctl_elem_value *ucontrol) | |
389 | -{ | |
390 | - ucontrol->value.integer.value[0] = kcontrol->private_value & 0xff; | |
391 | - return 0; | |
392 | -} | |
393 | - | |
394 | -static int stac92xx_volknob_put(struct snd_kcontrol *kcontrol, | |
395 | - struct snd_ctl_elem_value *ucontrol) | |
396 | -{ | |
397 | - struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | |
398 | - unsigned int oval = kcontrol->private_value & 0xff; | |
399 | - unsigned int val; | |
400 | - | |
401 | - val = ucontrol->value.integer.value[0] & 0xff; | |
402 | - if (val == oval) | |
403 | - return 0; | |
404 | - | |
405 | - kcontrol->private_value &= ~0xff; | |
406 | - kcontrol->private_value |= val; | |
407 | - | |
408 | - snd_hda_codec_write_cache(codec, kcontrol->private_value >> 16, 0, | |
409 | - AC_VERB_SET_VOLUME_KNOB_CONTROL, val | 0x80); | |
410 | - return 1; | |
411 | -} | |
412 | - | |
413 | 377 | static struct hda_verb stac9200_core_init[] = { |
414 | 378 | /* set dac0mux for dac converter */ |
415 | 379 | { 0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, |
... | ... | @@ -507,17 +471,6 @@ |
507 | 471 | .private_value = verb_read | (verb_write << 16), \ |
508 | 472 | } |
509 | 473 | |
510 | -#define STAC_VOLKNOB(knob_nid) \ | |
511 | - { \ | |
512 | - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | |
513 | - .name = "Master Playback Volume", \ | |
514 | - .count = 1, \ | |
515 | - .info = stac92xx_volknob_info, \ | |
516 | - .get = stac92xx_volknob_get, \ | |
517 | - .put = stac92xx_volknob_put, \ | |
518 | - .private_value = 127 | (knob_nid << 16), \ | |
519 | - } | |
520 | - | |
521 | 474 | static struct snd_kcontrol_new stac9200_mixer[] = { |
522 | 475 | HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT), |
523 | 476 | HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT), |
... | ... | @@ -531,7 +484,6 @@ |
531 | 484 | static struct snd_kcontrol_new stac92hd71bxx_mixer[] = { |
532 | 485 | STAC_DIGITAL_INPUT_SOURCE(1), |
533 | 486 | STAC_INPUT_SOURCE(2), |
534 | - STAC_VOLKNOB(0x28), | |
535 | 487 | |
536 | 488 | /* hardware gain controls */ |
537 | 489 | HDA_CODEC_VOLUME_IDX("Digital Mic Volume", 0x0, 0x18, 0x0, HDA_OUTPUT), |