From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Subject: Re: [RFC PATCH] Inverted internal mic
Date: Fri, 22 Jun 2012 19:33:06 +0200 [thread overview]
Message-ID: <4FE4AC52.4050600@canonical.com> (raw)
In-Reply-To: <s5ha9zvbbno.wl%tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 2094 bytes --]
On 06/22/2012 05:37 PM, Takashi Iwai wrote:
> At Fri, 22 Jun 2012 17:27:51 +0200,
> David Henningsson wrote:
>>
>> On 06/22/2012 02:46 PM, Takashi Iwai wrote:
>>> /*
>>> + * Inverted digital-mic handling
>>> + *
>>> + * First off, it's a bit tricky. The "Inverted Internal Mic Capture Switch"
>>> + * gives the additional mute only to the right channel of the digital mic
>>> + * capture stream. This is a workaround for avoiding the almost silence
>>> + * by summing the stereo stereo stream from some (known to be ForteMedia)
>>
>> Stereo stereo? It's "stereo" in stereo! :-)
>
> Yeah, quad channels. Fixed now.
>
>>> + * digital mic unit.
>>> + *
>>> + * The logic is to call alc_inv_dmic_sync() after each action (possibly)
>>> + * modifying ADC amp. When the mute flag is set, it mutes the R-channel
>>> + * without caching so that the cache can still keep the original value.
>>> + * The cached value is then restored when the flag is set off or any other
>>> + * than d-mic is used as the current input source.
>>
>> Ok, I get it now.
>>
>> There is a slight drawback with this (IMO a bit hacky) patch, and that
>> is that you can get a short signal spike on the right channel when you
>> turn "Capture Switch" on while "Inverted Capture" is off. Hopefully it
>> is not a practical problem.
>
> Right, I fully admit it's hacky :)
>
> A good thing by this is, however, that it doesn't touch other parts
> too intrusively but just wraps over it.
>
>> Thanks for looking at this long-standing problem :-)
>
> I'm going to commit it once after hearing the test with a real machine
> from Eliot.
Hi,
I'm adding the machines I know of in the patch attached (please commit
together with your patch).
For users running Ubuntu 12.04 (I think Eliot does), I have also made a
dkms package for easy testing of these two patches, and I also asked
existing bug reporters to test it.
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1002978/+attachment/3200653/+files/alsa-hda-dkms_0.1_all.deb
Happy weekend!
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
[-- Attachment #2: 0001-ALSA-hda-Add-inverted-mic-quirks-for-Asus-U41SV-Acer.patch --]
[-- Type: text/x-patch, Size: 2775 bytes --]
>From d4e041e6d5077b061eb99954e9d71a5ad5f8f4de Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Fri, 22 Jun 2012 19:12:10 +0200
Subject: [PATCH] ALSA: hda - Add inverted mic quirks for Asus U41SV, Acer
1810TZ and AOD260
These machines have inverted phase on right channel for their
internal mics.
BugLink: https://bugs.launchpad.net/bugs/997227
BugLink: https://bugs.launchpad.net/bugs/996611
BugLink: https://bugs.launchpad.net/bugs/1006089
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
sound/pci/hda/patch_realtek.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 53cd730..9be7da1 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5918,6 +5918,14 @@ static void alc269_fixup_mic2_mute(struct hda_codec *codec,
}
}
+static void alc269_fixup_inv_dmic(struct hda_codec *codec,
+ const struct alc_fixup *fix, int action)
+{
+ if (action == ALC_FIXUP_ACT_PROBE)
+ alc_add_inv_dmic_mixer(codec, 0x12);
+}
+
+
enum {
ALC269_FIXUP_SONY_VAIO,
ALC275_FIXUP_SONY_VAIO_GPIO2,
@@ -5936,6 +5944,7 @@ enum {
ALC269VB_FIXUP_AMIC,
ALC269VB_FIXUP_DMIC,
ALC269_FIXUP_MIC2_MUTE_LED,
+ ALC269_FIXUP_INV_DMIC,
};
static const struct alc_fixup alc269_fixups[] = {
@@ -6060,12 +6069,19 @@ static const struct alc_fixup alc269_fixups[] = {
.type = ALC_FIXUP_FUNC,
.v.func = alc269_fixup_mic2_mute,
},
+ [ALC269_FIXUP_INV_DMIC] = {
+ .type = ALC_FIXUP_FUNC,
+ .v.func = alc269_fixup_inv_dmic,
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
+ SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
+ SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_MIC2_MUTE_LED),
SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC),
SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
+ SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
@@ -6534,12 +6550,7 @@ static void alc272_fixup_mario(struct hda_codec *codec,
"hda_codec: failed to override amp caps for NID 0x2\n");
}
-static void alc662_fixup_inv_dmic(struct hda_codec *codec,
- const struct alc_fixup *fix, int action)
-{
- if (action == ALC_FIXUP_ACT_PROBE)
- alc_add_inv_dmic_mixer(codec, 0x12);
-}
+#define alc662_fixup_inv_dmic alc269_fixup_inv_dmic
enum {
ALC662_FIXUP_ASPIRE,
--
1.7.9.5
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-06-22 17:32 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 8:57 [RFC PATCH] Inverted internal mic David Henningsson
2012-02-28 9:24 ` Takashi Iwai
2012-02-28 9:54 ` David Henningsson
2012-02-28 10:38 ` Takashi Iwai
2012-02-28 13:07 ` David Henningsson
2012-02-28 13:22 ` Takashi Iwai
2012-02-28 14:19 ` David Henningsson
2012-02-28 15:20 ` Takashi Iwai
2012-02-28 18:11 ` David Henningsson
2012-02-28 19:42 ` Takashi Iwai
2012-02-29 9:21 ` David Henningsson
2012-02-29 9:56 ` Takashi Iwai
2012-02-29 10:45 ` David Henningsson
2012-02-29 16:36 ` Takashi Iwai
2012-06-19 3:07 ` Eliot Blennerhassett
2012-06-19 7:43 ` David Henningsson
2012-06-20 13:31 ` Takashi Iwai
2012-06-21 1:15 ` David Henningsson
2012-06-21 12:52 ` Takashi Iwai
2012-06-21 13:04 ` David Henningsson
2012-06-21 13:19 ` Takashi Iwai
2012-06-21 14:23 ` David Henningsson
2012-06-22 9:33 ` Takashi Iwai
2012-06-22 10:46 ` David Henningsson
2012-06-22 11:00 ` Takashi Iwai
2012-06-22 12:46 ` Takashi Iwai
2012-06-22 15:27 ` David Henningsson
2012-06-22 15:37 ` Takashi Iwai
2012-06-22 17:33 ` David Henningsson [this message]
2012-06-23 2:58 ` Eliot Blennerhassett
2012-06-23 8:40 ` Takashi Iwai
2012-06-23 8:39 ` Takashi Iwai
2012-06-25 8:04 ` David Henningsson
2012-06-25 8:18 ` Takashi Iwai
2012-06-20 8:02 ` Takashi Iwai
2012-06-20 10:54 ` Eliot Blennerhassett
2012-02-29 11:02 ` Raymond Yau
2012-06-20 21:53 ` James Courtier-Dutton
2012-06-21 5:56 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2014-10-20 13:52 rodney byne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FE4AC52.4050600@canonical.com \
--to=david.henningsson@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=eliot@blennerhassett.gen.nz \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox