From patchwork Wed Mar 26 05:40:26 2014
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Xiubo Li
X-Patchwork-Id: 3892171
Return-Path:
X-Original-To: patchwork-alsa-devel@patchwork.kernel.org
Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org
Received: from mail.kernel.org (mail.kernel.org [198.145.19.201])
by patchwork2.web.kernel.org (Postfix) with ESMTP id BD260BF540
for ;
Wed, 26 Mar 2014 06:31:51 +0000 (UTC)
Received: from mail.kernel.org (localhost [127.0.0.1])
by mail.kernel.org (Postfix) with ESMTP id DF99920218
for ;
Wed, 26 Mar 2014 06:31:50 +0000 (UTC)
Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243])
by mail.kernel.org (Postfix) with ESMTP id 9004A201E7
for ;
Wed, 26 Mar 2014 06:31:49 +0000 (UTC)
Received: by alsa0.perex.cz (Postfix, from userid 1000)
id AAD92265272; Wed, 26 Mar 2014 07:31:48 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org
X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY,
UNRESOLVED_TEMPLATE autolearn=no version=3.3.1
Received: from alsa0.perex.cz (localhost [IPv6:::1])
by alsa0.perex.cz (Postfix) with ESMTP id 5A8742651C0;
Wed, 26 Mar 2014 07:29:18 +0100 (CET)
X-Original-To: alsa-devel@alsa-project.org
Delivered-To: alsa-devel@alsa-project.org
Received: by alsa0.perex.cz (Postfix, from userid 1000)
id 84A0F2651C6; Wed, 26 Mar 2014 07:29:17 +0100 (CET)
Received: from co9outboundpool.messaging.microsoft.com
(co9ehsobe002.messaging.microsoft.com [207.46.163.25])
by alsa0.perex.cz (Postfix) with ESMTP id 733B92650F2
for ;
Wed, 26 Mar 2014 07:28:05 +0100 (CET)
Received: from mail70-co9-R.bigfish.com (10.236.132.249) by
CO9EHSOBE027.bigfish.com (10.236.130.90) with Microsoft SMTP Server
id 14.1.225.22; Wed, 26 Mar 2014 06:28:04 +0000
Received: from mail70-co9 (localhost [127.0.0.1]) by mail70-co9-R.bigfish.com
(Postfix) with ESMTP id E29E4A01F0;
Wed, 26 Mar 2014 06:28:03 +0000 (UTC)
X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null);
IPV:NLI;
H:mail.freescale.net; RD:none; EFVD:NLI
X-SpamScore: 0
X-BigFish:
VS0(zze0eahzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah21bch1fc6hzz1de098h8275bh1de097hz2dh2a8h839he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh2222h224fh1fb3h1d0ch1d2eh1d3fh1dfeh1dffh1e23h1fe8h1ff5h2218h2216h226dh22d0h24afh2327h2336h2438h2461h2487h24d7h2516h2545h255eh25cch25f6h2605h268bh1155h)
Received: from mail70-co9 (localhost.localdomain [127.0.0.1]) by mail70-co9
(MessageSwitch) id 1395815282547265_2790;
Wed, 26 Mar 2014 06:28:02 +0000 (UTC)
Received: from CO9EHSMHS017.bigfish.com (unknown [10.236.132.232]) by
mail70-co9.bigfish.com (Postfix) with ESMTP id 739223E0058;
Wed, 26 Mar 2014 06:28:02 +0000 (UTC)
Received: from mail.freescale.net (70.37.183.190) by CO9EHSMHS017.bigfish.com
(10.236.130.27) with Microsoft SMTP Server (TLS) id 14.16.227.3;
Wed, 26 Mar 2014 06:28:02 +0000
Received: from tx30smr01.am.freescale.net (10.81.153.31) by
039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP
Server (TLS) id 14.3.158.2; Wed, 26 Mar 2014 06:28:01 +0000
Received: from rock.am.freescale.net (rock.ap.freescale.net [10.193.20.106])
by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id
s2Q6RRnG002319; Tue, 25 Mar 2014 23:27:56 -0700
From: Xiubo Li
To: ,
Date: Wed, 26 Mar 2014 13:40:26 +0800
Message-ID: <1395812433-26410-5-git-send-email-Li.Xiubo@freescale.com>
X-Mailer: git-send-email 1.8.0
In-Reply-To: <1395812433-26410-1-git-send-email-Li.Xiubo@freescale.com>
References: <1395812433-26410-1-git-send-email-Li.Xiubo@freescale.com>
MIME-Version: 1.0
X-OriginatorOrg: freescale.com
X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn%
X-FOPE-CONNECTOR:
Id%0$Dn%FREESCALE.MAIL.ONMICROSOFT.COM$RO%1$TLS%0$FQDN%$TlsDn%
Cc: alsa-devel@alsa-project.org, lars@metafoo.de, shc_work@mail.ru,
tiwai@suse.de, viresh.kumar@linaro.org,
patches@opensource.wolfsonmicro.com,
andrew.smirnov@gmail.com, Xiubo Li ,
akpm@linux-foundation.org, s.trumtrar@pengutronix.de,
rf@opensource.wolfsonmicro.com, ckeepax@opensource.wolfsonmicro.com,
vinod.koul@intel.com
Subject: [alsa-devel] [PATCHv2 04/11] ASoc: mc13783: Remove the
set_cache_io() entirely from ASoC probe.
X-BeenThere: alsa-devel@alsa-project.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Alsa-devel mailing list for ALSA developers -
http://www.alsa-project.org"
List-Unsubscribe:
,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: alsa-devel-bounces@alsa-project.org
Sender: alsa-devel-bounces@alsa-project.org
X-Virus-Scanned: ClamAV using ClamSMTP
As we can set the CODEC I/O while snd_soc_register_codec(), so the
calling of set_cache_io() from CODEC ASoC probe could be removed
entirely.
And then we can set the CODEC I/O in the device probe instead of
CODEC ASoC probe as earily as possible.
Signed-off-by: Xiubo Li
---
sound/soc/codecs/mc13783.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 2c59b1f..8c0cec3 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -608,14 +608,6 @@ static struct snd_kcontrol_new mc13783_control_list[] = {
static int mc13783_probe(struct snd_soc_codec *codec)
{
struct mc13783_priv *priv = snd_soc_codec_get_drvdata(codec);
- int ret;
-
- ret = snd_soc_codec_set_cache_io(codec,
- dev_get_regmap(codec->dev->parent, NULL));
- if (ret != 0) {
- dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
- return ret;
- }
/* these are the reset values */
mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_RX0, 0x25893);
@@ -735,9 +727,15 @@ static struct snd_soc_dai_driver mc13783_dai_sync[] = {
}
};
+struct regmap *mc13783_get_regmap(struct device *dev)
+{
+ return dev_get_regmap(dev->parent, NULL);
+}
+
static struct snd_soc_codec_driver soc_codec_dev_mc13783 = {
.probe = mc13783_probe,
.remove = mc13783_remove,
+ .get_regmap = mc13783_get_regmap,
.controls = mc13783_control_list,
.num_controls = ARRAY_SIZE(mc13783_control_list),
.dapm_widgets = mc13783_dapm_widgets,