Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86432C433DF for ; Wed, 24 Jun 2020 08:09:05 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 12E9520874 for ; Wed, 24 Jun 2020 08:09:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="tN/C2UzW"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="wrftZ2hx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12E9520874 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A2FE8171D; Wed, 24 Jun 2020 10:08:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A2FE8171D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1592986143; bh=he7XbJ0X5cGTthJvccL0ViHP8fdA0j+js4V9qHAOwmA=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tN/C2UzW55+rPqdKEtYuofqelsGMO4nqCBUOyJe7/a5x9Y5cmeiNlGVhmW37hJs+S HCGzZilcdmwv/1Na9W9ZKLi2cVQX7zIwjCndnJ0ahdElna0RlS5NBN1McTo20JqoEb nacgMzd6bLHEYFvBokuK5WeiDZHvVr4+dob/jJyo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 98BD5F80444; Wed, 24 Jun 2020 09:50:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 18557F80234; Tue, 23 Jun 2020 17:31:25 +0200 (CEST) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1CFBAF800B2 for ; Tue, 23 Jun 2020 17:31:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1CFBAF800B2 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="wrftZ2hx" Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05NFVAE3129071; Tue, 23 Jun 2020 10:31:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1592926270; bh=uLEHz/OHzk1ME3oUbqR4BuAwuEDDTmmWf+QZUv9aRpw=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=wrftZ2hxdZdy5Ycu7wJqynv5z5avLZ9o20iZ6o999yHnujIMMzvfjPynu0442vxqr oTyymjup9pXjP5TRreezd1Ah5L/j06W0uwx+a2OtcpZzZCjq3eH2O4kgxG+anIzbMB 3K45PTDsG5LdSh9MDLsdjuXRh3Io62aQjff3yvrY= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 05NFV4sh037200 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 23 Jun 2020 10:31:04 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 23 Jun 2020 10:31:03 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 23 Jun 2020 10:31:03 -0500 Received: from [10.250.52.63] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05NFV1rK067938; Tue, 23 Jun 2020 10:31:02 -0500 Subject: Re: [PATCH 18/19] ASoC: soc-dai: remove .digital_mute To: Kuninori Morimoto , Mark Brown References: <87ftam37ko.wl-kuninori.morimoto.gx@renesas.com> <87pn9q1ss8.wl-kuninori.morimoto.gx@renesas.com> From: Dan Murphy Message-ID: <4e8f7b7b-9d60-4e60-60db-91477cb1b1d8@ti.com> Date: Tue, 23 Jun 2020 10:31:01 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87pn9q1ss8.wl-kuninori.morimoto.gx@renesas.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Approved-At: Wed, 24 Jun 2020 09:49:30 +0200 Cc: Shengjiu Wang , Linux-ALSA , Michael Walle , =?UTF-8?Q?Heiko_St=c3=bcbner?= , Neil Armstrong , David Airlie , =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Jonghwan Choi , Alexandre Belloni , Paul Cercueil , Andrzej Hajda , Frank Shi , Laurent Pinchart , Benjamin Gaignard , "Andrew F. Davis" , Fabio Estevam , Jerome Brunet , Nikita Yushchenko , Pierre-Louis Bossart , Lars-Peter Clausen , Joonyoung Shim , Matthias Reichl , Katsuhiro Suzuki , Kevin Hilman , Kai Vehmanen , Takashi Iwai , YueHaibing , Russell King , Krzysztof Kozlowski , Daniel Drake , Tzung-Bi Shih , Ludovic Desroches , Kukjin Kim , Ranjani Sridharan , Dinghao Liu , Codrin Ciubotariu , Cheng-Yi Chiang , Chun-Kuang Hu , Bartosz Golaszewski , Charles Keepax , Philipp Zabel , Jonas Karlman , Liam Girdwood , Nicolas Ferre , Chuhong Yuan , Robin Murphy , James Schulman , Inki Dae , Masahiro Yamada , Christophe JAILLET , Matthias Brugger , =?UTF-8?Q?Nuno_S=c3=a1?= , Vincent Abriou , Peter Ujfalusi , Jernej Skrabec , Support Opensource , Marek Szyprowski , Jason Yan , Stephen Boyd , Pankaj Bharadiya , David Rhodes , Seung-Woo Kim , Sandy Huang , Pavel Dobias , Philipp Puschmann , Kyungmin Park , Daniel Vetter , Colin Ian King , Kevin Cernekee , Shawn Guo , Peter Rosin , Lucas Stach X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" Kuninori On 6/22/20 8:21 PM, Kuninori Morimoto wrote: > From: Kuninori Morimoto > > All drivers are now using .mute_stream. > Let's remove .digital_mute. > > Signed-off-by: Kuninori Morimoto > --- > include/sound/soc-dai.h | 1 - > sound/soc/soc-dai.c | 4 ---- > 2 files changed, 5 deletions(-) > > diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h > index 212257e84fac..a3db208cd062 100644 > --- a/include/sound/soc-dai.h > +++ b/include/sound/soc-dai.h > @@ -246,7 +246,6 @@ struct snd_soc_dai_ops { > * DAI digital mute - optional. > * Called by soc-core to minimise any pops. > */ > - int (*digital_mute)(struct snd_soc_dai *dai, int mute); > int (*mute_stream)(struct snd_soc_dai *dai, int mute, int stream); > > /* > diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c > index b05e18b63a1c..b0fc3d8b1798 100644 > --- a/sound/soc/soc-dai.c > +++ b/sound/soc/soc-dai.c > @@ -301,10 +301,6 @@ int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute, > if (dai->driver->ops && > dai->driver->ops->mute_stream) > ret = dai->driver->ops->mute_stream(dai, mute, direction); > - else if (direction == SNDRV_PCM_STREAM_PLAYBACK && > - dai->driver->ops && > - dai->driver->ops->digital_mute) > - ret = dai->driver->ops->digital_mute(dai, mute); Instead of putting the direction check in every codec driver can't the check just part of the function? And then maybe a flag in dai_ops to override that call to mute? if (direction != SNDRV_PCM_STREAM_PLAYBACK)         return 0; I did not look at every codec driver as there are too many. Dan