From: Lydia Wang Date: Wed, 27 Apr 2011 09:44:16 +0000 (+0800) Subject: ALSA: hda - VIA: Fix Smart5.1 isn't useful for 6 audio jacks motherboard. X-Git-Tag: v3.0-rc1~51^2~12^2~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb34c207af4944e9c93e2b462e351430f15daad6;p=platform%2Fupstream%2Fkernel-adaptation-pc.git ALSA: hda - VIA: Fix Smart5.1 isn't useful for 6 audio jacks motherboard. For some motherboards with 5 or 6 audio jacks which had six or eight multiple channels output, smart5.1 item is no useful and should be removed. Signed-off-by: Lydia Wang Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 15b57a1..62fe64c 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -1021,6 +1021,11 @@ static int via_smart51_build(struct via_spec *spec) hda_nid_t nid; int i; + if (!cfg) + return 0; + if (cfg->line_outs > 2) + return 0; + knew = via_clone_control(spec, &via_smart51_mixer[0]); if (knew == NULL) return -ENOMEM;