At Mon, 08 Oct 2012 18:24:23 +0200, Julien Danjou wrote:
On Mon, Oct 08 2012, Takashi Iwai wrote:
OK, then could you try the patch below?
The patch is not enough on itself, but it seems on a good track. As soon as the module is started, the noise starts for one second and stops.
The "Beep Playback Switch" is shown as muted in alsamixer. If I unmute it, well, no noise, as expected. If i re-mute it, the noise come back.
So this patch just works after module loading, but I guess that's to be expected if I understand the code correctly. :)
Yep, as David pointed out, the beep control overrides the amp setup. And your previous result suggested that we shouldn't use this beep path either (except for unmuting it), otherwise you get a noise again.
So, the patch below is the revised version. It removes the beep control but still opens the path to NID 0x1d.
Let me know if this works better.
thanks,
Takashi
--- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8568aee..1cf45d0 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4249,6 +4249,7 @@ static const struct snd_pci_quirk beep_white_list[] = { SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1), SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1), SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1), + SND_PCI_QUIRK(0x104d, 0x90a5, "Sony VAIO Z", 0), /* beep cause noise */ SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1), SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1), {} @@ -5988,10 +5989,22 @@ static void alc269_fixup_mic2_mute(struct hda_codec *codec, } }
+static void alc275_fixup_vaio_mixer(struct hda_codec *codec, + const struct alc_fixup *fix, int action) +{ + /* _UN_muting the input from NID 0x1d fixes the mysterious speaker + * noise on Sony VAIO Z + */ + if (action == ALC_FIXUP_ACT_INIT) + snd_hda_codec_write(codec, 0x0b, 0, + AC_VERB_SET_AMP_GAIN_MUTE, + AMP_IN_UNMUTE(4)); +}
enum { ALC269_FIXUP_SONY_VAIO, ALC275_FIXUP_SONY_VAIO_GPIO2, + ALC275_FIXUP_SONY_VAIO_MIXER, ALC269_FIXUP_DELL_M101Z, ALC269_FIXUP_SKU_IGNORE, ALC269_FIXUP_ASUS_G73JW, @@ -6031,6 +6044,12 @@ static const struct alc_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC269_FIXUP_SONY_VAIO }, + [ALC275_FIXUP_SONY_VAIO_MIXER] = { + .type = ALC_FIXUP_FUNC, + .v.func = alc275_fixup_vaio_mixer, + .chained = true, + .chain_id = ALC269_FIXUP_SONY_VAIO + }, [ALC269_FIXUP_DELL_M101Z] = { .type = ALC_FIXUP_VERBS, .v.verbs = (const struct hda_verb[]) { @@ -6172,6 +6191,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), + SND_PCI_QUIRK(0x104d, 0x90a5, "Sony VAIO Z", ALC275_FIXUP_SONY_VAIO_MIXER), SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),