From patchwork Wed Nov 25 13:10:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aggarwal, Anuj" X-Patchwork-Id: 62774 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAPDAkcO026038 for ; Wed, 25 Nov 2009 13:10:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934648AbZKYNKh (ORCPT ); Wed, 25 Nov 2009 08:10:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934631AbZKYNKh (ORCPT ); Wed, 25 Nov 2009 08:10:37 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:49210 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934620AbZKYNKh (ORCPT ); Wed, 25 Nov 2009 08:10:37 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id nAPDAah0021989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 25 Nov 2009 07:10:39 -0600 Received: from psplinux050.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id nAPDAWcH015853; Wed, 25 Nov 2009 18:40:33 +0530 (IST) Received: from psplinux050.india.ti.com (localhost [127.0.0.1]) by psplinux050.india.ti.com (8.13.1/8.13.1) with ESMTP id nAPDAWoM015287; Wed, 25 Nov 2009 18:40:32 +0530 Received: (from a0393534@localhost) by psplinux050.india.ti.com (8.13.1/8.13.1/Submit) id nAPDAVlI015284; Wed, 25 Nov 2009 18:40:31 +0530 From: Anuj Aggarwal To: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org Cc: broonie@opensource.wolfsonmicro.com, Anuj Aggarwal Subject: [PATCH] ASoC: AM3517: Fix AIC23 suspend/resume hang Date: Wed, 25 Nov 2009 18:40:31 +0530 Message-Id: <1259154631-15251-1-git-send-email-anuj.aggarwal@ti.com> X-Mailer: git-send-email 1.6.2.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 6b24d8b..cabe60c 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c @@ -565,13 +565,12 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, case SND_SOC_BIAS_PREPARE: break; case SND_SOC_BIAS_STANDBY: - /* everything off except vref/vmid, */ - tlv320aic23_write(codec, TLV320AIC23_PWR, reg | 0x0040); + /* Activate the digital interface */ + tlv320aic23_write(codec, TLV320AIC23_ACTIVE, 0x1); break; case SND_SOC_BIAS_OFF: - /* everything off, dac mute, inactive */ + /* Deactivate the digital interface */ tlv320aic23_write(codec, TLV320AIC23_ACTIVE, 0x0); - tlv320aic23_write(codec, TLV320AIC23_PWR, 0xffff); break; } codec->bias_level = level; @@ -615,7 +614,6 @@ static int tlv320aic23_suspend(struct platform_device *pdev, struct snd_soc_device *socdev = platform_get_drvdata(pdev); struct snd_soc_codec *codec = socdev->card->codec; - tlv320aic23_write(codec, TLV320AIC23_ACTIVE, 0x0); tlv320aic23_set_bias_level(codec, SND_SOC_BIAS_OFF); return 0; @@ -625,14 +623,6 @@ static int tlv320aic23_resume(struct platform_device *pdev) { struct snd_soc_device *socdev = platform_get_drvdata(pdev); struct snd_soc_codec *codec = socdev->card->codec; - int i; - u16 reg; - - /* Sync reg_cache with the hardware */ - for (reg = 0; reg < ARRAY_SIZE(tlv320aic23_reg); i++) { - u16 val = tlv320aic23_read_reg_cache(codec, reg); - tlv320aic23_write(codec, reg, val); - } tlv320aic23_set_bias_level(codec, SND_SOC_BIAS_STANDBY); tlv320aic23_set_bias_level(codec, codec->suspend_bias_level);