Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752639Ab2KDIQs (ORCPT ); Sun, 4 Nov 2012 03:16:48 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59902 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751929Ab2KDIQq (ORCPT ); Sun, 4 Nov 2012 03:16:46 -0500 Date: Sun, 04 Nov 2012 09:16:44 +0100 Message-ID: From: Takashi Iwai To: Daniel J Blueman Cc: alsa-devel@alsa-project.org, Alexander Stein , Jaroslav Kysela , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] HDA: Fix digital microphone on CS420x In-Reply-To: <1352006344-3378-1-git-send-email-daniel@quora.org> References: <1352006344-3378-1-git-send-email-daniel@quora.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2448 Lines: 69 At Sun, 4 Nov 2012 13:19:03 +0800, Daniel J Blueman wrote: > > Correctly enable the digital microphones with the right bits in the right coeffecient > registers on Cirrus CS4206/7 codecs. It also prevents misconfiguring ADC1/2. > > This fixes the digital mic on the Macbook Pro 10,1/Retina. > > Based-on-patch-by: Alexander Stein > Signed-off-by: Daniel J Blueman Thanks, this looks more comprehensive. DIG1 and DIG2 seem to have been set wrongly in the original code, based on the Cirrus's example code. Is the right-only recording problem fixed by this patch? Alexander, could you check this doesn't break your machine? Takashi > --- > sound/pci/hda/patch_cirrus.c | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c > index 61a7113..859a119 100644 > --- a/sound/pci/hda/patch_cirrus.c > +++ b/sound/pci/hda/patch_cirrus.c > @@ -101,8 +101,8 @@ enum { > #define CS420X_VENDOR_NID 0x11 > #define CS_DIG_OUT1_PIN_NID 0x10 > #define CS_DIG_OUT2_PIN_NID 0x15 > -#define CS_DMIC1_PIN_NID 0x12 > -#define CS_DMIC2_PIN_NID 0x0e > +#define CS_DMIC1_PIN_NID 0x0e > +#define CS_DMIC2_PIN_NID 0x12 > > /* coef indices */ > #define IDX_SPDIF_STAT 0x0000 > @@ -1079,14 +1079,18 @@ static void init_input(struct hda_codec *codec) > cs_automic(codec, NULL); > > coef = 0x000a; /* ADC1/2 - Digital and Analog Soft Ramp */ > + cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); > + > + coef = cs_vendor_coef_get(codec, IDX_BEEP_CFG); > if (is_active_pin(codec, CS_DMIC2_PIN_NID)) > - coef |= 0x0500; /* DMIC2 2 chan on, GPIO1 off */ > + coef |= 1 << 4; /* DMIC2 2 chan on, GPIO1 off */ > if (is_active_pin(codec, CS_DMIC1_PIN_NID)) > - coef |= 0x1800; /* DMIC1 2 chan on, GPIO0 off > + coef |= 1 << 3; /* DMIC1 2 chan on, GPIO0 off > * No effect if SPDIF_OUT2 is > * selected in IDX_SPDIF_CTL. > */ > - cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); > + > + cs_vendor_coef_set(codec, IDX_BEEP_CFG, coef); > } else { > if (spec->mic_detect) > cs_automic(codec, NULL); > -- > 1.7.10.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/