v5.9: .digital_mute merged into .mute_stream with adjustments

Reference:

commit e2978c45e5ed3bab7f69477b882ef588185b30cc
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
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 <broonie@kernel.org>
Date:   Fri Jul 17 14:47:04 2020 +0100

    Merge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

    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 <broonie@kernel.org>
Date:   Thu Jul 16 23:51:51 2020 +0100

    Merge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

    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 <kuninori.morimoto.gx@renesas.com>
Date:   Thu Jul 9 10:55:41 2020 +0900

    ASoC: soc-dai.c: add .no_capture_mute support
This commit is contained in:
Hin-Tak Leung 2020-11-26 23:35:38 +00:00
parent 484c03d4c8
commit ebcf755c1a
2 changed files with 6 additions and 4 deletions

View file

@ -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 snd_soc_codec *codec = dai->codec;
struct ac10x_priv *ac10x = snd_soc_codec_get_drvdata(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, .hw_params = ac108_hw_params,
.prepare = ac108_prepare, .prepare = ac108_prepare,
.trigger = ac108_trigger, .trigger = ac108_trigger,
.digital_mute = ac108_aif_mute, .mute_stream = ac108_aif_mute,
/*DAI format configuration*/ /*DAI format configuration*/
.set_fmt = ac108_set_fmt, .set_fmt = ac108_set_fmt,
// .hw_free = ac108_hw_free, // .hw_free = ac108_hw_free,
.no_capture_mute = 1,
}; };
static struct snd_soc_dai_driver ac108_dai0 = { static struct snd_soc_dai_driver ac108_dai0 = {

View file

@ -796,7 +796,7 @@ static int wm8960_hw_free(struct snd_pcm_substream *substream,
return 0; 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; 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 = { static const struct snd_soc_dai_ops wm8960_dai_ops = {
.hw_params = wm8960_hw_params, .hw_params = wm8960_hw_params,
.hw_free = wm8960_hw_free, .hw_free = wm8960_hw_free,
.digital_mute = wm8960_mute, .mute_stream = wm8960_mute,
.set_fmt = wm8960_set_dai_fmt, .set_fmt = wm8960_set_dai_fmt,
.set_clkdiv = wm8960_set_dai_clkdiv, .set_clkdiv = wm8960_set_dai_clkdiv,
.set_pll = wm8960_set_dai_pll, .set_pll = wm8960_set_dai_pll,
.set_sysclk = wm8960_set_dai_sysclk, .set_sysclk = wm8960_set_dai_sysclk,
.no_capture_mute = 1,
}; };
static struct snd_soc_dai_driver wm8960_dai = { static struct snd_soc_dai_driver wm8960_dai = {