Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4875590iob; Mon, 9 May 2022 03:49:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxBIItP0zcHjMO62KDwbif4g7wqcBG6FoPRWVSXNyksxS1JwM8fa574VQJQwE7YFtyeard X-Received: by 2002:a17:90a:2f84:b0:1dd:940:50e7 with SMTP id t4-20020a17090a2f8400b001dd094050e7mr7757096pjd.210.1652093352964; Mon, 09 May 2022 03:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652093352; cv=none; d=google.com; s=arc-20160816; b=JV1KIbISavB+yi4sQS/LWreV9N6yJ4mxu0+NjPImTg7WUERmIfd5+5alX6QhyR37y8 HP8ODc11q7R3PER9zJXQhu1c/gbcHk0k7KEqdNdKrdEpxTJFFiJ9WgShNzRdKPDb2ouM N4T9A81RlcKvdJjpMyyeDBM+Vqe554GP0nX0FVElrWI18y1sg9IryUgFzIqJ/kUNhVHx aHh/Fbx5PnOtvKlJ83ONttNNnl1KKpHtJO9wGZqnuggw9TZ9Kg0LTCNLI6wuAYoqgZOF gtRj/fFzQyNZas3UjKdTQc4xSWkoj3yIeVenzAaRpvD5UIbttwPcNLZbNJUJfHOkVRtA wvBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=+5xmC0JIA2LADsrBwVNzLgGcQIj78WDq7koWR4ZY4kA=; b=Svkf1ny1xjigGjjYwxUTbrcMdxsnyoZz8+hG3aXgaaTtJlYvoo4R9YRzGGlkLX5xVD +pACsqrtn+cm7LtacdepRDo9QV29J+nnkEMxrUHuVn98AeACC9PVnVPR/H7xJj9yY92l 7L6go0HkIcZtIyDdq3HyKi+BM47yevTVxqdBi1pl91usbERAd7B2iQcC3CCJnFUru1nx JFIxn5eYFY81lyf0m33N2w8I/WDxOKbCHd6lzX6K0c6cREtqwqAsONG8QEUvJHfcL5vB YHOdHvvm+T+3exHxnHQnNo4057VKd77LtmDOI62+vhLq2sHfF+ByUixQEiYAzPO1DNPX P6nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s13-20020a056a0008cd00b0050d5cf88e9esi6173932pfu.367.2022.05.09.03.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:49:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7E5D4274A07; Mon, 9 May 2022 03:09:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237190AbiEIJdR (ORCPT + 99 others); Mon, 9 May 2022 05:33:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237084AbiEIJaX (ORCPT ); Mon, 9 May 2022 05:30:23 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60C6A1C345D; Mon, 9 May 2022 02:26:28 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 3248F200E75; Mon, 9 May 2022 11:26:27 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id F09C3200E74; Mon, 9 May 2022 11:26:26 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 510B9180031C; Mon, 9 May 2022 17:26:25 +0800 (+08) From: Shengjiu Wang To: nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, shengjiu.wang@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, robh+dt@kernel.org, krzk+dt@kernel.org, devicetree@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ASoC: fsl_micfil: Add support for i.MX8MPlus Date: Mon, 9 May 2022 17:14:22 +0800 Message-Id: <1652087663-1908-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On i.MX8Plus there are two updates for micfil module. One is that the output format is S32_LE, only the 24 more significative bits have information, the other bits are always zero. Add 'formats' variable in soc data to distinguish the format on different platform. Another is that the fifo depth is 32 entries. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_micfil.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index e4d1da55293e..25c647ae080a 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -55,6 +55,7 @@ struct fsl_micfil_soc_data { unsigned int fifo_depth; unsigned int dataline; bool imx; + u64 formats; }; static struct fsl_micfil_soc_data fsl_micfil_imx8mm = { @@ -62,10 +63,20 @@ static struct fsl_micfil_soc_data fsl_micfil_imx8mm = { .fifos = 8, .fifo_depth = 8, .dataline = 0xf, + .formats = SNDRV_PCM_FMTBIT_S16_LE, +}; + +static struct fsl_micfil_soc_data fsl_micfil_imx8mp = { + .imx = true, + .fifos = 8, + .fifo_depth = 32, + .dataline = 0xf, + .formats = SNDRV_PCM_FMTBIT_S32_LE, }; static const struct of_device_id fsl_micfil_dt_ids[] = { { .compatible = "fsl,imx8mm-micfil", .data = &fsl_micfil_imx8mm }, + { .compatible = "fsl,imx8mp-micfil", .data = &fsl_micfil_imx8mp }, {} }; MODULE_DEVICE_TABLE(of, fsl_micfil_dt_ids); @@ -659,6 +670,8 @@ static int fsl_micfil_probe(struct platform_device *pdev) return ret; } + fsl_micfil_dai.capture.formats = micfil->soc->formats; + ret = devm_snd_soc_register_component(&pdev->dev, &fsl_micfil_component, &fsl_micfil_dai, 1); if (ret) { -- 2.17.1