This is a note to let you know that I've just added the patch titled

    ALSA: hda - Workaround for silent output on VAIO Z with ALC889

to the 3.5-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-hda-workaround-for-silent-output-on-vaio-z-with-alc889.patch
and it can be found in the queue-3.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From [email protected]  Fri Sep 21 10:24:28 2012
From: Takashi Iwai <[email protected]>
Date: Thu, 20 Sep 2012 07:44:11 +0200
Subject: ALSA: hda - Workaround for silent output on VAIO Z with ALC889
To: [email protected]
Cc: Adam Williamson <[email protected]>
Message-ID: <s5h4nmtnt90.wl%[email protected]>

From: Takashi Iwai <[email protected]>

commit e427c2375646789ecd0ccaef1a1e41458559ab2d upstream.

On recent kernels, Realtek codec parser tries to optimize the routing
aggressively and take the headphone output as primary at first.  This
caused a regression on VAIO Z with ALC889, the silent output from the
speaker.

The problem seems that the speaker pin must be connected to the first
DAC (0x02) on this machine by some reason although the codec itself
advertises the flexible routing with any DACs.

This patch adds a fix-up for choosing the speaker pin as the primary
so that the right DAC is assigned on this device.

Reported-and-tested-by: Adam Williamson <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---

---
 Documentation/sound/alsa/HD-Audio-Models.txt |    1 +
 sound/pci/hda/patch_realtek.c                |   22 +++++++++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)

--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -47,6 +47,7 @@ ALC882/883/885/888/889
   acer-aspire-4930g    Acer Aspire 4930G/5930G/6530G/6930G/7730G
   acer-aspire-8930g    Acer Aspire 8330G/6935G
   acer-aspire          Acer Aspire others
+  no-primary-hp                VAIO Z workaround (for fixed speaker DAC)
 
 ALC861/660
 ==========
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -201,6 +201,7 @@ struct alc_spec {
        unsigned int vol_in_capsrc:1; /* use capsrc volume (ADC has no vol) */
        unsigned int parse_flags; /* passed to snd_hda_parse_pin_defcfg() */
        unsigned int shared_mic_hp:1; /* HP/Mic-in sharing */
+       unsigned int no_primary_hp:1; /* Don't prefer HP pins to speaker pins */
 
        /* auto-mute control */
        int automute_mode;
@@ -4182,7 +4183,8 @@ static int alc_parse_auto_config(struct
                return 0; /* can't find valid BIOS pin config */
        }
 
-       if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT &&
+       if (!spec->no_primary_hp &&
+           cfg->line_out_type == AUTO_PIN_SPEAKER_OUT &&
            cfg->line_outs <= cfg->hp_outs) {
                /* use HP as primary out */
                cfg->speaker_outs = cfg->line_outs;
@@ -4909,6 +4911,7 @@ enum {
        ALC889_FIXUP_DAC_ROUTE,
        ALC889_FIXUP_MBP_VREF,
        ALC889_FIXUP_IMAC91_VREF,
+       ALC882_FIXUP_NO_PRIMARY_HP,
 };
 
 static void alc889_fixup_coef(struct hda_codec *codec,
@@ -5030,6 +5033,17 @@ static void alc889_fixup_imac91_vref(str
        spec->keep_vref_in_automute = 1;
 }
 
+/* Don't take HP output as primary
+ * strangely, the speaker output doesn't work on VAIO Z through DAC 0x05
+ */
+static void alc882_fixup_no_primary_hp(struct hda_codec *codec,
+                                      const struct alc_fixup *fix, int action)
+{
+       struct alc_spec *spec = codec->spec;
+       if (action == ALC_FIXUP_ACT_PRE_PROBE)
+               spec->no_primary_hp = 1;
+}
+
 static const struct alc_fixup alc882_fixups[] = {
        [ALC882_FIXUP_ABIT_AW9D_MAX] = {
                .type = ALC_FIXUP_PINS,
@@ -5212,6 +5226,10 @@ static const struct alc_fixup alc882_fix
                .chained = true,
                .chain_id = ALC882_FIXUP_GPIO1,
        },
+       [ALC882_FIXUP_NO_PRIMARY_HP] = {
+               .type = ALC_FIXUP_FUNC,
+               .v.func = alc882_fixup_no_primary_hp,
+       },
 };
 
 static const struct snd_pci_quirk alc882_fixup_tbl[] = {
@@ -5246,6 +5264,7 @@ static const struct snd_pci_quirk alc882
        SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC),
        SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601),
        SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
+       SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", 
ALC882_FIXUP_NO_PRIMARY_HP),
 
        /* All Apple entries are in codec SSIDs */
        SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF),
@@ -5286,6 +5305,7 @@ static const struct alc_model_fixup alc8
        {.id = ALC882_FIXUP_ACER_ASPIRE_4930G, .name = "acer-aspire-4930g"},
        {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"},
        {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"},
+       {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"},
        {}
 };
 


Patches currently in stable-queue which might be from [email protected] are

queue-3.5/alsa-hda-fix-missing-master-volume-for-stac9200-925x.patch
queue-3.5/alsa-hda-fix-oops-at-codec-reset-reconfig.patch
queue-3.5/alsa-ice1724-use-linear-scale-for-ak4396-volume-control.patch
queue-3.5/alsa-hda-workaround-for-silent-output-on-vaio-z-with-alc889.patch
queue-3.5/alsa-usb-audio-fix-bogus-error-messages-for-delay-accounting.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to