Skip to content

Commit

Permalink
Merge series "ASoC: merge .digital_mute() into .mute_stream()" from K…
Browse files Browse the repository at this point in the history
…uninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Hi Mark

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

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/874kqy2y5t.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87ftam37ko.wl-kuninori.morimoto.gx@renesas.com

Kuninori Morimoto (21):
  ASoC: hdmi-codec: return -ENOTSUPP for digital_mute
  ASoC: soc-dai.c: add .no_capture_mute support
  ASoC: hdmi-codec: merge .digital_mute() into .mute_stream()
  ASoC: ti: merge .digital_mute() into .mute_stream()
  ASoC: spear: merge .digital_mute() into .mute_stream()
  ASoC: meson: merge .digital_mute() into .mute_stream()
  ASoC: atmel: merge .digital_mute() into .mute_stream()
  ASoC: codecs: merge .digital_mute() into .mute_stream()
  ASoC: codecs: tlv*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: tas*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: ssm*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: pcm*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: max*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: alc*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: wm*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: es*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: da*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: cs*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: ak*: merge .digital_mute() into .mute_stream()
  ASoC: soc-dai: remove .digital_mute
  ASoC: soc-core: snd_soc_dai_digital_mute() for both CPU/Codec

 drivers/gpu/drm/bridge/sii902x.c       |  7 ++++---
 drivers/gpu/drm/exynos/exynos_hdmi.c   |  6 ++++--
 drivers/gpu/drm/i2c/tda998x_drv.c      |  7 ++++---
 drivers/gpu/drm/mediatek/mtk_hdmi.c    |  6 ++++--
 drivers/gpu/drm/rockchip/cdn-dp-core.c |  7 ++++---
 drivers/gpu/drm/sti/sti_hdmi.c         |  6 ++++--
 drivers/gpu/drm/zte/zx_hdmi.c          |  7 ++++---
 include/sound/hdmi-codec.h             |  6 +++++-
 include/sound/soc-dai.h                |  4 +++-
 sound/soc/atmel/atmel-classd.c         |  7 ++++---
 sound/soc/codecs/88pm860x-codec.c      |  8 +++++---
 sound/soc/codecs/ad193x.c              |  5 +++--
 sound/soc/codecs/adau1701.c            |  5 +++--
 sound/soc/codecs/ak4458.c              |  5 +++--
 sound/soc/codecs/ak4535.c              |  6 ++++--
 sound/soc/codecs/ak4641.c              |  8 +++++---
 sound/soc/codecs/alc5623.c             |  5 +++--
 sound/soc/codecs/alc5632.c             |  5 +++--
 sound/soc/codecs/cpcap.c               | 11 +++++++----
 sound/soc/codecs/cq93vc.c              |  5 +++--
 sound/soc/codecs/cs4265.c              |  5 +++--
 sound/soc/codecs/cs4270.c              |  5 +++--
 sound/soc/codecs/cs42l42.c             |  5 +++--
 sound/soc/codecs/cs42l51.c             |  5 +++--
 sound/soc/codecs/cs42l52.c             |  5 +++--
 sound/soc/codecs/cs42l56.c             |  5 +++--
 sound/soc/codecs/cs42xx8.c             |  5 +++--
 sound/soc/codecs/cs4341.c              |  5 +++--
 sound/soc/codecs/cs4349.c              |  5 +++--
 sound/soc/codecs/da7210.c              |  5 +++--
 sound/soc/codecs/da7213.c              |  5 +++--
 sound/soc/codecs/da9055.c              |  5 +++--
 sound/soc/codecs/es8316.c              |  5 +++--
 sound/soc/codecs/es8328.c              |  5 +++--
 sound/soc/codecs/hdmi-codec.c          | 25 +++++++++++++++++--------
 sound/soc/codecs/isabelle.c            | 15 +++++++++------
 sound/soc/codecs/jz4770.c              |  5 +++--
 sound/soc/codecs/lm49453.c             | 25 +++++++++++++++----------
 sound/soc/codecs/max98088.c            | 12 ++++++++----
 sound/soc/codecs/max98090.c            |  6 ++++--
 sound/soc/codecs/max9867.c             |  5 +++--
 sound/soc/codecs/ml26124.c             |  5 +++--
 sound/soc/codecs/nau8822.c             |  5 +++--
 sound/soc/codecs/pcm1681.c             |  5 +++--
 sound/soc/codecs/pcm1789.c             |  5 +++--
 sound/soc/codecs/pcm179x.c             |  5 +++--
 sound/soc/codecs/pcm3168a.c            |  5 +++--
 sound/soc/codecs/pcm512x.c             |  5 +++--
 sound/soc/codecs/rk3328_codec.c        |  5 +++--
 sound/soc/codecs/sgtl5000.c            |  5 +++--
 sound/soc/codecs/ssm2518.c             |  5 +++--
 sound/soc/codecs/ssm2602.c             |  5 +++--
 sound/soc/codecs/ssm4567.c             |  5 +++--
 sound/soc/codecs/sta529.c              |  5 +++--
 sound/soc/codecs/tas2552.c             |  5 +++--
 sound/soc/codecs/tas2562.c             |  5 +++--
 sound/soc/codecs/tas2770.c             |  5 +++--
 sound/soc/codecs/tas571x.c             |  5 +++--
 sound/soc/codecs/tas5720.c             |  5 +++--
 sound/soc/codecs/tas6424.c             |  5 +++--
 sound/soc/codecs/tfa9879.c             |  5 +++--
 sound/soc/codecs/tlv320aic23.c         |  5 +++--
 sound/soc/codecs/tlv320aic26.c         |  5 +++--
 sound/soc/codecs/tlv320aic31xx.c       |  6 ++++--
 sound/soc/codecs/tlv320aic32x4.c       |  5 +++--
 sound/soc/codecs/tlv320aic3x.c         |  5 +++--
 sound/soc/codecs/twl6040.c             |  5 +++--
 sound/soc/codecs/uda134x.c             |  5 +++--
 sound/soc/codecs/wm8350.c              |  5 +++--
 sound/soc/codecs/wm8400.c              |  5 +++--
 sound/soc/codecs/wm8510.c              |  5 +++--
 sound/soc/codecs/wm8580.c              |  5 +++--
 sound/soc/codecs/wm8711.c              |  5 +++--
 sound/soc/codecs/wm8728.c              |  5 +++--
 sound/soc/codecs/wm8731.c              |  5 +++--
 sound/soc/codecs/wm8741.c              |  5 +++--
 sound/soc/codecs/wm8750.c              |  5 +++--
 sound/soc/codecs/wm8753.c              |  8 +++++---
 sound/soc/codecs/wm8770.c              |  5 +++--
 sound/soc/codecs/wm8776.c              |  5 +++--
 sound/soc/codecs/wm8900.c              |  5 +++--
 sound/soc/codecs/wm8903.c              |  5 +++--
 sound/soc/codecs/wm8904.c              |  5 +++--
 sound/soc/codecs/wm8940.c              |  5 +++--
 sound/soc/codecs/wm8955.c              |  5 +++--
 sound/soc/codecs/wm8960.c              |  5 +++--
 sound/soc/codecs/wm8961.c              |  5 +++--
 sound/soc/codecs/wm8962.c              |  5 +++--
 sound/soc/codecs/wm8971.c              |  5 +++--
 sound/soc/codecs/wm8974.c              |  5 +++--
 sound/soc/codecs/wm8978.c              |  5 +++--
 sound/soc/codecs/wm8983.c              |  7 ++++---
 sound/soc/codecs/wm8985.c              |  7 ++++---
 sound/soc/codecs/wm8988.c              |  5 +++--
 sound/soc/codecs/wm8990.c              |  5 +++--
 sound/soc/codecs/wm8991.c              |  7 ++++---
 sound/soc/codecs/wm8993.c              |  5 +++--
 sound/soc/codecs/wm8994.c              |  9 ++++++---
 sound/soc/codecs/wm8995.c              |  8 +++++---
 sound/soc/codecs/wm9081.c              |  5 +++--
 sound/soc/meson/axg-spdifout.c         |  5 +++--
 sound/soc/soc-core.c                   |  4 ++--
 sound/soc/soc-dai.c                    | 12 +++++++-----
 sound/soc/spear/spdif_out.c            |  8 +++++---
 sound/soc/ti/ams-delta.c               |  9 +++++----
 105 files changed, 390 insertions(+), 249 deletions(-)

