Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1044712pxp; Wed, 9 Mar 2022 19:34:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxLcWZ2Zpry5VJLHnocu3PjPwd48rLDNFnXbbQeD8bLHsL0HHwtnYVbdqRb62W3eoNcUYy X-Received: by 2002:a17:902:cf05:b0:14d:5249:3b1f with SMTP id i5-20020a170902cf0500b0014d52493b1fmr2834103plg.135.1646883248490; Wed, 09 Mar 2022 19:34:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646883248; cv=none; d=google.com; s=arc-20160816; b=g9OERNEiszEAWFhBwtnsx/jTakU25vWKg82q1BxgYU5hg5DIhAI39AcKkL2rNs6FlU 3+Mjl7u+RxHluT9TSF0ZuTwOWDrfBqQX2jj4PWeYa1pYMo9h0ogty4paKZTA8Jla6BnT aBPgq9qZ+bbVvg1Wrl7cIPcb+HkZ6+m49aTxgdpD77D37P5i1W6sGLPIVOt7zGXrG4pu ln4qnyaopbOaZrdcx8stNAEpqy7kN0QmyTbKerA2IVI8xfmj4L5rPl4oaD3uBaa84tyt jwDqI4pVHT0TwKpeVkAM6rHT2wgYf//l94VCyhncsJ+z9FEUI/q4SMajyK/9fW1sskbI HnMA== 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=A+0bAfKsJ3uRoX6w3lwSUozKpxygvZ40yieLW1w9cKc=; b=KvtqB+7yXgLmcQ2eiAaQfgh9pXriwduSRy/xl/Fn2bje2QalXdkPBQredAo8YiOEPY 3TP0qLVvubfS2oMmpvI/jW2gKWy/ziWvd6kP556G5ev2uJ8Qo0DchLX3lFg/c/nVMBsy 55ipTt7z+TFurERlA6HnApyc/TjgShy5Tjx1YT8LZfK32SQMFMBTe+msbsT1sNXrs3IS cYW2tDfCmeXqF/c8ZRVegjMASyIvYkBTE4a0GGUTs7t7CF2xSOnCM28xlUuLO79ey7er LyXN/bbF6lxz2oStUD83kXR6pd3cVjbNVUzRmaveAOJ2sIpYiEhIMuVMQ8K9axccImYT ufeA== 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:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l70-20020a638849000000b0037c6958aa7dsi3440850pgd.485.2022.03.09.19.33.50; Wed, 09 Mar 2022 19:34:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233026AbiCJCsB (ORCPT + 99 others); Wed, 9 Mar 2022 21:48:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231130AbiCJCsA (ORCPT ); Wed, 9 Mar 2022 21:48:00 -0500 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B098E122218 for ; Wed, 9 Mar 2022 18:47:00 -0800 (PST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 5538B200466; Thu, 10 Mar 2022 03:46:59 +0100 (CET) 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 1D0DE200DBA; Thu, 10 Mar 2022 03:46:59 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 8E67C183AD67; Thu, 10 Mar 2022 10:46:57 +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 Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: fsl_spdif: Disable TX clock when stop Date: Thu, 10 Mar 2022 10:37:43 +0800 Message-Id: <1646879863-27711-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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 The TX clock source may be changed in next case, need to disable it when stop, otherwise the TX may not work after changing the clock source, error log is: aplay: pcm_write:2058: write error: Input/output error Fixes: a2388a498ad2 ("ASoC: fsl: Add S/PDIF CPU DAI driver") Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_spdif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index 57c41b2f7d17..5f15dae16dd3 100644 --- a/sound/soc/fsl/fsl_spdif.c +++ b/sound/soc/fsl/fsl_spdif.c @@ -610,6 +610,8 @@ static void fsl_spdif_shutdown(struct snd_pcm_substream *substream, mask = SCR_TXFIFO_AUTOSYNC_MASK | SCR_TXFIFO_CTRL_MASK | SCR_TXSEL_MASK | SCR_USRC_SEL_MASK | SCR_TXFIFO_FSEL_MASK; + /* Disable TX clock */ + regmap_update_bits(regmap, REG_SPDIF_STC, STC_TXCLK_ALL_EN_MASK, 0); } else { scr = SCR_RXFIFO_OFF | SCR_RXFIFO_CTL_ZERO; mask = SCR_RXFIFO_FSEL_MASK | SCR_RXFIFO_AUTOSYNC_MASK| -- 2.17.1