From patchwork Fri May 20 10:07:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9129137 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 30BD560467 for ; Fri, 20 May 2016 10:07:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 217841FFC9 for ; Fri, 20 May 2016 10:07:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15C3727BF1; Fri, 20 May 2016 10:07:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1976D1FFC9 for ; Fri, 20 May 2016 10:07:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752892AbcETKHh (ORCPT ); Fri, 20 May 2016 06:07:37 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:7138 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752075AbcETKHg (ORCPT ); Fri, 20 May 2016 06:07:36 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie3.idc.renesas.com with ESMTP; 20 May 2016 19:07:35 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 13FF0538B6; Fri, 20 May 2016 19:07:35 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 12E8F2806E; Fri, 20 May 2016 19:07:35 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 0D3D52806D; Fri, 20 May 2016 19:07:35 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id VAG27448; Fri, 20 May 2016 19:07:35 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="211275642" Received: from mail-hk2apc01lp0211.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.211]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 20 May 2016 19:07:33 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+xRv7VTAPt4PWzRvX9yk2rSZFraSLJTfL6guOa+/9Fc=; b=hinh+idicrgr6OQB39wBfdBL+NAFFEQh58bNdD9qrgO+OqPaYy3Eq8OJhaAT6VEXEApLvTP/vpy3OOSGJgYvPGLMA2gZZ3Tp+wnYlQJbHuLLUC2858kOjxtbakZNwCipT71KfEljqlDh7umgNmP+0QaGnEHRoorUJPDAxYQREzg= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by PS1PR06MB1705.apcprd06.prod.outlook.com (10.167.53.15) with Microsoft SMTP Server (TLS) id 15.1.501.7; Fri, 20 May 2016 10:07:32 +0000 Message-ID: <87oa81oxou.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 47/49] ASoC: rsrc-card: rename rsrc-card to simple-dpcm-card phase1 User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown CC: Linux-ALSA , Liam Girdwood , Simon , In-Reply-To: <87lh35rs8w.wl%kuninori.morimoto.gx@renesas.com> References: <87lh35rs8w.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Fri, 20 May 2016 10:07:32 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR0201CA0035.apcprd02.prod.outlook.com (10.164.90.173) To PS1PR06MB1705.apcprd06.prod.outlook.com (10.167.53.15) X-MS-Office365-Filtering-Correlation-Id: 347d8ede-4c0e-4bdd-0af4-08d380968f1f X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1705; 2:MuKcr7TiqucRwFu7d5VEFI4dVh6/dVZ5wCuNocVGF9qMZFX9xnmql7TTv+MYy39QkDHYtzq++s79rusTqTusA6AlRmFBIobv2QqqhRDa8iX9a++KbNEnUp0U3yAytJSFrI8xCfOpAGeWHlIVleMeWiHfVdl74Sl2UULGwiBOFGc8sPsmU7gjly3aq7hqNg6t; 3:5tcY0x8BYDczMyJqX/oWuV2JDaLNle3D3Y3fPmd5DwJ8KzWgC4ZHH4KdvDsRve+X0P6oCBpMSU54CHxtodc9kMwHnQFw53nODWzQmJypCZNRUuorI6875x7UX8YS3wV5 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:PS1PR06MB1705; X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1705; 25:irGfbcwfcWp5PRY/xNvMbAd29qCtJclkLMt7O4buSgOs1efTW9KuidF+jxBhRNojI6J7gz0/GiZoreSolx+nk7PWZ2N3Ek2uBQXaPsMfdUCENvPBHtJC7kjaaaT8h+P0Gqn08aP5cxYvFD4dG0+QasME/1XOYkYgI5qguYKOh0Diin1FvWzi9tmuD13cds9ofP+auOro5/p7bLjHeBGb/NiqO+6U2kjo1+M4eYEbnY6fmNP9LlGiidat2guyg6uOl/o3dFkTyEfYgzxpz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v6jTMFcnsQFjUkLJkQs9q2QXumTSDEn4jBS3tO2EtE3sxYeIOWafkBuj8LINW6SLm3OYvrQMB3he9TCHS2/T18AUGuPnhAo+FMEBmZ26Ked5XzUkuUUGQ3PLC06er5yTNgtMP05X7wq4tFgqJLaaSbG+dcCOk9NDPwqF7pTJqbCwvW2w4s7cv5dLgxKNlsiQddnpziZ6JAEcrhZKk7A6g45rO+W6auEVkEpYHdyJAZsRNFX8T7KMNA0y1A2hTJnJRZnnoYX/TxezPw27e6XoHeEZeDVD62rzNZ0MVcjH+X6xaKqeJNfwYQD3g3tTHG3xx3ws63YC762ORgC2veQcis2moVgVdpSHbnwgw4sJYO/emw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:PS1PR06MB1705; BCL:0; PCL:0; RULEID:; SRVR:PS1PR06MB1705; X-Forefront-PRVS: 09480768F8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(4326007)(46406003)(5004730100002)(5008740100001)(229853001)(83506001)(33646002)(23726003)(2906002)(3846002)(6116002)(586003)(50466002)(230783001)(77096005)(66066001)(47776003)(36756003)(2950100001)(53416004)(81166006)(8676002)(42186005)(189998001)(110136002)(92566002)(86362001)(19580405001)(19580395003)(54356999)(76176999)(50986999)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:PS1PR06MB1705; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1705; 23:5wI4zCowr4rezT/u1iRy0Zucbio4kl6hUzgYjHZ0rSsD3hdWHNWzvZRU7jjVQQ+VrGVAZKzjw6sJiHe8L5oE6zIaNQc+htBSepj7IMGRQh8cBBHK+0DAKEO/Tq/aDWgJi4SB7SEjXkbSzPycomVSk22xS+m+TPUDgLa0daY0zWh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:9mB4+ZOuatqSplRqX5NkyMWy+wQc0fa05dUvKjje6gV++B8QX6GjBINkT9eiFE3T2MLYuZduYD+TCUFKbEkCRc8ti6GrTPtMT7uNXDRhG2SyttCoqj61Y365HF/KF55Go5OsVGCkQcSQWugoqKXBo1QoNdc/snYBrdU9ygfEgxC7/IcOOHV1hAtOUkyBUor9; 20:s7478SZA/EVUEWM3JWufZJ8SBaImMWmeOYkQmqLEZ61EFa8RTt/OysDRlpPRmaIALq9F/2i0UC1sutBis4V4JSWNQc3RQDQ3hRImRIBpYso8JBJ1YqlmuK7PKmK8XzpUZUVHE0c+DCZhYh5AIA+CGzax5x8IGyJpbv2DeUcHwv0= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2016 10:07:32.0404 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR06MB1705 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto rsrc-card which is using DPCM feature was created for Renesas sound. But not only Renesas, but many SoC can use this driver, because it is based on simple-card driver. To use it as more open driver, function prefix rsrc-card should be renamed to asoc_simple. In order to easy patch review, as 1st step, this patch renames "rsrc" function prefix to "asoc_simple". Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/rsrc-card.c | 108 +++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/sound/soc/sh/rcar/rsrc-card.c b/sound/soc/sh/rcar/rsrc-card.c index 6b77152..6c81b93 100644 --- a/sound/soc/sh/rcar/rsrc-card.c +++ b/sound/soc/sh/rcar/rsrc-card.c @@ -1,5 +1,5 @@ /* - * Renesas Sampling Rate Convert Sound Card for DPCM + * ASoC simple DPCM sound card support * * Copyright (C) 2015 Renesas Solutions Corp. * Kuninori Morimoto @@ -19,7 +19,7 @@ #include #include -struct rsrc_card_of_data { +struct asoc_simple_card_of_data { const char *prefix; const struct snd_soc_dapm_route *routes; int num_routes; @@ -30,23 +30,23 @@ static const struct snd_soc_dapm_route routes_ssi0_ak4642[] = { {"DAI0 Capture", NULL, "ak4642 Capture"}, }; -static const struct rsrc_card_of_data routes_of_ssi0_ak4642 = { +static const struct asoc_simple_card_of_data routes_of_ssi0_ak4642 = { .prefix = "ak4642", .routes = routes_ssi0_ak4642, .num_routes = ARRAY_SIZE(routes_ssi0_ak4642), }; -static const struct of_device_id rsrc_card_of_match[] = { +static const struct of_device_id asoc_simple_card_of_match[] = { { .compatible = "renesas,rsrc-card,lager", .data = &routes_of_ssi0_ak4642 }, { .compatible = "renesas,rsrc-card,koelsch", .data = &routes_of_ssi0_ak4642 }, { .compatible = "renesas,rsrc-card", }, {}, }; -MODULE_DEVICE_TABLE(of, rsrc_card_of_match); +MODULE_DEVICE_TABLE(of, asoc_simple_card_of_match); #define IDX_CPU 0 #define IDX_CODEC 1 -struct rsrc_card_priv { +struct asoc_simple_card_priv { struct snd_soc_card snd_card; struct snd_soc_codec_conf codec_conf; struct asoc_simple_dai *dai_props; @@ -55,48 +55,48 @@ struct rsrc_card_priv { u32 convert_channels; }; -#define rsrc_priv_to_dev(priv) ((priv)->snd_card.dev) -#define rsrc_priv_to_link(priv, i) ((priv)->snd_card.dai_link + (i)) -#define rsrc_priv_to_props(priv, i) ((priv)->dai_props + (i)) +#define simple_priv_to_dev(priv) ((priv)->snd_card.dev) +#define simple_priv_to_link(priv, i) ((priv)->snd_card.dai_link + (i)) +#define simple_priv_to_props(priv, i) ((priv)->dai_props + (i)) #define DAI "sound-dai" #define CELL "#sound-dai-cells" -static int rsrc_card_startup(struct snd_pcm_substream *substream) +static int asoc_simple_card_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct rsrc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); + struct asoc_simple_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct asoc_simple_dai *dai_props = - rsrc_priv_to_props(priv, rtd->num); + simple_priv_to_props(priv, rtd->num); return clk_prepare_enable(dai_props->clk); } -static void rsrc_card_shutdown(struct snd_pcm_substream *substream) +static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct rsrc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); + struct asoc_simple_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct asoc_simple_dai *dai_props = - rsrc_priv_to_props(priv, rtd->num); + simple_priv_to_props(priv, rtd->num); clk_disable_unprepare(dai_props->clk); } -static struct snd_soc_ops rsrc_card_ops = { - .startup = rsrc_card_startup, - .shutdown = rsrc_card_shutdown, +static struct snd_soc_ops asoc_simple_card_ops = { + .startup = asoc_simple_card_startup, + .shutdown = asoc_simple_card_shutdown, }; -static int rsrc_card_dai_init(struct snd_soc_pcm_runtime *rtd) +static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd) { - struct rsrc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); + struct asoc_simple_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *dai; struct snd_soc_dai_link *dai_link; struct asoc_simple_dai *dai_props; int num = rtd->num; - dai_link = rsrc_priv_to_link(priv, num); - dai_props = rsrc_priv_to_props(priv, num); + dai_link = simple_priv_to_link(priv, num); + dai_props = simple_priv_to_props(priv, num); dai = dai_link->dynamic ? rtd->cpu_dai : rtd->codec_dai; @@ -104,10 +104,10 @@ static int rsrc_card_dai_init(struct snd_soc_pcm_runtime *rtd) return asoc_simple_card_init_dai(dai, dai_props); } -static int rsrc_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, +static int asoc_simple_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { - struct rsrc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); + struct asoc_simple_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); struct snd_interval *channels = hw_param_interval(params, @@ -124,13 +124,13 @@ static int rsrc_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, return 0; } -static int rsrc_card_parse_links(struct device_node *np, - struct rsrc_card_priv *priv, +static int asoc_simple_card_parse_links(struct device_node *np, + struct asoc_simple_card_priv *priv, int idx, bool is_fe) { - struct device *dev = rsrc_priv_to_dev(priv); - struct snd_soc_dai_link *dai_link = rsrc_priv_to_link(priv, idx); - struct asoc_simple_dai *dai_props = rsrc_priv_to_props(priv, idx); + struct device *dev = simple_priv_to_dev(priv); + struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, idx); + struct asoc_simple_dai *dai_props = simple_priv_to_props(priv, idx); int is_single_links = 0; int ret; @@ -147,11 +147,11 @@ static int rsrc_card_parse_links(struct device_node *np, return ret; } else { - const struct rsrc_card_of_data *of_data; + const struct asoc_simple_card_of_data *of_data; of_data = of_device_get_match_data(dev); - asoc_simple_card_parse_dpcm_be(dai_link, rsrc_card_be_hw_params_fixup); + asoc_simple_card_parse_dpcm_be(dai_link, asoc_simple_card_be_hw_params_fixup); ret = asoc_simple_card_parse_codec(np, dai_link, DAI, CELL); if (ret < 0) @@ -186,8 +186,8 @@ static int rsrc_card_parse_links(struct device_node *np, if (ret < 0) return ret; - dai_link->ops = &rsrc_card_ops; - dai_link->init = rsrc_card_dai_init; + dai_link->ops = &asoc_simple_card_ops; + dai_link->init = asoc_simple_card_dai_init; dev_dbg(dev, "\t%s / %04x / %d\n", dai_link->name, @@ -202,10 +202,10 @@ static int rsrc_card_parse_links(struct device_node *np, return 0; } -static int rsrc_card_dai_link_of(struct device_node *node, - struct rsrc_card_priv *priv) +static int asoc_simple_card_dai_link_of(struct device_node *node, + struct asoc_simple_card_priv *priv) { - struct device *dev = rsrc_priv_to_dev(priv); + struct device *dev = simple_priv_to_dev(priv); struct snd_soc_dai_link *dai_link; struct device_node *np; unsigned int daifmt = 0; @@ -215,7 +215,7 @@ static int rsrc_card_dai_link_of(struct device_node *node, /* find 1st codec */ i = 0; for_each_child_of_node(node, np) { - dai_link = rsrc_priv_to_link(priv, i); + dai_link = simple_priv_to_link(priv, i); if (strcmp(np->name, "codec") == 0) { ret = asoc_simple_card_parse_daifmt(dev, node, np, @@ -229,14 +229,14 @@ static int rsrc_card_dai_link_of(struct device_node *node, i = 0; for_each_child_of_node(node, np) { - dai_link = rsrc_priv_to_link(priv, i); + dai_link = simple_priv_to_link(priv, i); dai_link->dai_fmt = daifmt; is_fe = false; if (strcmp(np->name, "cpu") == 0) is_fe = true; - ret = rsrc_card_parse_links(np, priv, i, is_fe); + ret = asoc_simple_card_parse_links(np, priv, i, is_fe); if (ret < 0) return ret; i++; @@ -245,11 +245,11 @@ static int rsrc_card_dai_link_of(struct device_node *node, return 0; } -static int rsrc_card_parse_of(struct device_node *node, - struct rsrc_card_priv *priv, +static int asoc_simple_card_parse_of(struct device_node *node, + struct asoc_simple_card_priv *priv, struct device *dev) { - const struct rsrc_card_of_data *of_data = of_device_get_match_data(dev); + const struct asoc_simple_card_of_data *of_data = of_device_get_match_data(dev); struct asoc_simple_dai *props; struct snd_soc_dai_link *links; int ret; @@ -281,7 +281,7 @@ static int rsrc_card_parse_of(struct device_node *node, /* channels transfer */ of_property_read_u32(node, "convert-channels", &priv->convert_channels); - ret = rsrc_card_dai_link_of(node, priv); + ret = asoc_simple_card_dai_link_of(node, priv); if (ret < 0) return ret; @@ -304,9 +304,9 @@ static int rsrc_card_parse_of(struct device_node *node, return 0; } -static int rsrc_card_probe(struct platform_device *pdev) +static int asoc_simple_card_probe(struct platform_device *pdev) { - struct rsrc_card_priv *priv; + struct asoc_simple_card_priv *priv; struct device_node *np = pdev->dev.of_node; struct device *dev = &pdev->dev; int ret; @@ -316,7 +316,7 @@ static int rsrc_card_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - ret = rsrc_card_parse_of(np, priv, dev); + ret = asoc_simple_card_parse_of(np, priv, dev); if (ret < 0) { if (ret != -EPROBE_DEFER) dev_err(dev, "parse error %d\n", ret); @@ -334,25 +334,25 @@ err: return ret; } -static int rsrc_card_remove(struct platform_device *pdev) +static int asoc_simple_card_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); return asoc_simple_card_clean_reference(card); } -static struct platform_driver rsrc_card = { +static struct platform_driver asoc_simple_card = { .driver = { .name = "renesas-src-audio-card", - .of_match_table = rsrc_card_of_match, + .of_match_table = asoc_simple_card_of_match, }, - .probe = rsrc_card_probe, - .remove = rsrc_card_remove, + .probe = asoc_simple_card_probe, + .remove = asoc_simple_card_remove, }; -module_platform_driver(rsrc_card); +module_platform_driver(asoc_simple_card); -MODULE_ALIAS("platform:renesas-src-audio-card"); +MODULE_ALIAS("platform:asoc-simple-dpcm-card"); MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Renesas Sampling Rate Convert Sound Card"); +MODULE_DESCRIPTION("ASoC Simple DPCM Sound Card"); MODULE_AUTHOR("Kuninori Morimoto ");