aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2013-02-05 06:06:02 -0500
committerTakashi Iwai <tiwai@suse.de>2013-02-05 06:17:24 -0500
commitf672f65a1c15b04e09d25701a8b5be47bad9376a (patch)
tree8eb0bede140303cd6694541ebe770800b79bc0dd
parent2ad779b7329d6894a80df94e693e72eaa0d56790 (diff)
ALSA: hda - Fix phantom jacks on VT1708
The VT1708 has no unsol event capability, and polling is set using the "Jack Detect" alsamixer control. In order not to create phantom Jack controls, temporary enable jackpoll during build_controls. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_via.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 9641c0e487bb..e934c498b95d 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -661,6 +661,18 @@ static int via_init(struct hda_codec *codec)
661 return 0; 661 return 0;
662} 662}
663 663
664static int vt1708_build_controls(struct hda_codec *codec)
665{
666 /* In order not to create "Phantom Jack" controls,
667 temporary enable jackpoll */
668 int err;
669 int old_interval = codec->jackpoll_interval;
670 codec->jackpoll_interval = msecs_to_jiffies(100);
671 err = via_build_controls(codec);
672 codec->jackpoll_interval = old_interval;
673 return err;
674}
675
664static int vt1708_build_pcms(struct hda_codec *codec) 676static int vt1708_build_pcms(struct hda_codec *codec)
665{ 677{
666 struct via_spec *spec = codec->spec; 678 struct via_spec *spec = codec->spec;
@@ -723,6 +735,7 @@ static int patch_vt1708(struct hda_codec *codec)
723 spec->init_verbs[spec->num_iverbs++] = vt1708_init_verbs; 735 spec->init_verbs[spec->num_iverbs++] = vt1708_init_verbs;
724 736
725 codec->patch_ops = via_patch_ops; 737 codec->patch_ops = via_patch_ops;
738 codec->patch_ops.build_controls = vt1708_build_controls;
726 codec->patch_ops.build_pcms = vt1708_build_pcms; 739 codec->patch_ops.build_pcms = vt1708_build_pcms;
727 740
728 /* clear jackpoll_interval again; it's set dynamically */ 741 /* clear jackpoll_interval again; it's set dynamically */