From patchwork Fri Jan 12 00:52:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10158963 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 BA4CA602A7 for ; Fri, 12 Jan 2018 00:54:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A757026212 for ; Fri, 12 Jan 2018 00:54:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BA5D28762; Fri, 12 Jan 2018 00:54:27 +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=-1.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5B5826212 for ; Fri, 12 Jan 2018 00:54:26 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E28B6267A46; Fri, 12 Jan 2018 01:53:25 +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 B72D1266F50; Fri, 12 Jan 2018 01:53:23 +0100 (CET) Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id ABC2F266F50 for ; Fri, 12 Jan 2018 01:52:35 +0100 (CET) Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie2.idc.renesas.com with ESMTP; 12 Jan 2018 09:52:30 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 043C16BD95; Fri, 12 Jan 2018 09:52:30 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.46,346,1511794800"; d="scan'208";a="268003584" Received: from mail-sg2apc01lp0240.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.240]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 12 Jan 2018 09:52:29 +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=6/rSwKL9IGBNUrpIx5U6W2CGsdm7OPgDldbP/y8M1Uc=; b=ToOZHfIP1IQ3VgB6Afy8g4T1+VatoDCshG5PEiIQC13RfIYXr1x/BXZ8owC2Xi2b8fhmAQWMMUJlsYr6YJ0LkuQbi9hcf1cWv/SFaPwr1+n0W9dNKV4xDv5BGTjfZtY9S+MOup/3VAuZpJp5j/Wd5xxV4rOF1XTw4lnztrUpL7U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.138) by HK2PR0601MB1876.apcprd06.prod.outlook.com (2603:1096:202:a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Fri, 12 Jan 2018 00:52:27 +0000 Message-ID: <87r2qvew6x.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown In-Reply-To: <87vag7gb9o.wl%kuninori.morimoto.gx@renesas.com> References: <87vag7gb9o.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Fri, 12 Jan 2018 00:52:27 +0000 X-Originating-IP: [211.11.155.138] X-ClientProxiedBy: TY1PR06CA0039.apcprd06.prod.outlook.com (2a01:111:e400:5972::49) To HK2PR0601MB1876.apcprd06.prod.outlook.com (2603:1096:202:a::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4de550f9-0a1a-45cd-53bd-08d55956c0a1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020074)(4652020)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:HK2PR0601MB1876; X-Microsoft-Exchange-Diagnostics: 1; HK2PR0601MB1876; 3:lQJiRq3adD+ybP5+4yUZ1UtI3Z5DF7cyUNK+G78+xkx5zkdG6XLpaWQmvVBD1N0d1YY5tt8jre7gdGsdXh9G4Wj/G3lfVuLxAmBljEGnQR353rCIyNZ2mw0LVpBxEY3Mo2zocxaYtzWNBf7syECsrbnZ9eK9RmbVsAQx/AmHzmCreOWDCoiSLy95zBOfys3q9E6G8CMJICNClzc77CXiKvkSHXo1vvqOMesmX1WiiFXVQcSQ1H61uxpZQNPekCeV; 25:A9wg+RI2MEED7ziikG9g8NIJ8QvzO6Gk+r2ufA2c9scqRLzEcjWsAy+Q/rTCBXh8q3Zi6xLNIGeHG2kyTfdpAfTvWLJtKUxS21ezTyPsAbIfZzngo0ZJ4jpyarBYyf9+YwQXa/1ez2ZpiEzeGmIz6SHE6L4Kysbo4pDoNf3ejRf68xgEIunzXO7k4Y5fyLaf1ntVpDk9XU2cMr0/mc7XDM0KgtyLVVuI2JUytVmaleVfKZNNKD38QJRV+nil8gjIrTI0mpUnodnYBSefdK+KHkVARnj6BF1+qfz4OXQtkcl8Ma/BgK4sSDgRuth7KShFgdtkHNKxWpCSDwWPOvSq6w==; 31:7LtNZb8t00qE2YjGb5DM1C7MvwXUYXR0QEgfK6WtseY5CAy3dELFsVUMbkAW4l+OEWZlfjVxSzTRp0u8OgyXHSRm6S4761UeReI9tJrxJLn/C3rgRIAmsEocpqYFSJzzOA/yNVltrSA1ZfM6Z9gMOecK6wXzoidO6K58ylsO2uqzpjvG8YMedt9RzM5HxZlSUHz/h/HCoS/uiIsF1TO3K2oT1NmNmLGkjb44ye2S3gA= X-MS-TrafficTypeDiagnostic: HK2PR0601MB1876: X-Microsoft-Exchange-Diagnostics: 1; HK2PR0601MB1876; 20:pW1ooz5fbXYXGQU343DBKYpGogU2sLX2cLmxr1voTH8MDgIO/wV82l8t/58WcMnraEG3j7CxKoKm/TIYnjuQExQ46T7bSle+BTimE9TeACImOGnrbPvx/bxGFKtIpxx6+mpJrr4grCDD4m8bzdrnNin3ksGxlns+muZRa3R1DbSZBhjrY4zzoHnA9X5wp0N7G+KRiztukNO8MxMYJOzWUs2cjqEUJxpirwM+pN03jEtnvO/W6shkqRcTymp9uRbROy+4XLi7g86zUj3xeerpY2fZgFggBdcTeVME6wuUnrsq88VkcfscmFq3O7AmnfCjFl0UveaH11bLxmWOR5TGT54f5/dhRdkxHnzAbKquO0E17u2mO/DdPrREeewu4feQfbGH2ZWWJU510tnOS7pHs5kI6UUxiuQ/zBNrWBpM766GK9GFAPKX8fqccQoLjH2KxMWHLRe2ntPNd8qNwyrOPLDCHfBmeVZEPEbhSi2DMPNUh/S0HjMJlbLfCWNN618S; 4:2aTmthDbhl1xO9qVGEwsZZPh5xwTEfS+WIpe6AOIKkwBIkKYmSWOdatChNfVUSCP3lT3fgtAT6+BLuCffFTpHTIulOMYwD/mQh150lQIaCZHpSR1YW4io7CHT3hIAf6cAViBX4NLjjYFBnymO6NzUx4YHfPsr/5AgM3Vxbz3ibb69RRWOUsXFf4alcvQ/xMlFzeq906GAMSrb9BhEwyC0T/7Tj8YmIZ/qGmjfD2tghmOcs8cj6jilDUHiuBHuQpwUmoYToMsqDJspaCLJxdDckTVWDe2HHYVhLjjAOvyyY4n9sqhcG/xLJjjCm7QkIY2 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231023)(944501137)(10201501046)(6055026)(6041268)(201703131423095)(201703061421075)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(6042181)(201708071742011); SRVR:HK2PR0601MB1876; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HK2PR0601MB1876; X-Forefront-PRVS: 0550778858 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(189003)(199004)(386003)(6916009)(6486002)(2950100002)(69596002)(4326008)(59450400001)(36756003)(106356001)(8936002)(508600001)(97736004)(105586002)(76176011)(305945005)(50466002)(6116002)(53416004)(8676002)(7736002)(52116002)(25786009)(83506002)(81156014)(5660300001)(81166006)(16586007)(3846002)(47776003)(68736007)(86362001)(7696005)(23726003)(66066001)(16526018)(2906002)(53936002)(58126008)(54906003)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR0601MB1876; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR0601MB1876; 23:ZtVFgCU4f8DnoisSK27jvSFl6XMe9wZrIVs01vN?= =?us-ascii?Q?Ih2VT9yXzeo2vx+rZBztWmEthsgziDJdbrZ6c/ocDgsBYwcYOCVD//eY5uNL?= =?us-ascii?Q?ahLBoSi9XbfAMpjNpO1MHcd209EBVD957M14lgMh+VgI3/ivlmWT8yolBdzy?= =?us-ascii?Q?rNZUCd9r/3wSs9QUZR0eZUwf9NaxDTgREM8cpDyXsLoI0We/QBL5pc1smRtp?= =?us-ascii?Q?Ppx78JbZXjl69LZFdpxg2jtsijgKwGu2VKsvj1CWAQb4AYqdU/a2jLliQxw+?= =?us-ascii?Q?qbcsLiAXHhbC6NKKxPzQgHxJXEeSHZubZKtLokw7OTQmD0wQbQL2NyUfT6Ax?= =?us-ascii?Q?GKz5a7Gx/50mUlB1zTS+01COAu4Q96GVaZsc57LXOxpVCLoy3ZyPVP3QdTHY?= =?us-ascii?Q?Mj32Xe2toHt4d57SfTRbR0LbZZPwhMg/fg7eBiYVuoVtW9Ud3sxWVUlGMQmK?= =?us-ascii?Q?BzaMqvT/lSSpA6z/3oDFxvzpkN1cxy2k7ed2h0nnxP+72Wx8BJbOySQyM9sM?= =?us-ascii?Q?T7lXsZD5aUb3j4c4QJn7W0+pb/jAnnJDWhJzz8p8IhoXNBNTiF/9MTVngZyB?= =?us-ascii?Q?aOWqOIp2inl16tEKAl/hijmZTZcg9Y30lwemn1KbY8QFr4QOl8uaGWdUH0dl?= =?us-ascii?Q?E0ru1+1u0XsAQTGkUwI7grjUj1TtZOv2i+BUJSsR2DIY7dVNKOHc46L5YbX7?= =?us-ascii?Q?NB85QR8usV5v0iQYWVLmx342Zs5dADcOzg7zukdetEx/4ia/Q3W6ILfeDAMW?= =?us-ascii?Q?gMOk+O478E7UkRndPimtsg2EuKw5vLQoRHCRn/yzDRWuM0I81oW3qyjhrqVt?= =?us-ascii?Q?Tk4rBhB1v8eZ2jWWJ32AOJEhYar2bkLlyZFYVx56ZdUoVRafsF06JQIgtnSv?= =?us-ascii?Q?zMo6OByHR02pHrGAIzTlrbWh1OmbHo4kbkMO6JBNJvsiJOxjRqaPG9gxvwZe?= =?us-ascii?Q?75GIZBQRCJahDad/9TUld2k06UCswLQMCwZoMIU5YhjGQU21fzytINATXuuf?= =?us-ascii?Q?goX14jvMATlBXLCEuuJtWSpYKaE7Bq+Y++4t7nOC7OmF39A=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR0601MB1876; 6:w4DqzyTC4WkZ/r1E80gvSHIdtvZSSCSKBod32Soi7BqKgSC+i8RjSv/i83CcaWQcP+CwRfw5EOPmFzhOKUWakVoygKkyE72IZ2FZsm9ZCceA2QpjIcwtSKdvfgOCJ+WFzwfgPQCUxDQmM3sx2vgwOfRsAgxZRhTyNl6MYWeGKYl3weRmeYgn9/ntflvfiWwGT8FG3Cj23pyLIc9PzVWwgzk7kA8A1bJn4weE5m/ZNw2TIsUVsPQq0Zf0nCsmhzR2yZyzb+bnQjpqltuUEpefp7j8Xil15XWUMnNOxFBspyozFnWDT4a5go8w/rb2U4aD133baIa0X5eWrpfXa4l9pLmzD/nHDyppaHFt0P6Zsug=; 5:js/AhOl6xms1UlkwufqZGFe0s2qG0YUQAtZ3U5XtzmJadMysssP4sBsyMljq8s3m9lliJTXbLVocEhL1e2EAKyS9+1dvDebQObHwtQghsPaKuVyAiVmUWlAmX8yEIM30Nagb8GAYJUiR1f0+NyyaGHAZWngfkHX/3SD1A+5T6tc=; 24:1tuunz6GTIpcqNwa7vxNaydrAx/G4fs9criqG5JHLxwFw071HWjf4EiLuRMY0o/enYh+5CIyLp6FA47y4Z5RNffn8FXxZzJk6qg6Tn4bNBQ=; 7:xE13IfO+iar4zqa+mp2E+cpx77zVyJRZwSimbMSwhfWHeKwFlrLb2dP1ZvIqTdUB0K5tMg1DYgbuNS6hjuepqySPBUd3imv3MXed08In5u2MdVoVDHNpekaC1UMV6rt+TQxRRzDRlmtkll/gKx4HtE3c4GRy8avbxc/nJaCcUOTERFwSU7t0y8qeWyDngjV/MI/1sfb1w/uzu3vQFlMDpVdzVja8x05gA5xssY70bfaL8i3sdrzX5VFglqAzE8yF SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HK2PR0601MB1876; 20:Z9/JnQfYgrPEoA1SQ7/974pul+7JppJErv7fcYELX9AjXd5B/3FGzjyWyMHeAErRXPQMzsncMm77RtT2Zj0LACzbPeLnSSPsBGX/yt4Wcpw9j5j6FVNeU8o9T+YTc3+/jzxS6aMbC2d9JvhihT2eUv3STEbWRFMb4H2d9gSZrKM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2018 00:52:27.3213 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4de550f9-0a1a-45cd-53bd-08d55956c0a1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR0601MB1876 Cc: Linux-ALSA , Simon Subject: [alsa-devel] [PATCH 28/38] ASoC: qcom: lpass-platform: replace platform to component 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 From: Kuninori Morimoto Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto --- sound/soc/qcom/lpass-platform.c | 42 ++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c index caf71aa..31fe78a 100644 --- a/sound/soc/qcom/lpass-platform.c +++ b/sound/soc/qcom/lpass-platform.c @@ -24,6 +24,8 @@ #include "lpass-lpaif-reg.h" #include "lpass.h" +#define DRV_NAME "lpass-platform" + struct lpass_pcm_data { int dma_ch; int i2s_port; @@ -61,8 +63,8 @@ static int lpass_platform_pcmops_open(struct snd_pcm_substream *substream) struct snd_pcm_runtime *runtime = substream->runtime; struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; struct snd_soc_dai *cpu_dai = soc_runtime->cpu_dai; - struct lpass_data *drvdata = - snd_soc_platform_get_drvdata(soc_runtime->platform); + struct snd_soc_component *component = snd_soc_rtdcom_lookup(soc_runtime, DRV_NAME); + struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct lpass_variant *v = drvdata->variant; int ret, dma_ch, dir = substream->stream; struct lpass_pcm_data *data; @@ -115,8 +117,8 @@ static int lpass_platform_pcmops_close(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; - struct lpass_data *drvdata = - snd_soc_platform_get_drvdata(soc_runtime->platform); + struct snd_soc_component *component = snd_soc_rtdcom_lookup(soc_runtime, DRV_NAME); + struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct lpass_variant *v = drvdata->variant; struct lpass_pcm_data *data; @@ -132,8 +134,8 @@ static int lpass_platform_pcmops_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; - struct lpass_data *drvdata = - snd_soc_platform_get_drvdata(soc_runtime->platform); + struct snd_soc_component *component = snd_soc_rtdcom_lookup(soc_runtime, DRV_NAME); + struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; struct lpass_variant *v = drvdata->variant; @@ -225,8 +227,8 @@ static int lpass_platform_pcmops_hw_params(struct snd_pcm_substream *substream, static int lpass_platform_pcmops_hw_free(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; - struct lpass_data *drvdata = - snd_soc_platform_get_drvdata(soc_runtime->platform); + struct snd_soc_component *component = snd_soc_rtdcom_lookup(soc_runtime, DRV_NAME); + struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; struct lpass_variant *v = drvdata->variant; @@ -246,8 +248,8 @@ static int lpass_platform_pcmops_prepare(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; - struct lpass_data *drvdata = - snd_soc_platform_get_drvdata(soc_runtime->platform); + struct snd_soc_component *component = snd_soc_rtdcom_lookup(soc_runtime, DRV_NAME); + struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; struct lpass_variant *v = drvdata->variant; @@ -298,8 +300,8 @@ static int lpass_platform_pcmops_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; - struct lpass_data *drvdata = - snd_soc_platform_get_drvdata(soc_runtime->platform); + struct snd_soc_component *component = snd_soc_rtdcom_lookup(soc_runtime, DRV_NAME); + struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; struct lpass_variant *v = drvdata->variant; @@ -372,8 +374,8 @@ static snd_pcm_uframes_t lpass_platform_pcmops_pointer( struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; - struct lpass_data *drvdata = - snd_soc_platform_get_drvdata(soc_runtime->platform); + struct snd_soc_component *component = snd_soc_rtdcom_lookup(soc_runtime, DRV_NAME); + struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; struct lpass_variant *v = drvdata->variant; @@ -509,13 +511,14 @@ static int lpass_platform_pcm_new(struct snd_soc_pcm_runtime *soc_runtime) { struct snd_pcm *pcm = soc_runtime->pcm; struct snd_pcm_substream *psubstream, *csubstream; + struct snd_soc_component *component = snd_soc_rtdcom_lookup(soc_runtime, DRV_NAME); int ret = -EINVAL; size_t size = lpass_platform_pcm_hardware.buffer_bytes_max; psubstream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; if (psubstream) { ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, - soc_runtime->platform->dev, + component->dev, size, &psubstream->dma_buffer); if (ret) { dev_err(soc_runtime->dev, "Cannot allocate buffer(s)\n"); @@ -526,7 +529,7 @@ static int lpass_platform_pcm_new(struct snd_soc_pcm_runtime *soc_runtime) csubstream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; if (csubstream) { ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, - soc_runtime->platform->dev, + component->dev, size, &csubstream->dma_buffer); if (ret) { dev_err(soc_runtime->dev, "Cannot allocate buffer(s)\n"); @@ -555,7 +558,8 @@ static void lpass_platform_pcm_free(struct snd_pcm *pcm) } } -static const struct snd_soc_platform_driver lpass_platform_driver = { +static const struct snd_soc_component_driver lpass_component_driver = { + .name = DRV_NAME, .pcm_new = lpass_platform_pcm_new, .pcm_free = lpass_platform_pcm_free, .ops = &lpass_platform_pcm_ops, @@ -591,8 +595,8 @@ int asoc_qcom_lpass_platform_register(struct platform_device *pdev) } - return devm_snd_soc_register_platform(&pdev->dev, - &lpass_platform_driver); + return devm_snd_soc_register_component(&pdev->dev, + &lpass_component_driver, NULL, 0); } EXPORT_SYMBOL_GPL(asoc_qcom_lpass_platform_register);