]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: hda - Improve loopback path lookups for AD1983
authorTakashi Iwai <tiwai@suse.de>
Wed, 5 Feb 2014 07:49:41 +0000 (08:49 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 5 Feb 2014 07:49:41 +0000 (08:49 +0100)
AD1983 has flexible loopback routes and the generic parser would take
wrong path confusingly instead of taking individual paths via NID 0x0c
and 0x0d.  For avoiding it, limit the connections at these widgets so
that the parser can think more straightforwardly.  This fixes the
regression of the missing line-in loopback on Dell machine.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70011
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_analog.c

index 195cd62cdce5928383e94f4a84fca54aa9f9b183..df3652ad15ef36224fdbc121ee1018116bab28c0 100644 (file)
@@ -491,6 +491,8 @@ static int ad1983_add_spdif_mux_ctl(struct hda_codec *codec)
 static int patch_ad1983(struct hda_codec *codec)
 {
        struct ad198x_spec *spec;
+       static hda_nid_t conn_0c[] = { 0x08 };
+       static hda_nid_t conn_0d[] = { 0x09 };
        int err;
 
        err = alloc_ad_spec(codec);
@@ -501,6 +503,11 @@ static int patch_ad1983(struct hda_codec *codec)
        spec->gen.mixer_nid = 0x0e;
        spec->gen.beep_nid = 0x10;
        set_beep_amp(spec, 0x10, 0, HDA_OUTPUT);
+
+       /* limit the loopback routes not to confuse the parser */
+       snd_hda_override_conn_list(codec, 0x0c, ARRAY_SIZE(conn_0c), conn_0c);
+       snd_hda_override_conn_list(codec, 0x0d, ARRAY_SIZE(conn_0d), conn_0d);
+
        err = ad198x_parse_auto_config(codec, false);
        if (err < 0)
                goto error;