From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 1B079C433E0 for ; Wed, 24 Jun 2020 08:09:41 +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 9DBF120B80 for ; Wed, 24 Jun 2020 08:09:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="RH6dNz3t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DBF120B80 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.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 3C52A16B4; Wed, 24 Jun 2020 10:08:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3C52A16B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1592986179; bh=WHOSJ+/vNeWNxlGSNkIX8BD+GxCblyNh1CuaoElS//k=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RH6dNz3tog32NPG2K21agmkv5l767hhCGhuxh9QCOzZE6V4tuv72N48iZW+shwGV0 9Cy5GYK1SYqz+nOQR86wvEnvdLDwvqtrQ2ofxxROVknr5ulsBjKC0Lh9FhpDzW126d qDibk6SoHhNkacGkvvTqJBNwZNNO6p1jylYHDeto= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AEFA3F8044A; Wed, 24 Jun 2020 09:50:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E3507F80259; Tue, 23 Jun 2020 17:56:56 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 91BE4F8023E for ; Tue, 23 Jun 2020 17:56:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 91BE4F8023E IronPort-SDR: djoC1ZTNzM0ISvwykB0Lc6QUGJ2RDnVBXoWH+AxBkZnIlnutETZl3jY2PFnyU8ot5ycqvzjfOh cdx4TEPczSJg== X-IronPort-AV: E=McAfee;i="6000,8403,9661"; a="123791892" X-IronPort-AV: E=Sophos;i="5.75,271,1589266800"; d="scan'208";a="123791892" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2020 08:56:49 -0700 IronPort-SDR: bgB3ilcNPNXQyT5Ki0OLm5qgSkjC9l6GWTEQnuFagfsDao8YcahNQDkRFu8X9FneJOWqgMa/DV z+GjrfbJ7Emg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,271,1589266800"; d="scan'208";a="263367240" Received: from meis-mobl1.amr.corp.intel.com (HELO [10.255.230.137]) ([10.255.230.137]) by fmsmga007.fm.intel.com with ESMTP; 23 Jun 2020 08:56:40 -0700 Subject: Re: [PATCH 01/19] ASoC: hdmi-codec: merge .digital_mute() into .mute_stream() To: Kuninori Morimoto , Mark Brown References: <87ftam37ko.wl-kuninori.morimoto.gx@renesas.com> <87eeq637ff.wl-kuninori.morimoto.gx@renesas.com> From: Pierre-Louis Bossart Message-ID: <3e596232-a22f-cd67-702e-59fb79c8aaec@linux.intel.com> Date: Tue, 23 Jun 2020 10:18:08 -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: <87eeq637ff.wl-kuninori.morimoto.gx@renesas.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 , Kai Vehmanen , Lars-Peter Clausen , Joonyoung Shim , Matthias Reichl , Katsuhiro Suzuki , Kevin Hilman , Masahiro Yamada , 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 , Christophe JAILLET , Dan Murphy , 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 , Vishwas A Deshpande , Daniel Vetter , Colin Ian King , Kevin Cernekee , Lucas Stach , Shawn Guo , Peter Rosin , M R Swami Reddy 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" > -static int sii902x_audio_digital_mute(struct device *dev, > - void *data, bool enable) > +static int sii902x_audio_mute(struct device *dev, void *data, > + bool enable, int direction) > { > struct sii902x *sii902x = dev_get_drvdata(dev); > > + if (direction != SNDRV_PCM_STREAM_PLAYBACK) > + return 0; > + Thanks for this clean-up Morimoto-san. One question: in all the codec changes the return is now 0. But in the previous implementation based on digital_mute, when the wrong direction was used it would have been -ENOTSUPP. int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute, int direction) { int ret = -ENOTSUPP; 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); <<< none of the branches taken for capture + digital_mute supported, so return -ENOTSUPP. return soc_dai_ret(dai, ret); } Was this change intentional? We also want to check why this return value is only tested in soc-dapm.c, if this digital_mute can fail then we are missing tests left and right - maybe that's a follow-up change?