]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ASoC: codecs: merge .digital_mute() into .mute_stream()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 9 Jul 2020 01:56:20 +0000 (10:56 +0900)
committerMark Brown <broonie@kernel.org>
Thu, 16 Jul 2020 22:06:09 +0000 (23:06 +0100)
snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/875zaxxxi4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 files changed:
sound/soc/codecs/88pm860x-codec.c
sound/soc/codecs/ad193x.c
sound/soc/codecs/adau1701.c
sound/soc/codecs/cpcap.c
sound/soc/codecs/cq93vc.c
sound/soc/codecs/isabelle.c
sound/soc/codecs/jz4770.c
sound/soc/codecs/lm49453.c
sound/soc/codecs/ml26124.c
sound/soc/codecs/nau8822.c
sound/soc/codecs/rk3328_codec.c
sound/soc/codecs/sgtl5000.c
sound/soc/codecs/sta529.c
sound/soc/codecs/tfa9879.c
sound/soc/codecs/twl6040.c
sound/soc/codecs/uda134x.c

index 068914d0ef3d3d8e32710092fbcaad9ce8f5fe52..cac7e557edc80085aa9e0563d290bb316f438ef0 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 980e024a5720d19fbed54202d17df0f516c2e5ad..f37ab7eda615533fcf5570d0b4f1af6c479d4cab 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 115e296b2ad63931217508a40d7529d44b45b216..68130eaa64a404509f0aca81c854fcf0cb389b8e 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 d7f05b384f1fbb83b944cf072f34c3efd238b601..f046987ee4cdb3f44febe980ba3c1c6517c73c13 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 b0cc61178a41615bfd4ecb1ca0e477cb7bcf0863..0aae5790222aef28b905ac83c86b584a356d70f3 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 3626f70f77683673771061670fcf3fc5a1ac8faf..79afced75d76cb83b4835459b86358a090c3b4de 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 4dee585761c2478cd8d1305db424c0406531ea87..c0a28f06b09a7d845d67f2f4a6018952df375113 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 f864b07cb0b829e0f2f151d7442c88a3d40704df..06ab61f6f7199ccd58ce163021c4e521ca6b0eb2 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 55823bc95d06f577499fe056b570a22ab67c347c..70c17be455cae424bdbe9c2e22dbe59559e940d2 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 79928ddeb7a1c0908ffe543eca4b5425187c20df..609aeeb27818939d24a5636bbcde79895f47fdee 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 115706a55577d13189cd56032bd1950f845a13e9..940a2fa933edb458dc0588449e83ba49ae068d63 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 eb08976a7d0652ae683629cb13c0484f40f0877b..4d6ff811462287c0c32ba730ffc184564085ee8d 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 2881a0f7bb399a9aaf6e02bf16da7e6b9ce8db61..97b5f34027c0c4b77bb94153c755aa2bd4225767 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 abc114a3ae2bdfd736ca0c9d0b4af01527f785b4..3d8e8c2276f086e9c4f31fc31918c7b0149145a1 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 f34637afee515872b66581144abe0335aa65b8a5..b37203336c4e0a92dd7bf656d4440dae89e179da 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 1cc7f56912dc779bbe4caa85652d2feb71a1be32..bf9182cedb8294461ea31ec8126f5e8fb49c634c 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 = {