From patchwork Thu Apr 7 08:49:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 12804783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC48EC433EF for ; Thu, 7 Apr 2022 08:50:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243429AbiDGIwB (ORCPT ); Thu, 7 Apr 2022 04:52:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243428AbiDGIvx (ORCPT ); Thu, 7 Apr 2022 04:51:53 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 787A31AC709 for ; Thu, 7 Apr 2022 01:49:53 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncNpp-0003cq-Sr; Thu, 07 Apr 2022 10:49:45 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1ncNpp-001Zqd-J3; Thu, 07 Apr 2022 10:49:44 +0200 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1ncNpm-000w46-Ie; Thu, 07 Apr 2022 10:49:42 +0200 From: Sascha Hauer To: alsa-devel@alsa-project.org Cc: Xiubo Li , Fabio Estevam , Shengjiu Wang , kernel@pengutronix.de, Vinod Koul , NXP Linux Team , dmaengine@vger.kernel.org, Sascha Hauer Subject: [PATCH v4 03/21] ASoC: fsl_micfil: drop fsl_micfil_set_mclk_rate() Date: Thu, 7 Apr 2022 10:49:18 +0200 Message-Id: <20220407084936.223075-4-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220407084936.223075-1-s.hauer@pengutronix.de> References: <20220407084936.223075-1-s.hauer@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: dmaengine@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org All that the .set_sysclk hook in the micfil driver does is to pass the sysclk frequency to fsl_micfil_set_mclk_rate(). This function expects the sample rate as argument though, not any kind of sysclk frequency. The resulting rate setting of the clock is overwritten in hw_params anyway, so drop this altogether. Signed-off-by: Sascha Hauer Acked-by: Shengjiu Wang --- sound/soc/fsl/fsl_micfil.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index cf10c212d770d..5353474d0ff2b 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -358,30 +358,10 @@ static int fsl_micfil_hw_params(struct snd_pcm_substream *substream, return 0; } -static int fsl_micfil_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, - unsigned int freq, int dir) -{ - struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai); - struct device *dev = &micfil->pdev->dev; - - int ret; - - if (!freq) - return 0; - - ret = fsl_micfil_set_mclk_rate(micfil, freq); - if (ret < 0) - dev_err(dev, "failed to set mclk[%lu] to rate %u\n", - clk_get_rate(micfil->mclk), freq); - - return ret; -} - static const struct snd_soc_dai_ops fsl_micfil_dai_ops = { .startup = fsl_micfil_startup, .trigger = fsl_micfil_trigger, .hw_params = fsl_micfil_hw_params, - .set_sysclk = fsl_micfil_set_dai_sysclk, }; static int fsl_micfil_dai_probe(struct snd_soc_dai *cpu_dai)