summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8741.c
diff options
context:
space:
mode:
authorSergej Sawazki <sergej@taudac.com>2019-02-10 16:28:04 +0100
committerMark Brown <broonie@kernel.org>2019-02-11 17:05:28 +0100
commit36b1599340b5bbaf4d4f015cbfe89b7bc8cd7873 (patch)
tree928dc593976c05748a8d68ac8f8f41f6d1694e7c /sound/soc/codecs/wm8741.c
parentASoC: hdac_hdmi: use devm_kzalloc for all structures (diff)
downloadlinux-36b1599340b5bbaf4d4f015cbfe89b7bc8cd7873.tar.xz
linux-36b1599340b5bbaf4d4f015cbfe89b7bc8cd7873.zip
ASoC: wm8741: Add digital mute callback
Signed-off-by: Sergej Sawazki <sergej@taudac.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm8741.c')
-rw-r--r--sound/soc/codecs/wm8741.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index 1fedf74da705..fdda83b7ca82 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -358,6 +358,15 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
return 0;
}
+int wm8741_mute(struct snd_soc_dai *codec_dai, int mute)
+{
+ struct snd_soc_component *component = codec_dai->component;
+
+ snd_soc_component_update_bits(component, WM8741_VOLUME_CONTROL,
+ WM8741_SOFT_MASK, !!mute << WM8741_SOFT_SHIFT);
+ return 0;
+}
+
#define WM8741_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | \
SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 | \
@@ -371,6 +380,7 @@ 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,
};
static struct snd_soc_dai_driver wm8741_dai = {