Message ID | 87ftam37ko.wl-kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
Headers | show |
Series | ASoC: merge .digital_mute() into .mute_stream() | expand |
Hi Morimoto-san, On 23/06/2020 4.16, Kuninori Morimoto wrote: > > Hi Mark > > ALSA SoC has 2 mute callbacks (= .digital_mute(), .mute_stream()). > But the difference between these 2 is very small. > .digital_mute() is for Playback > .mute_stream() is for Playback/Capture > > This patch-set merges .digital_mute() into .mute_stream(), > and removes .digital_mute(). Instead of finding the patch to ack, I just checked the series and: Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com> - Péter > Kuninori Morimoto (19): > ASoC: hdmi-codec: merge .digital_mute() into .mute_stream() > ASoC: ti: merge .digital_mute() into .mute_stream() > ASoC: spear: merge .digital_mute() into .mute_stream() > ASoC: meson: merge .digital_mute() into .mute_stream() > ASoC: atmel: merge .digital_mute() into .mute_stream() > ASoC: codecs: merge .digital_mute() into .mute_stream() > ASoC: codecs: tlv*: merge .digital_mute() into .mute_stream() > ASoC: codecs: tas*: merge .digital_mute() into .mute_stream() > ASoC: codecs: ssm*: merge .digital_mute() into .mute_stream() > ASoC: codecs: pcm*: merge .digital_mute() into .mute_stream() > ASoC: codecs: max*: merge .digital_mute() into .mute_stream() > ASoC: codecs: alc*: merge .digital_mute() into .mute_stream() > ASoC: codecs: wm*: merge .digital_mute() into .mute_stream() > ASoC: codecs: es*: merge .digital_mute() into .mute_stream() > ASoC: codecs: da*: merge .digital_mute() into .mute_stream() > ASoC: codecs: cs*: merge .digital_mute() into .mute_stream() > ASoC: codecs: ak*: merge .digital_mute() into .mute_stream() > ASoC: soc-dai: remove .digital_mute > ASoC: soc-core: snd_soc_dai_digital_mute() for both CPU/Codec > > drivers/gpu/drm/bridge/sii902x.c | 9 ++++--- > drivers/gpu/drm/exynos/exynos_hdmi.c | 8 ++++-- > drivers/gpu/drm/i2c/tda998x_drv.c | 9 ++++--- > drivers/gpu/drm/mediatek/mtk_hdmi.c | 8 ++++-- > drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ++++--- > drivers/gpu/drm/sti/sti_hdmi.c | 8 ++++-- > drivers/gpu/drm/zte/zx_hdmi.c | 9 ++++--- > include/sound/hdmi-codec.h | 3 ++- > include/sound/soc-dai.h | 1 - > sound/soc/atmel/atmel-classd.c | 10 +++++--- > sound/soc/codecs/88pm860x-codec.c | 9 ++++--- > sound/soc/codecs/ad193x.c | 7 ++++-- > sound/soc/codecs/adau1701.c | 7 ++++-- > sound/soc/codecs/ak4458.c | 7 ++++-- > sound/soc/codecs/ak4535.c | 8 ++++-- > sound/soc/codecs/ak4641.c | 9 ++++--- > sound/soc/codecs/alc5623.c | 7 ++++-- > sound/soc/codecs/alc5632.c | 7 ++++-- > sound/soc/codecs/cpcap.c | 15 ++++++++--- > sound/soc/codecs/cq93vc.c | 7 ++++-- > sound/soc/codecs/cs4265.c | 7 ++++-- > sound/soc/codecs/cs4270.c | 7 ++++-- > sound/soc/codecs/cs42l42.c | 7 ++++-- > sound/soc/codecs/cs42l51.c | 7 ++++-- > sound/soc/codecs/cs42l52.c | 7 ++++-- > sound/soc/codecs/cs42l56.c | 7 ++++-- > sound/soc/codecs/cs42xx8.c | 7 ++++-- > sound/soc/codecs/cs4341.c | 7 ++++-- > sound/soc/codecs/cs4349.c | 7 ++++-- > sound/soc/codecs/da7210.c | 7 ++++-- > sound/soc/codecs/da7213.c | 7 ++++-- > sound/soc/codecs/da9055.c | 7 ++++-- > sound/soc/codecs/es8316.c | 7 ++++-- > sound/soc/codecs/es8328.c | 7 ++++-- > sound/soc/codecs/hdmi-codec.c | 13 +++++----- > sound/soc/codecs/isabelle.c | 21 +++++++++++----- > sound/soc/codecs/jz4770.c | 7 ++++-- > sound/soc/codecs/lm49453.c | 35 ++++++++++++++++++-------- > sound/soc/codecs/max98088.c | 16 +++++++++--- > sound/soc/codecs/max98090.c | 8 ++++-- > sound/soc/codecs/max9867.c | 7 ++++-- > sound/soc/codecs/ml26124.c | 7 ++++-- > sound/soc/codecs/nau8822.c | 7 ++++-- > sound/soc/codecs/pcm1681.c | 7 ++++-- > sound/soc/codecs/pcm1789.c | 7 ++++-- > sound/soc/codecs/pcm179x.c | 7 ++++-- > sound/soc/codecs/pcm3168a.c | 7 ++++-- > sound/soc/codecs/pcm512x.c | 7 ++++-- > sound/soc/codecs/rk3328_codec.c | 7 ++++-- > sound/soc/codecs/sgtl5000.c | 7 ++++-- > sound/soc/codecs/ssm2518.c | 7 ++++-- > sound/soc/codecs/ssm2602.c | 7 ++++-- > sound/soc/codecs/ssm4567.c | 7 ++++-- > sound/soc/codecs/sta529.c | 7 ++++-- > sound/soc/codecs/tas2552.c | 7 ++++-- > sound/soc/codecs/tas2562.c | 7 ++++-- > sound/soc/codecs/tas2770.c | 7 ++++-- > sound/soc/codecs/tas571x.c | 7 ++++-- > sound/soc/codecs/tas5720.c | 7 ++++-- > sound/soc/codecs/tas6424.c | 7 ++++-- > sound/soc/codecs/tfa9879.c | 7 ++++-- > sound/soc/codecs/tlv320aic23.c | 7 ++++-- > sound/soc/codecs/tlv320aic26.c | 7 ++++-- > sound/soc/codecs/tlv320aic31xx.c | 8 ++++-- > sound/soc/codecs/tlv320aic32x4.c | 7 ++++-- > sound/soc/codecs/tlv320aic3x.c | 7 ++++-- > sound/soc/codecs/twl6040.c | 7 ++++-- > sound/soc/codecs/uda134x.c | 7 ++++-- > sound/soc/codecs/wm8350.c | 7 ++++-- > sound/soc/codecs/wm8400.c | 7 ++++-- > sound/soc/codecs/wm8510.c | 7 ++++-- > sound/soc/codecs/wm8580.c | 7 ++++-- > sound/soc/codecs/wm8711.c | 7 ++++-- > sound/soc/codecs/wm8728.c | 7 ++++-- > sound/soc/codecs/wm8731.c | 7 ++++-- > sound/soc/codecs/wm8741.c | 7 ++++-- > sound/soc/codecs/wm8750.c | 7 ++++-- > sound/soc/codecs/wm8753.c | 9 ++++--- > sound/soc/codecs/wm8770.c | 7 ++++-- > sound/soc/codecs/wm8776.c | 7 ++++-- > sound/soc/codecs/wm8900.c | 7 ++++-- > sound/soc/codecs/wm8903.c | 7 ++++-- > sound/soc/codecs/wm8904.c | 7 ++++-- > sound/soc/codecs/wm8940.c | 7 ++++-- > sound/soc/codecs/wm8955.c | 7 ++++-- > sound/soc/codecs/wm8960.c | 7 ++++-- > sound/soc/codecs/wm8961.c | 7 ++++-- > sound/soc/codecs/wm8962.c | 7 ++++-- > sound/soc/codecs/wm8971.c | 7 ++++-- > sound/soc/codecs/wm8974.c | 7 ++++-- > sound/soc/codecs/wm8978.c | 7 ++++-- > sound/soc/codecs/wm8983.c | 7 ++++-- > sound/soc/codecs/wm8985.c | 7 ++++-- > sound/soc/codecs/wm8988.c | 7 ++++-- > sound/soc/codecs/wm8990.c | 7 ++++-- > sound/soc/codecs/wm8991.c | 7 ++++-- > sound/soc/codecs/wm8993.c | 7 ++++-- > sound/soc/codecs/wm8994.c | 10 +++++--- > sound/soc/codecs/wm8995.c | 9 ++++--- > sound/soc/codecs/wm9081.c | 7 ++++-- > sound/soc/meson/axg-spdifout.c | 7 ++++-- > sound/soc/soc-core.c | 4 +-- > sound/soc/soc-dai.c | 4 --- > sound/soc/spear/spdif_out.c | 10 +++++--- > sound/soc/ti/ams-delta.c | 11 +++++--- > 105 files changed, 576 insertions(+), 243 deletions(-) > Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
On 23/06/2020 10:19:56+0900, Kuninori Morimoto wrote: > > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > > snd_soc_dai_digital_mute() is internally using both > mute_stream() (1) or digital_mute() (2), but the difference between > these 2 are only handling direction. > We can merge digital_mute() into mute_stream > > int snd_soc_dai_digital_mute(xxx, int direction) > { > ... > else if (dai->driver->ops->mute_stream) > (1) return dai->driver->ops->mute_stream(xxx, direction); > else if (direction == SNDRV_PCM_STREAM_PLAYBACK && > dai->driver->ops->digital_mute) > (2) return dai->driver->ops->digital_mute(xxx); > ... > } > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com> > --- > sound/soc/atmel/atmel-classd.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c > index e98601eccfa3..59231c0371b8 100644 > --- a/sound/soc/atmel/atmel-classd.c > +++ b/sound/soc/atmel/atmel-classd.c > @@ -327,12 +327,16 @@ static int atmel_classd_codec_dai_startup(struct snd_pcm_substream *substream, > return clk_prepare_enable(dd->gclk); > } > > -static int atmel_classd_codec_dai_digital_mute(struct snd_soc_dai *codec_dai, > - int mute) > +static int atmel_classd_codec_dai_mute(struct snd_soc_dai *codec_dai, > + int mute, > + int direction) > { > struct snd_soc_component *component = codec_dai->component; > u32 mask, val; > > + if (direction != SNDRV_PCM_STREAM_PLAYBACK) > + return 0; > + > mask = CLASSD_MR_LMUTE_MASK | CLASSD_MR_RMUTE_MASK; > > if (mute) > @@ -469,7 +473,7 @@ static int atmel_classd_codec_dai_trigger(struct snd_pcm_substream *substream, > } > > static const struct snd_soc_dai_ops atmel_classd_codec_dai_ops = { > - .digital_mute = atmel_classd_codec_dai_digital_mute, > + .mute_stream = atmel_classd_codec_dai_mute, > .startup = atmel_classd_codec_dai_startup, > .shutdown = atmel_classd_codec_dai_shutdown, > .hw_params = atmel_classd_codec_dai_hw_params, > -- > 2.25.1 >