ASoC: codecs: wm*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

	int snd_soc_dai_digital_mute(xxx, int direction)
	{
		...
		else if (dai->driver->ops->mute_stream)
(1)			return dai->driver->ops->mute_stream(xxx, direction);
		else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
			 dai->driver->ops->digital_mute)
(2)			return dai->driver->ops->digital_mute(xxx);
		...
	}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/87v9ixwiwr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2020-07-09 10:56:53 +09:00 committed by Mark Brown
parent 4c66c2fc10
commit 26d3c16e62
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
32 changed files with 106 additions and 70 deletions

View File

@ -942,7 +942,7 @@ static int wm8350_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8350_mute(struct snd_soc_dai *dai, int mute)
static int wm8350_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
unsigned int val;
@ -1426,11 +1426,12 @@ EXPORT_SYMBOL_GPL(wm8350_mic_jack_detect);
static const struct snd_soc_dai_ops wm8350_dai_ops = {
.hw_params = wm8350_pcm_hw_params,
.digital_mute = wm8350_mute,
.mute_stream = wm8350_mute,
.set_fmt = wm8350_set_dai_fmt,
.set_sysclk = wm8350_set_dai_sysclk,
.set_pll = wm8350_set_fll,
.set_clkdiv = wm8350_set_clkdiv,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8350_dai = {

View File

@ -1092,7 +1092,7 @@ static int wm8400_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8400_mute(struct snd_soc_dai *dai, int mute)
static int wm8400_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 val = snd_soc_component_read(component, WM8400_DAC_CTRL) & ~WM8400_DAC_MUTE;
@ -1222,11 +1222,12 @@ static int wm8400_set_bias_level(struct snd_soc_component *component,
static const struct snd_soc_dai_ops wm8400_dai_ops = {
.hw_params = wm8400_hw_params,
.digital_mute = wm8400_mute,
.mute_stream = wm8400_mute,
.set_fmt = wm8400_set_dai_fmt,
.set_clkdiv = wm8400_set_dai_clkdiv,
.set_sysclk = wm8400_set_dai_sysclk,
.set_pll = wm8400_set_dai_pll,
.no_capture_mute = 1,
};
/*

View File

@ -487,7 +487,7 @@ static int wm8510_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8510_mute(struct snd_soc_dai *dai, int mute)
static int wm8510_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 mute_reg = snd_soc_component_read(component, WM8510_DAC) & 0xffbf;
@ -547,10 +547,11 @@ static int wm8510_set_bias_level(struct snd_soc_component *component,
static const struct snd_soc_dai_ops wm8510_dai_ops = {
.hw_params = wm8510_pcm_hw_params,
.digital_mute = wm8510_mute,
.mute_stream = wm8510_mute,
.set_fmt = wm8510_set_dai_fmt,
.set_clkdiv = wm8510_set_dai_clkdiv,
.set_pll = wm8510_set_dai_pll,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8510_dai = {

View File

@ -800,7 +800,7 @@ static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id,
return 0;
}
static int wm8580_digital_mute(struct snd_soc_dai *codec_dai, int mute)
static int wm8580_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
{
struct snd_soc_component *component = codec_dai->component;
unsigned int reg;
@ -866,7 +866,8 @@ static const struct snd_soc_dai_ops wm8580_dai_ops_playback = {
.set_fmt = wm8580_set_paif_dai_fmt,
.set_clkdiv = wm8580_set_dai_clkdiv,
.set_pll = wm8580_set_dai_pll,
.digital_mute = wm8580_digital_mute,
.mute_stream = wm8580_mute,
.no_capture_mute = 1,
};
static const struct snd_soc_dai_ops wm8580_dai_ops_capture = {

View File

@ -204,7 +204,7 @@ static void wm8711_shutdown(struct snd_pcm_substream *substream,
}
}
static int wm8711_mute(struct snd_soc_dai *dai, int mute)
static int wm8711_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 mute_reg = snd_soc_component_read(component, WM8711_APDIGI) & 0xfff7;
@ -329,9 +329,10 @@ static const struct snd_soc_dai_ops wm8711_ops = {
.prepare = wm8711_pcm_prepare,
.hw_params = wm8711_hw_params,
.shutdown = wm8711_shutdown,
.digital_mute = wm8711_mute,
.mute_stream = wm8711_mute,
.set_sysclk = wm8711_set_dai_sysclk,
.set_fmt = wm8711_set_dai_fmt,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8711_dai = {

View File

@ -69,7 +69,7 @@ static const struct snd_soc_dapm_route wm8728_intercon[] = {
{"VOUTR", NULL, "DAC"},
};
static int wm8728_mute(struct snd_soc_dai *dai, int mute)
static int wm8728_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 mute_reg = snd_soc_component_read(component, WM8728_DACCTL);
@ -192,8 +192,9 @@ static int wm8728_set_bias_level(struct snd_soc_component *component,
static const struct snd_soc_dai_ops wm8728_dai_ops = {
.hw_params = wm8728_hw_params,
.digital_mute = wm8728_mute,
.mute_stream = wm8728_mute,
.set_fmt = wm8728_set_dai_fmt,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8728_dai = {

View File

@ -366,7 +366,7 @@ static int wm8731_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8731_mute(struct snd_soc_dai *dai, int mute)
static int wm8731_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 mute_reg = snd_soc_component_read(component, WM8731_APDIGI) & 0xfff7;
@ -546,9 +546,10 @@ static int wm8731_startup(struct snd_pcm_substream *substream,
static const struct snd_soc_dai_ops wm8731_dai_ops = {
.startup = wm8731_startup,
.hw_params = wm8731_hw_params,
.digital_mute = wm8731_mute,
.mute_stream = wm8731_mute,
.set_sysclk = wm8731_set_dai_sysclk,
.set_fmt = wm8731_set_dai_fmt,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8731_dai = {

View File

@ -364,7 +364,7 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
return 0;
}
static int wm8741_mute(struct snd_soc_dai *codec_dai, int mute)
static int wm8741_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
{
struct snd_soc_component *component = codec_dai->component;
@ -386,7 +386,8 @@ 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,
.mute_stream = wm8741_mute,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8741_dai = {

View File

@ -606,7 +606,7 @@ static int wm8750_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8750_mute(struct snd_soc_dai *dai, int mute)
static int wm8750_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 mute_reg = snd_soc_component_read(component, WM8750_ADCDAC) & 0xfff7;
@ -660,9 +660,10 @@ static int wm8750_set_bias_level(struct snd_soc_component *component,
static const struct snd_soc_dai_ops wm8750_dai_ops = {
.hw_params = wm8750_pcm_hw_params,
.digital_mute = wm8750_mute,
.mute_stream = wm8750_mute,
.set_fmt = wm8750_set_dai_fmt,
.set_sysclk = wm8750_set_dai_sysclk,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8750_dai = {

View File

@ -1297,7 +1297,7 @@ static int wm8753_voice_set_dai_fmt(struct snd_soc_dai *codec_dai,
return wm8753_voice_write_dai_fmt(component, fmt);
};
static int wm8753_mute(struct snd_soc_dai *dai, int mute)
static int wm8753_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 mute_reg = snd_soc_component_read(component, WM8753_DAC) & 0xfff7;
@ -1382,20 +1382,22 @@ static int wm8753_set_bias_level(struct snd_soc_component *component,
*/
static const struct snd_soc_dai_ops wm8753_dai_ops_hifi_mode = {
.hw_params = wm8753_i2s_hw_params,
.digital_mute = wm8753_mute,
.mute_stream = wm8753_mute,
.set_fmt = wm8753_hifi_set_dai_fmt,
.set_clkdiv = wm8753_set_dai_clkdiv,
.set_pll = wm8753_set_dai_pll,
.set_sysclk = wm8753_set_dai_sysclk,
.no_capture_mute = 1,
};
static const struct snd_soc_dai_ops wm8753_dai_ops_voice_mode = {
.hw_params = wm8753_pcm_hw_params,
.digital_mute = wm8753_mute,
.mute_stream = wm8753_mute,
.set_fmt = wm8753_voice_set_dai_fmt,
.set_clkdiv = wm8753_set_dai_clkdiv,
.set_pll = wm8753_set_dai_pll,
.set_sysclk = wm8753_set_dai_sysclk,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8753_dai[] = {

View File

@ -472,7 +472,7 @@ static int wm8770_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8770_mute(struct snd_soc_dai *dai, int mute)
static int wm8770_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component;
@ -538,10 +538,11 @@ static int wm8770_set_bias_level(struct snd_soc_component *component,
SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
static const struct snd_soc_dai_ops wm8770_dai_ops = {
.digital_mute = wm8770_mute,
.mute_stream = wm8770_mute,
.hw_params = wm8770_hw_params,
.set_fmt = wm8770_set_fmt,
.set_sysclk = wm8770_set_sysclk,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8770_dai = {

View File

@ -309,7 +309,7 @@ static int wm8776_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8776_mute(struct snd_soc_dai *dai, int mute)
static int wm8776_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
@ -361,10 +361,11 @@ static int wm8776_set_bias_level(struct snd_soc_component *component,
SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
static const struct snd_soc_dai_ops wm8776_dac_ops = {
.digital_mute = wm8776_mute,
.mute_stream = wm8776_mute,
.hw_params = wm8776_hw_params,
.set_fmt = wm8776_set_fmt,
.set_sysclk = wm8776_set_sysclk,
.no_capture_mute = 1,
};
static const struct snd_soc_dai_ops wm8776_adc_ops = {

View File

@ -967,7 +967,7 @@ static int wm8900_set_dai_fmt(struct snd_soc_dai *codec_dai,
return 0;
}
static int wm8900_digital_mute(struct snd_soc_dai *codec_dai, int mute)
static int wm8900_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
{
struct snd_soc_component *component = codec_dai->component;
u16 reg;
@ -997,7 +997,8 @@ static const struct snd_soc_dai_ops wm8900_dai_ops = {
.set_clkdiv = wm8900_set_dai_clkdiv,
.set_pll = wm8900_set_dai_pll,
.set_fmt = wm8900_set_dai_fmt,
.digital_mute = wm8900_digital_mute,
.mute_stream = wm8900_mute,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8900_dai = {

View File

@ -1307,7 +1307,7 @@ static int wm8903_set_dai_fmt(struct snd_soc_dai *codec_dai,
return 0;
}
static int wm8903_digital_mute(struct snd_soc_dai *codec_dai, int mute)
static int wm8903_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
{
struct snd_soc_component *component = codec_dai->component;
u16 reg;
@ -1737,9 +1737,10 @@ static irqreturn_t wm8903_irq(int irq, void *data)
static const struct snd_soc_dai_ops wm8903_dai_ops = {
.hw_params = wm8903_hw_params,
.digital_mute = wm8903_digital_mute,
.mute_stream = wm8903_mute,
.set_fmt = wm8903_set_dai_fmt,
.set_sysclk = wm8903_set_dai_sysclk,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8903_dai = {

View File

@ -1846,7 +1846,7 @@ static int wm8904_set_sysclk(struct snd_soc_dai *dai, int clk_id,
return 0;
}
static int wm8904_digital_mute(struct snd_soc_dai *codec_dai, int mute)
static int wm8904_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
{
struct snd_soc_component *component = codec_dai->component;
int val;
@ -1962,7 +1962,8 @@ static const struct snd_soc_dai_ops wm8904_dai_ops = {
.set_tdm_slot = wm8904_set_tdm_slot,
.set_pll = wm8904_set_fll,
.hw_params = wm8904_hw_params,
.digital_mute = wm8904_digital_mute,
.mute_stream = wm8904_mute,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8904_dai = {

View File

@ -452,7 +452,7 @@ error_ret:
return ret;
}
static int wm8940_mute(struct snd_soc_dai *dai, int mute)
static int wm8940_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 mute_reg = snd_soc_component_read(component, WM8940_DAC) & 0xffbf;
@ -664,10 +664,11 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
static const struct snd_soc_dai_ops wm8940_dai_ops = {
.hw_params = wm8940_i2s_hw_params,
.set_sysclk = wm8940_set_dai_sysclk,
.digital_mute = wm8940_mute,
.mute_stream = wm8940_mute,
.set_fmt = wm8940_set_dai_fmt,
.set_clkdiv = wm8940_set_dai_clkdiv,
.set_pll = wm8940_set_dai_pll,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8940_dai = {

View File

@ -745,7 +745,7 @@ static int wm8955_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
}
static int wm8955_digital_mute(struct snd_soc_dai *codec_dai, int mute)
static int wm8955_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
{
struct snd_soc_component *component = codec_dai->component;
int val;
@ -848,7 +848,8 @@ static const struct snd_soc_dai_ops wm8955_dai_ops = {
.set_sysclk = wm8955_set_sysclk,
.set_fmt = wm8955_set_fmt,
.hw_params = wm8955_hw_params,
.digital_mute = wm8955_digital_mute,
.mute_stream = wm8955_mute,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8955_dai = {

View File

@ -878,7 +878,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_component *component = dai->component;
@ -1315,11 +1315,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 = {

View File

@ -698,7 +698,7 @@ static int wm8961_set_tristate(struct snd_soc_dai *dai, int tristate)
return snd_soc_component_write(component, WM8961_ADDITIONAL_CONTROL_2, reg);
}
static int wm8961_digital_mute(struct snd_soc_dai *dai, int mute)
static int wm8961_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 reg = snd_soc_component_read(component, WM8961_ADC_DAC_CONTROL_1);
@ -806,9 +806,10 @@ static const struct snd_soc_dai_ops wm8961_dai_ops = {
.hw_params = wm8961_hw_params,
.set_sysclk = wm8961_set_sysclk,
.set_fmt = wm8961_set_fmt,
.digital_mute = wm8961_digital_mute,
.mute_stream = wm8961_mute,
.set_tristate = wm8961_set_tristate,
.set_clkdiv = wm8961_set_clkdiv,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8961_dai = {

View File

@ -2918,7 +2918,7 @@ static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int s
return 0;
}
static int wm8962_mute(struct snd_soc_dai *dai, int mute)
static int wm8962_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
int val, ret;
@ -2951,7 +2951,8 @@ static const struct snd_soc_dai_ops wm8962_dai_ops = {
.hw_params = wm8962_hw_params,
.set_sysclk = wm8962_set_dai_sysclk,
.set_fmt = wm8962_set_dai_fmt,
.digital_mute = wm8962_mute,
.mute_stream = wm8962_mute,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8962_dai = {

View File

@ -536,7 +536,7 @@ static int wm8971_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8971_mute(struct snd_soc_dai *dai, int mute)
static int wm8971_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 mute_reg = snd_soc_component_read(component, WM8971_ADCDAC) & 0xfff7;
@ -602,9 +602,10 @@ static int wm8971_set_bias_level(struct snd_soc_component *component,
static const struct snd_soc_dai_ops wm8971_dai_ops = {
.hw_params = wm8971_pcm_hw_params,
.digital_mute = wm8971_mute,
.mute_stream = wm8971_mute,
.set_fmt = wm8971_set_dai_fmt,
.set_sysclk = wm8971_set_dai_sysclk,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8971_dai = {

View File

@ -559,7 +559,7 @@ static int wm8974_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8974_mute(struct snd_soc_dai *dai, int mute)
static int wm8974_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 mute_reg = snd_soc_component_read(component, WM8974_DAC) & 0xffbf;
@ -616,11 +616,12 @@ static int wm8974_set_bias_level(struct snd_soc_component *component,
static const struct snd_soc_dai_ops wm8974_ops = {
.hw_params = wm8974_pcm_hw_params,
.digital_mute = wm8974_mute,
.mute_stream = wm8974_mute,
.set_fmt = wm8974_set_dai_fmt,
.set_clkdiv = wm8974_set_dai_clkdiv,
.set_pll = wm8974_set_dai_pll,
.set_sysclk = wm8974_set_dai_sysclk,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8974_dai = {

View File

@ -836,7 +836,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8978_mute(struct snd_soc_dai *dai, int mute)
static int wm8978_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
@ -893,10 +893,11 @@ static int wm8978_set_bias_level(struct snd_soc_component *component,
static const struct snd_soc_dai_ops wm8978_dai_ops = {
.hw_params = wm8978_hw_params,
.digital_mute = wm8978_mute,
.mute_stream = wm8978_mute,
.set_fmt = wm8978_set_dai_fmt,
.set_clkdiv = wm8978_set_dai_clkdiv,
.set_sysclk = wm8978_set_dai_sysclk,
.no_capture_mute = 1,
};
/* Also supports 12kHz */

View File

@ -557,7 +557,7 @@ static bool wm8983_writeable(struct device *dev, unsigned int reg)
}
}
static int wm8983_dac_mute(struct snd_soc_dai *dai, int mute)
static int wm8983_dac_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
@ -943,11 +943,12 @@ static int wm8983_probe(struct snd_soc_component *component)
}
static const struct snd_soc_dai_ops wm8983_dai_ops = {
.digital_mute = wm8983_dac_mute,
.mute_stream = wm8983_dac_mute,
.hw_params = wm8983_hw_params,
.set_fmt = wm8983_set_fmt,
.set_sysclk = wm8983_set_sysclk,
.set_pll = wm8983_set_pll
.set_pll = wm8983_set_pll,
.no_capture_mute = 1,
};
#define WM8983_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \

View File

@ -649,7 +649,7 @@ static int wm8985_reset(struct snd_soc_component *component)
return snd_soc_component_write(component, WM8985_SOFTWARE_RESET, 0x0);
}
static int wm8985_dac_mute(struct snd_soc_dai *dai, int mute)
static int wm8985_dac_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
@ -1072,11 +1072,12 @@ err_reg_enable:
}
static const struct snd_soc_dai_ops wm8985_dai_ops = {
.digital_mute = wm8985_dac_mute,
.mute_stream = wm8985_dac_mute,
.hw_params = wm8985_hw_params,
.set_fmt = wm8985_set_fmt,
.set_sysclk = wm8985_set_sysclk,
.set_pll = wm8985_set_pll
.set_pll = wm8985_set_pll,
.no_capture_mute = 1,
};
#define WM8985_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \

View File

@ -707,7 +707,7 @@ static int wm8988_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8988_mute(struct snd_soc_dai *dai, int mute)
static int wm8988_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 mute_reg = snd_soc_component_read(component, WM8988_ADCDAC) & 0xfff7;
@ -766,7 +766,8 @@ static const struct snd_soc_dai_ops wm8988_ops = {
.hw_params = wm8988_pcm_hw_params,
.set_fmt = wm8988_set_dai_fmt,
.set_sysclk = wm8988_set_dai_sysclk,
.digital_mute = wm8988_mute,
.mute_stream = wm8988_mute,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8988_dai = {

View File

@ -998,7 +998,7 @@ static int wm8990_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8990_mute(struct snd_soc_dai *dai, int mute)
static int wm8990_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 val;
@ -1152,11 +1152,12 @@ static int wm8990_set_bias_level(struct snd_soc_component *component,
*/
static const struct snd_soc_dai_ops wm8990_dai_ops = {
.hw_params = wm8990_hw_params,
.digital_mute = wm8990_mute,
.mute_stream = wm8990_mute,
.set_fmt = wm8990_set_dai_fmt,
.set_clkdiv = wm8990_set_dai_clkdiv,
.set_pll = wm8990_set_dai_pll,
.set_sysclk = wm8990_set_dai_sysclk,
.no_capture_mute = 1,
};
static struct snd_soc_dai_driver wm8990_dai = {

View File

@ -1064,7 +1064,7 @@ static int wm8991_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8991_mute(struct snd_soc_dai *dai, int mute)
static int wm8991_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 val;
@ -1196,10 +1196,11 @@ static int wm8991_set_bias_level(struct snd_soc_component *component,
static const struct snd_soc_dai_ops wm8991_ops = {
.hw_params = wm8991_hw_params,
.digital_mute = wm8991_mute,
.mute_stream = wm8991_mute,
.set_fmt = wm8991_set_dai_fmt,
.set_clkdiv = wm8991_set_dai_clkdiv,
.set_pll = wm8991_set_dai_pll
.set_pll = wm8991_set_dai_pll,
.no_capture_mute = 1,
};
/*

View File

@ -1330,7 +1330,7 @@ static int wm8993_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm8993_digital_mute(struct snd_soc_dai *codec_dai, int mute)
static int wm8993_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
{
struct snd_soc_component *component = codec_dai->component;
unsigned int reg;
@ -1444,9 +1444,10 @@ static const struct snd_soc_dai_ops wm8993_ops = {
.set_sysclk = wm8993_set_sysclk,
.set_fmt = wm8993_set_dai_fmt,
.hw_params = wm8993_hw_params,
.digital_mute = wm8993_digital_mute,
.mute_stream = wm8993_mute,
.set_pll = wm8993_set_fll,
.set_tdm_slot = wm8993_set_tdm_slot,
.no_capture_mute = 1,
};
#define WM8993_RATES SNDRV_PCM_RATE_8000_48000

View File

@ -3110,7 +3110,8 @@ static int wm8994_aif3_hw_params(struct snd_pcm_substream *substream,
return snd_soc_component_update_bits(component, aif1_reg, WM8994_AIF1_WL_MASK, aif1);
}
static int wm8994_aif_mute(struct snd_soc_dai *codec_dai, int mute)
static int wm8994_aif_mute(struct snd_soc_dai *codec_dai, int mute,
int direction)
{
struct snd_soc_component *component = codec_dai->component;
int mute_reg;
@ -3187,18 +3188,20 @@ static const struct snd_soc_dai_ops wm8994_aif1_dai_ops = {
.set_sysclk = wm8994_set_dai_sysclk,
.set_fmt = wm8994_set_dai_fmt,
.hw_params = wm8994_hw_params,
.digital_mute = wm8994_aif_mute,
.mute_stream = wm8994_aif_mute,
.set_pll = wm8994_set_fll,
.set_tristate = wm8994_set_tristate,
.no_capture_mute = 1,
};
static const struct snd_soc_dai_ops wm8994_aif2_dai_ops = {
.set_sysclk = wm8994_set_dai_sysclk,
.set_fmt = wm8994_set_dai_fmt,
.hw_params = wm8994_hw_params,
.digital_mute = wm8994_aif_mute,
.mute_stream = wm8994_aif_mute,
.set_pll = wm8994_set_fll,
.set_tristate = wm8994_set_tristate,
.no_capture_mute = 1,
};
static const struct snd_soc_dai_ops wm8994_aif3_dai_ops = {

View File

@ -1417,7 +1417,7 @@ static bool wm8995_volatile(struct device *dev, unsigned int reg)
}
}
static int wm8995_aif_mute(struct snd_soc_dai *dai, int mute)
static int wm8995_aif_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
int mute_reg;
@ -2094,18 +2094,20 @@ static const struct snd_soc_dai_ops wm8995_aif1_dai_ops = {
.set_sysclk = wm8995_set_dai_sysclk,
.set_fmt = wm8995_set_dai_fmt,
.hw_params = wm8995_hw_params,
.digital_mute = wm8995_aif_mute,
.mute_stream = wm8995_aif_mute,
.set_pll = wm8995_set_fll,
.set_tristate = wm8995_set_tristate,
.no_capture_mute = 1,
};
static const struct snd_soc_dai_ops wm8995_aif2_dai_ops = {
.set_sysclk = wm8995_set_dai_sysclk,
.set_fmt = wm8995_set_dai_fmt,
.hw_params = wm8995_hw_params,
.digital_mute = wm8995_aif_mute,
.mute_stream = wm8995_aif_mute,
.set_pll = wm8995_set_fll,
.set_tristate = wm8995_set_tristate,
.no_capture_mute = 1,
};
static const struct snd_soc_dai_ops wm8995_aif3_dai_ops = {

View File

@ -1147,7 +1147,7 @@ static int wm9081_hw_params(struct snd_pcm_substream *substream,
return 0;
}
static int wm9081_digital_mute(struct snd_soc_dai *codec_dai, int mute)
static int wm9081_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
{
struct snd_soc_component *component = codec_dai->component;
unsigned int reg;
@ -1232,8 +1232,9 @@ static int wm9081_set_tdm_slot(struct snd_soc_dai *dai,
static const struct snd_soc_dai_ops wm9081_dai_ops = {
.hw_params = wm9081_hw_params,
.set_fmt = wm9081_set_dai_fmt,
.digital_mute = wm9081_digital_mute,
.mute_stream = wm9081_mute,
.set_tdm_slot = wm9081_set_tdm_slot,
.no_capture_mute = 1,
};
/* We report two channels because the CODEC processes a stereo signal, even