From patchwork Wed Sep 3 02:23:40 2014
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Xiubo Li
X-Patchwork-Id: 4830211
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 884F8C0338
for ;
Wed, 3 Sep 2014 03:16:29 +0000 (UTC)
Received: from mail.kernel.org (localhost [127.0.0.1])
by mail.kernel.org (Postfix) with ESMTP id A61E5201F7
for ;
Wed, 3 Sep 2014 03:16:28 +0000 (UTC)
Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243])
by mail.kernel.org (Postfix) with ESMTP id 5A5C320160
for ;
Wed, 3 Sep 2014 03:16:27 +0000 (UTC)
Received: by alsa0.perex.cz (Postfix, from userid 1000)
id 4A5F9265615; Wed, 3 Sep 2014 05:16:26 +0200 (CEST)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org
X-Spam-Level:
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY
autolearn=unavailable version=3.3.1
Received: from alsa0.perex.cz (localhost [IPv6:::1])
by alsa0.perex.cz (Postfix) with ESMTP id DE5F32655C8;
Wed, 3 Sep 2014 05:15:20 +0200 (CEST)
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 4C12E2655AD; Wed, 3 Sep 2014 05:15:19 +0200 (CEST)
Received: from na01-bn1-obe.outbound.protection.outlook.com
(mail-bn1lp0142.outbound.protection.outlook.com [207.46.163.142])
by alsa0.perex.cz (Postfix) with ESMTP id 44252265586
for ;
Wed, 3 Sep 2014 05:15:13 +0200 (CEST)
Received: from CH1PR03CA003.namprd03.prod.outlook.com (10.255.156.148) by
BN1PR0301MB0609.namprd03.prod.outlook.com (25.160.170.24) with
Microsoft SMTP
Server (TLS) id 15.0.1015.19; Wed, 3 Sep 2014 03:15:10 +0000
Received: from BN1BFFO11FD005.protection.gbl (10.255.156.132) by
CH1PR03CA003.outlook.office365.com (10.255.156.148) with Microsoft
SMTP Server (TLS) id 15.0.1019.16 via Frontend Transport;
Wed, 3 Sep 2014 03:15:09 +0000
Received: from az84smr01.freescale.net (192.88.158.2) by
BN1BFFO11FD005.mail.protection.outlook.com (10.58.144.68) with
Microsoft SMTP Server (TLS) id 15.0.1010.11 via Frontend Transport;
Wed, 3 Sep 2014 03:15:09 +0000
Received: from rock.ap.freescale.net (rock.ap.freescale.net [10.193.20.106])
by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id
s833Epe6027982; Tue, 2 Sep 2014 20:15:04 -0700
From: Xiubo Li
To: , , ,
, , ,
, ,
, ,
, , ,
,
Date: Wed, 3 Sep 2014 10:23:40 +0800
Message-ID: <1409711021-19277-3-git-send-email-Li.Xiubo@freescale.com>
X-Mailer: git-send-email 1.8.4
In-Reply-To: <1409711021-19277-1-git-send-email-Li.Xiubo@freescale.com>
References: <1409711021-19277-1-git-send-email-Li.Xiubo@freescale.com>
X-EOPAttributedMessage: 0
X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI;
EFV:NLI; SFV:NSPM;
SFS:(6009001)(189002)(199003)(36756003)(80022001)(229853001)(69596002)(50986999)(76176999)(95666004)(84676001)(90102001)(81156004)(44976005)(107046002)(31966008)(64706001)(81342001)(77156001)(104166001)(106466001)(81542001)(97736001)(85306004)(21056001)(88136002)(50226001)(102836001)(85852003)(89996001)(74662001)(26826002)(68736004)(83322001)(19580405001)(104016003)(105606002)(92566001)(74502001)(19580395003)(62966002)(87286001)(87936001)(4396001)(99396002)(93916002)(76482001)(48376002)(20776003)(46102001)(83072002)(92726001)(86362001)(47776003)(50466002)(79102001)(77982001)(6806004)(2201001)(1121002)(21314002)(921003);
DIR:OUT; SFP:; SCL:1; SRVR:BN1PR0301MB0609; H:az84smr01.freescale.net;
FPR:;
MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en;
MIME-Version: 1.0
X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:;
X-Forefront-PRVS: 032334F434
Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not
designate 192.88.158.2 as permitted sender)
receiver=protection.outlook.com;
client-ip=192.88.158.2; helo=az84smr01.freescale.net;
Authentication-Results: spf=fail (sender IP is 192.88.158.2)
smtp.mailfrom=Li.Xiubo@freescale.com;
X-OriginatorOrg: freescale.com
Cc: Xiubo Li , linux-kernel@vger.kernel.org
Subject: [alsa-devel] [PATCHv3 2/3] ASoC: simple-card: Adjust the comments
of simple card.
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
Signed-off-by: Xiubo Li
---
sound/soc/generic/simple-card.c | 48 ++++++++++++++++++++---------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 1597a24..07f7fb6 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -120,7 +120,7 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
int ret;
/*
- * get node via "sound-dai = <&phandle port>"
+ * Get node via "sound-dai = <&phandle port>"
* it will be used as xxx_of_node on soc_bind_dai_link()
*/
node = of_parse_phandle(np, "sound-dai", 0);
@@ -128,19 +128,19 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
return -ENODEV;
*p_node = node;
- /* get dai->name */
+ /* Get dai->name */
ret = snd_soc_of_get_dai_name(np, name);
if (ret < 0)
return ret;
- /* parse TDM slot */
+ /* Parse TDM slot */
ret = snd_soc_of_parse_tdm_slot(np, &dai->slots, &dai->slot_width);
if (ret)
return ret;
/*
- * dai->sysclk come from
- * "clocks = <&xxx>" (if system has common clock)
+ * Parse dai->sysclk come from "clocks = <&xxx>"
+ * (if system has common clock)
* or "system-clock-frequency = "
* or device's module clock.
*/
@@ -232,9 +232,11 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
goto dai_link_of_err;
if (strlen(prefix) && !bitclkmaster && !framemaster) {
- /* No dai-link level and master setting was not found from
- sound node level, revert back to legacy DT parsing and
- take the settings from codec node. */
+ /*
+ * No DAI link level and master setting was found
+ * from sound node level, revert back to legacy DT
+ * parsing and take the settings from codec node.
+ */
dev_dbg(dev, "%s: Revert to legacy daifmt parsing\n",
__func__);
dai_props->cpu_dai.fmt = dai_props->codec_dai.fmt =
@@ -263,10 +265,10 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
goto dai_link_of_err;
}
- /* simple-card assumes platform == cpu */
+ /* Simple Card assumes platform == cpu */
dai_link->platform_of_node = dai_link->cpu_of_node;
- /* Link name is created from CPU/CODEC dai name */
+ /* DAI link name is created from CPU/CODEC dai name */
name = devm_kzalloc(dev,
strlen(dai_link->cpu_dai_name) +
strlen(dai_link->codec_dai_name) + 2,
@@ -288,11 +290,11 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
dai_props->codec_dai.sysclk);
/*
- * soc_bind_dai_link() will check cpu name
- * after of_node matching if dai_link has cpu_dai_name.
- * but, it will never match if name was created by fmt_single_name()
- * remove cpu_dai_name to escape name matching.
- * see
+ * In soc_bind_dai_link() will check cpu name after
+ * of_node matching if dai_link has cpu_dai_name.
+ * but, it will never match if name was created by
+ * fmt_single_name() remove cpu_dai_name to escape
+ * name matching. Please see:
* fmt_single_name()
* fmt_multiple_name()
*/
@@ -320,10 +322,10 @@ static int asoc_simple_card_parse_of(struct device_node *node,
if (!node)
return -EINVAL;
- /* parsing the card name from DT */
+ /* Parse the card name from DT */
snd_soc_of_parse_card_name(&priv->snd_card, "simple-audio-card,name");
- /* off-codec widgets */
+ /* The off-codec widgets */
if (of_property_read_bool(node, "simple-audio-card,widgets")) {
ret = snd_soc_of_parse_audio_simple_widgets(&priv->snd_card,
"simple-audio-card,widgets");
@@ -378,7 +380,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
return 0;
}
-/* update the reference count of the devices nodes at end of probe */
+/* Decrease the reference count of the device nodes */
static int asoc_simple_card_unref(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
@@ -407,29 +409,27 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
int num_links, ret;
- /* get the number of DAI links */
+ /* Get the number of DAI links */
if (np && of_get_child_by_name(np, "simple-audio-card,dai-link"))
num_links = of_get_child_count(np);
else
num_links = 1;
- /* allocate the private data and the DAI link array */
+ /* Allocate the private data and the DAI link array */
priv = devm_kzalloc(dev,
sizeof(*priv) + sizeof(*dai_link) * num_links,
GFP_KERNEL);
if (!priv)
return -ENOMEM;
- /*
- * init snd_soc_card
- */
+ /* Init snd_soc_card */
priv->snd_card.owner = THIS_MODULE;
priv->snd_card.dev = dev;
dai_link = priv->dai_link;
priv->snd_card.dai_link = dai_link;
priv->snd_card.num_links = num_links;
- /* get room for the other properties */
+ /* Get room for the other properties */
priv->dai_props = devm_kzalloc(dev,
sizeof(*priv->dai_props) * num_links,
GFP_KERNEL);