ALSA: hda - Workaround for silent output on Sony Vaio VGC-LN51JGB with ALC889
Subsystems (2)
PATCH 1/3 ALSA: hda - Workaround for silent output on Sony Vaio VGC-LN51JGB with ALC889
Some Vaio all-in-one desktop PCs (for example VGC-LN51JGB) are affected by the same issue that caused Vaio Z laptops to become silent: the speaker pin must be connected to the first DAC even though the codec itself advertises flexible routing through any of the DACs.
Use the no-primary-hp fixup for choosing the speaker pin as the primary so that the right DAC is assigned on this device.
---
sound/pci/hda/patch_realtek.c +1 -0
@@ -5388,6 +5388,7 @@ static const struct snd_pci_quirk alc882SND_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 ), +SND_PCI_QUIRK (0x104d ,0x9043 ,"Sony Vaio VGC-LN51JGB" ,ALC882_FIXUP_NO_PRIMARY_HP ),/* All Apple entries are in codec SSIDs */ SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF),
PATCH 2/3 ALSA: hda - update documentation for no-primary-hp fixup
The problem addressed by this fixup is not specific to Vaio Z, affecting some Vaio all-in-one desktop PCs too. Update the code comments accordingly.
---
Documentation/sound/alsa/HD-Audio-Models.txt +1 -1
@@ -53,7 +53,7 @@ ALC882/883/885/888/889 acer-aspire-8930g Acer Aspire 8330G/6935G acer-aspire Acer Aspire others inv-dmic Inverted internal mic workaround - no-primary-hp VAIO Z workaround (for fixed speaker DAC) + no-primary-hp VAIO Z/VGC-LN51JGB workaround (for fixed speaker DAC) ALC861/660 ==========
sound/pci/hda/patch_realtek.c +2 -1
@@ -5153,7 +5153,8 @@ static void alc889_fixup_imac91_vref(str }/* Don't take HP output as primary -* strangely, the speaker output doesn't work on VAIO Z through DAC 0x05 +* Strangely, the speaker output doesn't work on Vaio Z and some Vaio +* all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 */ static void alc882_fixup_no_primary_hp (struct hda_codec *codec,const struct alc_fixup *fix,int action)
Re: [PATCH 2/3] ALSA: hda - update documentation for no-primary-hp fixup
At Tue, 12 Feb 2013 16:49:46 +0900,
Quoted 7 lines · Fernando Luis Vázquez Cao
The problem addressed by this fixup is not specific to Vaio Z, affecting some Vaio all-in-one desktop PCs too. Update the code comments accordingly.
I applied this now to sound git tree but dropped Cc to stable because the patch is no longer cleanly applicable due to the recent code change. And this is just some minor documentation update, thus we can still live peacefully without this fix.
thanks,
Takashi
Quoted 20 lines
---
diff -urNp
linux-3.7.6-orig/Documentation/sound/alsa/HD-Audio-Models.txtlinux-3.7.6/Documentation/sound/alsa/HD-Audio-Models.txtDocumentation/sound/alsa/HD-Audio-Models.txt +1
-1@@ -53,7 +53,7 @@ ALC882/883/885/888/889 acer-aspire-8930g Acer Aspire 8330G/6935G acer-aspire Acer Aspire others inv-dmic Inverted internal mic workaround - no-primary-hp VAIO Z workaround (for fixed speaker DAC) + no-primary-hp VAIO Z/VGC-LN51JGB workaround (for fixed speaker DAC) ALC861/660 ==========diff -urNp
linux-3.7.6-orig/sound/pci/hda/patch_realtek.clinux-3.7.6/sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_realtek.c static void alc889_fixup_imac91_vref(str · line 5160
Quoted 9 lines
sound/pci/hda/patch_realtek.c +2
-1@@ -5153,7 +5153,8 @@ static void alc889_fixup_imac91_vref(str }/* Don't take HP output as primary -* strangely, the speaker output doesn't work on VAIO Z through DAC 0x05 +* Strangely, the speaker output doesn't work on Vaio Z and some Vaio +* all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 */ static void alc882_fixup_no_primary_hp (struct hda_codec *codec,const struct alc_fixup *fix,int action)
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
PATCH 2/3 ALSA: hda - no-primary-hp is a quirk for model ALC889 not ALC882
In reply to Fernando Luis Vázquez CaoSubstitute ALC889 for ALC882 in macro and function names.
---
sound/pci/hda/patch_realtek.c +7 -7
@@ -5030,7 +5030,7 @@ enum {ALC889_FIXUP_MBP_VREF ,ALC889_FIXUP_IMAC91_VREF ,ALC882_FIXUP_INV_DMIC , - ALC882_FIXUP_NO_PRIMARY_HP, + ALC889_FIXUP_NO_PRIMARY_HP, }; static void alc889_fixup_coef(struct hda_codec *codec,
@@ -5156,7 +5156,7 @@ static void alc889_fixup_imac91_vref(str* Strangely, the speaker output doesn't work on Vaio Z and some Vaio * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 */ -static void alc882_fixup_no_primary_hp (struct hda_codec *codec, +static void alc889_fixup_no_primary_hp (struct hda_codec *codec,const struct alc_fixup *fix,int action) {struct alc_spec *spec = codec->spec;
@@ -5350,9 +5350,9 @@ static const struct alc_fixup alc882_fix .type = ALC_FIXUP_FUNC, .v.func = alc_fixup_inv_dmic_0x12, }, - [ALC882_FIXUP_NO_PRIMARY_HP] = { + [ALC889_FIXUP_NO_PRIMARY_HP] = { .type = ALC_FIXUP_FUNC, - .v.func = alc882_fixup_no_primary_hp, + .v.func = alc889_fixup_no_primary_hp, }, };
@@ -5388,8 +5388,8 @@ static const struct snd_pci_quirk alc882SND_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 ), -SND_PCI_QUIRK (0x104d ,0x9043 ,"Sony Vaio VGC-LN51JGB" ,ALC882_FIXUP_NO_PRIMARY_HP ), +SND_PCI_QUIRK (0x104d ,0x905a ,"Sony Vaio Z" ,ALC889_FIXUP_NO_PRIMARY_HP ), +SND_PCI_QUIRK (0x104d ,0x9043 ,"Sony Vaio VGC-LN51JGB" ,ALC889_FIXUP_NO_PRIMARY_HP ),/* All Apple entries are in codec SSIDs */ SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF),
@@ -5432,7 +5432,7 @@ static const struct alc_model_fixup alc8 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"}, {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"}, {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"}, - {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"}, + {.id = ALC889_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"}, {} };
Re: [PATCH 2/3] ALSA: hda - no-primary-hp is a quirk for model ALC889 not ALC882
Hi Iwai,
Ouch, the subject reads "[PATCH 2/3]" but this is patch 3 of the series and should be applied last. I am sorry for the noise.
Thanks,
Fernando
Quoted 59 lines · Fernando Luis Vázquez Cao
Substitute ALC889 for ALC882 in macro and function names.
---
diff -urNp
linux-3.7.6-orig/sound/pci/hda/patch_realtek.clinux-3.7.6/sound/pci/hda/patch_realtek.csound/pci/hda/patch_realtek.c +7
-7@@ -5030,7 +5030,7 @@ enum {ALC889_FIXUP_MBP_VREF ,ALC889_FIXUP_IMAC91_VREF ,ALC882_FIXUP_INV_DMIC , - ALC882_FIXUP_NO_PRIMARY_HP, + ALC889_FIXUP_NO_PRIMARY_HP, }; static void alc889_fixup_coef(struct hda_codec *codec,@@ -5156,7 +5156,7 @@ static void alc889_fixup_imac91_vref(str* Strangely, the speaker output doesn't work on Vaio Z and some Vaio * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 */ -static void alc882_fixup_no_primary_hp (struct hda_codec *codec, +static void alc889_fixup_no_primary_hp (struct hda_codec *codec,const struct alc_fixup *fix,int action) {struct alc_spec *spec = codec->spec;@@ -5350,9 +5350,9 @@ static const struct alc_fixup alc882_fix .type = ALC_FIXUP_FUNC, .v.func = alc_fixup_inv_dmic_0x12, }, - [ALC882_FIXUP_NO_PRIMARY_HP] = { + [ALC889_FIXUP_NO_PRIMARY_HP] = { .type = ALC_FIXUP_FUNC, - .v.func = alc882_fixup_no_primary_hp, + .v.func = alc889_fixup_no_primary_hp, }, };@@ -5388,8 +5388,8 @@ static const struct snd_pci_quirk alc882SND_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 ), -SND_PCI_QUIRK (0x104d ,0x9043 ,"Sony Vaio VGC-LN51JGB" ,ALC882_FIXUP_NO_PRIMARY_HP ), +SND_PCI_QUIRK (0x104d ,0x905a ,"Sony Vaio Z" ,ALC889_FIXUP_NO_PRIMARY_HP ), +SND_PCI_QUIRK (0x104d ,0x9043 ,"Sony Vaio VGC-LN51JGB" ,ALC889_FIXUP_NO_PRIMARY_HP ),/* All Apple entries are in codec SSIDs */ SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF),@@ -5432,7 +5432,7 @@ static const struct alc_model_fixup alc8 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"}, {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"}, {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"}, - {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"}, + {.id = ALC889_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"}, {} };
Re: [PATCH 2/3] ALSA: hda - no-primary-hp is a quirk for model ALC889 not ALC882
In reply to Fernando Luis Vázquez CaoAt Tue, 12 Feb 2013 16:54:16 +0900,
Quoted 6 lines · Fernando Luis Vázquez Cao
Substitute ALC889 for ALC882 in macro and function names.
This fixup can work generically to all ALC882 variants, including ALC889. Unless you are really sure that this must be used exclusively only for ALC889, no reason to change the prefix.
thanks,
Takashi
Quoted 57 lines
---
diff -urNp
linux-3.7.6-orig/sound/pci/hda/patch_realtek.clinux-3.7.6/sound/pci/hda/patch_realtek.csound/pci/hda/patch_realtek.c +7
-7@@ -5030,7 +5030,7 @@ enum {ALC889_FIXUP_MBP_VREF ,ALC889_FIXUP_IMAC91_VREF ,ALC882_FIXUP_INV_DMIC , - ALC882_FIXUP_NO_PRIMARY_HP, + ALC889_FIXUP_NO_PRIMARY_HP, }; static void alc889_fixup_coef(struct hda_codec *codec,@@ -5156,7 +5156,7 @@ static void alc889_fixup_imac91_vref(str* Strangely, the speaker output doesn't work on Vaio Z and some Vaio * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 */ -static void alc882_fixup_no_primary_hp (struct hda_codec *codec, +static void alc889_fixup_no_primary_hp (struct hda_codec *codec,const struct alc_fixup *fix,int action) {struct alc_spec *spec = codec->spec;@@ -5350,9 +5350,9 @@ static const struct alc_fixup alc882_fix .type = ALC_FIXUP_FUNC, .v.func = alc_fixup_inv_dmic_0x12, }, - [ALC882_FIXUP_NO_PRIMARY_HP] = { + [ALC889_FIXUP_NO_PRIMARY_HP] = { .type = ALC_FIXUP_FUNC, - .v.func = alc882_fixup_no_primary_hp, + .v.func = alc889_fixup_no_primary_hp, }, };@@ -5388,8 +5388,8 @@ static const struct snd_pci_quirk alc882SND_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 ), -SND_PCI_QUIRK (0x104d ,0x9043 ,"Sony Vaio VGC-LN51JGB" ,ALC882_FIXUP_NO_PRIMARY_HP ), +SND_PCI_QUIRK (0x104d ,0x905a ,"Sony Vaio Z" ,ALC889_FIXUP_NO_PRIMARY_HP ), +SND_PCI_QUIRK (0x104d ,0x9043 ,"Sony Vaio VGC-LN51JGB" ,ALC889_FIXUP_NO_PRIMARY_HP ),/* All Apple entries are in codec SSIDs */ SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF),@@ -5432,7 +5432,7 @@ static const struct alc_model_fixup alc8 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"}, {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"}, {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"}, - {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"}, + {.id = ALC889_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"}, {} };
Re: [PATCH 2/3] ALSA: hda - no-primary-hp is a quirk for model ALC889 not ALC882
Quoted 10 lines · Takashi Iwai
At Tue, 12 Feb 2013 16:54:16 +0900,
Quoted 5 lines · Fernando Luis Vázquez Cao
Substitute ALC889 for ALC882 in macro and function names.
This fixup can work generically to all ALC882 variants, including ALC889. Unless you are really sure that this must be used exclusively only for ALC889, no reason to change the prefix.
Thank you for applying patches 1 and 2 (I agree that the second patch is not needed for stable).
Regarding this patch, I am not completely sure whether this issue is ALC889 specific so we probably shouldn't apply it as you say.
Regards,
Fernando
Takashi Iwai
AppliedAt Tue, 12 Feb 2013 16:47:44 +0900,
Quoted 6 lines · Fernando Luis Vázquez Cao
Some Vaio all-in-one desktop PCs (for example VGC-LN51JGB) are affected by the same issue that caused Vaio Z laptops to become silent: the speaker pin must be connected to the first DAC even though the codec itself advertises flexible routing through any of the DACs.
Quoted 6 lines
Use the no-primary-hp fixup for choosing the speaker pin as the primary so that the right DAC is assigned on this device.
Thanks, applied now.
Takashi
Quoted 15 lines
---
diff -urNp
linux-3.7.6-orig/sound/pci/hda/patch_realtek.clinux-3.7.6/sound/pci/hda/patch_realtek.csound/pci/hda/patch_realtek.c +1
-0@@ -5388,6 +5388,7 @@ static const struct snd_pci_quirk alc882SND_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 ), +SND_PCI_QUIRK (0x104d ,0x9043 ,"Sony Vaio VGC-LN51JGB" ,ALC882_FIXUP_NO_PRIMARY_HP ),/* All Apple entries are in codec SSIDs */ SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF),