ASoC: codecs: wm*: merge .digital_mute() into .mute_stream()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 9 Jul 2020 01:56:53 +0000 (10:56 +0900)
committerMark Brown <broonie@kernel.org>
Thu, 16 Jul 2020 22:06:16 +0000 (23:06 +0100)
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>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/87v9ixwiwr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
32 files changed:
sound/soc/codecs/wm8350.c
sound/soc/codecs/wm8400.c
sound/soc/codecs/wm8510.c
sound/soc/codecs/wm8580.c
sound/soc/codecs/wm8711.c
sound/soc/codecs/wm8728.c
sound/soc/codecs/wm8731.c
sound/soc/codecs/wm8741.c
sound/soc/codecs/wm8750.c
sound/soc/codecs/wm8753.c
sound/soc/codecs/wm8770.c
sound/soc/codecs/wm8776.c
sound/soc/codecs/wm8900.c
sound/soc/codecs/wm8903.c
sound/soc/codecs/wm8904.c
sound/soc/codecs/wm8940.c
sound/soc/codecs/wm8955.c
sound/soc/codecs/wm8960.c
sound/soc/codecs/wm8961.c
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8971.c
sound/soc/codecs/wm8974.c
sound/soc/codecs/wm8978.c
sound/soc/codecs/wm8983.c
sound/soc/codecs/wm8985.c
sound/soc/codecs/wm8988.c
sound/soc/codecs/wm8990.c
sound/soc/codecs/wm8991.c
sound/soc/codecs/wm8993.c
sound/soc/codecs/wm8994.c
sound/soc/codecs/wm8995.c
sound/soc/codecs/wm9081.c

