From patchwork Fri May 20 10:08:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9129139 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 ECD0560467 for ; Fri, 20 May 2016 10:09:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE2211FFC9 for ; Fri, 20 May 2016 10:09:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2D8D27BF1; Fri, 20 May 2016 10:09:01 +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 F3AF61FFC9 for ; Fri, 20 May 2016 10:09:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754297AbcETKIx (ORCPT ); Fri, 20 May 2016 06:08:53 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:9081 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752930AbcETKIv (ORCPT ); Fri, 20 May 2016 06:08:51 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 20 May 2016 19:08:49 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 368674EEBC; Fri, 20 May 2016 19:08:49 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 37E901806F; Fri, 20 May 2016 19:08:49 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 326E71800A; Fri, 20 May 2016 19:08:49 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id VAK12464; Fri, 20 May 2016 19:08:49 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="211717527" Received: from mail-sg2apc01lp0244.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.244]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 20 May 2016 19:08:48 +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=26VYsuehJBLHisEK3SsYtLWEQC68whhT3xL6hFSob/Q=; b=TG1K6/9uKNCJbztR9YzndZc5l3JrBINGhx8KJyWgqlKVlD44v95DyJ8gYtsa129ILbbkk0RQpri3AOHC4gurd1LpXckRV6SBTSXLxbxyL64D5WlN9ePRjiKRLQ+Zknb1w7u5qf00dp+ytr23f/rvR3E2kanWzsYUXrVW6TeGP30= 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 KL1PR06MB1701.apcprd06.prod.outlook.com (10.167.63.15) with Microsoft SMTP Server (TLS) id 15.1.497.12; Fri, 20 May 2016 10:08:44 +0000 Message-ID: <87mvnloxmw.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 48/49] ASoC: rsrc-card: rename rsrc-card to simple-dpcm-card phase2 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:08:44 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS2PR01CA0090.jpnprd01.prod.outlook.com (10.165.51.178) To KL1PR06MB1701.apcprd06.prod.outlook.com (10.167.63.15) X-MS-Office365-Filtering-Correlation-Id: ce612d0b-dd1f-4c29-66ca-08d38096baf6 X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1701; 2:nZLMM4gySp8zLoNRPPbSN9SxOqK395KJlIugk/0CHRrZ/WJdzIVcSwNADSpjuvYuprflVsSknyMbs3kqMXZlY/aKuk1Xxup6RVoWQQZI0qD4xVOaDQZMpcqhlqTKPBXtldVOKNiLxGM1dmbSqYp8AvtTEYk1hKoQsTOqtrDID5j9M02c/DriA6ZEmFDM58by; 3:DRtw4FwCNTjo9ZLyrIz3FBje7GHS4PevrRffAxGO4NzenakGrgvrhCi/B/ClNx3jQgUFFw++sUBvZ2LvWYESiNdIYhXDZJJztelGxc2E8ob3WTRi+mMZjIchxbiAZJeG X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:KL1PR06MB1701; X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1701; 25:qkzCo32qIRXtbVZ5+2YJgXbjrn6R+Ea7H5y8GT1KB1cDnYe997GUEMxrFaZhBSVPik+FTUbGUA1TE7902M4THA7gDWy8QPsooovR9mVNM/venJ2C7k79CuglJvxUM6pfIpuAdqdTOUJdFHVMv4Eubadi2dMDX+t1qzImQHha/zU0zIx8gAUj3bwTN3W5TeoeGd0hTEZDB2aEwdFGYz/6wRl9PF0vBPtfwF0glKlEA9TVnwZKqMDHGBzlUrHzoCsUpne5sL1I0UPqPdvYSuDD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JJ5+Yy/sTse5xPGZXdhwKi0q+9i6/qnRS2IwRJJ4LMjfB0XukUIfcFAaX8Xyof6ot1/ZrOLYGl0ECfv67S96cz521RU5hQyKVr3WEmLg64Ga6iTfd2r8miKlgTgBmpA1c+hZoY6Yk+LoSAgriXGus9PKZUz/K/BFTPJwXBgbLuLARr0bhrcbR4KtvEUXIYcroNzGH435mEkGD0NiR0dfQp5yYDRMei0R273pNo7YTeDtKx1DDE5yHnnAyv71cw5ua0idSFkoTZdc48zOxugC+B4dzbfHTwSS/n5KpIBRCnF/tFTx3BOX1w7TARjuqqmh0+UNs6vwSD8NR7pDXy+qeCdL7WSAp/z4NLkaw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:KL1PR06MB1701; BCL:0; PCL:0; RULEID:; SRVR:KL1PR06MB1701; X-Forefront-PRVS: 09480768F8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(229853001)(83506001)(77096005)(2950100001)(47776003)(66066001)(76176999)(50466002)(5004730100002)(230783001)(53416004)(54356999)(36756003)(92566002)(46406003)(42186005)(8676002)(50986999)(3846002)(6116002)(586003)(19580395003)(19580405001)(23726003)(81166006)(2906002)(33646002)(189998001)(86362001)(110136002)(4326007)(5008740100001)(31430400001)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1PR06MB1701; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1701; 23:vyUV1W7hiaF5Li4whxJVLr5Hs1qp8j0b7ftVl+xI2Rpe37Zidk0FcCu9ueVCBp4vl0a4Erfx6FEIf1v04syfdmRJdgaLub5+gGnTqC4ag/7jcLIcwOTr/lguKv0qy8CaGc7IgCrPQC7qfgShQA+PSfCf5mwKWlwylJMcCt2ut1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Nwah+5uFRdxMg9cBc=; 7:aQBBdliPHWjEk5sf52EvfZg9qKHiyTkPyz8ZH3hLK5zRwGGsdNpytVQlEJxTZM04wDVSes+T3ApGEePDM12E1zhMXqWi6Z2xxvaJNBisQGTl9KU6EOhV+QtwXSBOcDVoqUPAyO3bb9drzyObpK6PgqAw67VVQbM0vUbjTJF8/WNCIYRMMumNFmMj9bpNPpiJ; 20:mG5p0DraHy6Z7YUURTyV4O6kTT3/khGreOv0JOELYZcfIy8B6NrJBuksy8nHp0y8vi7y5cf7xrWXXIWumcfZna8ujXaYlfsWLo3DR+Ho1VOh/aLN78s8RfO36+4CWnrVSWyk+ok0Yhb1DPhQ0x0hZY07FFcevA85xayAm8hzOu0= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2016 10:08:44.9531 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB1701 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, rsrc-card should be renamed to simple-dpcm-card. In order to easy patch review, as 2nd step, this patch renames compatible from "renesas,rsrc-car" to "simple-dpcm-audio-card"; rcar-card used specific property, not "simple-audio-card", but it should be now. Actually, rsrc-card is upstreamed driver, but noone is using it on upstream. The user is only local, and it is only me. Thus, there is no compatible break by this patch. This patch uses "simple-audio-card" prefix. And it removes rcar-card specifix compatible too. Signed-off-by: Kuninori Morimoto --- .../bindings/sound/renesas,rsrc-card.txt | 56 +++++++++--------- sound/soc/sh/rcar/rsrc-card.c | 66 +++++++--------------- 2 files changed, 49 insertions(+), 73 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/renesas,rsrc-card.txt b/Documentation/devicetree/bindings/sound/renesas,rsrc-card.txt index 255ece3..cfdf441 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsrc-card.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsrc-card.txt @@ -1,38 +1,35 @@ -Renesas Sampling Rate Convert Sound Card: +ASoC simple DPCM Sound Card -Renesas Sampling Rate Convert Sound Card specifies audio DAI connections of SoC <-> codec. +Simple-Card specifies audio DAI connections of SoC <-> codec. Required properties: -- compatible : "renesas,rsrc-card{,}" - Examples with boards are: - - "renesas,rsrc-card" - - "renesas,rsrc-card,lager" - - "renesas,rsrc-card,koelsch" +- compatible : "simple-dpcm-audio-card" + Optional properties: -- card_name : User specified audio sound card name, one string +- simple-audio-card,name : User specified audio sound card name, one string property. -- cpu : CPU sub-node -- codec : CODEC sub-node +- simple-audio-card,cpu : CPU sub-node +- simple-audio-card,codec : CODEC sub-node Optional subnode properties: -- format : CPU/CODEC common audio format. +- simple-audio-card,format : CPU/CODEC common audio format. "i2s", "right_j", "left_j" , "dsp_a" "dsp_b", "ac97", "pdm", "msb", "lsb" -- frame-master : Indicates dai-link frame master. +- simple-audio-card,frame-master : Indicates dai-link frame master. phandle to a cpu or codec subnode. -- bitclock-master : Indicates dai-link bit clock master. +- simple-audio-card,bitclock-master : Indicates dai-link bit clock master. phandle to a cpu or codec subnode. -- bitclock-inversion : bool property. Add this if the +- simple-audio-card,bitclock-inversion : bool property. Add this if the dai-link uses bit clock inversion. -- frame-inversion : bool property. Add this if the +- simple-audio-card,frame-inversion : bool property. Add this if the dai-link uses frame clock inversion. -- convert-rate : platform specified sampling rate convert -- convert-channels : platform specified converted channel size (2 - 8 ch) -- audio-prefix : see audio-routing -- audio-routing : A list of the connections between audio components. +- simple-audio-card,convert-rate : platform specified sampling rate convert +- simple-audio-card,convert-channels : platform specified converted channel size (2 - 8 ch) +- simple-audio-card,prefix : see audio-routing +- simple-audio-card,routing : A list of the connections between audio components. Each entry is a pair of strings, the first being the connection's sink, the second being the connection's source. Valid names for sources. use audio-prefix if some components is using same sink/sources naming. @@ -57,18 +54,25 @@ Optional CPU/CODEC subnodes properties: Example sound { - compatible = "renesas,rsrc-card,lager"; + compatible = "simple-dpcm-audio-card"; + + simple-audio-card,name = "rsnd-ak4643"; + simple-audio-card,format = "left_j"; + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sndcodec>; + simple-audio-card,frame-master = <&sndcodec>; + + simple-audio-card,convert-rate = <48000>; /* see audio_clk_a */ - card-name = "rsnd-ak4643"; - format = "left_j"; - bitclock-master = <&sndcodec>; - frame-master = <&sndcodec>; + simple-audio-card,prefix = "ak4642"; + simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback", + "DAI0 Capture", "ak4642 Capture"; - sndcpu: cpu { + sndcpu: simple-audio-card,cpu { sound-dai = <&rcar_sound>; }; - sndcodec: codec { + sndcodec: simple-audio-card,codec { sound-dai = <&ak4643>; system-clock-frequency = <11289600>; }; diff --git a/sound/soc/sh/rcar/rsrc-card.c b/sound/soc/sh/rcar/rsrc-card.c index 6c81b93..333642f 100644 --- a/sound/soc/sh/rcar/rsrc-card.c +++ b/sound/soc/sh/rcar/rsrc-card.c @@ -25,21 +25,8 @@ struct asoc_simple_card_of_data { int num_routes; }; -static const struct snd_soc_dapm_route routes_ssi0_ak4642[] = { - {"ak4642 Playback", NULL, "DAI0 Playback"}, - {"DAI0 Capture", NULL, "ak4642 Capture"}, -}; - -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 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", }, + { .compatible = "simple-dpcm-audio-card", }, {}, }; MODULE_DEVICE_TABLE(of, asoc_simple_card_of_match); @@ -61,6 +48,7 @@ struct asoc_simple_card_priv { #define DAI "sound-dai" #define CELL "#sound-dai-cells" +#define PREFIX "simple-audio-card," static int asoc_simple_card_startup(struct snd_pcm_substream *substream) { @@ -147,10 +135,6 @@ static int asoc_simple_card_parse_links(struct device_node *np, return ret; } else { - 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, asoc_simple_card_be_hw_params_fixup); ret = asoc_simple_card_parse_codec(np, dai_link, DAI, CELL); @@ -161,17 +145,11 @@ static int asoc_simple_card_parse_links(struct device_node *np, if (ret < 0) return ret; - /* additional name prefix */ - if (of_data) { - priv->codec_conf.of_node = dai_link->codec_of_node; - priv->codec_conf.name_prefix = of_data->prefix; - } else { - ret = asoc_simple_card_parse_card_prefix(&priv->snd_card, - dai_link, &priv->codec_conf, - "audio-"); - if (ret < 0) - return ret; - } + ret = asoc_simple_card_parse_card_prefix(&priv->snd_card, + dai_link, &priv->codec_conf, + PREFIX); + if (ret < 0) + return ret; } ret = asoc_simple_card_parse_tdm(np, dai_props); @@ -217,9 +195,9 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, for_each_child_of_node(node, np) { dai_link = simple_priv_to_link(priv, i); - if (strcmp(np->name, "codec") == 0) { + if (strcmp(np->name, PREFIX "codec") == 0) { ret = asoc_simple_card_parse_daifmt(dev, node, np, - NULL, &daifmt); + PREFIX, &daifmt); if (ret < 0) return ret; break; @@ -233,7 +211,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, dai_link->dai_fmt = daifmt; is_fe = false; - if (strcmp(np->name, "cpu") == 0) + if (strcmp(np->name, PREFIX "cpu") == 0) is_fe = true; ret = asoc_simple_card_parse_links(np, priv, i, is_fe); @@ -249,7 +227,6 @@ static int asoc_simple_card_parse_of(struct device_node *node, struct asoc_simple_card_priv *priv, struct device *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; @@ -276,30 +253,25 @@ static int asoc_simple_card_parse_of(struct device_node *node, priv->snd_card.num_configs = 1; /* sampling rate convert */ - of_property_read_u32(node, "convert-rate", &priv->convert_rate); + of_property_read_u32(node, PREFIX "convert-rate", &priv->convert_rate); /* channels transfer */ - of_property_read_u32(node, "convert-channels", &priv->convert_channels); + of_property_read_u32(node, PREFIX "convert-channels", &priv->convert_channels); ret = asoc_simple_card_dai_link_of(node, priv); if (ret < 0) return ret; - if (of_data) { - priv->snd_card.of_dapm_routes = of_data->routes; - priv->snd_card.num_of_dapm_routes = of_data->num_routes; - } else { - asoc_simple_card_parse_card_route(&priv->snd_card, "audio-"); - } + ret = asoc_simple_card_parse_card_route(&priv->snd_card, PREFIX); + if (ret < 0) + return ret; - ret = asoc_simple_card_parse_card_name(&priv->snd_card, "card-"); + ret = asoc_simple_card_parse_card_name(&priv->snd_card, PREFIX); if (ret < 0) return ret; - dev_dbg(dev, "New rsrc-audio-card: %s\n", - priv->snd_card.name ? priv->snd_card.name : ""); - dev_dbg(dev, "SRC : convert_rate %d\n", priv->convert_rate); - dev_dbg(dev, "CTU : convert_channels %d\n", priv->convert_channels); + dev_dbg(dev, "convert_rate %d\n", priv->convert_rate); + dev_dbg(dev, "convert_channels %d\n", priv->convert_channels); return 0; } @@ -343,7 +315,7 @@ static int asoc_simple_card_remove(struct platform_device *pdev) static struct platform_driver asoc_simple_card = { .driver = { - .name = "renesas-src-audio-card", + .name = "simple-dpcm-audio-card", .of_match_table = asoc_simple_card_of_match, }, .probe = asoc_simple_card_probe,