Message ID | 20230912063329.2260360-1-chancel.liu@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp365109vqx; Tue, 12 Sep 2023 05:20:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEpZv+khSczltiJ3ysvHskwsJoMN39az4Jp7i5Yev1dMgviGKneAgnVCeIg7aLE7CxgDaGU X-Received: by 2002:a17:902:f7cb:b0:1c0:d5b1:2de8 with SMTP id h11-20020a170902f7cb00b001c0d5b12de8mr9894002plw.9.1694521215376; Tue, 12 Sep 2023 05:20:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1694521215; cv=pass; d=google.com; s=arc-20160816; b=J2GZpUzZ8t61zBJJiE7YsrDQ6j+teoJhAmiEOP1HrUZ6r4ZGsALYwd+ARhMCUZNo59 7k3kI1o5bzIA3Gh6zapaNcVRN/njDioNv6YDjhvhsFgk0cSnAegJx5s3/ZVFVwzXE6TR AIVGMUM4XW2nNjZlVEObtGgsfq2FViZagUMFhUr7rMs2h0n7sWc0860l1EDMZVF5BiGe oc9k8OPNgx7VMtdMRQZxpnJVsgAHlNIhl7+B3uKIItN+j94l5yX4e0ZlV2WGsrT1AzT7 wrjm5bNwgsU8x3795nDOoYUZKrXwVuyCf3uhX3WKEfxmY4JZmAa/NOyJgLaUNKHkEr2f xHBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=uTyqv2t1gJzlEaB+U7fgU0wD3aVZC7wms7saV5VFGb4=; fh=sS/a21TkJAjgmPdTZuEGW43FoVHEH5LbXZ/ZSskeN74=; b=RpGwNxQyfZRT7xytnAH9vrDS0wYmevOgHM52ONNqUFxluRfMjGIGe2newQipVPU/Bm 677+8UrzyltlBJGxVw5kAKZl0PWj0vymSGIRF56x/maf5LdJG+X5IgqZH+CA62L+TkLM +dt5rORj6YmGGm8875L4TBfLiL6lrTwY+Tm17gA+0PsBOP33Tgc4d6sWhAeJ+fL0vkDs aGqFqWG0iIGVEUcRvqnaNb9U5OWJ/PzaZu6nExTOhnH2tfDJH0o76aUdNPZTmUI9fuGk zX+KVnaOjpxbqB2rDcpHm/63ojP+G5LQWcX9eVhCbtKGwdsoOdHbs7GkXr1ps71eQgdm PH0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=dqfyrh8J; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id n3-20020a170903110300b001b9c3498526si8348846plh.433.2023.09.12.05.20.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 05:20:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=dqfyrh8J; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id F02278022C94; Mon, 11 Sep 2023 23:34:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230070AbjILGeR (ORCPT <rfc822;ruipengqi7@gmail.com> + 39 others); Tue, 12 Sep 2023 02:34:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230018AbjILGeP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 12 Sep 2023 02:34:15 -0400 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2057.outbound.protection.outlook.com [40.107.105.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C939E75 for <linux-kernel@vger.kernel.org>; Mon, 11 Sep 2023 23:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CYbsfeSX2J6FE8m/0527pJ9gaBqy+tUHRr8L/51rq3ckYORdobZRcWtnEZ4QpEEc7C+xyqOxqx+fto1Tr1sTziTiAgS746BpGZ+8RkROqLtowKcrHgzmgbr7f0ZfQyNbCpJhZ2nyA/b/DyW6+qUNq95GY2ZOv8PtSFxNtMYOIcfrymTeC0taS6KHborqaqEzk+t8bhAE8P9bwUH6pF0P275riAisS3Mvmj5WmY0rQbW4Vzo0zTygM0+HaMUsIl3RR8ZG/f98JjvJHyDFmDsjpWjl2eZjQaGSro19bwvxNgd30uXmPjmbvDWQjDZtgCg2ZI16ckjFERTgqq9ZedJP8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uTyqv2t1gJzlEaB+U7fgU0wD3aVZC7wms7saV5VFGb4=; b=jMcNwQWTyA/5cHbewGY4unD9/CD/SIq/R9pzpAU5m3jcOm0o4VeuRRCna15Kf6IvoU24VgoUJ//5d5xfL/4FM+mv7OUX4C1yDiKqz3MrjtUzVX5HZQyAEA4++yVPTfuNc/Jbai7IsTL/zlMBXpqVoMKGxXVmr+EFJ8lIi6MqfTRrV8p2utLe44pQjkX2p9Dptu8Ta6RxCkfDTW1GfpcczFSYt47jHVJsUHMjWgVvQZx5cv0wko/Bk87bUPrvaVyjHjV4p3Mbz4ssn6XY9jmmkUQq+ZjzyeIqnYvPbS7ibVQKXiJtiAr3HEPfdsZpdxYR5lqijNsk78TnjT0f/2cApA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uTyqv2t1gJzlEaB+U7fgU0wD3aVZC7wms7saV5VFGb4=; b=dqfyrh8Jn6VBBqiJFM/SicNG5lPbquqrcJHVuqu6GXwzF+mNQq6WBxOww7A/tBTpcbLXeBC3H3FpEFhWAOdRA81I2fx9fPaqZz+gYF+JiqsT03ZplK4dd644JBWNMt5H7h3jgBMZcVPtLeMNUWus9gx//bP8D6IVNFHeIfMW6+k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) by AM9PR04MB8778.eurprd04.prod.outlook.com (2603:10a6:20b:409::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.35; Tue, 12 Sep 2023 06:34:09 +0000 Received: from DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::cda8:5cad:29b6:3c96]) by DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::cda8:5cad:29b6:3c96%7]) with mapi id 15.20.6745.034; Tue, 12 Sep 2023 06:34:08 +0000 From: Chancel Liu <chancel.liu@nxp.com> To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: Chancel Liu <chancel.liu@nxp.com> Subject: [PATCH] ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link Date: Tue, 12 Sep 2023 14:33:29 +0800 Message-Id: <20230912063329.2260360-1-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0046.apcprd01.prod.exchangelabs.com (2603:1096:4:193::18) To DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9498:EE_|AM9PR04MB8778:EE_ X-MS-Office365-Filtering-Correlation-Id: c8c40ab1-9ed3-47d5-3669-08dbb35a44db X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A5EfoBMKi8tRqU5ZYuJ+AdRP0NIAp1pJ2jOFaIFVONl1swJ/qx1WQKV9fXdQjpr54IubtrpyjuLpEtGXCv8d4bxdw8hinl6sgqpv0dob5dgr3yqQivWkrg1dx44++Xf4vJn8vxwa8KJewsI+OPe0/zhow7kb0hBv6nPixIPOhOWjrke+NftrniPLMpMOwDflzWvFiNPCuG3qnAjFoOPEwAx6+/PP2+l8Zzb1VpD+Rnjfnh0GOiDfTgfJfosyMBQVGa79WbDa4daoJQ0rzLjnstLya9cgCQozIXkiRuRXDI0DIi6KM0tEeCNdG+GFgkMzKV1Rb90sgUL6LIix6iGLVBaWcDhgRi3Wxzllcb++uMz82YC9Wq5uZ+5jMuFr2cp6XV+VKPcSND3L3R1I9+OrgU43hnLQkAOv++ek8dvhc06Cb8++0Mqo7pQY+zKuoZ2b4/ulm6Q0XdoRu3z2Ba/XrKNbu2ADqTXUBtGS3mQHzcpwiIf0p6s0/YnM+DfBqawWa0i74iXRXqepmAPB6xlaRPZvvrgz2dmr5Dpfkz2TbVqtgxTmyWWu8jCtqGLopl9xETJvPyu89TiuZmfZj/TFBzdFSOH4Z53eXFmnVLtIdr0OD+au+s6BFdK6MrwiNrvUAPgCdYkdBJD2QufMCwG+jQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9498.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(396003)(376002)(39860400002)(346002)(366004)(186009)(1800799009)(451199024)(6506007)(6486002)(6512007)(52116002)(6666004)(83380400001)(921005)(38100700002)(86362001)(38350700002)(36756003)(2616005)(1076003)(26005)(66476007)(2906002)(66556008)(7416002)(66946007)(316002)(41300700001)(44832011)(5660300002)(8936002)(4326008)(8676002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0DbXtKfZk6VGdbsNt+wmPYmXMJ736ZjPVChC6F3a7aZjN5IkxOvubg+GgDZTwwF7jm0ZMWqsgtAtHfWciNACiMxrBp+rPvahEK56uRXQagLx9KVyM1KvXVCNImjBcfBLyVabQirEjPn17I08ZpN7X1s9JhkYZw33Jng0egZtv/y2oCQtbYbugv17YuWPp3BnTFLzCsI3+prvIHmXOd0V5KgfGNxJaQHQ7vxXImvdoUprrjiiT3Zs6eWVn5iZBktdJe1guUvsZthsI9WX6s6LNB/aLdSLq/MYCTUSixBkU5tXKq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MJtrkNvnuxH2V1JA3IzbQRE6+xTcBOQ+nnr5nZjPevBOiNTfUm1MjCjMyzxZn+X76catizAP7F9AwCPk27JO34fzzDuJGGH/zvFhdUAss0bZJCTXzbN6rt4hew35gSV39eAywwq4MRsAET7VLmdGM/3rBz07RV7Kzd6o3juin8X+Yl8GVPNCqWJ/9fx4e/YdQhmWT3dQQ+j2 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8c40ab1-9ed3-47d5-3669-08dbb35a44db X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9498.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2023 06:34:08.9611 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5SbLCHeco4WhcC69m2ateXDue7Bp8CBJULY5d+Ef9dne6Y7DQqJo54HXRrbNjatvS+OIM4HUTUXADQhe5d8eug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8778 Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 11 Sep 2023 23:34:26 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776834277653168258 X-GMAIL-MSGID: 1776834277653168258 |
Series |
ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link
|
|
Commit Message
Chancel Liu
Sept. 12, 2023, 6:33 a.m. UTC
i.MX rpmsg sound cards work on codec slave mode. MCLK will be disabled
by CPU DAI driver in hw_free(). Some codec requires MCLK present at
power up/down sequence. So need to set ignore_pmdown_time to power down
codec immediately before MCLK is turned off.
Take WM8962 as an example, if MCLK is disabled before DAPM power down
playback stream, FIFO error will arise in WM8962 which will have bad
impact on playback next.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
sound/soc/fsl/imx-rpmsg.c | 7 +++++++
1 file changed, 7 insertions(+)
Comments
On Tue, Sep 12, 2023 at 2:34 PM Chancel Liu <chancel.liu@nxp.com> wrote: > > i.MX rpmsg sound cards work on codec slave mode. MCLK will be disabled > by CPU DAI driver in hw_free(). Some codec requires MCLK present at > power up/down sequence. So need to set ignore_pmdown_time to power down > codec immediately before MCLK is turned off. > > Take WM8962 as an example, if MCLK is disabled before DAPM power down > playback stream, FIFO error will arise in WM8962 which will have bad > impact on playback next. > > Signed-off-by: Chancel Liu <chancel.liu@nxp.com> > --- > sound/soc/fsl/imx-rpmsg.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c > index 3c7b95db2eac..d2ecd5e821b1 100644 > --- a/sound/soc/fsl/imx-rpmsg.c > +++ b/sound/soc/fsl/imx-rpmsg.c > @@ -89,6 +89,13 @@ static int imx_rpmsg_probe(struct platform_device *pdev) > SND_SOC_DAIFMT_NB_NF | > SND_SOC_DAIFMT_CBC_CFC; > > + /* i.MX rpmsg sound cards work on codec slave mode. MCLK will be Comments for multi line start from empty line with "/* " Best regards wang Shengjiu > + * disabled by CPU DAI driver in hw_free(). Some codec requires MCLK > + * present at power up/down sequence. So need to set ignore_pmdown_time > + * to power down codec immediately before MCLK is turned off. > + */ > + data->dai.ignore_pmdown_time = 1; > + > /* Optional codec node */ > ret = of_parse_phandle_with_fixed_args(np, "audio-codec", 0, 0, &args); > if (ret) { > -- > 2.25.1 >
diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c index 3c7b95db2eac..d2ecd5e821b1 100644 --- a/sound/soc/fsl/imx-rpmsg.c +++ b/sound/soc/fsl/imx-rpmsg.c @@ -89,6 +89,13 @@ static int imx_rpmsg_probe(struct platform_device *pdev) SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC; + /* i.MX rpmsg sound cards work on codec slave mode. MCLK will be + * disabled by CPU DAI driver in hw_free(). Some codec requires MCLK + * present at power up/down sequence. So need to set ignore_pmdown_time + * to power down codec immediately before MCLK is turned off. + */ + data->dai.ignore_pmdown_time = 1; + /* Optional codec node */ ret = of_parse_phandle_with_fixed_args(np, "audio-codec", 0, 0, &args); if (ret) {