At Wed, 18 Apr 2012 20:43:51 +0200, Takashi Iwai wrote:
At Wed, 18 Apr 2012 19:33:35 +0200, Uros Vampl wrote:
On 18.04.12 18:41, Takashi Iwai wrote:
Ah, does it affect both? What happens if you change the pin 0x10? Does it affect the headphone or speaker output?
Pin 0x0f affects both. Pin 0x10 affects neither.
Does the headphone output work with 3.4 kernel at all?
No. I always tested both speakers and headphones with each patch (and without patches). There was never any sound from either of the two.
OK. This explains lots.
Also, just to be sure, try the patch below in addition to another. This will disable the COEF setup, and it wasn't applied to previous models.
This patch does the trick! First I tried it with the patch that deletes two lines from hda_codec.c, worked already, but there was no Speaker control. Then I instead tried with the patch that sets pin 0x0f. Sound works and I have a Speaker control. Interesting thing though, the Headphone control does nothing and the Speaker control affects both speakers and headphones. Maybe pin 0x10 is bogus too.
Also interesting, the Auto-Mute control does nothing. No matter what it's set to, when I plug in headphones the speakers go silent. It seems the machine has hardware auto-mute handling.
Thank you for your work, I now have sound again!
The patch below is the integrated fix patch. Try this one instead of the all previous fixes. Again with this patch, you'll have only "Master" volume, as both speaker and headphone share the same pin, thus no individual amps are present.
Hopefully this works for you.
BTW, has the auto-mute via HP plug ever worked with your machine?
If not, try the patch below instead. It might be that your machine needs a similar trick like some other ALC260 laptops.
Takashi
--- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 2508f81..7de3502 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1445,6 +1445,13 @@ enum { ALC_FIXUP_ACT_BUILD, };
+static void alc_apply_pincfgs(struct hda_codec *codec, + const struct alc_pincfg *cfg) +{ + for (; cfg->nid; cfg++) + snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val); +} + static void alc_apply_fixup(struct hda_codec *codec, int action) { struct alc_spec *spec = codec->spec; @@ -1478,9 +1485,7 @@ static void alc_apply_fixup(struct hda_codec *codec, int action) snd_printdd(KERN_INFO "hda_codec: %s: " "Apply pincfg for %s\n", codec->chip_name, modelname); - for (; cfg->nid; cfg++) - snd_hda_codec_set_pincfg(codec, cfg->nid, - cfg->val); + alc_apply_pincfgs(codec, cfg); break; case ALC_FIXUP_VERBS: if (action != ALC_FIXUP_ACT_PROBE || !fix->v.verbs) @@ -4861,6 +4866,7 @@ enum { ALC260_FIXUP_GPIO1_TOGGLE, ALC260_FIXUP_REPLACER, ALC260_FIXUP_HP_B1900, + ALC260_FIXUP_KN1, };
static void alc260_gpio1_automute(struct hda_codec *codec) @@ -4888,6 +4894,36 @@ static void alc260_fixup_gpio1_toggle(struct hda_codec *codec, } }
+static void alc260_fixup_kn1(struct hda_codec *codec, + const struct alc_fixup *fix, int action) +{ + struct alc_spec *spec = codec->spec; + static const struct alc_pincfg pincfgs[] = { + { 0x0f, 0x02214000 }, /* HP/speaker */ + { 0x12, 0x90a60160 }, /* int mic */ + { 0x13, 0x02a19000 }, /* ext mic */ + { 0x18, 0x01446000 }, /* SPDIF out */ + /* disable bogus I/O pins */ + { 0x10, 0x411111f0 }, + { 0x11, 0x411111f0 }, + { 0x14, 0x411111f0 }, + { 0x15, 0x411111f0 }, + { 0x16, 0x411111f0 }, + { 0x17, 0x411111f0 }, + { 0x19, 0x411111f0 }, + { } + }; + + switch (action) { + case ALC_FIXUP_ACT_PRE_PROBE: + alc_apply_pincfgs(codec, pincfgs); + break; + case ALC_FIXUP_ACT_PROBE: + spec->init_amp = ALC_INIT_NONE; + break; + } +} + static const struct alc_fixup alc260_fixups[] = { [ALC260_FIXUP_HP_DC5750] = { .type = ALC_FIXUP_PINS, @@ -4938,7 +4974,13 @@ static const struct alc_fixup alc260_fixups[] = { .v.func = alc260_fixup_gpio1_toggle, .chained = true, .chain_id = ALC260_FIXUP_COEF, - } + }, + [ALC260_FIXUP_KN1] = { + .type = ALC_FIXUP_FUNC, + .v.func = alc260_fixup_kn1, + .chained = true, + .chain_id = ALC260_FIXUP_GPIO1_TOGGLE, + }, };
static const struct snd_pci_quirk alc260_fixup_tbl[] = { @@ -4948,6 +4990,7 @@ static const struct snd_pci_quirk alc260_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900), SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1), + SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1), SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER), SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF), {}