From patchwork Wed Aug 24 11:08:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 1091982 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7OB8er9006137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 24 Aug 2011 11:09:02 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QwBJu-00007Q-0I; Wed, 24 Aug 2011 11:08:30 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QwBJt-0001bS-Hl; Wed, 24 Aug 2011 11:08:29 +0000 Received: from ch1ehsobe003.messaging.microsoft.com ([216.32.181.183] helo=ch1outboundpool.messaging.microsoft.com) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QwBJp-0001b9-Ae for linux-arm-kernel@lists.infradead.org; Wed, 24 Aug 2011 11:08:27 +0000 Received: from mail22-ch1-R.bigfish.com (216.32.181.168) by CH1EHSOBE001.bigfish.com (10.43.70.51) with Microsoft SMTP Server id 14.1.225.22; Wed, 24 Aug 2011 11:08:24 +0000 Received: from mail22-ch1 (localhost.localdomain [127.0.0.1]) by mail22-ch1-R.bigfish.com (Postfix) with ESMTP id 1EF996201B7; Wed, 24 Aug 2011 11:08:24 +0000 (UTC) X-SpamScore: -20 X-BigFish: VS-20(zz9371K146fK542M1432N98dKzz1202hzz8275bhz2dh2a8h668h839h8e2h8e3h944h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail22-ch1 (localhost.localdomain [127.0.0.1]) by mail22-ch1 (MessageSwitch) id 1314184103888473_14261; Wed, 24 Aug 2011 11:08:23 +0000 (UTC) Received: from CH1EHSMHS035.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.244]) by mail22-ch1.bigfish.com (Postfix) with ESMTP id D306370804F; Wed, 24 Aug 2011 11:08:23 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS035.bigfish.com (10.43.70.35) with Microsoft SMTP Server (TLS) id 14.1.225.22; Wed, 24 Aug 2011 11:08:17 +0000 Received: from 039-SN1MPN1-001.039d.mgd.msft.net ([169.254.1.101]) by 039-SN1MMR1-002.039d.mgd.msft.net ([10.84.1.15]) with mapi id 14.01.0323.002; Wed, 24 Aug 2011 06:08:16 -0500 From: Dong Aisheng-B29396 To: Wolfram Sang Subject: RE: [PATCH 1/2] ASoC: mxs-saif: add record function Thread-Topic: [PATCH 1/2] ASoC: mxs-saif: add record function Thread-Index: AQHMYBpceVcqpVAuokuIiendr/1NHpUpEYQAgALHqYA= Date: Wed, 24 Aug 2011 11:08:15 +0000 Message-ID: <65EE16ACC360FA4D99C96DC085B3F772223F4A@039-SN1MPN1-001.039d.mgd.msft.net> References: <1313942545-21403-1-git-send-email-b29396@freescale.com> <20110822113054.GC2006@pengutronix.de> In-Reply-To: <20110822113054.GC2006@pengutronix.de> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.192.242.89] MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110824_070825_507185_C70FE610 X-CRM114-Status: GOOD ( 27.07 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [216.32.181.183 listed in list.dnswl.org] Cc: "alsa-devel@alsa-project.org" , "broonie@opensource.wolfsonmicro.com" , "s.hauer@pengutronix.de" , "lrg@ti.com" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 24 Aug 2011 11:09:05 +0000 (UTC) Hi Wolfram, > -----Original Message----- > From: Wolfram Sang [mailto:w.sang@pengutronix.de] > Sent: Monday, August 22, 2011 7:31 PM > To: Dong Aisheng-B29396 > Cc: alsa-devel@alsa-project.org; linux-arm-kernel@lists.infradead.org; > broonie@opensource.wolfsonmicro.com; lrg@ti.com; s.hauer@pengutronix.de > Subject: Re: [PATCH 1/2] ASoC: mxs-saif: add record function > > On Mon, Aug 22, 2011 at 12:02:25AM +0800, Dong Aisheng wrote: > > 1. add different clkmux mode handling for record. > > SAIF can use two instances to implement full duplex (playback & > > recording) and record saif may work on EXTMASTER mode that is using > > other saif's BITCLK&LRCLK. > > The clkmux mode is determined by saif's platform data and machine > > specific clkmux setting is done in pdata->init(). > > 2. support playback and capture simutaneously however the sample rates > > can not be different due to hw limitation. > > > > Signed-off-by: Dong Aisheng > > Cc: Mark Brown > > Cc: Liam Girdwood > > Cc: Sascha Hauer > > Cc: Wolfram Sang > > Will test and review, but probably not before Wednesday. > If you want to test, you may need to apply another sgtl5000 patch to fix noise issue. BTW, since MX28EVK only has line-in (no mic-in), i just tested by capturing data from line-in and connected the line-in to a PC's Headphone output. Not sure if there might be some issue due to line-in level is a little different from headphone out level. (Any comments from the person who knows?) Anyway, it just sounds well at my side. The patch for your reference: It's just for testing and I'm going to check it with our ic people for the root cause. Regards Dong Aisheng From a29191c7716680966c82132e50356b78f9b1c9b6 Mon Sep 17 00:00:00 2001 From: Dong Aisheng Date: Wed, 17 Aug 2011 21:29:12 +0800 Subject: [PATCH 1/1] sgtl5000: fix record unwork issue Signed-off-by: Dong Aisheng --- sound/soc/codecs/sgtl5000.c | 32 ++++++++++++++++++-------------- 1 files changed, 18 insertions(+), 14 deletions(-) diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 5a0d8e4..ef52890 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -198,13 +198,13 @@ static int small_pop_event(struct snd_soc_dapm_widget *w, { switch (event) { case SND_SOC_DAPM_PRE_PMU: - snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER, - SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP); +// snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER, +// SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP); break; case SND_SOC_DAPM_PRE_PMD: - snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER, - SGTL5000_VAG_POWERUP, 0); +// snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER, +// SGTL5000_VAG_POWERUP, 0); msleep(400); break; default: @@ -1153,11 +1153,13 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec) SGTL5000_VDDC_CHRGPMP_POWERUP, 0); /* VDDC use VDDIO rail */ - lreg_ctrl |= SGTL5000_VDDC_ASSN_OVRD; - lreg_ctrl |= SGTL5000_VDDC_MAN_ASSN_VDDIO << - SGTL5000_VDDC_MAN_ASSN_SHIFT; +// lreg_ctrl |= SGTL5000_VDDC_ASSN_OVRD; +// lreg_ctrl |= SGTL5000_VDDC_MAN_ASSN_VDDIO << +// SGTL5000_VDDC_MAN_ASSN_SHIFT; } +// ana_pwr |= SGTL5000_VDDC_CHRGPMP_POWERUP | SGTL5000_VAG_POWERUP | SGTL5000_HP_POWERUP; + ana_pwr |= 0x5afb; snd_soc_write(codec, SGTL5000_CHIP_LINREG_CTRL, lreg_ctrl); snd_soc_write(codec, SGTL5000_CHIP_ANA_POWER, ana_pwr); @@ -1194,9 +1196,9 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec) else vag = (vag - SGTL5000_ANA_GND_BASE) / SGTL5000_ANA_GND_STP; - snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL, - vag << SGTL5000_ANA_GND_SHIFT, - vag << SGTL5000_ANA_GND_SHIFT); +// snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL, +// vag << SGTL5000_ANA_GND_SHIFT, +/// vag << SGTL5000_ANA_GND_SHIFT); /* set line out VAG to vddio / 2, in range (0.8v, 1.675v) */ vag = vddio / 2; @@ -1208,14 +1210,15 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec) else vag = (vag - SGTL5000_LINE_OUT_GND_BASE) / SGTL5000_LINE_OUT_GND_STP; - +#if 1 snd_soc_update_bits(codec, SGTL5000_CHIP_LINE_OUT_CTRL, - vag << SGTL5000_LINE_OUT_GND_SHIFT | +// vag << SGTL5000_LINE_OUT_GND_SHIFT | SGTL5000_LINE_OUT_CURRENT_360u << SGTL5000_LINE_OUT_CURRENT_SHIFT, - vag << SGTL5000_LINE_OUT_GND_SHIFT | +// vag << SGTL5000_LINE_OUT_GND_SHIFT | SGTL5000_LINE_OUT_CURRENT_360u << SGTL5000_LINE_OUT_CURRENT_SHIFT); +#endif return 0; } @@ -1378,7 +1381,8 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) snd_soc_write(codec, SGTL5000_CHIP_ANA_CTRL, SGTL5000_HP_ZCD_EN | - SGTL5000_ADC_ZCD_EN); + SGTL5000_ADC_ZCD_EN + | SGTL5000_LINE_OUT_MUTE); snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 0);