diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-08-03 01:48:37 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-08-04 09:21:13 -0400 |
commit | adabb3ec8b0bcbd2ca81973d33c3da726b939c7c (patch) | |
tree | 9f7780b73244c211d04670e95bdecf8bf810a4a7 /sound/pci/hda/patch_realtek.c | |
parent | 9f3b24948f22e4e21e961bd514c2089d24f0938e (diff) |
ALSA: hda - Fix digital-mic mono recording on ASUS Eee PC
The digital-mic unit on ASUS Eee PC gives PDM signals instead of the
normal stereo PCM, thus you can't record a mono stream from the stereo
stream as is; the summed stereo signal results in almost zero level, and
you'll hear only soft noise.
As a workaround, use ALC269-specific COEF to manipulate the dmic route
for mono, like used for ALC271x. This is implemented as a fix-up, thus
it works only with model=auto or without REALTEK_QUIRKS Kconfig.
Reported-and-tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e125c60fe352..9a1aa09f47fe 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4484,6 +4484,22 @@ static void alc269_fixup_pcm_44k(struct hda_codec *codec, | |||
4484 | spec->stream_analog_capture = &alc269_44k_pcm_analog_capture; | 4484 | spec->stream_analog_capture = &alc269_44k_pcm_analog_capture; |
4485 | } | 4485 | } |
4486 | 4486 | ||
4487 | static void alc269_fixup_stereo_dmic(struct hda_codec *codec, | ||
4488 | const struct alc_fixup *fix, int action) | ||
4489 | { | ||
4490 | int coef; | ||
4491 | |||
4492 | if (action != ALC_FIXUP_ACT_INIT) | ||
4493 | return; | ||
4494 | /* The digital-mic unit sends PDM (differential signal) instead of | ||
4495 | * the standard PCM, thus you can't record a valid mono stream as is. | ||
4496 | * Below is a workaround specific to ALC269 to control the dmic | ||
4497 | * signal source as mono. | ||
4498 | */ | ||
4499 | coef = alc_read_coef_idx(codec, 0x07); | ||
4500 | alc_write_coef_idx(codec, 0x07, coef | 0x80); | ||
4501 | } | ||
4502 | |||
4487 | enum { | 4503 | enum { |
4488 | ALC269_FIXUP_SONY_VAIO, | 4504 | ALC269_FIXUP_SONY_VAIO, |
4489 | ALC275_FIXUP_SONY_VAIO_GPIO2, | 4505 | ALC275_FIXUP_SONY_VAIO_GPIO2, |
@@ -4494,6 +4510,7 @@ enum { | |||
4494 | ALC275_FIXUP_SONY_HWEQ, | 4510 | ALC275_FIXUP_SONY_HWEQ, |
4495 | ALC271_FIXUP_DMIC, | 4511 | ALC271_FIXUP_DMIC, |
4496 | ALC269_FIXUP_PCM_44K, | 4512 | ALC269_FIXUP_PCM_44K, |
4513 | ALC269_FIXUP_STEREO_DMIC, | ||
4497 | }; | 4514 | }; |
4498 | 4515 | ||
4499 | static const struct alc_fixup alc269_fixups[] = { | 4516 | static const struct alc_fixup alc269_fixups[] = { |
@@ -4556,10 +4573,19 @@ static const struct alc_fixup alc269_fixups[] = { | |||
4556 | .type = ALC_FIXUP_FUNC, | 4573 | .type = ALC_FIXUP_FUNC, |
4557 | .v.func = alc269_fixup_pcm_44k, | 4574 | .v.func = alc269_fixup_pcm_44k, |
4558 | }, | 4575 | }, |
4576 | [ALC269_FIXUP_STEREO_DMIC] = { | ||
4577 | .type = ALC_FIXUP_FUNC, | ||
4578 | .v.func = alc269_fixup_stereo_dmic, | ||
4579 | }, | ||
4559 | }; | 4580 | }; |
4560 | 4581 | ||
4561 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { | 4582 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
4562 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), | 4583 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), |
4584 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), | ||
4585 | SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), | ||
4586 | SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), | ||
4587 | SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), | ||
4588 | SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), | ||
4563 | SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), | 4589 | SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), |
4564 | SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), | 4590 | SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |
4565 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), | 4591 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |