]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: hda - VIA prefers side surrounds over HP
authorTakashi Iwai <tiwai@suse.de>
Fri, 22 Mar 2013 14:11:07 +0000 (15:11 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 22 Mar 2013 14:11:07 +0000 (15:11 +0100)
The recent fix for the independent HP reduced the availability of the
side surround output, because there are only 4 DACs for 7.1 and a HP
outputs.  Adjust the badness tables for VIA so that 7.1 outputs are
activated for the cost of missing independent HP.

Once when we implement the dynamic DAC switching to multiple outputs,
this conflicts will be eased in future...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_via.c

index c35338a8771d9a01020c5c088be985402041a17c..e0dadcf2030d6995197a47c025b085fb7b70a7e3 100644 (file)
@@ -626,11 +626,31 @@ static void via_set_jack_unsol_events(struct hda_codec *codec)
        }
 }
 
+static const struct badness_table via_main_out_badness = {
+       .no_primary_dac = 0x10000,
+       .no_dac = 0x4000,
+       .shared_primary = 0x10000,
+       .shared_surr = 0x20,
+       .shared_clfe = 0x20,
+       .shared_surr_main = 0x20,
+};
+static const struct badness_table via_extra_out_badness = {
+       .no_primary_dac = 0x4000,
+       .no_dac = 0x4000,
+       .shared_primary = 0x12,
+       .shared_surr = 0x20,
+       .shared_clfe = 0x20,
+       .shared_surr_main = 0x10,
+};
+
 static int via_parse_auto_config(struct hda_codec *codec)
 {
        struct via_spec *spec = codec->spec;
        int err;
 
+       spec->gen.main_out_badness = &via_main_out_badness;
+       spec->gen.extra_out_badness = &via_extra_out_badness;
+
        err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, 0);
        if (err < 0)
                return err;