Commit 36b15993 authored by Sergej Sawazki's avatar Sergej Sawazki Committed by Mark Brown

ASoC: wm8741: Add digital mute callback

Signed-off-by: default avatarSergej Sawazki <sergej@taudac.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c7ba4e53
......@@ -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 = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment