[alsa-devel] [PATCH 1/1] ALSA: VIA HDA: Fix Smart5.1 isn't useful for 6 audio jacks motherboard

lydiawang lydiawang at viatech.com.cn
Wed Apr 27 11:44:16 CEST 2011


From: Lydia Wang <lydiawang at viatech.com.cn>
Subject: ALSA: VIA HDA: 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 <lydiawang at viatech.com.cn>
Index: sound-2.6/sound/pci/hda/patch_via.c
===================================================================
--- sound-2.6.orig/sound/pci/hda/patch_via.c    2011-04-27 16:48:03.000000000 +0800
+++ sound-2.6/sound/pci/hda/patch_via.c    2011-04-27 17:01:22.000000000 +0800
@@ -1021,6 +1021,10 @@
     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;


More information about the Alsa-devel mailing list