From ebcf755c1a47c8776039407cfaa3ee66856e69c1 Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Thu, 26 Nov 2020 23:35:38 +0000 Subject: [PATCH] v5.9: .digital_mute merged into .mute_stream with adjustments Reference: commit e2978c45e5ed3bab7f69477b882ef588185b30cc Author: Kuninori Morimoto Date: Fri Jul 17 09:21:54 2020 +0900 ASoC: soc-dai: remove .digital_mute All drivers are now using .mute_stream. Let's remove .digital_mute. commit 22e9b54307987787efa0ee534aa9e31982ec1161 Merge: dc9584c5a3b8 a0234d0e6014 Author: Mark Brown Date: Fri Jul 17 14:47:04 2020 +0100 Merge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori Morimoto : These are v4 digital_mute() patch which adjusts to atmel which had conflict on v3. v3 -> v4 - tidyup for atmel which had conflict $ git diff dc9584c5a3b8...a0234d0e6014 commit bdd0c277d9846977ec3f175341d4e7475ed26ef7 Merge: d235b2823698 50891431aaad Author: Mark Brown Date: Thu Jul 16 23:51:51 2020 +0100 Merge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori Morimoto : 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 $ git diff d235b2823698...50891431aaad commit 350d993510115e3d9e78f1b3359bff7b68e88418 Author: Kuninori Morimoto Date: Thu Jul 9 10:55:41 2020 +0900 ASoC: soc-dai.c: add .no_capture_mute support --- ac108.c | 5 +++-- wm8960.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ac108.c b/ac108.c index 67edeae..4663df0 100644 --- a/ac108.c +++ b/ac108.c @@ -1124,7 +1124,7 @@ void ac108_aif_shutdown(struct snd_pcm_substream *substream, } } -int ac108_aif_mute(struct snd_soc_dai *dai, int mute) { +int ac108_aif_mute(struct snd_soc_dai *dai, int mute, int direction) { struct snd_soc_codec *codec = dai->codec; struct ac10x_priv *ac10x = snd_soc_codec_get_drvdata(codec); @@ -1145,12 +1145,13 @@ static const struct snd_soc_dai_ops ac108_dai_ops = { .hw_params = ac108_hw_params, .prepare = ac108_prepare, .trigger = ac108_trigger, - .digital_mute = ac108_aif_mute, + .mute_stream = ac108_aif_mute, /*DAI format configuration*/ .set_fmt = ac108_set_fmt, // .hw_free = ac108_hw_free, + .no_capture_mute = 1, }; static struct snd_soc_dai_driver ac108_dai0 = { diff --git a/wm8960.c b/wm8960.c index 34d4dad..465c6dc 100644 --- a/wm8960.c +++ b/wm8960.c @@ -796,7 +796,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_codec *codec = dai->codec; @@ -1236,11 +1236,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 = {