Merge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori Morimoto...
authorMark Brown <broonie@kernel.org>
Thu, 16 Jul 2020 22:51:51 +0000 (23:51 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 16 Jul 2020 22:51:51 +0000 (23:51 +0100)
Hi Mark

These are v3 patch-set.
ALSA SoC has 2 mute callbacks (= .digital_mute(), .mute_stream()).
But the difference between these 2 are very small.
.digital_mute() is for Playback
.mute_stream()  is for Playback/Capture

This patch-set adds new .no_capture_mute flag and emulate
.digital_mute() by .mute_stream().

v2 -> v3
- uses "xxx_mute_stream" for .mute_stream naming
  if it was better
- removed verbose Cc email address

v1 -> v2
- return -ENOTSUPP at hdmi-codec
- add new .no_capture_mute flag and emulate .digital_mute()
  by .mute_stream()

Link: https://lore.kernel.org/r/874kqy2y5t.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87ftam37ko.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (21):
  ASoC: hdmi-codec: return -ENOTSUPP for digital_mute
  ASoC: soc-dai.c: add .no_capture_mute support
  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       |  7 ++++---
 drivers/gpu/drm/exynos/exynos_hdmi.c   |  6 ++++--
 drivers/gpu/drm/i2c/tda998x_drv.c      |  7 ++++---
 drivers/gpu/drm/mediatek/mtk_hdmi.c    |  6 ++++--
 drivers/gpu/drm/rockchip/cdn-dp-core.c |  7 ++++---
 drivers/gpu/drm/sti/sti_hdmi.c         |  6 ++++--
 drivers/gpu/drm/zte/zx_hdmi.c          |  7 ++++---
 include/sound/hdmi-codec.h             |  6 +++++-
 include/sound/soc-dai.h                |  4 +++-
 sound/soc/atmel/atmel-classd.c         |  7 ++++---
 sound/soc/codecs/88pm860x-codec.c      |  8 +++++---
 sound/soc/codecs/ad193x.c              |  5 +++--
 sound/soc/codecs/adau1701.c            |  5 +++--
 sound/soc/codecs/ak4458.c              |  5 +++--
 sound/soc/codecs/ak4535.c              |  6 ++++--
 sound/soc/codecs/ak4641.c              |  8 +++++---
 sound/soc/codecs/alc5623.c             |  5 +++--
 sound/soc/codecs/alc5632.c             |  5 +++--
 sound/soc/codecs/cpcap.c               | 11 +++++++----
 sound/soc/codecs/cq93vc.c              |  5 +++--
 sound/soc/codecs/cs4265.c              |  5 +++--
 sound/soc/codecs/cs4270.c              |  5 +++--
 sound/soc/codecs/cs42l42.c             |  5 +++--
 sound/soc/codecs/cs42l51.c             |  5 +++--
 sound/soc/codecs/cs42l52.c             |  5 +++--
 sound/soc/codecs/cs42l56.c             |  5 +++--
 sound/soc/codecs/cs42xx8.c             |  5 +++--
 sound/soc/codecs/cs4341.c              |  5 +++--
 sound/soc/codecs/cs4349.c              |  5 +++--
 sound/soc/codecs/da7210.c              |  5 +++--
 sound/soc/codecs/da7213.c              |  5 +++--
 sound/soc/codecs/da9055.c              |  5 +++--
 sound/soc/codecs/es8316.c              |  5 +++--
 sound/soc/codecs/es8328.c              |  5 +++--
 sound/soc/codecs/hdmi-codec.c          | 25 +++++++++++++++++--------
 sound/soc/codecs/isabelle.c            | 15 +++++++++------
 sound/soc/codecs/jz4770.c              |  5 +++--
 sound/soc/codecs/lm49453.c             | 25 +++++++++++++++----------
 sound/soc/codecs/max98088.c            | 12 ++++++++----
 sound/soc/codecs/max98090.c            |  6 ++++--
 sound/soc/codecs/max9867.c             |  5 +++--
 sound/soc/codecs/ml26124.c             |  5 +++--
 sound/soc/codecs/nau8822.c             |  5 +++--
 sound/soc/codecs/pcm1681.c             |  5 +++--
 sound/soc/codecs/pcm1789.c             |  5 +++--
 sound/soc/codecs/pcm179x.c             |  5 +++--
 sound/soc/codecs/pcm3168a.c            |  5 +++--
 sound/soc/codecs/pcm512x.c             |  5 +++--
 sound/soc/codecs/rk3328_codec.c        |  5 +++--
 sound/soc/codecs/sgtl5000.c            |  5 +++--
 sound/soc/codecs/ssm2518.c             |  5 +++--
 sound/soc/codecs/ssm2602.c             |  5 +++--
 sound/soc/codecs/ssm4567.c             |  5 +++--
 sound/soc/codecs/sta529.c              |  5 +++--
 sound/soc/codecs/tas2552.c             |  5 +++--
 sound/soc/codecs/tas2562.c             |  5 +++--
 sound/soc/codecs/tas2770.c             |  5 +++--
 sound/soc/codecs/tas571x.c             |  5 +++--
 sound/soc/codecs/tas5720.c             |  5 +++--
 sound/soc/codecs/tas6424.c             |  5 +++--
 sound/soc/codecs/tfa9879.c             |  5 +++--
 sound/soc/codecs/tlv320aic23.c         |  5 +++--
 sound/soc/codecs/tlv320aic26.c         |  5 +++--
 sound/soc/codecs/tlv320aic31xx.c       |  6 ++++--
 sound/soc/codecs/tlv320aic32x4.c       |  5 +++--
 sound/soc/codecs/tlv320aic3x.c         |  5 +++--
 sound/soc/codecs/twl6040.c             |  5 +++--
 sound/soc/codecs/uda134x.c             |  5 +++--
 sound/soc/codecs/wm8350.c              |  5 +++--
 sound/soc/codecs/wm8400.c              |  5 +++--
 sound/soc/codecs/wm8510.c              |  5 +++--
 sound/soc/codecs/wm8580.c              |  5 +++--
 sound/soc/codecs/wm8711.c              |  5 +++--
 sound/soc/codecs/wm8728.c              |  5 +++--
 sound/soc/codecs/wm8731.c              |  5 +++--
 sound/soc/codecs/wm8741.c              |  5 +++--
 sound/soc/codecs/wm8750.c              |  5 +++--
 sound/soc/codecs/wm8753.c              |  8 +++++---
 sound/soc/codecs/wm8770.c              |  5 +++--
 sound/soc/codecs/wm8776.c              |  5 +++--
 sound/soc/codecs/wm8900.c              |  5 +++--
 sound/soc/codecs/wm8903.c              |  5 +++--
 sound/soc/codecs/wm8904.c              |  5 +++--
 sound/soc/codecs/wm8940.c              |  5 +++--
 sound/soc/codecs/wm8955.c              |  5 +++--
 sound/soc/codecs/wm8960.c              |  5 +++--
 sound/soc/codecs/wm8961.c              |  5 +++--
 sound/soc/codecs/wm8962.c              |  5 +++--
 sound/soc/codecs/wm8971.c              |  5 +++--
 sound/soc/codecs/wm8974.c              |  5 +++--
 sound/soc/codecs/wm8978.c              |  5 +++--
 sound/soc/codecs/wm8983.c              |  7 ++++---
 sound/soc/codecs/wm8985.c              |  7 ++++---
 sound/soc/codecs/wm8988.c              |  5 +++--
 sound/soc/codecs/wm8990.c              |  5 +++--
 sound/soc/codecs/wm8991.c              |  7 ++++---
 sound/soc/codecs/wm8993.c              |  5 +++--
 sound/soc/codecs/wm8994.c              |  9 ++++++---
 sound/soc/codecs/wm8995.c              |  8 +++++---
 sound/soc/codecs/wm9081.c              |  5 +++--
 sound/soc/meson/axg-spdifout.c         |  5 +++--
 sound/soc/soc-core.c                   |  4 ++--
 sound/soc/soc-dai.c                    | 12 +++++++-----
 sound/soc/spear/spdif_out.c            |  8 +++++---
 sound/soc/ti/ams-delta.c               |  9 +++++----
 105 files changed, 390 insertions(+), 249 deletions(-)

--
2.25.1

103 files changed:
drivers/gpu/drm/bridge/sii902x.c
drivers/gpu/drm/exynos/exynos_hdmi.c
drivers/gpu/drm/i2c/tda998x_drv.c
drivers/gpu/drm/mediatek/mtk_hdmi.c
drivers/gpu/drm/rockchip/cdn-dp-core.c
drivers/gpu/drm/sti/sti_hdmi.c
drivers/gpu/drm/zte/zx_hdmi.c
include/sound/hdmi-codec.h
include/sound/soc-dai.h
sound/soc/codecs/88pm860x-codec.c
sound/soc/codecs/ad193x.c
sound/soc/codecs/adau1701.c
sound/soc/codecs/ak4458.c
sound/soc/codecs/ak4535.c
sound/soc/codecs/ak4641.c
sound/soc/codecs/alc5623.c
sound/soc/codecs/alc5632.c
sound/soc/codecs/cpcap.c
sound/soc/codecs/cq93vc.c
sound/soc/codecs/cs4265.c
sound/soc/codecs/cs4270.c
sound/soc/codecs/cs42l42.c
sound/soc/codecs/cs42l51.c
sound/soc/codecs/cs42l52.c
sound/soc/codecs/cs42l56.c
sound/soc/codecs/cs42xx8.c
sound/soc/codecs/cs4341.c
sound/soc/codecs/cs4349.c
sound/soc/codecs/da7210.c
sound/soc/codecs/da7213.c
sound/soc/codecs/da9055.c
sound/soc/codecs/es8316.c
sound/soc/codecs/es8328.c
sound/soc/codecs/hdmi-codec.c
sound/soc/codecs/isabelle.c
sound/soc/codecs/jz4770.c
sound/soc/codecs/lm49453.c
sound/soc/codecs/max98088.c
sound/soc/codecs/max98090.c
sound/soc/codecs/max9867.c
sound/soc/codecs/ml26124.c
sound/soc/codecs/nau8822.c
sound/soc/codecs/pcm1681.c
sound/soc/codecs/pcm1789.c
sound/soc/codecs/pcm179x.c
sound/soc/codecs/pcm3168a.c
sound/soc/codecs/pcm512x.c
sound/soc/codecs/rk3328_codec.c
sound/soc/codecs/sgtl5000.c
sound/soc/codecs/ssm2518.c
sound/soc/codecs/ssm2602.c
sound/soc/codecs/ssm4567.c
sound/soc/codecs/sta529.c
sound/soc/codecs/tas2552.c
sound/soc/codecs/tas2562.c
sound/soc/codecs/tas2770.c
sound/soc/codecs/tas571x.c
sound/soc/codecs/tas5720.c
sound/soc/codecs/tas6424.c
sound/soc/codecs/tfa9879.c
sound/soc/codecs/tlv320aic23.c
sound/soc/codecs/tlv320aic26.c
sound/soc/codecs/tlv320aic31xx.c
sound/soc/codecs/tlv320aic32x4.c
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/twl6040.c
sound/soc/codecs/uda134x.c
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
sound/soc/meson/axg-spdifout.c
sound/soc/soc-dai.c
sound/soc/spear/spdif_out.c
sound/soc/ti/ams-delta.c

index 6dad025..c751baf 100644 (file)
@@ -672,8 +672,8 @@ static void sii902x_audio_shutdown(struct device *dev, void *data)
        clk_disable_unprepare(sii902x->audio.mclk);
 }
 
