diff options
author | Lydia Wang <lydiawang@viatech.com.cn> | 2011-03-22 16:26:36 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-27 11:35:39 -0700 |
commit | ab0190c746a2d9f830c9f25507d78b4e19c5f219 (patch) | |
tree | ae4047ef38617d5216a487f183c69e82790b1fd9 /sound | |
parent | ac66c28dc30d7778b80110552fd5cd82b7bd21d6 (diff) | |
download | lwn-ab0190c746a2d9f830c9f25507d78b4e19c5f219.tar.gz lwn-ab0190c746a2d9f830c9f25507d78b4e19c5f219.zip |
ALSA: hda - VIA: Fix VT1708 can't build up Headphone control issue
commit ee3c35c0827de02de414d08b2ddcbb910c2263ab upstream.
Since VT1708 didn't support the control of getting connection number,
building of headphone control will fail in via_hp_build() function.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_via.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 269bb365752b..acc45798eeb4 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -1266,9 +1266,12 @@ static int via_hp_build(struct hda_codec *codec) break; } - nums = snd_hda_get_connections(codec, nid, conn, HDA_MAX_CONNECTIONS); - if (nums <= 1) - return 0; + if (spec->codec_type != VT1708) { + nums = snd_hda_get_connections(codec, nid, + conn, HDA_MAX_CONNECTIONS); + if (nums <= 1) + return 0; + } knew = via_clone_control(spec, &via_hp_mixer[0]); if (knew == NULL) |