summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic26.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-07-09 03:56:25 +0200
committerMark Brown <broonie@kernel.org>2020-07-17 00:06:11 +0200
commit960af79d31495b81bf9406f2f1fda425cb49342b (patch)
treeddd87715967b94d6cc6ab8c1412d330498cfed99 /sound/soc/codecs/tlv320aic26.c
parentASoC: codecs: merge .digital_mute() into .mute_stream() (diff)
downloadlinux-960af79d31495b81bf9406f2f1fda425cb49342b.tar.xz
linux-960af79d31495b81bf9406f2f1fda425cb49342b.zip
ASoC: codecs: tlv*: merge .digital_mute() into .mute_stream()
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: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/874kqhxxhz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/tlv320aic26.c')
-rw-r--r--sound/soc/codecs/tlv320aic26.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index 4569bbc08acb..c7baef8948d4 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -134,7 +134,7 @@ static int aic26_hw_params(struct snd_pcm_substream *substream,
/*
* aic26_mute - Mute control to reduce noise when changing audio format
*/
-static int aic26_mute(struct snd_soc_dai *dai, int mute)
+static int aic26_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
struct aic26 *aic26 = snd_soc_component_get_drvdata(component);
@@ -211,9 +211,10 @@ static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
static const struct snd_soc_dai_ops aic26_dai_ops = {
.hw_params = aic26_hw_params,
- .digital_mute = aic26_mute,
+ .mute_stream = aic26_mute,
.set_sysclk = aic26_set_sysclk,
.set_fmt = aic26_set_fmt,
+ .no_capture_mute = 1,
};
static struct snd_soc_dai_driver aic26_dai = {