-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);
 
@@ -724,9 +724,10 @@ static int sii902x_audio_get_dai_id(struct snd_soc_component *component,
 static const struct hdmi_codec_ops sii902x_audio_codec_ops = {
        .hw_params = sii902x_audio_hw_params,
        .audio_shutdown = sii902x_audio_shutdown,
-       .digital_mute = sii902x_audio_digital_mute,
+       .mute_stream = sii902x_audio_mute,
        .get_eld = sii902x_audio_get_eld,
        .get_dai_id = sii902x_audio_get_dai_id,
+       .no_capture_mute = 1,
 };
 
 static int sii902x_audio_codec_init(struct sii902x *sii902x,
index 95dd399..68d7b1c 100644 (file)
@@ -1604,7 +1604,8 @@ static int hdmi_audio_hw_params(struct device *dev, void *data,
        return 0;
 }
 
-static int hdmi_audio_digital_mute(struct device *dev, void *data, bool mute)
+static int hdmi_audio_mute(struct device *dev, void *data,
+                          bool mute, int direction)
 {
        struct hdmi_context *hdata = dev_get_drvdata(dev);
 
@@ -1634,8 +1635,9 @@ static int hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf,
 static const struct hdmi_codec_ops audio_codec_ops = {
        .hw_params = hdmi_audio_hw_params,
        .audio_shutdown = hdmi_audio_shutdown,
-       .digital_mute = hdmi_audio_digital_mute,
+       .mute_stream = hdmi_audio_mute,
        .get_eld = hdmi_audio_get_eld,
+       .no_capture_mute = 1,
 };
 
 static int hdmi_register_audio_device(struct hdmi_context *hdata)
index 9517f52..3010a45 100644 (file)
@@ -1133,8 +1133,8 @@ static void tda998x_audio_shutdown(struct device *dev, void *data)
        mutex_unlock(&priv->audio_mutex);
 }
 
-static int tda998x_audio_digital_mute(struct device *dev, void *data,
-                                     bool enable)
+static int tda998x_audio_mute_stream(struct device *dev, void *data,
+                                    bool enable, int direction)
 {
        struct tda998x_priv *priv = dev_get_drvdata(dev);
 
@@ -1162,8 +1162,9 @@ static int tda998x_audio_get_eld(struct device *dev, void *data,
 static const struct hdmi_codec_ops audio_codec_ops = {
        .hw_params = tda998x_audio_hw_params,
        .audio_shutdown = tda998x_audio_shutdown,
-       .digital_mute = tda998x_audio_digital_mute,
+       .mute_stream = tda998x_audio_mute_stream,
        .get_eld = tda998x_audio_get_eld,
+       .no_capture_mute = 1,
 };
 
 static int tda998x_audio_codec_init(struct tda998x_priv *priv,
index 5feb760..37b4420 100644 (file)
@@ -1647,7 +1647,8 @@ static void mtk_hdmi_audio_shutdown(struct device *dev, void *data)
 }
 
 static int
-mtk_hdmi_audio_digital_mute(struct device *dev, void *data, bool enable)
+mtk_hdmi_audio_mute(struct device *dev, void *data,
+                   bool enable, int direction)
 {
        struct mtk_hdmi *hdmi = dev_get_drvdata(dev);
 
@@ -1692,9 +1693,10 @@ static const struct hdmi_codec_ops mtk_hdmi_audio_codec_ops = {
        .hw_params = mtk_hdmi_audio_hw_params,
        .audio_startup = mtk_hdmi_audio_startup,
        .audio_shutdown = mtk_hdmi_audio_shutdown,
-       .digital_mute = mtk_hdmi_audio_digital_mute,
+       .mute_stream = mtk_hdmi_audio_mute,
        .get_eld = mtk_hdmi_audio_get_eld,
        .hook_plugged_cb = mtk_hdmi_audio_hook_plugged_cb,
+       .no_capture_mute = 1,
 };
 
 static int mtk_hdmi_register_audio_driver(struct device *dev)
index c634b95..a4a45da 100644 (file)
@@ -817,8 +817,8 @@ out:
        mutex_unlock(&dp->lock);
 }
 
-static int cdn_dp_audio_digital_mute(struct device *dev, void *data,
-                                    bool enable)
+static int cdn_dp_audio_mute_stream(struct device *dev, void *data,
+                                   bool enable, int direction)
 {
        struct cdn_dp_device *dp = dev_get_drvdata(dev);
        int ret;
@@ -849,8 +849,9 @@ static int cdn_dp_audio_get_eld(struct device *dev, void *data,
 static const struct hdmi_codec_ops audio_codec_ops = {
        .hw_params = cdn_dp_audio_hw_params,
        .audio_shutdown = cdn_dp_audio_shutdown,
-       .digital_mute = cdn_dp_audio_digital_mute,
+       .mute_stream = cdn_dp_audio_mute_stream,
        .get_eld = cdn_dp_audio_get_eld,
+       .no_capture_mute = 1,
 };
 
 static int cdn_dp_audio_codec_init(struct cdn_dp_device *dp,
index 5b15c49..008f079 100644 (file)
@@ -1191,7 +1191,8 @@ static int hdmi_audio_hw_params(struct device *dev,
        return 0;
 }
 
-static int hdmi_audio_digital_mute(struct device *dev, void *data, bool enable)
+static int hdmi_audio_mute(struct device *dev, void *data,
+                          bool enable, int direction)
 {
        struct sti_hdmi *hdmi = dev_get_drvdata(dev);
 
@@ -1219,8 +1220,9 @@ static int hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf, size
 static const struct hdmi_codec_ops audio_codec_ops = {
        .hw_params = hdmi_audio_hw_params,
        .audio_shutdown = hdmi_audio_shutdown,
-       .digital_mute = hdmi_audio_digital_mute,
+       .mute_stream = hdmi_audio_mute,
        .get_eld = hdmi_audio_get_eld,
+       .no_capture_mute = 1,
 };
 
 static int sti_hdmi_register_audio_driver(struct device *dev,
index 76a16d9..cd79ca0 100644 (file)
@@ -439,8 +439,8 @@ static int zx_hdmi_audio_hw_params(struct device *dev,
        return zx_hdmi_infoframe_trans(hdmi, &frame, FSEL_AUDIO);
 }
 
-static int zx_hdmi_audio_digital_mute(struct device *dev, void *data,
-                                     bool enable)
+static int zx_hdmi_audio_mute(struct device *dev, void *data,
+                             bool enable, int direction)
 {
        struct zx_hdmi *hdmi = dev_get_drvdata(dev);
 
@@ -468,8 +468,9 @@ static const struct hdmi_codec_ops zx_hdmi_codec_ops = {
        .audio_startup = zx_hdmi_audio_startup,
        .hw_params = zx_hdmi_audio_hw_params,
        .audio_shutdown = zx_hdmi_audio_shutdown,
-       .digital_mute = zx_hdmi_audio_digital_mute,
+       .mute_stream = zx_hdmi_audio_mute,
        .get_eld = zx_hdmi_audio_get_eld,
+       .no_capture_mute = 1,
 };
 
 static struct hdmi_codec_pdata zx_hdmi_codec_pdata = {
index 83b1768..17eebd3 100644 (file)
@@ -76,7 +76,8 @@ struct hdmi_codec_ops {
         * Mute/unmute HDMI audio stream.
         * Optional
         */
-       int (*digital_mute)(struct device *dev, void *data, bool enable);
+       int (*mute_stream)(struct device *dev, void *data,
+                          bool enable, int direction);
 
        /*
         * Provides EDID-Like-Data from connected HDMI device.
@@ -99,6 +100,9 @@ struct hdmi_codec_ops {
        int (*hook_plugged_cb)(struct device *dev, void *data,
                               hdmi_codec_plugged_cb fn,
                               struct device *codec_dev);
+
+       /* bit field */
+       unsigned int no_capture_mute:1;
 };
 
 /* HDMI codec initalization data */
index 212257e..e0e061b 100644 (file)
@@ -280,6 +280,9 @@ struct snd_soc_dai_ops {
         */
        snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *,
                struct snd_soc_dai *);
+
+       /* bit field */
+       unsigned int no_capture_mute:1;
 };
 
 struct snd_soc_cdai_ops {
index 068914d..cac7e55 100644 (file)
@@ -902,7 +902,7 @@ static const struct snd_soc_dapm_route pm860x_dapm_routes[] = {
  * Use MUTE_LEFT & MUTE_RIGHT to implement digital mute.
  * These bits can also be used to mute.
  */
-static int pm860x_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int pm860x_mute_stream(struct snd_soc_dai *codec_dai, int mute, int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        int data = 0, mask = MUTE_LEFT | MUTE_RIGHT;
@@ -1136,17 +1136,19 @@ static int pm860x_set_bias_level(struct snd_soc_component *component,
 }
 
 static const struct snd_soc_dai_ops pm860x_pcm_dai_ops = {
-       .digital_mute   = pm860x_digital_mute,
+       .mute_stream    = pm860x_mute_stream,
        .hw_params      = pm860x_pcm_hw_params,
        .set_fmt        = pm860x_pcm_set_dai_fmt,
        .set_sysclk     = pm860x_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops pm860x_i2s_dai_ops = {
-       .digital_mute   = pm860x_digital_mute,
+       .mute_stream    = pm860x_mute_stream,
        .hw_params      = pm860x_i2s_hw_params,
        .set_fmt        = pm860x_i2s_set_dai_fmt,
        .set_sysclk     = pm860x_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 #define PM860X_RATES   (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |   \
index 980e024..f37ab7e 100644 (file)
@@ -143,7 +143,7 @@ static inline bool ad193x_has_adc(const struct ad193x_priv *ad193x)
  * DAI ops entries
  */
 
-static int ad193x_mute(struct snd_soc_dai *dai, int mute)
+static int ad193x_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct ad193x_priv *ad193x = snd_soc_component_get_drvdata(dai->component);
 
@@ -371,10 +371,11 @@ static int ad193x_startup(struct snd_pcm_substream *substream,
 static const struct snd_soc_dai_ops ad193x_dai_ops = {
        .startup = ad193x_startup,
        .hw_params = ad193x_hw_params,
-       .digital_mute = ad193x_mute,
+       .mute_stream = ad193x_mute,
        .set_tdm_slot = ad193x_set_tdm_slot,
        .set_sysclk     = ad193x_set_dai_sysclk,
        .set_fmt = ad193x_set_dai_fmt,
+       .no_capture_mute = 1,
 };
 
 /* codec DAI instance */
index 115e296..68130ea 100644 (file)
@@ -573,7 +573,7 @@ static int adau1701_set_bias_level(struct snd_soc_component *component,
        return 0;
 }
 
-static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute)
+static int adau1701_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        unsigned int mask = ADAU1701_DSPCTRL_DAM;
@@ -631,8 +631,9 @@ static int adau1701_startup(struct snd_pcm_substream *substream,
 static const struct snd_soc_dai_ops adau1701_dai_ops = {
        .set_fmt        = adau1701_set_dai_fmt,
        .hw_params      = adau1701_hw_params,
-       .digital_mute   = adau1701_digital_mute,
+       .mute_stream    = adau1701_mute_stream,
        .startup        = adau1701_startup,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver adau1701_dai = {
index 39ae089..cbe3c78 100644 (file)
@@ -401,7 +401,7 @@ static int ak4458_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 
 static const int att_speed[] = { 4080, 2040, 510, 255 };
 
-static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute)
+static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component);
@@ -495,8 +495,9 @@ static const struct snd_soc_dai_ops ak4458_dai_ops = {
        .startup        = ak4458_startup,
        .hw_params      = ak4458_hw_params,
        .set_fmt        = ak4458_set_dai_fmt,
-       .digital_mute   = ak4458_set_dai_mute,
+       .mute_stream    = ak4458_set_dai_mute,
        .set_tdm_slot   = ak4458_set_tdm_slot,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver ak4458_dai = {
index f5ad1f5..91e7a57 100644 (file)
@@ -309,10 +309,11 @@ static int ak4535_set_dai_fmt(struct snd_soc_dai *codec_dai,
        return 0;
 }
 
-static int ak4535_mute(struct snd_soc_dai *dai, int mute)
+static int ak4535_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, AK4535_DAC);
+
        if (!mute)
                snd_soc_component_write(component, AK4535_DAC, mute_reg & ~0x20);
        else
@@ -348,8 +349,9 @@ static int ak4535_set_bias_level(struct snd_soc_component *component,
 static const struct snd_soc_dai_ops ak4535_dai_ops = {
        .hw_params      = ak4535_hw_params,
        .set_fmt        = ak4535_set_dai_fmt,
-       .digital_mute   = ak4535_mute,
+       .mute_stream    = ak4535_mute,
        .set_sysclk     = ak4535_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver ak4535_dai = {
index 2d5b640..77004cd 100644 (file)
@@ -405,7 +405,7 @@ static int ak4641_i2s_set_dai_fmt(struct snd_soc_dai *codec_dai,
        return snd_soc_component_write(component, AK4641_MODE1, mode1);
 }
 
-static int ak4641_mute(struct snd_soc_dai *dai, int mute)
+static int ak4641_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -467,15 +467,17 @@ static int ak4641_set_bias_level(struct snd_soc_component *component,
 static const struct snd_soc_dai_ops ak4641_i2s_dai_ops = {
        .hw_params    = ak4641_i2s_hw_params,
        .set_fmt      = ak4641_i2s_set_dai_fmt,
-       .digital_mute = ak4641_mute,
+       .mute_stream  = ak4641_mute,
        .set_sysclk   = ak4641_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops ak4641_pcm_dai_ops = {
        .hw_params    = NULL, /* rates are controlled by BT chip */
        .set_fmt      = ak4641_pcm_set_dai_fmt,
-       .digital_mute = ak4641_mute,
+       .mute_stream  = ak4641_mute,
        .set_sysclk   = ak4641_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver ak4641_dai[] = {
index c70c49b..3d1761a 100644 (file)
@@ -737,7 +737,7 @@ static int alc5623_pcm_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int alc5623_mute(struct snd_soc_dai *dai, int mute)
+static int alc5623_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 hp_mute = ALC5623_MISC_M_DAC_L_INPUT | ALC5623_MISC_M_DAC_R_INPUT;
@@ -829,10 +829,11 @@ static int alc5623_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops alc5623_dai_ops = {
                .hw_params = alc5623_pcm_hw_params,
-               .digital_mute = alc5623_mute,
+               .mute_stream = alc5623_mute,
                .set_fmt = alc5623_set_dai_fmt,
                .set_sysclk = alc5623_set_dai_sysclk,
                .set_pll = alc5623_set_dai_pll,
+               .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver alc5623_dai = {
index f495431..9d6dcd3 100644 (file)
@@ -902,7 +902,7 @@ static int alc5632_pcm_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int alc5632_mute(struct snd_soc_dai *dai, int mute)
+static int alc5632_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 hp_mute = ALC5632_MISC_HP_DEPOP_MUTE_L
@@ -1005,10 +1005,11 @@ static int alc5632_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops alc5632_dai_ops = {
                .hw_params = alc5632_pcm_hw_params,
-               .digital_mute = alc5632_mute,
+               .mute_stream = alc5632_mute,
                .set_fmt = alc5632_set_dai_fmt,
                .set_sysclk = alc5632_set_dai_sysclk,
                .set_pll = alc5632_set_dai_pll,
+               .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver alc5632_dai = {
index d7f05b3..f046987 100644 (file)
@@ -1216,7 +1216,7 @@ static int cpcap_hifi_set_dai_fmt(struct snd_soc_dai *codec_dai,
        return regmap_update_bits(cpcap->regmap, reg, mask, val);
 }
 
-static int cpcap_hifi_set_mute(struct snd_soc_dai *dai, int mute)
+static int cpcap_hifi_set_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct cpcap_audio *cpcap = snd_soc_component_get_drvdata(component);
@@ -1237,7 +1237,8 @@ static const struct snd_soc_dai_ops cpcap_dai_hifi_ops = {
        .hw_params      = cpcap_hifi_hw_params,
        .set_sysclk     = cpcap_hifi_set_dai_sysclk,
        .set_fmt        = cpcap_hifi_set_dai_fmt,
-       .digital_mute   = cpcap_hifi_set_mute,
+       .mute_stream    = cpcap_hifi_set_mute,
+       .no_capture_mute = 1,
 };
 
 static int cpcap_voice_hw_params(struct snd_pcm_substream *substream,
@@ -1370,7 +1371,8 @@ static int cpcap_voice_set_dai_fmt(struct snd_soc_dai *codec_dai,
        return 0;
 }
 
-static int cpcap_voice_set_mute(struct snd_soc_dai *dai, int mute)
+static int cpcap_voice_set_mute(struct snd_soc_dai *dai,
+                               int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct cpcap_audio *cpcap = snd_soc_component_get_drvdata(component);
@@ -1391,7 +1393,8 @@ static const struct snd_soc_dai_ops cpcap_dai_voice_ops = {
        .hw_params      = cpcap_voice_hw_params,
        .set_sysclk     = cpcap_voice_set_dai_sysclk,
        .set_fmt        = cpcap_voice_set_dai_fmt,
-       .digital_mute   = cpcap_voice_set_mute,
+       .mute_stream    = cpcap_voice_set_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver cpcap_dai[] = {
index b0cc611..0aae579 100644 (file)
@@ -30,7 +30,7 @@ static const struct snd_kcontrol_new cq93vc_snd_controls[] = {
        SOC_SINGLE("Mono DAC Playback Volume", DAVINCI_VC_REG09, 0, 0x3f, 0),
 };
 
-static int cq93vc_mute(struct snd_soc_dai *dai, int mute)
+static int cq93vc_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u8 reg;
@@ -87,8 +87,9 @@ static int cq93vc_set_bias_level(struct snd_soc_component *component,
 #define CQ93VC_FORMATS (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE)
 
 static const struct snd_soc_dai_ops cq93vc_dai_ops = {
-       .digital_mute   = cq93vc_mute,
+       .mute_stream    = cq93vc_mute,
        .set_sysclk     = cq93vc_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver cq93vc_dai = {
index 2fb65f2..d76be44 100644 (file)
@@ -378,7 +378,7 @@ static int cs4265_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
        return 0;
 }
 
-static int cs4265_digital_mute(struct snd_soc_dai *dai, int mute)
+static int cs4265_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -498,9 +498,10 @@ static int cs4265_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops cs4265_ops = {
        .hw_params      = cs4265_pcm_hw_params,
-       .digital_mute   = cs4265_digital_mute,
+       .mute_stream    = cs4265_mute,
        .set_fmt        = cs4265_set_fmt,
        .set_sysclk     = cs4265_set_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver cs4265_dai[] = {
index bd17c80..ddd95c8 100644 (file)
@@ -406,7 +406,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream,
  * board does not have the MUTEA or MUTEB pins connected to such circuitry,
  * then this function will do nothing.
  */
-static int cs4270_dai_mute(struct snd_soc_dai *dai, int mute)
+static int cs4270_dai_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component);
@@ -471,7 +471,8 @@ static const struct snd_soc_dai_ops cs4270_dai_ops = {
        .hw_params      = cs4270_hw_params,
        .set_sysclk     = cs4270_set_dai_sysclk,
        .set_fmt        = cs4270_set_dai_fmt,
-       .digital_mute   = cs4270_dai_mute,
+       .mute_stream    = cs4270_dai_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver cs4270_dai = {
index d391b50..210fcbe 100644 (file)
@@ -849,7 +849,7 @@ static int cs42l42_set_sysclk(struct snd_soc_dai *dai,
        return 0;
 }
 
-static int cs42l42_digital_mute(struct snd_soc_dai *dai, int mute)
+static int cs42l42_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        unsigned int regval;
@@ -909,7 +909,8 @@ static const struct snd_soc_dai_ops cs42l42_ops = {
        .hw_params      = cs42l42_pcm_hw_params,
        .set_fmt        = cs42l42_set_dai_fmt,
        .set_sysclk     = cs42l42_set_sysclk,
-       .digital_mute = cs42l42_digital_mute
+       .mute_stream    = cs42l42_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver cs42l42_dai = {
index dde9812..764f2ef 100644 (file)
@@ -484,7 +484,7 @@ static int cs42l51_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int cs42l51_dai_mute(struct snd_soc_dai *dai, int mute)
+static int cs42l51_dai_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        int reg;
@@ -511,7 +511,8 @@ static const struct snd_soc_dai_ops cs42l51_dai_ops = {
        .hw_params      = cs42l51_hw_params,
        .set_sysclk     = cs42l51_set_dai_sysclk,
        .set_fmt        = cs42l51_set_dai_fmt,
-       .digital_mute   = cs42l51_dai_mute,
+       .mute_stream    = cs42l51_dai_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver cs42l51_dai = {
index 2ea4cba..f772628 100644 (file)
@@ -784,7 +784,7 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
        return 0;
 }
 
-static int cs42l52_digital_mute(struct snd_soc_dai *dai, int mute)
+static int cs42l52_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -865,9 +865,10 @@ static int cs42l52_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops cs42l52_ops = {
        .hw_params      = cs42l52_pcm_hw_params,
-       .digital_mute   = cs42l52_digital_mute,
+       .mute_stream    = cs42l52_mute,
        .set_fmt        = cs42l52_set_fmt,
        .set_sysclk     = cs42l52_set_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver cs42l52_dai = {
index ac569ab..97024a6 100644 (file)
@@ -800,7 +800,7 @@ static int cs42l56_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
        return 0;
 }
 
-static int cs42l56_digital_mute(struct snd_soc_dai *dai, int mute)
+static int cs42l56_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -929,9 +929,10 @@ static int cs42l56_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops cs42l56_ops = {
        .hw_params      = cs42l56_pcm_hw_params,
-       .digital_mute   = cs42l56_digital_mute,
+       .mute_stream    = cs42l56_mute,
        .set_fmt        = cs42l56_set_dai_fmt,
        .set_sysclk     = cs42l56_set_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver cs42l56_dai = {
index 94b1adb..5d6ef66 100644 (file)
@@ -362,7 +362,7 @@ static int cs42xx8_hw_free(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int cs42xx8_digital_mute(struct snd_soc_dai *dai, int mute)
+static int cs42xx8_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct cs42xx8_priv *cs42xx8 = snd_soc_component_get_drvdata(component);
@@ -380,7 +380,8 @@ static const struct snd_soc_dai_ops cs42xx8_dai_ops = {
        .set_sysclk     = cs42xx8_set_dai_sysclk,
        .hw_params      = cs42xx8_hw_params,
        .hw_free        = cs42xx8_hw_free,
-       .digital_mute   = cs42xx8_digital_mute,
+       .mute_stream    = cs42xx8_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver cs42xx8_dai = {
index ade7477..f566604 100644 (file)
@@ -116,7 +116,7 @@ static int cs4341_hw_params(struct snd_pcm_substream *substream,
                                             CS4341_MODE2_DIF, mode);
 }
 
-static int cs4341_digital_mute(struct snd_soc_dai *dai, int mute)
+static int cs4341_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        int ret;
@@ -174,7 +174,8 @@ static const struct snd_kcontrol_new cs4341_controls[] = {
 static const struct snd_soc_dai_ops cs4341_dai_ops = {
        .set_fmt        = cs4341_set_fmt,
        .hw_params      = cs4341_hw_params,
-       .digital_mute   = cs4341_digital_mute,
+       .mute_stream    = cs4341_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver cs4341_dai = {
index 3381209..fd55263 100644 (file)
@@ -131,7 +131,7 @@ static int cs4349_pcm_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int cs4349_digital_mute(struct snd_soc_dai *dai, int mute)
+static int cs4349_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        int reg;
@@ -236,7 +236,8 @@ static const struct snd_soc_dapm_route cs4349_routes[] = {
 static const struct snd_soc_dai_ops cs4349_dai_ops = {
        .hw_params      = cs4349_pcm_hw_params,
        .set_fmt        = cs4349_set_dai_fmt,
-       .digital_mute   = cs4349_digital_mute,
+       .mute_stream    = cs4349_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver cs4349_dai = {
index 2bb727d..3d05c37 100644 (file)
@@ -924,7 +924,7 @@ static int da7210_set_dai_fmt(struct snd_soc_dai *codec_dai, u32 fmt)
        return 0;
 }
 
-static int da7210_mute(struct snd_soc_dai *dai, int mute)
+static int da7210_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u8 mute_reg = snd_soc_component_read(component, DA7210_DAC_HPF) & 0xFB;
@@ -1036,7 +1036,8 @@ static const struct snd_soc_dai_ops da7210_dai_ops = {
        .set_fmt        = da7210_set_dai_fmt,
        .set_sysclk     = da7210_set_dai_sysclk,
        .set_pll        = da7210_set_dai_pll,
-       .digital_mute   = da7210_mute,
+       .mute_stream    = da7210_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver da7210_dai = {
index fe93ec7..7240246 100644 (file)
@@ -1332,7 +1332,7 @@ static int da7213_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
        return 0;
 }
 
-static int da7213_mute(struct snd_soc_dai *dai, int mute)
+static int da7213_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -1528,7 +1528,8 @@ static int da7213_set_component_pll(struct snd_soc_component *component,
 static const struct snd_soc_dai_ops da7213_dai_ops = {
        .hw_params      = da7213_hw_params,
        .set_fmt        = da7213_set_dai_fmt,
-       .digital_mute   = da7213_mute,
+       .mute_stream    = da7213_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver da7213_dai = {
index e93436c..b0d9ca6 100644 (file)
@@ -1211,7 +1211,7 @@ static int da9055_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
        return 0;
 }
 
-static int da9055_mute(struct snd_soc_dai *dai, int mute)
+static int da9055_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -1324,7 +1324,8 @@ static const struct snd_soc_dai_ops da9055_dai_ops = {
        .set_fmt        = da9055_set_dai_fmt,
        .set_sysclk     = da9055_set_dai_sysclk,
        .set_pll        = da9055_set_dai_pll,
-       .digital_mute   = da9055_mute,
+       .mute_stream    = da9055_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver da9055_dai = {
index 70af35c..bd5d230 100644 (file)
@@ -507,7 +507,7 @@ static int es8316_pcm_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int es8316_mute(struct snd_soc_dai *dai, int mute)
+static int es8316_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        snd_soc_component_update_bits(dai->component, ES8316_DAC_SET1, 0x20,
                            mute ? 0x20 : 0);
@@ -522,7 +522,8 @@ static const struct snd_soc_dai_ops es8316_ops = {
        .hw_params = es8316_pcm_hw_params,
        .set_fmt = es8316_set_dai_fmt,
        .set_sysclk = es8316_set_dai_sysclk,
-       .digital_mute = es8316_mute,
+       .mute_stream = es8316_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver es8316_dai = {
index 757e740..7e26231 100644 (file)
@@ -449,7 +449,7 @@ static const struct snd_soc_dapm_route es8328_dapm_routes[] = {
        { "ROUT2", NULL, "Right Out 2" },
 };
 
-static int es8328_mute(struct snd_soc_dai *dai, int mute)
+static int es8328_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        return snd_soc_component_update_bits(dai->component, ES8328_DACCONTROL3,
                        ES8328_DACCONTROL3_DACMUTE,
@@ -692,9 +692,10 @@ static int es8328_set_bias_level(struct snd_soc_component *component,
 static const struct snd_soc_dai_ops es8328_dai_ops = {
        .startup        = es8328_startup,
        .hw_params      = es8328_hw_params,
-       .digital_mute   = es8328_mute,
+       .mute_stream    = es8328_mute,
        .set_sysclk     = es8328_set_sysclk,
        .set_fmt        = es8328_set_dai_fmt,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver es8328_dai = {
index f005751..bc760a8 100644 (file)
@@ -558,15 +558,24 @@ static int hdmi_codec_i2s_set_fmt(struct snd_soc_dai *dai,
        return 0;
 }
 
-static int hdmi_codec_digital_mute(struct snd_soc_dai *dai, int mute)
+static int hdmi_codec_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
 
-       if (hcp->hcd.ops->digital_mute)
-               return hcp->hcd.ops->digital_mute(dai->dev->parent,
-                                                 hcp->hcd.data, mute);
-
-       return 0;
+       /*
+        * ignore if direction was CAPTURE
+        * and it had .no_capture_mute flag
+        * see
+        *      snd_soc_dai_digital_mute()
+        */
+       if (hcp->hcd.ops->mute_stream &&
+           (direction == SNDRV_PCM_STREAM_PLAYBACK ||
+            !hcp->hcd.ops->no_capture_mute))
+               return hcp->hcd.ops->mute_stream(dai->dev->parent,
+                                                hcp->hcd.data,
+                                                mute, direction);
+
+       return -ENOTSUPP;
 }
 
 static const struct snd_soc_dai_ops hdmi_codec_i2s_dai_ops = {
@@ -574,14 +583,14 @@ static const struct snd_soc_dai_ops hdmi_codec_i2s_dai_ops = {
        .shutdown       = hdmi_codec_shutdown,
        .hw_params      = hdmi_codec_hw_params,
        .set_fmt        = hdmi_codec_i2s_set_fmt,
-       .digital_mute   = hdmi_codec_digital_mute,
+       .mute_stream    = hdmi_codec_mute,
 };
 
 static const struct snd_soc_dai_ops hdmi_codec_spdif_dai_ops = {
        .startup        = hdmi_codec_startup,
        .shutdown       = hdmi_codec_shutdown,
        .hw_params      = hdmi_codec_hw_params,
-       .digital_mute   = hdmi_codec_digital_mute,
+       .mute_stream    = hdmi_codec_mute,
 };
 
 #define HDMI_RATES     (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |\
index 3626f70..79afced 100644 (file)
@@ -860,7 +860,7 @@ static const struct snd_soc_dapm_route isabelle_intercon[] = {
        { "LINEOUT2", NULL, "LINEOUT2 Driver" },
 };
 
-static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute)
+static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        snd_soc_component_update_bits(dai->component, ISABELLE_DAC1_SOFTRAMP_REG,
                        BIT(4), (mute ? BIT(4) : 0));
@@ -868,7 +868,7 @@ static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute)
        return 0;
 }
 
-static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute)
+static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        snd_soc_component_update_bits(dai->component, ISABELLE_DAC2_SOFTRAMP_REG,
                        BIT(4), (mute ? BIT(4) : 0));
@@ -876,7 +876,7 @@ static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute)
        return 0;
 }
 
-static int isabelle_line_mute(struct snd_soc_dai *dai, int mute)
+static int isabelle_line_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        snd_soc_component_update_bits(dai->component, ISABELLE_DAC3_SOFTRAMP_REG,
                        BIT(4), (mute ? BIT(4) : 0));
@@ -1014,19 +1014,22 @@ static int isabelle_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
 static const struct snd_soc_dai_ops isabelle_hs_dai_ops = {
        .hw_params      = isabelle_hw_params,
        .set_fmt        = isabelle_set_dai_fmt,
-       .digital_mute   = isabelle_hs_mute,
+       .mute_stream    = isabelle_hs_mute,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops isabelle_hf_dai_ops = {
        .hw_params      = isabelle_hw_params,
        .set_fmt        = isabelle_set_dai_fmt,
-       .digital_mute   = isabelle_hf_mute,
+       .mute_stream    = isabelle_hf_mute,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops isabelle_line_dai_ops = {
        .hw_params      = isabelle_hw_params,
        .set_fmt        = isabelle_set_dai_fmt,
-       .digital_mute   = isabelle_line_mute,
+       .mute_stream    = isabelle_line_mute,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops isabelle_ul_dai_ops = {
index 4dee585..c0a28f0 100644 (file)
@@ -264,7 +264,7 @@ static int jz4770_codec_pcm_trigger(struct snd_pcm_substream *substream,
        return ret;
 }
 
-static int jz4770_codec_digital_mute(struct snd_soc_dai *dai, int mute)
+static int jz4770_codec_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *codec = dai->component;
        struct jz_codec *jz_codec = snd_soc_component_get_drvdata(codec);
@@ -752,7 +752,8 @@ static const struct snd_soc_dai_ops jz4770_codec_dai_ops = {
        .shutdown       = jz4770_codec_shutdown,
        .hw_params      = jz4770_codec_hw_params,
        .trigger        = jz4770_codec_pcm_trigger,
-       .digital_mute   = jz4770_codec_digital_mute,
+       .mute_stream    = jz4770_codec_mute_stream,
+       .no_capture_mute = 1,
 };
 
 #define JZ_CODEC_FORMATS (SNDRV_PCM_FMTBIT_S16_LE  | \
index f864b07..06ab61f 100644 (file)
@@ -1218,35 +1218,35 @@ static int lm49453_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
        return 0;
 }
 
-static int lm49453_hp_mute(struct snd_soc_dai *dai, int mute)
+static int lm49453_hp_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(1)|BIT(0),
                            (mute ? (BIT(1)|BIT(0)) : 0));
        return 0;
 }
 
-static int lm49453_lo_mute(struct snd_soc_dai *dai, int mute)
+static int lm49453_lo_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(3)|BIT(2),
                            (mute ? (BIT(3)|BIT(2)) : 0));
        return 0;
 }
 
-static int lm49453_ls_mute(struct snd_soc_dai *dai, int mute)
+static int lm49453_ls_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(5)|BIT(4),
                            (mute ? (BIT(5)|BIT(4)) : 0));
        return 0;
 }
 
-static int lm49453_ep_mute(struct snd_soc_dai *dai, int mute)
+static int lm49453_ep_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(4),
                            (mute ? BIT(4) : 0));
        return 0;
 }
 
-static int lm49453_ha_mute(struct snd_soc_dai *dai, int mute)
+static int lm49453_ha_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(7)|BIT(6),
                            (mute ? (BIT(7)|BIT(6)) : 0));
@@ -1288,35 +1288,40 @@ static const struct snd_soc_dai_ops lm49453_headset_dai_ops = {
        .hw_params      = lm49453_hw_params,
        .set_sysclk     = lm49453_set_dai_sysclk,
        .set_fmt        = lm49453_set_dai_fmt,
-       .digital_mute   = lm49453_hp_mute,
+       .mute_stream    = lm49453_hp_mute,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops lm49453_speaker_dai_ops = {
        .hw_params      = lm49453_hw_params,
        .set_sysclk     = lm49453_set_dai_sysclk,
        .set_fmt        = lm49453_set_dai_fmt,
-       .digital_mute   = lm49453_ls_mute,
+       .mute_stream    = lm49453_ls_mute,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops lm49453_haptic_dai_ops = {
        .hw_params      = lm49453_hw_params,
        .set_sysclk     = lm49453_set_dai_sysclk,
        .set_fmt        = lm49453_set_dai_fmt,
-       .digital_mute   = lm49453_ha_mute,
+       .mute_stream    = lm49453_ha_mute,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops lm49453_ep_dai_ops = {
        .hw_params      = lm49453_hw_params,
        .set_sysclk     = lm49453_set_dai_sysclk,
        .set_fmt        = lm49453_set_dai_fmt,
-       .digital_mute   = lm49453_ep_mute,
+       .mute_stream    = lm49453_ep_mute,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops lm49453_lineout_dai_ops = {
        .hw_params      = lm49453_hw_params,
        .set_sysclk     = lm49453_set_dai_sysclk,
        .set_fmt        = lm49453_set_dai_fmt,
-       .digital_mute   = lm49453_lo_mute,
+       .mute_stream    = lm49453_lo_mute,
+       .no_capture_mute = 1,
 };
 
 /* LM49453 dai structure. */
index 1f18176..4be24e7 100644 (file)
@@ -1274,7 +1274,8 @@ static int max98088_dai2_set_fmt(struct snd_soc_dai *codec_dai,
        return 0;
 }
 
-static int max98088_dai1_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int max98088_dai1_mute(struct snd_soc_dai *codec_dai, int mute,
+                             int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        int reg;
@@ -1289,7 +1290,8 @@ static int max98088_dai1_digital_mute(struct snd_soc_dai *codec_dai, int mute)
        return 0;
 }
 
-static int max98088_dai2_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int max98088_dai2_mute(struct snd_soc_dai *codec_dai, int mute,
+                             int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        int reg;
@@ -1354,14 +1356,16 @@ static const struct snd_soc_dai_ops max98088_dai1_ops = {
        .set_sysclk = max98088_dai_set_sysclk,
        .set_fmt = max98088_dai1_set_fmt,
        .hw_params = max98088_dai1_hw_params,
-       .digital_mute = max98088_dai1_digital_mute,
+       .mute_stream = max98088_dai1_mute,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dai_ops max98088_dai2_ops = {
        .set_sysclk = max98088_dai_set_sysclk,
        .set_fmt = max98088_dai2_set_fmt,
        .hw_params = max98088_dai2_hw_params,
-       .digital_mute = max98088_dai2_digital_mute,
+       .mute_stream = max98088_dai2_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver max98088_dai[] = {
index a61c563..945a79e 100644 (file)
@@ -2017,7 +2017,8 @@ static int max98090_dai_set_sysclk(struct snd_soc_dai *dai,
        return 0;
 }
 
-static int max98090_dai_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int max98090_dai_mute(struct snd_soc_dai *codec_dai, int mute,
+                            int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        int regval;
@@ -2347,8 +2348,9 @@ static const struct snd_soc_dai_ops max98090_dai_ops = {
        .set_fmt = max98090_dai_set_fmt,
        .set_tdm_slot = max98090_set_tdm_slot,
        .hw_params = max98090_dai_hw_params,
-       .digital_mute = max98090_dai_digital_mute,
+       .mute_stream = max98090_dai_mute,
        .trigger = max98090_dai_trigger,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver max98090_dai[] = {
index c72cb28..fcb3114 100644 (file)
@@ -283,7 +283,7 @@ static int max9867_dai_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int max9867_mute(struct snd_soc_dai *dai, int mute)
+static int max9867_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component);
@@ -393,9 +393,10 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai,
 static const struct snd_soc_dai_ops max9867_dai_ops = {
        .set_sysclk     = max9867_set_dai_sysclk,
        .set_fmt        = max9867_dai_set_fmt,
-       .digital_mute   = max9867_mute,
+       .mute_stream    = max9867_mute,
        .startup        = max9867_startup,
        .hw_params      = max9867_dai_hw_params,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver max9867_dai[] = {
index 55823bc..70c17be 100644 (file)
@@ -372,7 +372,7 @@ static int ml26124_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int ml26124_mute(struct snd_soc_dai *dai, int mute)
+static int ml26124_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct ml26124_priv *priv = snd_soc_component_get_drvdata(component);
@@ -492,9 +492,10 @@ static int ml26124_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops ml26124_dai_ops = {
        .hw_params      = ml26124_hw_params,
-       .digital_mute   = ml26124_mute,
+       .mute_stream    = ml26124_mute,
        .set_fmt        = ml26124_set_dai_fmt,
        .set_sysclk     = ml26124_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver ml26124_dai = {
index 79928dd..609aeeb 100644 (file)
@@ -900,7 +900,7 @@ static int nau8822_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int nau8822_mute(struct snd_soc_dai *dai, int mute)
+static int nau8822_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -967,10 +967,11 @@ static int nau8822_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops nau8822_dai_ops = {
        .hw_params      = nau8822_hw_params,
-       .digital_mute   = nau8822_mute,
+       .mute_stream    = nau8822_mute,
        .set_fmt        = nau8822_set_dai_fmt,
        .set_sysclk     = nau8822_set_dai_sysclk,
        .set_pll        = nau8822_set_pll,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver nau8822_dai = {
index 4767e15..07ed8fd 100644 (file)
@@ -147,7 +147,7 @@ static int pcm1681_set_dai_fmt(struct snd_soc_dai *codec_dai,
        return 0;
 }
 
-static int pcm1681_digital_mute(struct snd_soc_dai *dai, int mute)
+static int pcm1681_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct pcm1681_private *priv = snd_soc_component_get_drvdata(component);
@@ -205,7 +205,8 @@ static int pcm1681_hw_params(struct snd_pcm_substream *substream,
 static const struct snd_soc_dai_ops pcm1681_dai_ops = {
        .set_fmt        = pcm1681_set_dai_fmt,
        .hw_params      = pcm1681_hw_params,
-       .digital_mute   = pcm1681_digital_mute,
+       .mute_stream    = pcm1681_mute,
+       .no_capture_mute = 1,
 };
 
 static const struct snd_soc_dapm_widget pcm1681_dapm_widgets[] = {
index 8df6447..620dec1 100644 (file)
@@ -60,7 +60,7 @@ static int pcm1789_set_dai_fmt(struct snd_soc_dai *codec_dai,
        return 0;
 }
 
-static int pcm1789_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int pcm1789_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        struct pcm1789_private *priv = snd_soc_component_get_drvdata(component);
@@ -167,8 +167,9 @@ static int pcm1789_trigger(struct snd_pcm_substream *substream, int cmd,
 static const struct snd_soc_dai_ops pcm1789_dai_ops = {
        .set_fmt        = pcm1789_set_dai_fmt,
        .hw_params      = pcm1789_hw_params,
-       .digital_mute   = pcm1789_digital_mute,
+       .mute_stream    = pcm1789_mute,
        .trigger        = pcm1789_trigger,
+       .no_capture_mute = 1,
 };
 
 static const DECLARE_TLV_DB_SCALE(pcm1789_dac_tlv, -12000, 50, 1);
index 9e70b73..ee60373 100644 (file)
@@ -76,7 +76,7 @@ static int pcm179x_set_dai_fmt(struct snd_soc_dai *codec_dai,
        return 0;
 }
 
-static int pcm179x_digital_mute(struct snd_soc_dai *dai, int mute)
+static int pcm179x_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct pcm179x_private *priv = snd_soc_component_get_drvdata(component);
@@ -145,7 +145,8 @@ static int pcm179x_hw_params(struct snd_pcm_substream *substream,
 static const struct snd_soc_dai_ops pcm179x_dai_ops = {
        .set_fmt        = pcm179x_set_dai_fmt,
        .hw_params      = pcm179x_hw_params,
-       .digital_mute   = pcm179x_digital_mute,
+       .mute_stream    = pcm179x_mute,
+       .no_capture_mute = 1,
 };
 
 static const DECLARE_TLV_DB_SCALE(pcm179x_dac_tlv, -12000, 50, 1);
index 9711fab..5e445fe 100644 (file)
@@ -290,7 +290,7 @@ static int pcm3168a_reset(struct pcm3168a_priv *pcm3168a)
                        PCM3168A_MRST_MASK | PCM3168A_SRST_MASK);
 }
 
-static int pcm3168a_digital_mute(struct snd_soc_dai *dai, int mute)
+static int pcm3168a_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct pcm3168a_priv *pcm3168a = snd_soc_component_get_drvdata(component);
@@ -570,8 +570,9 @@ static const struct snd_soc_dai_ops pcm3168a_dai_ops = {
        .set_fmt        = pcm3168a_set_dai_fmt,
        .set_sysclk     = pcm3168a_set_dai_sysclk,
        .hw_params      = pcm3168a_hw_params,
-       .digital_mute   = pcm3168a_digital_mute,
+       .mute_stream    = pcm3168a_mute,
        .set_tdm_slot   = pcm3168a_set_tdm_slot,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver pcm3168a_dais[] = {
index 4cbef9a..8153d3d 100644 (file)
@@ -1394,7 +1394,7 @@ static int pcm512x_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio)
        return 0;
 }
 
-static int pcm512x_digital_mute(struct snd_soc_dai *dai, int mute)
+static int pcm512x_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component);
@@ -1445,8 +1445,9 @@ static const struct snd_soc_dai_ops pcm512x_dai_ops = {
        .startup = pcm512x_dai_startup,
        .hw_params = pcm512x_hw_params,
        .set_fmt = pcm512x_set_fmt,
-       .digital_mute = pcm512x_digital_mute,
+       .mute_stream = pcm512x_mute,
        .set_bclk_ratio = pcm512x_set_bclk_ratio,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver pcm512x_dai = {
index 115706a..940a2fa 100644 (file)
@@ -107,7 +107,7 @@ static int rk3328_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
        return 0;
 }
 
-static int rk3328_digital_mute(struct snd_soc_dai *dai, int mute)
+static int rk3328_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct rk3328_codec_priv *rk3328 =
                snd_soc_component_get_drvdata(dai->component);
@@ -316,9 +316,10 @@ static void rk3328_pcm_shutdown(struct snd_pcm_substream *substream,
 static const struct snd_soc_dai_ops rk3328_dai_ops = {
        .hw_params = rk3328_hw_params,
        .set_fmt = rk3328_set_dai_fmt,
-       .digital_mute = rk3328_digital_mute,
+       .mute_stream = rk3328_mute_stream,
        .startup = rk3328_pcm_startup,
        .shutdown = rk3328_pcm_shutdown,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver rk3328_dai[] = {
index eb08976..4d6ff81 100644 (file)
@@ -775,7 +775,7 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = {
 };
 
 /* mute the codec used by alsa core */
-static int sgtl5000_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+static int sgtl5000_mute_stream(struct snd_soc_dai *codec_dai, int mute, int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
        u16 i2s_pwr = SGTL5000_I2S_IN_POWERUP;
@@ -1160,9 +1160,10 @@ static int sgtl5000_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops sgtl5000_ops = {
        .hw_params = sgtl5000_pcm_hw_params,
-       .digital_mute = sgtl5000_digital_mute,
+       .mute_stream = sgtl5000_mute_stream,
        .set_fmt = sgtl5000_set_dai_fmt,
        .set_sysclk = sgtl5000_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver sgtl5000_dai = {
index c47e3c4..09449c6 100644 (file)
@@ -388,7 +388,7 @@ static int ssm2518_hw_params(struct snd_pcm_substream *substream,
                                SSM2518_POWER1_MCS_MASK, mcs << 1);
 }
 
-static int ssm2518_mute(struct snd_soc_dai *dai, int mute)
+static int ssm2518_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct ssm2518 *ssm2518 = snd_soc_component_get_drvdata(dai->component);
        unsigned int val;
@@ -623,9 +623,10 @@ static int ssm2518_startup(struct snd_pcm_substream *substream,
 static const struct snd_soc_dai_ops ssm2518_dai_ops = {
        .startup = ssm2518_startup,
        .hw_params      = ssm2518_hw_params,
-       .digital_mute   = ssm2518_mute,
+       .mute_stream    = ssm2518_mute,
        .set_fmt        = ssm2518_set_dai_fmt,
        .set_tdm_slot   = ssm2518_set_tdm_slot,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver ssm2518_dai = {
index 464a4d7..9051602 100644 (file)
@@ -338,7 +338,7 @@ static int ssm2602_startup(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int ssm2602_mute(struct snd_soc_dai *dai, int mute)
+static int ssm2602_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct ssm2602_priv *ssm2602 = snd_soc_component_get_drvdata(dai->component);
 
@@ -505,9 +505,10 @@ static int ssm2602_set_bias_level(struct snd_soc_component *component,
 static const struct snd_soc_dai_ops ssm2602_dai_ops = {
        .startup        = ssm2602_startup,
        .hw_params      = ssm2602_hw_params,
-       .digital_mute   = ssm2602_mute,
+       .mute_stream    = ssm2602_mute,
        .set_sysclk     = ssm2602_set_dai_sysclk,
        .set_fmt        = ssm2602_set_dai_fmt,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver ssm2602_dai = {
index bb4958b..811b1a2 100644 (file)
@@ -220,7 +220,7 @@ static int ssm4567_hw_params(struct snd_pcm_substream *substream,
                                SSM4567_DAC_FS_MASK, dacfs);
 }
 
-static int ssm4567_mute(struct snd_soc_dai *dai, int mute)
+static int ssm4567_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct ssm4567 *ssm4567 = snd_soc_component_get_drvdata(dai->component);
        unsigned int val;
@@ -390,9 +390,10 @@ static int ssm4567_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops ssm4567_dai_ops = {
        .hw_params      = ssm4567_hw_params,
-       .digital_mute   = ssm4567_mute,
+       .mute_stream    = ssm4567_mute,
        .set_fmt        = ssm4567_set_dai_fmt,
        .set_tdm_slot   = ssm4567_set_tdm_slot,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver ssm4567_dai = {
index 2881a0f..97b5f34 100644 (file)
@@ -251,7 +251,7 @@ static int sta529_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int sta529_mute(struct snd_soc_dai *dai, int mute)
+static int sta529_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        u8 val = 0;
 
@@ -291,7 +291,8 @@ static int sta529_set_dai_fmt(struct snd_soc_dai *codec_dai, u32 fmt)
 static const struct snd_soc_dai_ops sta529_dai_ops = {
        .hw_params      =       sta529_hw_params,
        .set_fmt        =       sta529_set_dai_fmt,
-       .digital_mute   =       sta529_mute,
+       .mute_stream    =       sta529_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver sta529_dai = {
index d9d239d..e23905e 100644 (file)
@@ -465,7 +465,7 @@ static int tas2552_set_dai_tdm_slot(struct snd_soc_dai *dai,
        return 0;
 }
 
-static int tas2552_mute(struct snd_soc_dai *dai, int mute)
+static int tas2552_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        u8 cfg1_reg = 0;
        struct snd_soc_component *component = dai->component;
@@ -519,7 +519,8 @@ static const struct snd_soc_dai_ops tas2552_speaker_dai_ops = {
        .set_sysclk     = tas2552_set_dai_sysclk,
        .set_fmt        = tas2552_set_dai_fmt,
        .set_tdm_slot   = tas2552_set_dai_tdm_slot,
-       .digital_mute = tas2552_mute,
+       .mute_stream    = tas2552_mute,
+       .no_capture_mute = 1,
 };
 
 /* Formats supported by TAS2552 driver. */
index 5c28af3..e746280 100644 (file)
@@ -394,7 +394,7 @@ static int tas2562_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
        return 0;
 }
 
-static int tas2562_mute(struct snd_soc_dai *dai, int mute)
+static int tas2562_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -612,7 +612,8 @@ static const struct snd_soc_dai_ops tas2562_speaker_dai_ops = {
        .hw_params      = tas2562_hw_params,
        .set_fmt        = tas2562_set_dai_fmt,
        .set_tdm_slot   = tas2562_set_dai_tdm_slot,
-       .digital_mute   = tas2562_mute,
+       .mute_stream    = tas2562_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver tas2562_dai[] = {
index 54c8135..4538b2d 100644 (file)
@@ -189,7 +189,7 @@ static const struct snd_soc_dapm_route tas2770_audio_map[] = {
        {"VSENSE", "Switch", "VMON"},
 };
 
-static int tas2770_mute(struct snd_soc_dai *dai, int mute)
+static int tas2770_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        int ret;
@@ -530,10 +530,11 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai,
 }
 
 static struct snd_soc_dai_ops tas2770_dai_ops = {
-       .digital_mute = tas2770_mute,
+       .mute_stream = tas2770_mute,
        .hw_params  = tas2770_hw_params,
        .set_fmt    = tas2770_set_fmt,
        .set_tdm_slot = tas2770_set_dai_tdm_slot,
+       .no_capture_mute = 1,
 };
 
 #define TAS2770_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
index 5b7f9fc..835a723 100644 (file)
@@ -301,7 +301,7 @@ static int tas571x_hw_params(struct snd_pcm_substream *substream,
                                  TAS571X_SDI_FMT_MASK, val);
 }
 
-static int tas571x_mute(struct snd_soc_dai *dai, int mute)
+static int tas571x_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u8 sysctl2;
@@ -354,7 +354,8 @@ static int tas571x_set_bias_level(struct snd_soc_component *component,
 static const struct snd_soc_dai_ops tas571x_dai_ops = {
        .set_fmt        = tas571x_set_dai_fmt,
        .hw_params      = tas571x_hw_params,
-       .digital_mute   = tas571x_mute,
+       .mute_stream    = tas571x_mute,
+       .no_capture_mute = 1,
 };
 
 
index e159f83..139ac5e 100644 (file)
@@ -199,7 +199,7 @@ error_snd_soc_component_update_bits:
        return ret;
 }
 
-static int tas5720_mute(struct snd_soc_dai *dai, int mute)
+static int tas5720_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        int ret;
@@ -604,7 +604,8 @@ static const struct snd_soc_dai_ops tas5720_speaker_dai_ops = {
        .hw_params      = tas5720_hw_params,
        .set_fmt        = tas5720_set_dai_fmt,
        .set_tdm_slot   = tas5720_set_dai_tdm_slot,
-       .digital_mute   = tas5720_mute,
+       .mute_stream    = tas5720_mute,
+       .no_capture_mute = 1,
 };
 
 /*
index aaba392..6198138 100644 (file)
@@ -252,7 +252,7 @@ static int tas6424_set_dai_tdm_slot(struct snd_soc_dai *dai,
        return 0;
 }
 
-static int tas6424_mute(struct snd_soc_dai *dai, int mute)
+static int tas6424_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        struct tas6424_data *tas6424 = snd_soc_component_get_drvdata(component);
@@ -382,7 +382,8 @@ static const struct snd_soc_dai_ops tas6424_speaker_dai_ops = {
        .hw_params      = tas6424_hw_params,
        .set_fmt        = tas6424_set_dai_fmt,
        .set_tdm_slot   = tas6424_set_dai_tdm_slot,
-       .digital_mute   = tas6424_mute,
+       .mute_stream    = tas6424_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver tas6424_dai[] = {
index abc114a..3d8e8c2 100644 (file)
@@ -93,7 +93,7 @@ static int tfa9879_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int tfa9879_digital_mute(struct snd_soc_dai *dai, int mute)
+static int tfa9879_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -251,8 +251,9 @@ static const struct regmap_config tfa9879_regmap = {
 
 static const struct snd_soc_dai_ops tfa9879_dai_ops = {
        .hw_params = tfa9879_hw_params,
-       .digital_mute = tfa9879_digital_mute,
+       .mute_stream = tfa9879_mute_stream,
        .set_fmt = tfa9879_set_fmt,
+       .no_capture_mute = 1,
 };
 
 #define TFA9879_RATES SNDRV_PCM_RATE_8000_96000
index 7d5b6db..2400093 100644 (file)
@@ -404,7 +404,7 @@ static void tlv320aic23_shutdown(struct snd_pcm_substream *substream,
                aic23->requested_adc = 0;
 }
 
-static int tlv320aic23_mute(struct snd_soc_dai *dai, int mute)
+static int tlv320aic23_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u16 reg;
@@ -512,9 +512,10 @@ static const struct snd_soc_dai_ops tlv320aic23_dai_ops = {
        .prepare        = tlv320aic23_pcm_prepare,
        .hw_params      = tlv320aic23_hw_params,
        .shutdown       = tlv320aic23_shutdown,
-       .digital_mute   = tlv320aic23_mute,
+       .mute_stream    = tlv320aic23_mute,
        .set_fmt        = tlv320aic23_set_dai_fmt,
        .set_sysclk     = tlv320aic23_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver tlv320aic23_dai = {
index 4569bbc..c7baef8 100644 (file)
@@ -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 = {
index 6694e56..a14dd2d 100644 (file)
@@ -972,7 +972,8 @@ static int aic31xx_hw_params(struct snd_pcm_substream *substream,
        return aic31xx_setup_pll(component, params);
 }
 
-static int aic31xx_dac_mute(struct snd_soc_dai *codec_dai, int mute)
+static int aic31xx_dac_mute(struct snd_soc_dai *codec_dai, int mute,
+                           int direction)
 {
        struct snd_soc_component *component = codec_dai->component;
 
@@ -1379,7 +1380,8 @@ static const struct snd_soc_dai_ops aic31xx_dai_ops = {
        .hw_params      = aic31xx_hw_params,
        .set_sysclk     = aic31xx_set_dai_sysclk,
        .set_fmt        = aic31xx_set_dai_fmt,
-       .digital_mute   = aic31xx_dac_mute,
+       .mute_stream    = aic31xx_dac_mute,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver dac31xx_dai_driver[] = {
index 8682dae..4678028 100644 (file)
@@ -812,7 +812,7 @@ static int aic32x4_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int aic32x4_mute(struct snd_soc_dai *dai, int mute)
+static int aic32x4_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
 
@@ -866,9 +866,10 @@ static int aic32x4_set_bias_level(struct snd_soc_component *component,
 
 static const struct snd_soc_dai_ops aic32x4_ops = {
        .hw_params = aic32x4_hw_params,
-       .digital_mute = aic32x4_mute,
+       .mute_stream = aic32x4_mute,
        .set_fmt = aic32x4_set_dai_fmt,
        .set_sysclk = aic32x4_set_dai_sysclk,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver aic32x4_dai = {
index 6860743..6d066bc 100644 (file)
@@ -1216,7 +1216,7 @@ static int aic3x_prepare(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int aic3x_mute(struct snd_soc_dai *dai, int mute)
+static int aic3x_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct snd_soc_component *component = dai->component;
        u8 ldac_reg = snd_soc_component_read(component, LDAC_VOL) & ~MUTE_ON;
@@ -1481,10 +1481,11 @@ static int aic3x_set_bias_level(struct snd_soc_component *component,
 static const struct snd_soc_dai_ops aic3x_dai_ops = {
        .hw_params      = aic3x_hw_params,
        .prepare        = aic3x_prepare,
-       .digital_mute   = aic3x_mute,
+       .mute_stream    = aic3x_mute,
        .set_sysclk     = aic3x_set_dai_sysclk,
        .set_fmt        = aic3x_set_dai_fmt,
        .set_tdm_slot   = aic3x_set_dai_tdm_slot,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver aic3x_dai = {
index f34637a..b372033 100644 (file)
@@ -997,7 +997,7 @@ static void twl6040_mute_path(struct snd_soc_component *component, enum twl6040_
        }
 }
 
-static int twl6040_digital_mute(struct snd_soc_dai *dai, int mute)
+static int twl6040_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
 {
        switch (dai->id) {
        case TWL6040_DAI_LEGACY:
@@ -1020,7 +1020,8 @@ static const struct snd_soc_dai_ops twl6040_dai_ops = {
        .hw_params      = twl6040_hw_params,
        .prepare        = twl6040_prepare,
        .set_sysclk     = twl6040_set_dai_sysclk,
-       .digital_mute   = twl6040_digital_mute,
+       .mute_stream    = twl6040_mute_stream,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver twl6040_dai[] = {
index 1cc7f56..bf9182c 100644 (file)
@@ -117,7 +117,7 @@ static inline void uda134x_reset(struct snd_soc_component *component)
        regmap_update_bits(uda134x->regmap, UDA134X_STATUS0, mask, 0);
 }
 
-static int uda134x_mute(struct snd_soc_dai *dai, int mute)
+static int uda134x_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct uda134x_priv *uda134x = snd_soc_component_get_drvdata(dai->component);
        unsigned int mask = 1<<2;
@@ -416,9 +416,10 @@ static const struct snd_soc_dai_ops uda134x_dai_ops = {
        .startup        = uda134x_startup,
        .shutdown       = uda134x_shutdown,
        .hw_params      = uda134x_hw_params,
-       .digital_mute   = uda134x_mute,
+       .mute_stream    = uda134x_mute,
        .set_sysclk     = uda134x_set_dai_sysclk,
        .set_fmt        = uda134x_set_dai_fmt,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver uda134x_dai = {
index 7fe7c1e..a6aa212 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 35ffa77..bf5e77c 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 63a877a..73c4a8b 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 d1fc529..85ad2f0 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 8a0f93f..bc4d161 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 bb5521f..2cd58d1 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 cae2cc3..304bf72 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 328df81..0e39943 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 970941f..9491817 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 f3c3112..deaa54b 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 d51be25..1176a6a 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 f174d7c..554acf5 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 3921af6..a9a6d76 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 a52cb8f..09f4980 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 d542570..1c360ba 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 41d87e1..016cd8a 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 0630dcb..513df47 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 e1ab2be..660ec46 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 e62a0a8..ef80d9f 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 df8cdc7..25c9600 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 2cefb79..21ae55c 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 953d12e..89c6507 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 e01ba53..a7acb89 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 78e1a30..d1d2d40 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 62f2c60..3f27482 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 646cfd8..d2c2d0d 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 13bca8e..9389407 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 ba71c2f..16bc860 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 8c9f82e..9f31008 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 903f8e8..a84ae87 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 ec75281..b896d9c 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 b5465e4..4a667ee 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
index 7ce6aa9..e769a5e 100644 (file)
@@ -108,7 +108,7 @@ static int axg_spdifout_trigger(struct snd_pcm_substream *substream, int cmd,
        }
 }
 
-static int axg_spdifout_digital_mute(struct snd_soc_dai *dai, int mute)
+static int axg_spdifout_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct axg_spdifout *priv = snd_soc_dai_get_drvdata(dai);
 
@@ -285,10 +285,11 @@ static void axg_spdifout_shutdown(struct snd_pcm_substream *substream,
 
 static const struct snd_soc_dai_ops axg_spdifout_ops = {
        .trigger        = axg_spdifout_trigger,
-       .digital_mute   = axg_spdifout_digital_mute,
+       .mute_stream    = axg_spdifout_mute,
        .hw_params      = axg_spdifout_hw_params,
        .startup        = axg_spdifout_startup,
        .shutdown       = axg_spdifout_shutdown,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver axg_spdifout_dai_drv[] = {
index b05e18b..458d2ea 100644 (file)
@@ -298,8 +298,14 @@ int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute,
 {
        int ret = -ENOTSUPP;
 
+       /*
+        * ignore if direction was CAPTURE
+        * and it had .no_capture_mute flag
+        */
        if (dai->driver->ops &&
-           dai->driver->ops->mute_stream)
+           dai->driver->ops->mute_stream &&
+           (direction == SNDRV_PCM_STREAM_PLAYBACK ||
+            !dai->driver->ops->no_capture_mute))
                ret = dai->driver->ops->mute_stream(dai, mute, direction);
        else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
                 dai->driver->ops &&
index 58d5843..38f9fff 100644 (file)
@@ -188,7 +188,7 @@ static int spdif_out_trigger(struct snd_pcm_substream *substream, int cmd,
        return ret;
 }
 
-static int spdif_digital_mute(struct snd_soc_dai *dai, int mute)
+static int spdif_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        struct spdif_out_dev *host = snd_soc_dai_get_drvdata(dai);
        u32 val;
@@ -229,7 +229,8 @@ static int spdif_mute_put(struct snd_kcontrol *kcontrol,
        if (host->saved_params.mute == ucontrol->value.integer.value[0])
                return 0;
 
-       spdif_digital_mute(cpu_dai, ucontrol->value.integer.value[0]);
+       spdif_mute(cpu_dai, ucontrol->value.integer.value[0],
+                  SNDRV_PCM_STREAM_PLAYBACK);
 
        return 1;
 }
@@ -250,11 +251,12 @@ static int spdif_soc_dai_probe(struct snd_soc_dai *dai)
 }
 
 static const struct snd_soc_dai_ops spdif_out_dai_ops = {
-       .digital_mute   = spdif_digital_mute,
+       .mute_stream    = spdif_mute,
        .startup        = spdif_out_startup,
        .shutdown       = spdif_out_shutdown,
        .trigger        = spdif_out_trigger,
        .hw_params      = spdif_out_hw_params,
+       .no_capture_mute = 1,
 };
 
 static struct snd_soc_dai_driver spdif_out_dai = {
index e17cd5e..5c47de9 100644 (file)
@@ -420,7 +420,7 @@ static struct snd_soc_ops ams_delta_ops;
  * Shares hardware with codec config pulse generation */
 static bool ams_delta_muted = 1;
 
-static int ams_delta_digital_mute(struct snd_soc_dai *dai, int mute)
+static int ams_delta_mute(struct snd_soc_dai *dai, int mute, int direction)
 {
        int apply;
 
@@ -439,18 +439,19 @@ static int ams_delta_digital_mute(struct snd_soc_dai *dai, int mute)
 
 /* Our codec DAI probably doesn't have its own .ops structure */
 static const struct snd_soc_dai_ops ams_delta_dai_ops = {
-       .digital_mute = ams_delta_digital_mute,
+       .mute_stream = ams_delta_mute,
+       .no_capture_mute = 1,
 };
 
 /* Will be used if the codec ever has its own digital_mute function */
 static int ams_delta_startup(struct snd_pcm_substream *substream)
 {
-       return ams_delta_digital_mute(NULL, 0);
+       return ams_delta_digital_mute(NULL, 0, substream->stream);
 }
 
 static void ams_delta_shutdown(struct snd_pcm_substream *substream)
 {
-       ams_delta_digital_mute(NULL, 1);
+       ams_delta_digital_mute(NULL, 1, substream->stream);
 }