From patchwork Thu Jun 15 00:24:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9787657 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 ACC1D602CB for ; Thu, 15 Jun 2017 00:24:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A00242849E for ; Thu, 15 Jun 2017 00:24:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 949B4284A6; Thu, 15 Jun 2017 00:24:21 +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 002892850E for ; Thu, 15 Jun 2017 00:24:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751908AbdFOAYT (ORCPT ); Wed, 14 Jun 2017 20:24:19 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:56090 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751727AbdFOAYQ (ORCPT ); Wed, 14 Jun 2017 20:24:16 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 15 Jun 2017 09:24:14 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 38F6D5AFCB; Thu, 15 Jun 2017 09:24:14 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.39,341,1493650800"; d="scan'208";a="246634121" Received: from mail-sg2apc01lp0244.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.244]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 15 Jun 2017 09:24:13 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=UVv3WU4U7ulSEfKBbpldlNg4mGey4P/qck2Ct0w88KQ=; b=I5ddGXwnEPm8uFySmMCDT5G1antd/BqWavT2WwgJjwI+J6aTjn8hPKjbynAUCjT6wQlosPnHcGqci5sBp0YRBzwPY2ydKemUAnaZBZ7LMKKmCCfhPlOM78aZrdIF00tacJg262YkDOECPkPSneFTpyub0g7V6jD8f3U4EvpollI= 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 PS1PR0601MB1881.apcprd06.prod.outlook.com (2603:1096:803:8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Thu, 15 Jun 2017 00:24:09 +0000 Message-ID: <871sqmnlwa.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/7] ASoC: simple-card-utils: add asoc_simple_card_convert_fixup() User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown CC: Linux-ALSA , Simon , In-Reply-To: <8737b2nlxk.wl%kuninori.morimoto.gx@renesas.com> References: <8737b2nlxk.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Thu, 15 Jun 2017 00:24:09 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) To PS1PR0601MB1881.apcprd06.prod.outlook.com (2603:1096:803:8::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e63306d4-f9bd-4fde-6fb3-08d4b384d77d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:PS1PR0601MB1881; X-Microsoft-Exchange-Diagnostics: 1; PS1PR0601MB1881; 3:CxJVK15Uanvs2dnAlrAhRTMWSLNLDdtOntENry93mX3busLPWweUHe3F5wiFMCLDYaHV7E3Ab0+wr9GG/3xyarQvUwo0bhb7ltyYUvLW0vS2oyI8QCyFaJ5fTrR0pNetkzQ2vq+OED8Hej65oxJbwqK4wdNkoV7DQ+2z0B1hyDVmphAfTLGHMRhSZrsWp3/X1lBj6cd/JUYtMUEZkftoZEJiw9n7DjPyNdbF7hDUqSnEOziod4fwxdfQuUWT1ImWWD9am7FbLNp4xPwDjNw/xs/HCq5AMGs3zjduvHoOo1PfhX8lZIgoRZrNP66TobaXfjnXQa7m5ktUh1z/oMhLvD5+OtzZEHfnhknPWHlFqKk=; 25:s0CQOUzrVoBRt+GKaMQCOyZBpvUFFo+nwj3F9G9CK8K/8RzhDRDq8UHZMlrH2eFQ0Uyd66SL4pQ0ZSnLulrpIaNsNlqDU9BRvlQh9sVvct4gqw679YNQqhoDLQW6mkU5ybHp8h3F/1f3a4giPgWqNHEOQaEbvdG8jpynXHkaNVdCO6QC06az5Orp/oNXpldH07+LdYQZgVJ9E85aTD58UzTqBAKqE8bFWWUrZsQiXHO3g1V43lSEYHhb8uDAcLIEAcR46OYGOjOAjVh6H1Pw4KziagUG3A2PhfKuOlUUhyHa72HJtb6/WjcQ4VLdRqPhyTLDYPblGpWNiFzW5UguwjYGrDDf6KruaHLqSSWE7bh1kIjBghECPuwpI7H95g19yCVKK+XTH/I+fkHml1cw4F2EIGNBUGz5gQ9DNADhUs58jDPtz9ym4kGJYjAk9ENuAr5XPmCDuc4k5X/WKYK3lj+5aNaCQFkc4KE/XcW3jys= X-MS-TrafficTypeDiagnostic: PS1PR0601MB1881: X-Microsoft-Exchange-Diagnostics: 1; PS1PR0601MB1881; 31:lwIpZDGOWri9u8X7uFf1nseljLFAi+tK035ULoAhI05PLCBeiuf96QCwvibtW7x7rRfuj9BEVpRQc/r8H/6Y+MiPjY8igmek/kIshtNQcS5kC5SESX4K/7UWm5y37SAEVsZOnzxRD9ivbp0TegxrW39ccj7z+ZbrNS29+6PvDIpD+r7T7zfTdSjw8vjOGLMd2asrFAbarlQMbc3I5Q29u3mnBwHeUEMw7nsc7TiJHs5hCzGj1fteUFsKziEr7Fyp9cOk+J5TdJZfHBeuBoeGzg==; 20:pZNpWsjpuraM1uiKn2jj5tEIzKs1uNYWz1Z9vd64r4i0j8Jqq+Wzb4KJQVUeg8rJkJj+8HXzg7h6e72J1jpqG0rRWYyDIp47/fZTHdPO/E6ZhdyaV+PxA/oG3g0bVXQP0SqtccC03tQtAwBBkPJCdPZ6KRvX3ktY7rPrJ/OB82PxsFYTiZtQRHqJk++vRmIvjxIzgl9kh9qOAqW5P2cO+N1x+JoO7fjpfR2nL0qFRr1ZKzK1VTon1foisjng4D/ZOohXs67tT2V1E5FrZwngK9/jdHMAMyzIwu6AgtIBWOrZzpk/Km6+2IkJ5uri930ZlhcWGGjCdfi0e3QWsE2WMQ8Spx9m2o3b02gUtn7BrCqbj9FOZgelSSMo+yr7vrVo/J0cpm9N1MLk2ZB39QZtLR7UKcRDruwOjLW0BH/TdmFRcMcL6OM8iUwz012hJXUgJe4zneXipVz8vYMsKRe5prHaD8qaop+ibWSDjRruPWbh9neYQ1UO2Zf+RZBWp3td X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:PS1PR0601MB1881; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:PS1PR0601MB1881; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; PS1PR0601MB1881; 4:o5UcV4JCk2291UkN7CvOCbznkDBvcKLaxPJKyfwQ?= =?us-ascii?Q?MB5bHBXqBKKTyvgF2goP43KYPZLe8rJvZiABC9JAIBpIbvXXUO6gAB4VU4ob?= =?us-ascii?Q?xO5/lg39LdrkMEIriudsV9IEXkso/eTLnFq3AlcMJ7z1EJAecGn6Ck+zUSxM?= =?us-ascii?Q?vbXkj+d5L79L9BjYCFAzBX6ZD3IWcbah6DtUtuq7wBM+7wYSW9IKN8BiswNq?= =?us-ascii?Q?Qx+Ek/Uz4WuF0AbuccbJtfjFfA8JE+XYbm5M1Qbxgu2B84pIpvUEbO5tA/Cq?= =?us-ascii?Q?7gY354Vd1oXsEJvwGucvfFR2NLpzFXA6ZrpK5bw+wAUN1ahCq+8weZ8WXXtH?= =?us-ascii?Q?GvS1CqINA1j2QLCobqXEg7OE1IHyHMC5qonbta4bB87DhROpU+cojnVjjtQm?= =?us-ascii?Q?mCh4R1DHzThrVdhnIiFUsYtyTuBSYkD0XJm+UvCdWtrgd6GDh+nDyZxawu5h?= =?us-ascii?Q?KmMc8y0xm1b2tE6lzV0R8vaVPfKGLUkmzZ2qQvQWw43prHBrzbpLqTmRqUty?= =?us-ascii?Q?8fBBnKltgYr8pRx2qTKYU/OVre/+IuqDkQQ2JQZlT82FEWiCeLq4iQLRbvSV?= =?us-ascii?Q?aIsLYmXvEhMyOlxhtNlSci5cUwCB72s2YdNSebYiijC+kIxxmWZJ7Awwet2h?= =?us-ascii?Q?BnGM0PAKJtizUcBSGcHaxmcpb7G/86evnEOrhvrrzWueHu0R8n74uaj4qg17?= =?us-ascii?Q?K6qXx32arcYTMEHOYrnePH/N3/hgS/X8hFvmyFjwip1/sQhRGuqQ+ottQvZa?= =?us-ascii?Q?x5Vw2B2Nqn/XatUVBiqsyKSWZoPESF8hQHH8tDcQf+UTEmqXyR08Klh4PTCB?= =?us-ascii?Q?KLre6gEAWaJv2u6o6RIMkwVWRX8JnIVoxfWF/eABRlzfwqIu1gU5fETeKf/R?= =?us-ascii?Q?fBLp8MyDn3TphNPrfNJvFC5x36ligy/Ns6i/EkUvMOjJ0kBRUuaHalY9qsk/?= =?us-ascii?Q?HlrNstaVuI7NK3zXywlqDSnV23VIsM67Q1PktqTtfMf6wzaO/2B+iIK4huQW?= =?us-ascii?Q?UlowVfrr+dRRmz4kbISqPtqk3Lx80mXq3XjRp7sCmCUJUjnrvu6I4Igkf5Tj?= =?us-ascii?Q?57vSnIQHjek5PdNLRD4C4yLeR4OTJDV1j2++jveTQMKOJyquKdcW3jdAMjcq?= =?us-ascii?Q?4z8WDF3gsBC78ic3WwFmcJL7UF09qoFJJ/9s+axMJC5/RYSTOrfUMA=3D=3D?= X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39850400002)(39410400002)(39450400003)(39400400002)(39860400002)(39840400002)(66066001)(46406003)(76176999)(50986999)(4326008)(54356999)(2906002)(36756003)(86362001)(478600001)(4001350100001)(47776003)(189998001)(25786009)(110136004)(33646002)(7736002)(38730400002)(54906002)(6486002)(53936002)(42186005)(3846002)(83506001)(53416004)(50466002)(6116002)(8676002)(5660300001)(305945005)(81166006)(6916009)(2950100002)(23726003)(230783001)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:PS1PR0601MB1881; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; PS1PR0601MB1881; 23:8ZS5WASQa7DfgdFOCMtNRWWlabAbaoTamugabUa?= =?us-ascii?Q?zlh9sJAmlyvwfB23LiO2icJbIkvAhqHor/D6+sES7x1G26Y02sL6UmFi/GU8?= =?us-ascii?Q?fbyYHnqSA6spiuCkV7ThSwUyAMtHUW/IPgtgnqm549ZKySoRFpEHJMdCFXYm?= =?us-ascii?Q?KpKU0GDftwo2adBPt1sUraYDNSLzmAFutqyHX31YEhGFYmM8wabRGRtFXW4T?= =?us-ascii?Q?TEOjo/h0xVq+6GEy/D7cDK3NRpQFfpVU1ULG/9gXUkKlp+6sQygLuqA+dEz1?= =?us-ascii?Q?LKC+XUz0FHDrzmfLBttRKnEB6odhpeQjts6SP01PyzisLM6UGQm5QwHduZ4/?= =?us-ascii?Q?bdiCCwS5CI9WjQ7d9E5lK7hGis3MsLR40WpTSMAnH59JLESP5S9aoMz7VQ0W?= =?us-ascii?Q?7O9PhNHyRI0dkExhHUY/PBuN3Q5eP1f+hq7al/uvqtc3rKokWDiOKViWBZnu?= =?us-ascii?Q?olFzrXtNkDadOmBLclQ+m19qlvL479L0vMVwb3Y/MN6gtIhZM6D+cb35uM6x?= =?us-ascii?Q?v+eNr0x6HyQ6qlf7Z9vc+xMO2RoJCzJMSke71vTedR1O8o9MXDitucKoFQ7s?= =?us-ascii?Q?q8BbJzEW96H/BRlRTc+A6zi3kZoZyGWlRpopVHe3nE5wt5og0tfJ0AYfCsZI?= =?us-ascii?Q?q4lSiXjnqSVXt4ciVxB7gil3K0Ygs88U+ZphSgDH3INCW9uYl5h6YGlJfRK0?= =?us-ascii?Q?r1g+Sir3Qr9tEVTVAvAIHvHXbLaDnKeqSCHyx+7sLdA9BoGBAzryRG3FVwS1?= =?us-ascii?Q?3JrUXibg6aacDRCwdPDNDFPY4418jHxox7Bk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keo63/oNWmUEWC8BDtDNafKt5d7qz6dc6geiz4kprLjS2TsDaO0e+c8cTx3ZzBR0jzFvj6H4= X-Microsoft-Exchange-Diagnostics: 1; PS1PR0601MB1881; 20:F/dPXNm54/cwBAra00PbM4c0M2Hl+un4FfatEOJSyE+4Cn0qJiTAys2uAriYyHPgsK8gtJNRam9dKq+4EfIy8RsMTc4G/kYVO0nwiHxp591xqYYaHCg19xCRD5b2VDjaWbis9AvjDZGny4qGejt4dW2LF9MNb/j/Zga+FPMDWRE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2017 00:24:09.1243 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR0601MB1881 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 Current simple/audio scu card drivers are supporting same convert-rate/convert-channels on DT, but doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_parse_convert/asoc_simple_card_convert_fixup Signed-off-by: Kuninori Morimoto --- include/sound/simple_card_utils.h | 10 +++++++++ sound/soc/generic/simple-card-utils.c | 40 +++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 2679312..cc318cc 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -22,6 +22,11 @@ struct asoc_simple_dai { struct clk *clk; }; +struct asoc_simple_card_data { + u32 convert_rate; + u32 convert_channels; +}; + int asoc_simple_card_parse_daifmt(struct device *dev, struct device_node *node, struct device_node *codec, @@ -90,4 +95,9 @@ void asoc_simple_card_canonicalize_cpu(struct snd_soc_dai_link *dai_link, int asoc_simple_card_clean_reference(struct snd_soc_card *card); +void asoc_simple_card_convert_fixup(struct asoc_simple_card_data *data, + struct snd_pcm_hw_params *params); +void asoc_simple_card_parse_convert(struct device *dev, char *prefix, + struct asoc_simple_card_data *data); + #endif /* __SIMPLE_CARD_UTILS_H */ diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 2ad7633..948a188 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -13,6 +13,46 @@ #include #include +void asoc_simple_card_convert_fixup(struct asoc_simple_card_data *data, + struct snd_pcm_hw_params *params) +{ + struct snd_interval *rate = hw_param_interval(params, + SNDRV_PCM_HW_PARAM_RATE); + struct snd_interval *channels = hw_param_interval(params, + SNDRV_PCM_HW_PARAM_CHANNELS); + + if (data->convert_rate) + rate->min = + rate->max = data->convert_rate; + + if (data->convert_channels) + channels->min = + channels->max = data->convert_channels; +} +EXPORT_SYMBOL_GPL(asoc_simple_card_convert_fixup); + +void asoc_simple_card_parse_convert(struct device *dev, char *prefix, + struct asoc_simple_card_data *data) +{ + struct device_node *np = dev->of_node; + char prop[128]; + + if (!prefix) + prefix = ""; + + /* sampling rate convert */ + snprintf(prop, sizeof(prop), "%s%s", prefix, "convert-rate"); + of_property_read_u32(np, prop, &data->convert_rate); + + /* channels transfer */ + snprintf(prop, sizeof(prop), "%s%s", prefix, "convert-channels"); + of_property_read_u32(np, prop, &data->convert_channels); + + dev_dbg(dev, "convert_rate %d\n", data->convert_rate); + dev_dbg(dev, "convert_channels %d\n", data->convert_channels); +} +EXPORT_SYMBOL_GPL(asoc_simple_card_parse_convert); + int asoc_simple_card_parse_daifmt(struct device *dev, struct device_node *node, struct device_node *codec,