Skip to content

Commit

Permalink
ALSA: hda - VIA: Fix VT1708 can't build up Headphone control issue
Browse files Browse the repository at this point in the history
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>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Lydia Wang authored and Takashi Iwai committed Mar 22, 2011
1 parent 970f630 commit ee3c35c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ee3c35c

Please sign in to comment.