ALSA: hda - Cirrus: Correctly clear line_out_pins when moving to speaker
authorDavid Henningsson <david.henningsson@canonical.com>
Wed, 21 Nov 2012 09:03:10 +0000 (10:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Dec 2012 19:47:04 +0000 (11:47 -0800)
commit 34c3d1926bdaf45d3a891dd577482abcdd9faa34 upstream.

If this array is not cleared, the jack related code later might
fail to create "Internal Speaker Phantom Jack" on Dell Inspiron 3420 and
Dell Vostro 2420.

BugLink: https://bugs.launchpad.net/bugs/1076840
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/patch_cirrus.c

index 057f95a2bbb00ef5fca3189753fabb8862ac3595..3605fbb6ef154581caed85803b0ba236195a5141 100644 (file)
@@ -460,6 +460,7 @@ static int parse_output(struct hda_codec *codec)
                memcpy(cfg->speaker_pins, cfg->line_out_pins,
                       sizeof(cfg->speaker_pins));
                cfg->line_outs = 0;
+               memset(cfg->line_out_pins, 0, sizeof(cfg->line_out_pins));
        }
 
        return 0;