--
2.25.1
  • Loading branch information
Mark Brown committed Jul 16, 2020
2 parents d235b28 + 5089143 commit bdd0c27
Show file tree
Hide file tree
Showing 103 changed files with 384 additions and 239 deletions.
7 changes: 4 additions & 3 deletions drivers/gpu/drm/bridge/sii902x.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,8 @@ static void sii902x_audio_shutdown(struct device *dev, void *data)
clk_disable_unprepare(sii902x->audio.mclk);
}

static int sii902x_audio_digital_mute(struct device *dev,
void *data, bool enable)
static int sii902x_audio_mute(struct device *dev, void *data,
bool enable, int direction)
{
struct sii902x *sii902x = dev_get_drvdata(dev);

Expand Down Expand Up @@ -724,9 +724,10 @@ static int sii902x_audio_get_dai_id(struct snd_soc_component *component,
static const struct hdmi_codec_ops sii902x_audio_codec_ops = {
.hw_params = sii902x_audio_hw_params,
.audio_shutdown = sii902x_audio_shutdown,
.digital_mute = sii902x_audio_digital_mute,
.mute_stream = sii902x_audio_mute,
.get_eld = sii902x_audio_get_eld,
.get_dai_id = sii902x_audio_get_dai_id,
.no_capture_mute = 1,
};

static int sii902x_audio_codec_init(struct sii902x *sii902x,
Expand Down
6 changes: 4 additions & 2 deletions drivers/gpu/drm/exynos/exynos_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,8 @@ static int hdmi_audio_hw_params(struct device *dev, void *data,
return 0;
}

static int hdmi_audio_digital_mute(struct device *dev, void *data, bool mute)
static int hdmi_audio_mute(struct device *dev, void *data,
bool mute, int direction)
{
struct hdmi_context *hdata = dev_get_drvdata(dev);

Expand Down Expand Up @@ -1634,8 +1635,9 @@ static int hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf,
static const struct hdmi_codec_ops audio_codec_ops = {
.hw_params = hdmi_audio_hw_params,
.audio_shutdown = hdmi_audio_shutdown,
.digital_mute = hdmi_audio_digital_mute,
.mute_stream = hdmi_audio_mute,
.get_eld = hdmi_audio_get_eld,
.no_capture_mute = 1,
};

static int hdmi_register_audio_device(struct hdmi_context *hdata)
Expand Down
7 changes: 4 additions & 3 deletions drivers/gpu/drm/i2c/tda998x_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,8 +1133,8 @@ static void tda998x_audio_shutdown(struct device *dev, void *data)
mutex_unlock(&priv->audio_mutex);
}

static int tda998x_audio_digital_mute(struct device *dev, void *data,
bool enable)
static int tda998x_audio_mute_stream(struct device *dev, void *data,
bool enable, int direction)
{
struct tda998x_priv *priv = dev_get_drvdata(dev);

Expand Down Expand Up @@ -1162,8 +1162,9 @@ static int tda998x_audio_get_eld(struct device *dev, void *data,
static const struct hdmi_codec_ops audio_codec_ops = {
.hw_params = tda998x_audio_hw_params,
.audio_shutdown = tda998x_audio_shutdown,
.digital_mute = tda998x_audio_digital_mute,
.mute_stream = tda998x_audio_mute_stream,
.get_eld = tda998x_audio_get_eld,
.no_capture_mute = 1,
};

static int tda998x_audio_codec_init(struct tda998x_priv *priv,
Expand Down
6 changes: 4 additions & 2 deletions drivers/gpu/drm/mediatek/mtk_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1647,7 +1647,8 @@ static void mtk_hdmi_audio_shutdown(struct device *dev, void *data)
}

static int
mtk_hdmi_audio_digital_mute(struct device *dev, void *data, bool enable)
mtk_hdmi_audio_mute(struct device *dev, void *data,
bool enable, int direction)
{
struct mtk_hdmi *hdmi = dev_get_drvdata(dev);

Expand Down Expand Up @@ -1692,9 +1693,10 @@ static const struct hdmi_codec_ops mtk_hdmi_audio_codec_ops = {
.hw_params = mtk_hdmi_audio_hw_params,
.audio_startup = mtk_hdmi_audio_startup,
.audio_shutdown = mtk_hdmi_audio_shutdown,
.digital_mute = mtk_hdmi_audio_digital_mute,
.mute_stream = mtk_hdmi_audio_mute,
.get_eld = mtk_hdmi_audio_get_eld,
.hook_plugged_cb = mtk_hdmi_audio_hook_plugged_cb,
.no_capture_mute = 1,
};

static int mtk_hdmi_register_audio_driver(struct device *dev)
Expand Down
7 changes: 4 additions & 3 deletions drivers/gpu/drm/rockchip/cdn-dp-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,8 @@ static void cdn_dp_audio_shutdown(struct device *dev, void *data)
mutex_unlock(&dp->lock);
}

static int cdn_dp_audio_digital_mute(struct device *dev, void *data,
bool enable)
static int cdn_dp_audio_mute_stream(struct device *dev, void *data,
bool enable, int direction)
{
struct cdn_dp_device *dp = dev_get_drvdata(dev);
int ret;
Expand Down Expand Up @@ -849,8 +849,9 @@ static int cdn_dp_audio_get_eld(struct device *dev, void *data,
static const struct hdmi_codec_ops audio_codec_ops = {
.hw_params = cdn_dp_audio_hw_params,
.audio_shutdown = cdn_dp_audio_shutdown,
.digital_mute = cdn_dp_audio_digital_mute,
.mute_stream = cdn_dp_audio_mute_stream,
.get_eld = cdn_dp_audio_get_eld,
.no_capture_mute = 1,
};

static int cdn_dp_audio_codec_init(struct cdn_dp_device *dp,
Expand Down
6 changes: 4 additions & 2 deletions drivers/gpu/drm/sti/sti_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,8 @@ static int hdmi_audio_hw_params(struct device *dev,
return 0;
}

static int hdmi_audio_digital_mute(struct device *dev, void *data, bool enable)
static int hdmi_audio_mute(struct device *dev, void *data,
bool enable, int direction)
{
struct sti_hdmi *hdmi = dev_get_drvdata(dev);

Expand Down Expand Up @@ -1219,8 +1220,9 @@ static int hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf, size
static const struct hdmi_codec_ops audio_codec_ops = {
.hw_params = hdmi_audio_hw_params,
.audio_shutdown = hdmi_audio_shutdown,
.digital_mute = hdmi_audio_digital_mute,
.mute_stream = hdmi_audio_mute,
.get_eld = hdmi_audio_get_eld,
.no_capture_mute = 1,
};

static int sti_hdmi_register_audio_driver(struct device *dev,
Expand Down
7 changes: 4 additions & 3 deletions drivers/gpu/drm/zte/zx_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ static int zx_hdmi_audio_hw_params(struct device *dev,
return zx_hdmi_infoframe_trans(hdmi, &frame, FSEL_AUDIO);
}

static int zx_hdmi_audio_digital_mute(struct device *dev, void *data,
bool enable)
static int zx_hdmi_audio_mute(struct device *dev, void *data,
bool enable, int direction)
{
struct zx_hdmi *hdmi = dev_get_drvdata(dev);

Expand Down Expand Up @@ -468,8 +468,9 @@ static const struct hdmi_codec_ops zx_hdmi_codec_ops = {
.audio_startup = zx_hdmi_audio_startup,
.hw_params = zx_hdmi_audio_hw_params,
.audio_shutdown = zx_hdmi_audio_shutdown,
.digital_mute = zx_hdmi_audio_digital_mute,
.mute_stream = zx_hdmi_audio_mute,
.get_eld = zx_hdmi_audio_get_eld,
.no_capture_mute = 1,
};

static struct hdmi_codec_pdata zx_hdmi_codec_pdata = {
Expand Down
6 changes: 5 additions & 1 deletion include/sound/hdmi-codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ struct hdmi_codec_ops {
* Mute/unmute HDMI audio stream.
* Optional
*/
int (*digital_mute)(struct device *dev, void *data, bool enable);
int (*mute_stream)(struct device *dev, void *data,
bool enable, int direction);

/*
* Provides EDID-Like-Data from connected HDMI device.
Expand All @@ -99,6 +100,9 @@ struct hdmi_codec_ops {
int (*hook_plugged_cb)(struct device *dev, void *data,
hdmi_codec_plugged_cb fn,
struct device *codec_dev);

/* bit field */
unsigned int no_capture_mute:1;
};

/* HDMI codec initalization data */
Expand Down
3 changes: 3 additions & 0 deletions include/sound/soc-dai.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ struct snd_soc_dai_ops {
*/
snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *,
struct snd_soc_dai *);

/* bit field */
unsigned int no_capture_mute:1;
};

struct snd_soc_cdai_ops {
Expand Down
8 changes: 5 additions & 3 deletions sound/soc/codecs/88pm860x-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ static const struct snd_soc_dapm_route pm860x_dapm_routes[] = {
* Use MUTE_LEFT & MUTE_RIGHT to implement digital mute.
* These bits can also be used to mute.
*/
static int pm860x_digital_mute(struct snd_soc_dai *codec_dai, int mute)
static int pm860x_mute_stream(struct snd_soc_dai *codec_dai, int mute, int direction)
{
struct snd_soc_component *component = codec_dai->component;
int data = 0, mask = MUTE_LEFT | MUTE_RIGHT;
Expand Down Expand Up @@ -1136,17 +1136,19 @@ static int pm860x_set_bias_level(struct snd_soc_component *component,
}

static const struct snd_soc_dai_ops pm860x_pcm_dai_ops = {
.digital_mute = pm860x_digital_mute,
.mute_stream = pm860x_mute_stream,
.hw_params = pm860x_pcm_hw_params,
.set_fmt = pm860x_pcm_set_dai_fmt,
.set_sysclk = pm860x_set_dai_sysclk,
.no_capture_mute = 1,
};

static const struct snd_soc_dai_ops pm860x_i2s_dai_ops = {
.digital_mute = pm860x_digital_mute,
.mute_stream = pm860x_mute_stream,
.hw_params = pm860x_i2s_hw_params,
.set_fmt = pm860x_i2s_set_dai_fmt,
.set_sysclk = pm860x_set_dai_sysclk,
.no_capture_mute = 1,
};

#define PM860X_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | \
Expand Down
5 changes: 3 additions & 2 deletions sound/soc/codecs/ad193x.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static inline bool ad193x_has_adc(const struct ad193x_priv *ad193x)
* DAI ops entries
*/

static int ad193x_mute(struct snd_soc_dai *dai, int mute)
static int ad193x_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct ad193x_priv *ad193x = snd_soc_component_get_drvdata(dai->component);

Expand Down Expand Up @@ -371,10 +371,11 @@ static int ad193x_startup(struct snd_pcm_substream *substream,
static const struct snd_soc_dai_ops ad193x_dai_ops = {
.startup = ad193x_startup,
.hw_params = ad193x_hw_params,
.digital_mute = ad193x_mute,
.mute_stream = ad193x_mute,
.set_tdm_slot = ad193x_set_tdm_slot,
.set_sysclk = ad193x_set_dai_sysclk,
.set_fmt = ad193x_set_dai_fmt,
.no_capture_mute = 1,
};

/* codec DAI instance */
Expand Down
5 changes: 3 additions & 2 deletions sound/soc/codecs/adau1701.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ static int adau1701_set_bias_level(struct snd_soc_component *component,
return 0;
}

static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute)
static int adau1701_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
unsigned int mask = ADAU1701_DSPCTRL_DAM;
Expand Down Expand Up @@ -631,8 +631,9 @@ static int adau1701_startup(struct snd_pcm_substream *substream,
static const struct snd_soc_dai_ops adau1701_dai_ops = {
.set_fmt = adau1701_set_dai_fmt,
.hw_params = adau1701_hw_params,
.digital_mute = adau1701_digital_mute,
.mute_stream = adau1701_mute_stream,
.startup = adau1701_startup,
.no_capture_mute = 1,
};

static struct snd_soc_dai_driver adau1701_dai = {
Expand Down
5 changes: 3 additions & 2 deletions sound/soc/codecs/ak4458.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static int ak4458_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)

static const int att_speed[] = { 4080, 2040, 510, 255 };

static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute)
static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component);
Expand Down Expand Up @@ -495,8 +495,9 @@ static const struct snd_soc_dai_ops ak4458_dai_ops = {
.startup = ak4458_startup,
.hw_params = ak4458_hw_params,
.set_fmt = ak4458_set_dai_fmt,
.digital_mute = ak4458_set_dai_mute,
.mute_stream = ak4458_set_dai_mute,
.set_tdm_slot = ak4458_set_tdm_slot,
.no_capture_mute = 1,
};

static struct snd_soc_dai_driver ak4458_dai = {
Expand Down
6 changes: 4 additions & 2 deletions sound/soc/codecs/ak4535.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,11 @@ static int ak4535_set_dai_fmt(struct snd_soc_dai *codec_dai,
return 0;
}

static int ak4535_mute(struct snd_soc_dai *dai, int mute)
static int ak4535_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, AK4535_DAC);

if (!mute)
snd_soc_component_write(component, AK4535_DAC, mute_reg & ~0x20);
else
Expand Down Expand Up @@ -348,8 +349,9 @@ static int ak4535_set_bias_level(struct snd_soc_component *component,
static const struct snd_soc_dai_ops ak4535_dai_ops = {
.hw_params = ak4535_hw_params,
.set_fmt = ak4535_set_dai_fmt,
.digital_mute = ak4535_mute,
.mute_stream = ak4535_mute,
.set_sysclk = ak4535_set_dai_sysclk,
.no_capture_mute = 1,
};

static struct snd_soc_dai_driver ak4535_dai = {
Expand Down
8 changes: 5 additions & 3 deletions sound/soc/codecs/ak4641.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ static int ak4641_i2s_set_dai_fmt(struct snd_soc_dai *codec_dai,
return snd_soc_component_write(component, AK4641_MODE1, mode1);
}

static int ak4641_mute(struct snd_soc_dai *dai, int mute)
static int ak4641_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;

Expand Down Expand Up @@ -467,15 +467,17 @@ static int ak4641_set_bias_level(struct snd_soc_component *component,
static const struct snd_soc_dai_ops ak4641_i2s_dai_ops = {
.hw_params = ak4641_i2s_hw_params,
.set_fmt = ak4641_i2s_set_dai_fmt,
.digital_mute = ak4641_mute,
.mute_stream = ak4641_mute,
.set_sysclk = ak4641_set_dai_sysclk,
.no_capture_mute = 1,
};

static const struct snd_soc_dai_ops ak4641_pcm_dai_ops = {
.hw_params = NULL, /* rates are controlled by BT chip */
.set_fmt = ak4641_pcm_set_dai_fmt,
.digital_mute = ak4641_mute,
.mute_stream = ak4641_mute,
.set_sysclk = ak4641_set_dai_sysclk,
.no_capture_mute = 1,
};

static struct snd_soc_dai_driver ak4641_dai[] = {
Expand Down
5 changes: 3 additions & 2 deletions sound/soc/codecs/alc5623.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ static int alc5623_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}

static int alc5623_mute(struct snd_soc_dai *dai, int mute)
static int alc5623_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 hp_mute = ALC5623_MISC_M_DAC_L_INPUT | ALC5623_MISC_M_DAC_R_INPUT;
Expand Down Expand Up @@ -829,10 +829,11 @@ static int alc5623_set_bias_level(struct snd_soc_component *component,

static const struct snd_soc_dai_ops alc5623_dai_ops = {
.hw_params = alc5623_pcm_hw_params,
.digital_mute = alc5623_mute,
.mute_stream = alc5623_mute,
.set_fmt = alc5623_set_dai_fmt,
.set_sysclk = alc5623_set_dai_sysclk,
.set_pll = alc5623_set_dai_pll,
.no_capture_mute = 1,
};

static struct snd_soc_dai_driver alc5623_dai = {
Expand Down
5 changes: 3 additions & 2 deletions sound/soc/codecs/alc5632.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ static int alc5632_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}

static int alc5632_mute(struct snd_soc_dai *dai, int mute)
static int alc5632_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct snd_soc_component *component = dai->component;
u16 hp_mute = ALC5632_MISC_HP_DEPOP_MUTE_L
Expand Down Expand Up @@ -1005,10 +1005,11 @@ static int alc5632_set_bias_level(struct snd_soc_component *component,

static const struct snd_soc_dai_ops alc5632_dai_ops = {
.hw_params = alc5632_pcm_hw_params,
.digital_mute = alc5632_mute,
.mute_stream = alc5632_mute,
.set_fmt = alc5632_set_dai_fmt,
.set_sysclk = alc5632_set_dai_sysclk,
.set_pll = alc5632_set_dai_pll,
.no_capture_mute = 1,
};

static struct snd_soc_dai_driver alc5632_dai = {
Expand Down
Loading

0 comments on commit bdd0c27

Please sign in to comment.