At Mon, 01 Aug 2011 13:12:29 -0400, Pavel Roskin wrote:
Hello!
Quoting Takashi Iwai tiwai@suse.de:
At Sun, 31 Jul 2011 23:39:45 -0400, Pavel Roskin wrote:
My laptop has ALC269, bit it also used the DMIC quirk: SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005HA", ALC269_DMIC),
It might be that ALC269 has a same or similar COEF like ALC271 or ALC889. For ALC271, the following verbs do the mono-mixing of d-mic,
{0x20, AC_VERB_SET_COEF_INDEX, 0x0d}, {0x20, AC_VERB_SET_PROC_COEF, 0x4000},
while for ALC889, the following do:
{0x20, AC_VERB_SET_COEF_INDEX, 0x0b}, {0x20, AC_VERB_SET_PROC_COEF, 0x0003},
Try the above via hda-verb once whether it has any effect on your machine.
I tried both using hda-verb 0.3 but didn't have any effect. I tied playing with hda-verb a little bit. For COEF_INDEX 0xb, the initial value returned by GET_PROC_COEF is 0x5cc0. The lowest value (after writing 0) is 0x5c00. The highest value (after writing 0xffff) is 0x5dff. Writing 0x0003 results in 0x5c03, quite predictably.
For COEF_INDEX 0xd, the initial value is 0xf000. The range is from 0 to 0xffc0. Setting 0x4000 succeeds, 0x4000 is read back.
Maybe I could run some script looking for acoustic feedback?
This gives feedback:
arecord -f cd --channels 2 | aplay -
This gives no feedback (pulse audio is used, output volume is maximal):
arecord -f cd --channels 1 | aplay -
Kailang at Realtek suggested that the verb above is only for ALC269vb, but he found out another workaround (coef idx 7 bit 7).
Could you try the patch below?
thanks,
Takashi
--- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e125c60..d3f67ef 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4484,6 +4484,17 @@ static void alc269_fixup_pcm_44k(struct hda_codec *codec, spec->stream_analog_capture = &alc269_44k_pcm_analog_capture; }
+static void alc269_fixup_dmic(struct hda_codec *codec, + const struct alc_fixup *fix, int action) +{ + int coef; + + if (action != ALC_FIXUP_ACT_INIT) + return; + coef = alc_read_coef_idx(codec, 0x07); + alc_write_coef_idx(codec, 0x07, coef | 0x80); +} + enum { ALC269_FIXUP_SONY_VAIO, ALC275_FIXUP_SONY_VAIO_GPIO2, @@ -4494,6 +4505,7 @@ enum { ALC275_FIXUP_SONY_HWEQ, ALC271_FIXUP_DMIC, ALC269_FIXUP_PCM_44K, + ALC269_FIXUP_DMIC, };
static const struct alc_fixup alc269_fixups[] = { @@ -4556,10 +4568,15 @@ static const struct alc_fixup alc269_fixups[] = { .type = ALC_FIXUP_FUNC, .v.func = alc269_fixup_pcm_44k, }, + [ALC269_FIXUP_DMIC] = { + .type = ALC_FIXUP_FUNC, + .v.func = alc269_fixup_dmic, + }, };
static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), + SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005HA", ALC269_FIXUP_DMIC), 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),