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

Hi Mark

These are v4 digital_mute() patch which adjusts
to atmel which had conflict on v3.

v3 -> v4
	- tidyup for atmel which had conflict

v2 -> v3
	- uses "xxx_mute_stream" for .mute_stream naming
	  if it was better
	- removed verbose Cc email address

v1 -> v2
	- return -ENOTSUPP at hdmi-codec
	- add new .no_capture_mute flag and emulate .digital_mute()
	  by .mute_stream()

Link: https://lore.kernel.org/r/87h7uhxxk6.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/874kqy2y5t.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87ftam37ko.wl-kuninori.morimoto.gx@renesas.com

Kuninori Morimoto (3):
  ASoC: soc-dai: remove .digital_mute
  ASoC: soc-core: snd_soc_dai_digital_mute() for both CPU/Codec
  ASoC: soc-xxx: add asoc_substream_to_rtd()

 include/sound/soc-dai.h               |  1 -
 include/sound/soc.h                   |  2 +
 sound/soc/soc-component.c             | 20 ++++-----
 sound/soc/soc-core.c                  |  4 +-
 sound/soc/soc-dai.c                   | 12 ++----
 sound/soc/soc-dapm.c                  |  6 +--
 sound/soc/soc-generic-dmaengine-pcm.c |  4 +-
 sound/soc/soc-link.c                  | 12 +++---
 sound/soc/soc-pcm.c                   | 62 +++++++++++++--------------
 sound/soc/soc-utils.c                 |  2 +-
 10 files changed, 61 insertions(+), 64 deletions(-)

--
2.25.1
This commit is contained in:
Mark Brown 2020-07-17 14:47:04 +01:00
commit 22e9b54307
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 6 additions and 5 deletions

View File

@ -288,8 +288,8 @@ static int atmel_classd_component_resume(struct snd_soc_component *component)
return regcache_sync(dd->regmap); return regcache_sync(dd->regmap);
} }
static int atmel_classd_cpu_dai_digital_mute(struct snd_soc_dai *cpu_dai, static int atmel_classd_cpu_dai_mute_stream(struct snd_soc_dai *cpu_dai,
int mute) int mute, int direction)
{ {
struct snd_soc_component *component = cpu_dai->component; struct snd_soc_component *component = cpu_dai->component;
u32 mask, val; u32 mask, val;
@ -432,10 +432,11 @@ static int atmel_classd_cpu_dai_trigger(struct snd_pcm_substream *substream,
static const struct snd_soc_dai_ops atmel_classd_cpu_dai_ops = { static const struct snd_soc_dai_ops atmel_classd_cpu_dai_ops = {
.startup = atmel_classd_cpu_dai_startup, .startup = atmel_classd_cpu_dai_startup,
.shutdown = atmel_classd_cpu_dai_shutdown, .shutdown = atmel_classd_cpu_dai_shutdown,
.digital_mute = atmel_classd_cpu_dai_digital_mute, .mute_stream = atmel_classd_cpu_dai_mute_stream,
.hw_params = atmel_classd_cpu_dai_hw_params, .hw_params = atmel_classd_cpu_dai_hw_params,
.prepare = atmel_classd_cpu_dai_prepare, .prepare = atmel_classd_cpu_dai_prepare,
.trigger = atmel_classd_cpu_dai_trigger, .trigger = atmel_classd_cpu_dai_trigger,
.no_capture_mute = 1,
}; };
static struct snd_soc_dai_driver atmel_classd_cpu_dai = { static struct snd_soc_dai_driver atmel_classd_cpu_dai = {

View File

@ -548,7 +548,7 @@ int snd_soc_suspend(struct device *dev)
if (rtd->dai_link->ignore_suspend) if (rtd->dai_link->ignore_suspend)
continue; continue;
for_each_rtd_codec_dais(rtd, i, dai) { for_each_rtd_dais(rtd, i, dai) {
if (snd_soc_dai_stream_active(dai, playback)) if (snd_soc_dai_stream_active(dai, playback))
snd_soc_dai_digital_mute(dai, 1, playback); snd_soc_dai_digital_mute(dai, 1, playback);
} }
@ -687,7 +687,7 @@ static void soc_resume_deferred(struct work_struct *work)
if (rtd->dai_link->ignore_suspend) if (rtd->dai_link->ignore_suspend)
continue; continue;
for_each_rtd_codec_dais(rtd, i, dai) { for_each_rtd_dais(rtd, i, dai) {
if (snd_soc_dai_stream_active(dai, playback)) if (snd_soc_dai_stream_active(dai, playback))
snd_soc_dai_digital_mute(dai, 0, playback); snd_soc_dai_digital_mute(dai, 0, playback);
} }