All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] ASoC: wm8741: Add digital mute callback
@ 2019-02-10 15:28 Sergej Sawazki
  2019-02-11 15:43 ` Charles Keepax
  2019-02-12 14:21 ` Applied "ASoC: wm8741: Add digital mute callback" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Sergej Sawazki @ 2019-02-10 15:28 UTC (permalink / raw)
  To: broonie, lgirdwood, ckeepax; +Cc: ce3a, patches, alsa-devel, Sergej Sawazki

Signed-off-by: Sergej Sawazki <sergej@taudac.com>
---
Changes in v3:
 * Removed debug message.
 
 sound/soc/codecs/wm8741.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index 1fedf74..fdda83b 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 = {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-12 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-10 15:28 [PATCH v3] ASoC: wm8741: Add digital mute callback Sergej Sawazki
2019-02-11 15:43 ` Charles Keepax
2019-02-12 14:21 ` Applied "ASoC: wm8741: Add digital mute callback" to the asoc tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.