index 7fe7c1e918828e3a0e033764a6c204fef382bb7e..a6aa212fa0c89faa2865755cf68da635226f27a6 100644 (file)
@@ -942,7 +942,7 @@ static int wm8350_pcm_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8350_mute(struct snd_soc_dai *dai, int mute)
+static int wm8350_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        unsigned int val;
@@ -1426,11 +1426,12 @@ EXPORT_SYMBOL_GPL(wm8350_mic_jack_detect);
 
 static const struct snd_soc_dai_ops wm8350_dai_ops = {
         .hw_params     = wm8350_pcm_hw_params,
-        .digital_mute  = wm8350_mute,
+        .mute_stream   = wm8350_mute,
         .set_fmt       = wm8350_set_dai_fmt,
         .set_sysclk    = wm8350_set_dai_sysclk,
         .set_pll       = wm8350_set_fll,
         .set_clkdiv    = wm8350_set_clkdiv,
+        .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8350_dai = {
index 35ffa7765c85cf31f33e854a2f67bc678eb31c7c..bf5e77c86aed659b202ce8faac7af7f65faafb74 100644 (file)
@@ -1092,7 +1092,7 @@ static int wm8400_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8400_mute(struct snd_soc_dai *dai, int mute)
+static int wm8400_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 val = snd_soc_component_read(component, WM8400_DAC_CTRL) & ~WM8400_DAC_MUTE;
@@ -1222,11 +1222,12 @@ static int wm8400_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops wm8400_dai_ops = {
        .hw_params = wm8400_hw_params,
-       .digital_mute = wm8400_mute,
+       .mute_stream = wm8400_mute,
        .set_fmt = wm8400_set_dai_fmt,
        .set_clkdiv = wm8400_set_dai_clkdiv,
        .set_sysclk = wm8400_set_dai_sysclk,
        .set_pll = wm8400_set_dai_pll,
+       .no_capture_mute = 1,
 };
 
 /*
index 63a877a8ee2b0ceaa88f87045b64300d8020306a..73c4a8b9f59e333bff00e7f45e2149c934e8e27f 100644 (file)
@@ -487,7 +487,7 @@ static int wm8510_pcm_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8510_mute(struct snd_soc_dai *dai, int mute)
+static int wm8510_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 mute_reg = snd_soc_component_read(component, WM8510_DAC) & 0xffbf;
@@ -547,10 +547,11 @@ static int wm8510_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops wm8510_dai_ops = {
        .hw_params      = wm8510_pcm_hw_params,
-       .digital_mute   = wm8510_mute,
+       .mute_stream    = wm8510_mute,
        .set_fmt        = wm8510_set_dai_fmt,
        .set_clkdiv     = wm8510_set_dai_clkdiv,
        .set_pll        = wm8510_set_dai_pll,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8510_dai = {
index d1fc529d20e7b26df612bebfedd4ced92d857b9e..85ad2f03cfd0c00844212c5049a25af8c914ec48 100644 (file)
@@ -800,7 +800,7 @@ static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id,
        return 0;
 }
 
-static int wm8580_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int wm8580_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        unsigned int reg;
@@ -866,7 +866,8 @@ static const struct snd_soc_dai_ops wm8580_dai_ops_playback = {
        .set_fmt        = wm8580_set_paif_dai_fmt,
        .set_clkdiv     = wm8580_set_dai_clkdiv,
        .set_pll        = wm8580_set_dai_pll,
-       .digital_mute   = wm8580_digital_mute,
+       .mute_stream    = wm8580_mute,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops wm8580_dai_ops_capture = {
index 8a0f93f54b60edfb3c768967b733ce4d48ad4469..bc4d161c59e5c586adbdef50567985f015f53c58 100644 (file)
@@ -204,7 +204,7 @@ static void wm8711_shutdown(struct snd_pcm_substream *substream,
        }
 }
 
-static int wm8711_mute(struct snd_soc_dai *dai, int mute)
+static int wm8711_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 mute_reg = snd_soc_component_read(component, WM8711_APDIGI) & 0xfff7;
@@ -329,9 +329,10 @@ static const struct snd_soc_dai_ops wm8711_ops = {
        .prepare = wm8711_pcm_prepare,
        .hw_params = wm8711_hw_params,
        .shutdown = wm8711_shutdown,
-       .digital_mute = wm8711_mute,
+       .mute_stream = wm8711_mute,
        .set_sysclk = wm8711_set_dai_sysclk,
        .set_fmt = wm8711_set_dai_fmt,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8711_dai = {
index bb5521f544bacc0b7139f845abc8ec0d8a541f4b..2cd58d133899da0468bda1fe09d9385f275c2e25 100644 (file)
@@ -69,7 +69,7 @@ static const struct snd_soc_dapm_route wm8728_intercon[] = {
        {"VOUTR", NULL, "DAC"},
 };
 
-static int wm8728_mute(struct snd_soc_dai *dai, int mute)
+static int wm8728_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 mute_reg = snd_soc_component_read(component, WM8728_DACCTL);
@@ -192,8 +192,9 @@ static int wm8728_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops wm8728_dai_ops = {
        .hw_params      = wm8728_hw_params,
-       .digital_mute   = wm8728_mute,
+       .mute_stream    = wm8728_mute,
        .set_fmt        = wm8728_set_dai_fmt,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8728_dai = {
index cae2cc38d93c35454a0964bfe610f728aa6ec6c2..304bf725a6132524731db01f0931f6207c1cafa6 100644 (file)
@@ -366,7 +366,7 @@ static int wm8731_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8731_mute(struct snd_soc_dai *dai, int mute)
+static int wm8731_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 mute_reg = snd_soc_component_read(component, WM8731_APDIGI) & 0xfff7;
@@ -546,9 +546,10 @@ static int wm8731_startup(struct snd_pcm_substream *substream,
 static const struct snd_soc_dai_ops wm8731_dai_ops = {
        .startup        = wm8731_startup,
        .hw_params      = wm8731_hw_params,
-       .digital_mute   = wm8731_mute,
+       .mute_stream    = wm8731_mute,
        .set_sysclk     = wm8731_set_dai_sysclk,
        .set_fmt        = wm8731_set_dai_fmt,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8731_dai = {
index 328df81ee8394033ded73dc62115b70d370013a3..0e3994326936d89182945833511490f617b6f72b 100644 (file)
@@ -364,7 +364,7 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
        return 0;
 }
 
-static int wm8741_mute(struct snd_soc_dai *codec_dai, int mute)
+static int wm8741_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
 
@@ -386,7 +386,8 @@ static const struct snd_soc_dai_ops wm8741_dai_ops = {
        .hw_params      = wm8741_hw_params,
        .set_sysclk     = wm8741_set_dai_sysclk,
        .set_fmt        = wm8741_set_dai_fmt,
-       .digital_mute   = wm8741_mute,
+       .mute_stream    = wm8741_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8741_dai = {
index 970941f8ae8117975c51af2fb66c39ab273fb13d..9491817020d85cb9e247ec9dfd661099cac5ff6a 100644 (file)
@@ -606,7 +606,7 @@ static int wm8750_pcm_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8750_mute(struct snd_soc_dai *dai, int mute)
+static int wm8750_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 mute_reg = snd_soc_component_read(component, WM8750_ADCDAC) & 0xfff7;
@@ -660,9 +660,10 @@ static int wm8750_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops wm8750_dai_ops = {
        .hw_params      = wm8750_pcm_hw_params,
-       .digital_mute   = wm8750_mute,
+       .mute_stream    = wm8750_mute,
        .set_fmt        = wm8750_set_dai_fmt,
        .set_sysclk     = wm8750_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8750_dai = {
index f3c31121d100c9f4e2f76e22e3c560d839d54ed8..deaa54be6268ab886a8d9a34f71002ac23199fae 100644 (file)
@@ -1297,7 +1297,7 @@ static int wm8753_voice_set_dai_fmt(struct snd_soc_dai *codec_dai,
        return wm8753_voice_write_dai_fmt(component, fmt);
 };
 
-static int wm8753_mute(struct snd_soc_dai *dai, int mute)
+static int wm8753_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 mute_reg = snd_soc_component_read(component, WM8753_DAC) & 0xfff7;
@@ -1382,20 +1382,22 @@ static int wm8753_set_bias_level(struct snd_soc_component *component,
  */
 static const struct snd_soc_dai_ops wm8753_dai_ops_hifi_mode = {
        .hw_params      = wm8753_i2s_hw_params,
-       .digital_mute   = wm8753_mute,
+       .mute_stream    = wm8753_mute,
        .set_fmt        = wm8753_hifi_set_dai_fmt,
        .set_clkdiv     = wm8753_set_dai_clkdiv,
        .set_pll        = wm8753_set_dai_pll,
        .set_sysclk     = wm8753_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops wm8753_dai_ops_voice_mode = {
        .hw_params      = wm8753_pcm_hw_params,
-       .digital_mute   = wm8753_mute,
+       .mute_stream    = wm8753_mute,
        .set_fmt        = wm8753_voice_set_dai_fmt,
        .set_clkdiv     = wm8753_set_dai_clkdiv,
        .set_pll        = wm8753_set_dai_pll,
        .set_sysclk     = wm8753_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8753_dai[] = {
index d51be2531e2ed3d7cb56c7657cc705ddbc8d7b80..1176a6ad269d4eadc8268f6e9b701f4f40592c0b 100644 (file)
@@ -472,7 +472,7 @@ static int wm8770_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8770_mute(struct snd_soc_dai *dai, int mute)
+static int wm8770_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component;
 
@@ -538,10 +538,11 @@ static int wm8770_set_bias_level(struct snd_soc_component *component,
                        SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
 
 static const struct snd_soc_dai_ops wm8770_dai_ops = {
-       .digital_mute = wm8770_mute,
+       .mute_stream = wm8770_mute,
        .hw_params = wm8770_hw_params,
        .set_fmt = wm8770_set_fmt,
        .set_sysclk = wm8770_set_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8770_dai = {
index f174d7ce2b13ce70f27690a2cca626877e8a45af..554acf56130caee2400504e4811dfb147e1af902 100644 (file)
@@ -309,7 +309,7 @@ static int wm8776_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8776_mute(struct snd_soc_dai *dai, int mute)
+static int wm8776_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -361,10 +361,11 @@ static int wm8776_set_bias_level(struct snd_soc_component *component,
                        SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
 
 static const struct snd_soc_dai_ops wm8776_dac_ops = {
-       .digital_mute   = wm8776_mute,
+       .mute_stream    = wm8776_mute,
        .hw_params      = wm8776_hw_params,
        .set_fmt        = wm8776_set_fmt,
        .set_sysclk     = wm8776_set_sysclk,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops wm8776_adc_ops = {
index 3921af63adf29eca670bcec2a1708d191e70eba4..a9a6d766a176319cbfd45f00f7d08b135a1fa7e3 100644 (file)
@@ -967,7 +967,7 @@ static int wm8900_set_dai_fmt(struct snd_soc_dai *codec_dai,
        return 0;
 }
 
-static int wm8900_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int wm8900_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        u16 reg;
@@ -997,7 +997,8 @@ static const struct snd_soc_dai_ops wm8900_dai_ops = {
        .set_clkdiv     = wm8900_set_dai_clkdiv,
        .set_pll        = wm8900_set_dai_pll,
        .set_fmt        = wm8900_set_dai_fmt,
-       .digital_mute   = wm8900_digital_mute,
+       .mute_stream    = wm8900_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8900_dai = {
index a52cb8fee82f9a8dc1dc70921a9dec173b35ba2f..09f4980630c7e9cefadfa2e125324576ce3bc2c6 100644 (file)
@@ -1307,7 +1307,7 @@ static int wm8903_set_dai_fmt(struct snd_soc_dai *codec_dai,
        return 0;
 }
 
-static int wm8903_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int wm8903_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        u16 reg;
@@ -1737,9 +1737,10 @@ static irqreturn_t wm8903_irq(int irq, void *data)
 
 static const struct snd_soc_dai_ops wm8903_dai_ops = {
        .hw_params      = wm8903_hw_params,
-       .digital_mute   = wm8903_digital_mute,
+       .mute_stream    = wm8903_mute,
        .set_fmt        = wm8903_set_dai_fmt,
        .set_sysclk     = wm8903_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8903_dai = {
index d54257097d569cbe74d16bc01ad41b4748e75121..1c360bae5652c56fa8f954c1a30dca603ec36a5c 100644 (file)
@@ -1846,7 +1846,7 @@ static int wm8904_set_sysclk(struct snd_soc_dai *dai, int clk_id,
        return 0;
 }
 
-static int wm8904_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int wm8904_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        int val;
@@ -1962,7 +1962,8 @@ static const struct snd_soc_dai_ops wm8904_dai_ops = {
        .set_tdm_slot = wm8904_set_tdm_slot,
        .set_pll = wm8904_set_fll,
        .hw_params = wm8904_hw_params,
-       .digital_mute = wm8904_digital_mute,
+       .mute_stream = wm8904_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8904_dai = {
index 41d87e1727756247425a83b01edfc491e46a5f1b..016cd8aeef37c6892715f5680f96519d7eab243a 100644 (file)
@@ -452,7 +452,7 @@ error_ret:
        return ret;
 }
 
-static int wm8940_mute(struct snd_soc_dai *dai, int mute)
+static int wm8940_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 mute_reg = snd_soc_component_read(component, WM8940_DAC) & 0xffbf;
@@ -664,10 +664,11 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
 static const struct snd_soc_dai_ops wm8940_dai_ops = {
        .hw_params = wm8940_i2s_hw_params,
        .set_sysclk = wm8940_set_dai_sysclk,
-       .digital_mute = wm8940_mute,
+       .mute_stream = wm8940_mute,
        .set_fmt = wm8940_set_dai_fmt,
        .set_clkdiv = wm8940_set_dai_clkdiv,
        .set_pll = wm8940_set_dai_pll,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8940_dai = {
index 0630dcb66c6f721e9798330c67334209364f8f4b..513df47bd87d60e9581e9c72882c2f4fdc14a913 100644 (file)
@@ -745,7 +745,7 @@ static int wm8955_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 }
 
 
-static int wm8955_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int wm8955_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        int val;
@@ -848,7 +848,8 @@ static const struct snd_soc_dai_ops wm8955_dai_ops = {
        .set_sysclk = wm8955_set_sysclk,
        .set_fmt = wm8955_set_fmt,
        .hw_params = wm8955_hw_params,
-       .digital_mute = wm8955_digital_mute,
+       .mute_stream = wm8955_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8955_dai = {
index e1ab2be51ee7edff4e06ff15a85c4c218d497f62..660ec46eecf2588d7a277c8ff4a2b63a67242145 100644 (file)
@@ -878,7 +878,7 @@ static int wm8960_hw_free(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8960_mute(struct snd_soc_dai *dai, int mute)
+static int wm8960_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -1315,11 +1315,12 @@ static int wm8960_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
 static const struct snd_soc_dai_ops wm8960_dai_ops = {
        .hw_params = wm8960_hw_params,
        .hw_free = wm8960_hw_free,
-       .digital_mute = wm8960_mute,
+       .mute_stream = wm8960_mute,
        .set_fmt = wm8960_set_dai_fmt,
        .set_clkdiv = wm8960_set_dai_clkdiv,
        .set_pll = wm8960_set_dai_pll,
        .set_sysclk = wm8960_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8960_dai = {
index e62a0a8ac297886b9e96a846e07d43b15e57d68e..ef80d9fc1eec21d1d34203ed624132beb5d7df25 100644 (file)
@@ -698,7 +698,7 @@ static int wm8961_set_tristate(struct snd_soc_dai *dai, int tristate)
        return snd_soc_component_write(component, WM8961_ADDITIONAL_CONTROL_2, reg);
 }
 
-static int wm8961_digital_mute(struct snd_soc_dai *dai, int mute)
+static int wm8961_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 reg = snd_soc_component_read(component, WM8961_ADC_DAC_CONTROL_1);
@@ -806,9 +806,10 @@ static const struct snd_soc_dai_ops wm8961_dai_ops = {
        .hw_params = wm8961_hw_params,
        .set_sysclk = wm8961_set_sysclk,
        .set_fmt = wm8961_set_fmt,
-       .digital_mute = wm8961_digital_mute,
+       .mute_stream = wm8961_mute,
        .set_tristate = wm8961_set_tristate,
        .set_clkdiv = wm8961_set_clkdiv,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8961_dai = {
index df8cdc71357d77f62edc0f6178360f5f4fb00f54..25c9600c19062520529e40262ae6b334f9ae1f5f 100644 (file)
@@ -2918,7 +2918,7 @@ static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int s
        return 0;
 }
 
-static int wm8962_mute(struct snd_soc_dai *dai, int mute)
+static int wm8962_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        int val, ret;
@@ -2951,7 +2951,8 @@ static const struct snd_soc_dai_ops wm8962_dai_ops = {
        .hw_params = wm8962_hw_params,
        .set_sysclk = wm8962_set_dai_sysclk,
        .set_fmt = wm8962_set_dai_fmt,
-       .digital_mute = wm8962_mute,
+       .mute_stream = wm8962_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8962_dai = {
index 2cefb795da03d2a243f230eb9eddb99ce9d7dba7..21ae55c32a6ded0526468630543696eec08e042a 100644 (file)
@@ -536,7 +536,7 @@ static int wm8971_pcm_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8971_mute(struct snd_soc_dai *dai, int mute)
+static int wm8971_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 mute_reg = snd_soc_component_read(component, WM8971_ADCDAC) & 0xfff7;
@@ -602,9 +602,10 @@ static int wm8971_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops wm8971_dai_ops = {
        .hw_params      = wm8971_pcm_hw_params,
-       .digital_mute   = wm8971_mute,
+       .mute_stream    = wm8971_mute,
        .set_fmt        = wm8971_set_dai_fmt,
        .set_sysclk     = wm8971_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8971_dai = {
index 953d12e4576fbd27f87aa9c0cb1bfd03f1a4a53d..89c6507d5566be0f793ca0427824e8fd71b24f85 100644 (file)
@@ -559,7 +559,7 @@ static int wm8974_pcm_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8974_mute(struct snd_soc_dai *dai, int mute)
+static int wm8974_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 mute_reg = snd_soc_component_read(component, WM8974_DAC) & 0xffbf;
@@ -616,11 +616,12 @@ static int wm8974_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops wm8974_ops = {
        .hw_params = wm8974_pcm_hw_params,
-       .digital_mute = wm8974_mute,
+       .mute_stream = wm8974_mute,
        .set_fmt = wm8974_set_dai_fmt,
        .set_clkdiv = wm8974_set_dai_clkdiv,
        .set_pll = wm8974_set_dai_pll,
        .set_sysclk = wm8974_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8974_dai = {
index e01ba5394527f68668c5f088ea6582690858a075..a7acb898171592cad66d75f73628b767cae1448a 100644 (file)
@@ -836,7 +836,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8978_mute(struct snd_soc_dai *dai, int mute)
+static int wm8978_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -893,10 +893,11 @@ static int wm8978_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops wm8978_dai_ops = {
        .hw_params      = wm8978_hw_params,
-       .digital_mute   = wm8978_mute,
+       .mute_stream    = wm8978_mute,
        .set_fmt        = wm8978_set_dai_fmt,
        .set_clkdiv     = wm8978_set_dai_clkdiv,
        .set_sysclk     = wm8978_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 /* Also supports 12kHz */
index 78e1a302c54c1608de2b3da60854550c2e03e5bc..d1d2d408ad952fd8f7ad63c0243ad70bac43acf2 100644 (file)
@@ -557,7 +557,7 @@ static bool wm8983_writeable(struct device *dev, unsigned int reg)
        }
 }
 
-static int wm8983_dac_mute(struct snd_soc_dai *dai, int mute)
+static int wm8983_dac_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -943,11 +943,12 @@ static int wm8983_probe(struct snd_soc_component *component)
 }
 
 static const struct snd_soc_dai_ops wm8983_dai_ops = {
-       .digital_mute = wm8983_dac_mute,
+       .mute_stream = wm8983_dac_mute,
        .hw_params = wm8983_hw_params,
        .set_fmt = wm8983_set_fmt,
        .set_sysclk = wm8983_set_sysclk,
-       .set_pll = wm8983_set_pll
+       .set_pll = wm8983_set_pll,
+       .no_capture_mute = 1,
 };
 
 #define WM8983_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
index 62f2c603eb2d9a65b3dcbfbd906ceab976407d94..3f27482349b2a36438bd7e1d8406d386f84a6a95 100644 (file)
@@ -649,7 +649,7 @@ static int wm8985_reset(struct snd_soc_component *component)
        return snd_soc_component_write(component, WM8985_SOFTWARE_RESET, 0x0);
 }
 
-static int wm8985_dac_mute(struct snd_soc_dai *dai, int mute)
+static int wm8985_dac_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -1072,11 +1072,12 @@ err_reg_enable:
 }
 
 static const struct snd_soc_dai_ops wm8985_dai_ops = {
-       .digital_mute = wm8985_dac_mute,
+       .mute_stream = wm8985_dac_mute,
        .hw_params = wm8985_hw_params,
        .set_fmt = wm8985_set_fmt,
        .set_sysclk = wm8985_set_sysclk,
-       .set_pll = wm8985_set_pll
+       .set_pll = wm8985_set_pll,
+       .no_capture_mute = 1,
 };
 
 #define WM8985_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
index 646cfd8b2693ada1b30026d4897b4c652b545765..d2c2d0d943f09ecc408ad00fd81f77d667d6d3de 100644 (file)
@@ -707,7 +707,7 @@ static int wm8988_pcm_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8988_mute(struct snd_soc_dai *dai, int mute)
+static int wm8988_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 mute_reg = snd_soc_component_read(component, WM8988_ADCDAC) & 0xfff7;
@@ -766,7 +766,8 @@ static const struct snd_soc_dai_ops wm8988_ops = {
        .hw_params = wm8988_pcm_hw_params,
        .set_fmt = wm8988_set_dai_fmt,
        .set_sysclk = wm8988_set_dai_sysclk,
-       .digital_mute = wm8988_mute,
+       .mute_stream = wm8988_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8988_dai = {
index 13bca8ebf6779f197c7dea7a778ddeac8f67d956..938940777e5dcdc0b55e070989111fac3c4c8c65 100644 (file)
@@ -998,7 +998,7 @@ static int wm8990_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8990_mute(struct snd_soc_dai *dai, int mute)
+static int wm8990_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 val;
@@ -1152,11 +1152,12 @@ static int wm8990_set_bias_level(struct snd_soc_component *component,
  */
 static const struct snd_soc_dai_ops wm8990_dai_ops = {
        .hw_params      = wm8990_hw_params,
-       .digital_mute   = wm8990_mute,
+       .mute_stream    = wm8990_mute,
        .set_fmt        = wm8990_set_dai_fmt,
        .set_clkdiv     = wm8990_set_dai_clkdiv,
        .set_pll        = wm8990_set_dai_pll,
        .set_sysclk     = wm8990_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver wm8990_dai = {
index ba71c2f595118333066327fe3a7d1d8189726f71..16bc8609d0d2091640bf4fefc81510a9ce7d4934 100644 (file)
@@ -1064,7 +1064,7 @@ static int wm8991_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8991_mute(struct snd_soc_dai *dai, int mute)
+static int wm8991_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 val;
@@ -1196,10 +1196,11 @@ static int wm8991_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops wm8991_ops = {
        .hw_params = wm8991_hw_params,
-       .digital_mute = wm8991_mute,
+       .mute_stream = wm8991_mute,
        .set_fmt = wm8991_set_dai_fmt,
        .set_clkdiv = wm8991_set_dai_clkdiv,
-       .set_pll = wm8991_set_dai_pll
+       .set_pll = wm8991_set_dai_pll,
+       .no_capture_mute = 1,
 };
 
 /*
index 8c9f82efcceb537731c0da15b5c35d71303ec613..9f310082e3c1a0653df367bc6a8ae128a53b0b07 100644 (file)
@@ -1330,7 +1330,7 @@ static int wm8993_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm8993_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int wm8993_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        unsigned int reg;
@@ -1444,9 +1444,10 @@ static const struct snd_soc_dai_ops wm8993_ops = {
        .set_sysclk = wm8993_set_sysclk,
        .set_fmt = wm8993_set_dai_fmt,
        .hw_params = wm8993_hw_params,
-       .digital_mute = wm8993_digital_mute,
+       .mute_stream = wm8993_mute,
        .set_pll = wm8993_set_fll,
        .set_tdm_slot = wm8993_set_tdm_slot,
+       .no_capture_mute = 1,
 };
 
 #define WM8993_RATES SNDRV_PCM_RATE_8000_48000
index 903f8e81cd896b616a903e839f059d7b71809790..a84ae879d37e673b3da0bd26362d46ba2368059e 100644 (file)
@@ -3110,7 +3110,8 @@ static int wm8994_aif3_hw_params(struct snd_pcm_substream *substream,
        return snd_soc_component_update_bits(component, aif1_reg, WM8994_AIF1_WL_MASK, aif1);
 }
 
-static int wm8994_aif_mute(struct snd_soc_dai *codec_dai, int mute)
+static int wm8994_aif_mute(struct snd_soc_dai *codec_dai, int mute,
+                          int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        int mute_reg;
@@ -3187,18 +3188,20 @@ static const struct snd_soc_dai_ops wm8994_aif1_dai_ops = {
        .set_sysclk     = wm8994_set_dai_sysclk,
        .set_fmt        = wm8994_set_dai_fmt,
        .hw_params      = wm8994_hw_params,
-       .digital_mute   = wm8994_aif_mute,
+       .mute_stream    = wm8994_aif_mute,
        .set_pll        = wm8994_set_fll,
        .set_tristate   = wm8994_set_tristate,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops wm8994_aif2_dai_ops = {
        .set_sysclk     = wm8994_set_dai_sysclk,
        .set_fmt        = wm8994_set_dai_fmt,
        .hw_params      = wm8994_hw_params,
-       .digital_mute   = wm8994_aif_mute,
+       .mute_stream    = wm8994_aif_mute,
        .set_pll        = wm8994_set_fll,
        .set_tristate   = wm8994_set_tristate,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops wm8994_aif3_dai_ops = {
index ec752819cb2c1d12c11c91fdf1803a36f470a084..b896d9c5bea0b50f8a8ce2667404547fe1ad4cf5 100644 (file)
@@ -1417,7 +1417,7 @@ static bool wm8995_volatile(struct device *dev, unsigned int reg)
        }
 }
 
-static int wm8995_aif_mute(struct snd_soc_dai *dai, int mute)
+static int wm8995_aif_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        int mute_reg;
@@ -2094,18 +2094,20 @@ static const struct snd_soc_dai_ops wm8995_aif1_dai_ops = {
        .set_sysclk = wm8995_set_dai_sysclk,
        .set_fmt = wm8995_set_dai_fmt,
        .hw_params = wm8995_hw_params,
-       .digital_mute = wm8995_aif_mute,
+       .mute_stream = wm8995_aif_mute,
        .set_pll = wm8995_set_fll,
        .set_tristate = wm8995_set_tristate,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops wm8995_aif2_dai_ops = {
        .set_sysclk = wm8995_set_dai_sysclk,
        .set_fmt = wm8995_set_dai_fmt,
        .hw_params = wm8995_hw_params,
-       .digital_mute = wm8995_aif_mute,
+       .mute_stream = wm8995_aif_mute,
        .set_pll = wm8995_set_fll,
        .set_tristate = wm8995_set_tristate,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops wm8995_aif3_dai_ops = {
index b5465e486fb5764d9e0f07c132ec8862d6f1d606..4a667ee82fe20effcef50294560ddb4b52e1074d 100644 (file)
@@ -1147,7 +1147,7 @@ static int wm9081_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int wm9081_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int wm9081_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        unsigned int reg;
@@ -1232,8 +1232,9 @@ static int wm9081_set_tdm_slot(struct snd_soc_dai *dai,
 static const struct snd_soc_dai_ops wm9081_dai_ops = {
        .hw_params = wm9081_hw_params,
        .set_fmt = wm9081_set_dai_fmt,
-       .digital_mute = wm9081_digital_mute,
+       .mute_stream = wm9081_mute,
        .set_tdm_slot = wm9081_set_tdm_slot,
+       .no_capture_mute = 1,
 };
 
 /* We report two channels because the CODEC processes a stereo signal, even