From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Mark Brown <broonie@kernel.org>
Cc: "Shengjiu Wang" <shengjiu.wang@nxp.com>,
Linux-ALSA <alsa-devel@alsa-project.org>,
"Michael Walle" <michael@walle.cc>,
"Heiko Stübner" <heiko@sntech.de>,
"Neil Armstrong" <narmstrong@baylibre.com>,
"David Airlie" <airlied@linux.ie>,
"Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
"Jonghwan Choi" <charlie.jh@kakaocorp.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Paul Cercueil" <paul@crapouillou.net>,
"Andrzej Hajda" <a.hajda@samsung.com>,
"Frank Shi" <shifu0704@thundersoft.com>,
"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
"Benjamin Gaignard" <benjamin.gaignard@linaro.org>,
"Andrew F. Davis" <afd@ti.com>,
"Fabio Estevam" <festevam@gmail.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Nikita Yushchenko" <nikita.yoush@cogentembedded.com>,
"Kai Vehmanen" <kai.vehmanen@linux.intel.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Joonyoung Shim" <jy0922.shim@samsung.com>,
"Matthias Reichl" <hias@horus.com>,
"Katsuhiro Suzuki" <katsuhiro@katsuster.net>,
"Kevin Hilman" <khilman@baylibre.com>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Takashi Iwai" <tiwai@suse.com>,
YueHaibing <yuehaibing@huawei.com>,
"Russell King" <linux@armlinux.org.uk>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Daniel Drake" <drake@endlessm.com>,
"Tzung-Bi Shih" <tzungbi@google.com>,
"Ludovic Desroches" <ludovic.desroches@microchip.com>,
"Kukjin Kim" <kgene@kernel.org>,
"Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>,
"Dinghao Liu" <dinghao.liu@zju.edu.cn>,
"Codrin Ciubotariu" <codrin.ciubotariu@microchip.com>,
"Cheng-Yi Chiang" <cychiang@chromium.org>,
"Chun-Kuang Hu" <chunkuang.hu@kernel.org>,
"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
"Charles Keepax" <ckeepax@opensource.cirrus.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Jonas Karlman" <jonas@kwiboo.se>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
"Chuhong Yuan" <hslester96@gmail.com>,
"Robin Murphy" <robin.murphy@arm.com>,
"James Schulman" <james.schulman@cirrus.com>,
"Inki Dae" <inki.dae@samsung.com>,
"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
"Dan Murphy" <dmurphy@ti.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Vincent Abriou" <vincent.abriou@st.com>,
"Peter Ujfalusi" <peter.ujfalusi@ti.com>,
"Jernej Skrabec" <jernej.skrabec@siol.net>,
"Support Opensource" <support.opensource@diasemi.com>,
"Marek Szyprowski" <m.szyprowski@samsung.com>,
"Jason Yan" <yanaijie@huawei.com>,
"Stephen Boyd" <sboyd@kernel.org>,
"Pankaj Bharadiya" <pankaj.laxminarayan.bharadiya@intel.com>,
"David Rhodes" <david.rhodes@cirrus.com>,
"Seung-Woo Kim" <sw0312.kim@samsung.com>,
"Sandy Huang" <hjc@rock-chips.com>, "Pavel Dobias" <dobias@2n.cz>,
"Philipp Puschmann" <p.puschmann@pironex.de>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Vishwas A Deshpande" <vishwas.a.deshpande@ti.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Colin Ian King" <colin.king@canonical.com>,
"Kevin Cernekee" <cernekee@chromium.org>,
"Lucas Stach" <l.stach@pengutronix.de>,
"Shawn Guo" <shawnguo@kernel.org>,
"Peter Rosin" <peda@axentia.se>,
"M R Swami Reddy" <mr.swami.reddy@ti.com>
Subject: Re: [PATCH 01/19] ASoC: hdmi-codec: merge .digital_mute() into .mute_stream()
Date: Tue, 23 Jun 2020 10:18:08 -0500 [thread overview]
Message-ID: <3e596232-a22f-cd67-702e-59fb79c8aaec@linux.intel.com> (raw)
In-Reply-To: <87eeq637ff.wl-kuninori.morimoto.gx@renesas.com>
> -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?
next prev parent reply other threads:[~2020-06-24 8:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 1:16 [PATCH 00/19] ASoC: merge .digital_mute() into .mute_stream() Kuninori Morimoto
2020-06-23 1:19 ` [PATCH 01/19] ASoC: hdmi-codec: " Kuninori Morimoto
2020-06-23 15:18 ` Pierre-Louis Bossart [this message]
2020-06-23 1:19 ` [PATCH 02/19] ASoC: ti: " Kuninori Morimoto
2020-06-23 1:19 ` [PATCH 03/19] ASoC: spear: " Kuninori Morimoto
2020-06-23 1:19 ` [PATCH 04/19] ASoC: meson: " Kuninori Morimoto
2020-06-23 1:19 ` [PATCH 05/19] ASoC: atmel: " Kuninori Morimoto
2020-06-23 11:29 ` Alexandre Belloni
2020-06-23 1:20 ` [PATCH 06/19] ASoC: codecs: " Kuninori Morimoto
2020-06-23 1:20 ` [PATCH 07/19] ASoC: codecs: tlv*: " Kuninori Morimoto
2020-06-23 1:20 ` [PATCH 08/19] ASoC: codecs: tas*: " Kuninori Morimoto
2020-06-23 1:20 ` [PATCH 09/19] ASoC: codecs: ssm*: " Kuninori Morimoto
2020-06-23 1:20 ` [PATCH 10/19] ASoC: codecs: pcm*: " Kuninori Morimoto
2020-06-23 1:20 ` [PATCH 11/19] ASoC: codecs: max*: " Kuninori Morimoto
2020-06-23 1:20 ` [PATCH 12/19] ASoC: codecs: alc*: " Kuninori Morimoto
2020-06-23 1:20 ` [PATCH 13/19] ASoC: codecs: wm*: " Kuninori Morimoto
2020-06-23 10:29 ` Charles Keepax
2020-06-23 1:20 ` [PATCH 14/19] ASoC: codecs: es*: " Kuninori Morimoto
2020-06-23 1:20 ` [PATCH 15/19] ASoC: codecs: da*: " Kuninori Morimoto
2020-06-23 15:16 ` Adam Thomson
2020-06-23 1:20 ` [PATCH 16/19] ASoC: codecs: cs*: " Kuninori Morimoto
2020-06-23 1:21 ` [PATCH 17/19] ASoC: codecs: ak*: " Kuninori Morimoto
2020-06-23 1:21 ` [PATCH 18/19] ASoC: soc-dai: remove .digital_mute Kuninori Morimoto
2020-06-23 15:31 ` Dan Murphy
2020-06-23 1:21 ` [PATCH 19/19] ASoC: soc-core: snd_soc_dai_digital_mute() for both CPU/Codec Kuninori Morimoto
2020-06-23 9:34 ` [PATCH 00/19] ASoC: merge .digital_mute() into .mute_stream() Peter Ujfalusi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e596232-a22f-cd67-702e-59fb79c8aaec@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=a.hajda@samsung.com \
--cc=afd@ti.com \
--cc=airlied@linux.ie \
--cc=alexandre.belloni@bootlin.com \
--cc=alsa-devel@alsa-project.org \
--cc=benjamin.gaignard@linaro.org \
--cc=bgolaszewski@baylibre.com \
--cc=broonie@kernel.org \
--cc=cernekee@chromium.org \
--cc=charlie.jh@kakaocorp.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=chunkuang.hu@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=codrin.ciubotariu@microchip.com \
--cc=colin.king@canonical.com \
--cc=cychiang@chromium.org \
--cc=daniel@ffwll.ch \
--cc=david.rhodes@cirrus.com \
--cc=dinghao.liu@zju.edu.cn \
--cc=dmurphy@ti.com \
--cc=dobias@2n.cz \
--cc=drake@endlessm.com \
--cc=festevam@gmail.com \
--cc=heiko@sntech.de \
--cc=hias@horus.com \
--cc=hjc@rock-chips.com \
--cc=hslester96@gmail.com \
--cc=inki.dae@samsung.com \
--cc=james.schulman@cirrus.com \
--cc=jbrunet@baylibre.com \
--cc=jernej.skrabec@siol.net \
--cc=jonas@kwiboo.se \
--cc=jy0922.shim@samsung.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=katsuhiro@katsuster.net \
--cc=kgene@kernel.org \
--cc=khilman@baylibre.com \
--cc=krzk@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=kyungmin.park@samsung.com \
--cc=l.stach@pengutronix.de \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux@armlinux.org.uk \
--cc=ludovic.desroches@microchip.com \
--cc=m.szyprowski@samsung.com \
--cc=masahiroy@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=michael@walle.cc \
--cc=mirq-linux@rere.qmqm.pl \
--cc=mr.swami.reddy@ti.com \
--cc=narmstrong@baylibre.com \
--cc=nicolas.ferre@microchip.com \
--cc=nikita.yoush@cogentembedded.com \
--cc=nuno.sa@analog.com \
--cc=p.puschmann@pironex.de \
--cc=p.zabel@pengutronix.de \
--cc=pankaj.laxminarayan.bharadiya@intel.com \
--cc=paul@crapouillou.net \
--cc=peda@axentia.se \
--cc=peter.ujfalusi@ti.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=robin.murphy@arm.com \
--cc=sboyd@kernel.org \
--cc=shawnguo@kernel.org \
--cc=shengjiu.wang@nxp.com \
--cc=shifu0704@thundersoft.com \
--cc=support.opensource@diasemi.com \
--cc=sw0312.kim@samsung.com \
--cc=tiwai@suse.com \
--cc=tzungbi@google.com \
--cc=vincent.abriou@st.com \
--cc=vishwas.a.deshpande@ti.com \
--cc=yanaijie@huawei.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.