mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 06:04:48 -04:00
Merge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori 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
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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.
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
@@ -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 | \
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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);
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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[] = {
|
||||
|
||||
@@ -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;
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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
|
||||
@@ -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 = {
|
||||
|
||||
@@ -1216,7 +1216,7 @@ static int cpcap_hifi_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
return regmap_update_bits(cpcap->regmap, reg, mask, val);
|
||||
}
|
||||
|
||||
static int cpcap_hifi_set_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cpcap_hifi_set_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct cpcap_audio *cpcap = snd_soc_component_get_drvdata(component);
|
||||
@@ -1237,7 +1237,8 @@ static const struct snd_soc_dai_ops cpcap_dai_hifi_ops = {
|
||||
.hw_params = cpcap_hifi_hw_params,
|
||||
.set_sysclk = cpcap_hifi_set_dai_sysclk,
|
||||
.set_fmt = cpcap_hifi_set_dai_fmt,
|
||||
.digital_mute = cpcap_hifi_set_mute,
|
||||
.mute_stream = cpcap_hifi_set_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static int cpcap_voice_hw_params(struct snd_pcm_substream *substream,
|
||||
@@ -1370,7 +1371,8 @@ static int cpcap_voice_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cpcap_voice_set_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cpcap_voice_set_mute(struct snd_soc_dai *dai,
|
||||
int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct cpcap_audio *cpcap = snd_soc_component_get_drvdata(component);
|
||||
@@ -1391,7 +1393,8 @@ static const struct snd_soc_dai_ops cpcap_dai_voice_ops = {
|
||||
.hw_params = cpcap_voice_hw_params,
|
||||
.set_sysclk = cpcap_voice_set_dai_sysclk,
|
||||
.set_fmt = cpcap_voice_set_dai_fmt,
|
||||
.digital_mute = cpcap_voice_set_mute,
|
||||
.mute_stream = cpcap_voice_set_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver cpcap_dai[] = {
|
||||
|
||||
@@ -30,7 +30,7 @@ static const struct snd_kcontrol_new cq93vc_snd_controls[] = {
|
||||
SOC_SINGLE("Mono DAC Playback Volume", DAVINCI_VC_REG09, 0, 0x3f, 0),
|
||||
};
|
||||
|
||||
static int cq93vc_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cq93vc_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
u8 reg;
|
||||
@@ -87,8 +87,9 @@ static int cq93vc_set_bias_level(struct snd_soc_component *component,
|
||||
#define CQ93VC_FORMATS (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE)
|
||||
|
||||
static const struct snd_soc_dai_ops cq93vc_dai_ops = {
|
||||
.digital_mute = cq93vc_mute,
|
||||
.mute_stream = cq93vc_mute,
|
||||
.set_sysclk = cq93vc_set_dai_sysclk,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver cq93vc_dai = {
|
||||
|
||||
@@ -378,7 +378,7 @@ static int cs4265_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cs4265_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cs4265_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
|
||||
@@ -498,9 +498,10 @@ static int cs4265_set_bias_level(struct snd_soc_component *component,
|
||||
|
||||
static const struct snd_soc_dai_ops cs4265_ops = {
|
||||
.hw_params = cs4265_pcm_hw_params,
|
||||
.digital_mute = cs4265_digital_mute,
|
||||
.mute_stream = cs4265_mute,
|
||||
.set_fmt = cs4265_set_fmt,
|
||||
.set_sysclk = cs4265_set_sysclk,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver cs4265_dai[] = {
|
||||
|
||||
@@ -406,7 +406,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream,
|
||||
* board does not have the MUTEA or MUTEB pins connected to such circuitry,
|
||||
* then this function will do nothing.
|
||||
*/
|
||||
static int cs4270_dai_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cs4270_dai_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component);
|
||||
@@ -471,7 +471,8 @@ static const struct snd_soc_dai_ops cs4270_dai_ops = {
|
||||
.hw_params = cs4270_hw_params,
|
||||
.set_sysclk = cs4270_set_dai_sysclk,
|
||||
.set_fmt = cs4270_set_dai_fmt,
|
||||
.digital_mute = cs4270_dai_mute,
|
||||
.mute_stream = cs4270_dai_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver cs4270_dai = {
|
||||
|
||||
@@ -849,7 +849,7 @@ static int cs42l42_set_sysclk(struct snd_soc_dai *dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cs42l42_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cs42l42_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
unsigned int regval;
|
||||
@@ -909,7 +909,8 @@ static const struct snd_soc_dai_ops cs42l42_ops = {
|
||||
.hw_params = cs42l42_pcm_hw_params,
|
||||
.set_fmt = cs42l42_set_dai_fmt,
|
||||
.set_sysclk = cs42l42_set_sysclk,
|
||||
.digital_mute = cs42l42_digital_mute
|
||||
.mute_stream = cs42l42_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver cs42l42_dai = {
|
||||
|
||||
@@ -484,7 +484,7 @@ static int cs42l51_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cs42l51_dai_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cs42l51_dai_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
int reg;
|
||||
@@ -511,7 +511,8 @@ static const struct snd_soc_dai_ops cs42l51_dai_ops = {
|
||||
.hw_params = cs42l51_hw_params,
|
||||
.set_sysclk = cs42l51_set_dai_sysclk,
|
||||
.set_fmt = cs42l51_set_dai_fmt,
|
||||
.digital_mute = cs42l51_dai_mute,
|
||||
.mute_stream = cs42l51_dai_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver cs42l51_dai = {
|
||||
|
||||
@@ -784,7 +784,7 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cs42l52_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cs42l52_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
|
||||
@@ -865,9 +865,10 @@ static int cs42l52_set_bias_level(struct snd_soc_component *component,
|
||||
|
||||
static const struct snd_soc_dai_ops cs42l52_ops = {
|
||||
.hw_params = cs42l52_pcm_hw_params,
|
||||
.digital_mute = cs42l52_digital_mute,
|
||||
.mute_stream = cs42l52_mute,
|
||||
.set_fmt = cs42l52_set_fmt,
|
||||
.set_sysclk = cs42l52_set_sysclk,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver cs42l52_dai = {
|
||||
|
||||
@@ -800,7 +800,7 @@ static int cs42l56_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cs42l56_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cs42l56_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
|
||||
@@ -929,9 +929,10 @@ static int cs42l56_set_bias_level(struct snd_soc_component *component,
|
||||
|
||||
static const struct snd_soc_dai_ops cs42l56_ops = {
|
||||
.hw_params = cs42l56_pcm_hw_params,
|
||||
.digital_mute = cs42l56_digital_mute,
|
||||
.mute_stream = cs42l56_mute,
|
||||
.set_fmt = cs42l56_set_dai_fmt,
|
||||
.set_sysclk = cs42l56_set_sysclk,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver cs42l56_dai = {
|
||||
|
||||
@@ -362,7 +362,7 @@ static int cs42xx8_hw_free(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cs42xx8_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cs42xx8_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct cs42xx8_priv *cs42xx8 = snd_soc_component_get_drvdata(component);
|
||||
@@ -380,7 +380,8 @@ static const struct snd_soc_dai_ops cs42xx8_dai_ops = {
|
||||
.set_sysclk = cs42xx8_set_dai_sysclk,
|
||||
.hw_params = cs42xx8_hw_params,
|
||||
.hw_free = cs42xx8_hw_free,
|
||||
.digital_mute = cs42xx8_digital_mute,
|
||||
.mute_stream = cs42xx8_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver cs42xx8_dai = {
|
||||
|
||||
@@ -116,7 +116,7 @@ static int cs4341_hw_params(struct snd_pcm_substream *substream,
|
||||
CS4341_MODE2_DIF, mode);
|
||||
}
|
||||
|
||||
static int cs4341_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cs4341_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
int ret;
|
||||
@@ -174,7 +174,8 @@ static const struct snd_kcontrol_new cs4341_controls[] = {
|
||||
static const struct snd_soc_dai_ops cs4341_dai_ops = {
|
||||
.set_fmt = cs4341_set_fmt,
|
||||
.hw_params = cs4341_hw_params,
|
||||
.digital_mute = cs4341_digital_mute,
|
||||
.mute_stream = cs4341_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver cs4341_dai = {
|
||||
|
||||
@@ -131,7 +131,7 @@ static int cs4349_pcm_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cs4349_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int cs4349_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
int reg;
|
||||
@@ -236,7 +236,8 @@ static const struct snd_soc_dapm_route cs4349_routes[] = {
|
||||
static const struct snd_soc_dai_ops cs4349_dai_ops = {
|
||||
.hw_params = cs4349_pcm_hw_params,
|
||||
.set_fmt = cs4349_set_dai_fmt,
|
||||
.digital_mute = cs4349_digital_mute,
|
||||
.mute_stream = cs4349_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver cs4349_dai = {
|
||||
|
||||
@@ -924,7 +924,7 @@ static int da7210_set_dai_fmt(struct snd_soc_dai *codec_dai, u32 fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int da7210_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int da7210_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
u8 mute_reg = snd_soc_component_read(component, DA7210_DAC_HPF) & 0xFB;
|
||||
@@ -1036,7 +1036,8 @@ static const struct snd_soc_dai_ops da7210_dai_ops = {
|
||||
.set_fmt = da7210_set_dai_fmt,
|
||||
.set_sysclk = da7210_set_dai_sysclk,
|
||||
.set_pll = da7210_set_dai_pll,
|
||||
.digital_mute = da7210_mute,
|
||||
.mute_stream = da7210_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver da7210_dai = {
|
||||
|
||||
@@ -1332,7 +1332,7 @@ static int da7213_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int da7213_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int da7213_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
|
||||
@@ -1528,7 +1528,8 @@ static int da7213_set_component_pll(struct snd_soc_component *component,
|
||||
static const struct snd_soc_dai_ops da7213_dai_ops = {
|
||||
.hw_params = da7213_hw_params,
|
||||
.set_fmt = da7213_set_dai_fmt,
|
||||
.digital_mute = da7213_mute,
|
||||
.mute_stream = da7213_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver da7213_dai = {
|
||||
|
||||
@@ -1211,7 +1211,7 @@ static int da9055_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int da9055_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int da9055_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
|
||||
@@ -1324,7 +1324,8 @@ static const struct snd_soc_dai_ops da9055_dai_ops = {
|
||||
.set_fmt = da9055_set_dai_fmt,
|
||||
.set_sysclk = da9055_set_dai_sysclk,
|
||||
.set_pll = da9055_set_dai_pll,
|
||||
.digital_mute = da9055_mute,
|
||||
.mute_stream = da9055_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver da9055_dai = {
|
||||
|
||||
@@ -507,7 +507,7 @@ static int es8316_pcm_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int es8316_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int es8316_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
snd_soc_component_update_bits(dai->component, ES8316_DAC_SET1, 0x20,
|
||||
mute ? 0x20 : 0);
|
||||
@@ -522,7 +522,8 @@ static const struct snd_soc_dai_ops es8316_ops = {
|
||||
.hw_params = es8316_pcm_hw_params,
|
||||
.set_fmt = es8316_set_dai_fmt,
|
||||
.set_sysclk = es8316_set_dai_sysclk,
|
||||
.digital_mute = es8316_mute,
|
||||
.mute_stream = es8316_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver es8316_dai = {
|
||||
|
||||
@@ -449,7 +449,7 @@ static const struct snd_soc_dapm_route es8328_dapm_routes[] = {
|
||||
{ "ROUT2", NULL, "Right Out 2" },
|
||||
};
|
||||
|
||||
static int es8328_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int es8328_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
return snd_soc_component_update_bits(dai->component, ES8328_DACCONTROL3,
|
||||
ES8328_DACCONTROL3_DACMUTE,
|
||||
@@ -692,9 +692,10 @@ static int es8328_set_bias_level(struct snd_soc_component *component,
|
||||
static const struct snd_soc_dai_ops es8328_dai_ops = {
|
||||
.startup = es8328_startup,
|
||||
.hw_params = es8328_hw_params,
|
||||
.digital_mute = es8328_mute,
|
||||
.mute_stream = es8328_mute,
|
||||
.set_sysclk = es8328_set_sysclk,
|
||||
.set_fmt = es8328_set_dai_fmt,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver es8328_dai = {
|
||||
|
||||
@@ -558,15 +558,24 @@ static int hdmi_codec_i2s_set_fmt(struct snd_soc_dai *dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hdmi_codec_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int hdmi_codec_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
|
||||
|
||||
if (hcp->hcd.ops->digital_mute)
|
||||
return hcp->hcd.ops->digital_mute(dai->dev->parent,
|
||||
hcp->hcd.data, mute);
|
||||
/*
|
||||
* ignore if direction was CAPTURE
|
||||
* and it had .no_capture_mute flag
|
||||
* see
|
||||
* snd_soc_dai_digital_mute()
|
||||
*/
|
||||
if (hcp->hcd.ops->mute_stream &&
|
||||
(direction == SNDRV_PCM_STREAM_PLAYBACK ||
|
||||
!hcp->hcd.ops->no_capture_mute))
|
||||
return hcp->hcd.ops->mute_stream(dai->dev->parent,
|
||||
hcp->hcd.data,
|
||||
mute, direction);
|
||||
|
||||
return 0;
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops hdmi_codec_i2s_dai_ops = {
|
||||
@@ -574,14 +583,14 @@ static const struct snd_soc_dai_ops hdmi_codec_i2s_dai_ops = {
|
||||
.shutdown = hdmi_codec_shutdown,
|
||||
.hw_params = hdmi_codec_hw_params,
|
||||
.set_fmt = hdmi_codec_i2s_set_fmt,
|
||||
.digital_mute = hdmi_codec_digital_mute,
|
||||
.mute_stream = hdmi_codec_mute,
|
||||
};
|
||||
|
||||
static const struct snd_soc_dai_ops hdmi_codec_spdif_dai_ops = {
|
||||
.startup = hdmi_codec_startup,
|
||||
.shutdown = hdmi_codec_shutdown,
|
||||
.hw_params = hdmi_codec_hw_params,
|
||||
.digital_mute = hdmi_codec_digital_mute,
|
||||
.mute_stream = hdmi_codec_mute,
|
||||
};
|
||||
|
||||
#define HDMI_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |\
|
||||
|
||||
@@ -860,7 +860,7 @@ static const struct snd_soc_dapm_route isabelle_intercon[] = {
|
||||
{ "LINEOUT2", NULL, "LINEOUT2 Driver" },
|
||||
};
|
||||
|
||||
static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
snd_soc_component_update_bits(dai->component, ISABELLE_DAC1_SOFTRAMP_REG,
|
||||
BIT(4), (mute ? BIT(4) : 0));
|
||||
@@ -868,7 +868,7 @@ static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
snd_soc_component_update_bits(dai->component, ISABELLE_DAC2_SOFTRAMP_REG,
|
||||
BIT(4), (mute ? BIT(4) : 0));
|
||||
@@ -876,7 +876,7 @@ static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int isabelle_line_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int isabelle_line_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
snd_soc_component_update_bits(dai->component, ISABELLE_DAC3_SOFTRAMP_REG,
|
||||
BIT(4), (mute ? BIT(4) : 0));
|
||||
@@ -1014,19 +1014,22 @@ static int isabelle_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
static const struct snd_soc_dai_ops isabelle_hs_dai_ops = {
|
||||
.hw_params = isabelle_hw_params,
|
||||
.set_fmt = isabelle_set_dai_fmt,
|
||||
.digital_mute = isabelle_hs_mute,
|
||||
.mute_stream = isabelle_hs_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static const struct snd_soc_dai_ops isabelle_hf_dai_ops = {
|
||||
.hw_params = isabelle_hw_params,
|
||||
.set_fmt = isabelle_set_dai_fmt,
|
||||
.digital_mute = isabelle_hf_mute,
|
||||
.mute_stream = isabelle_hf_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static const struct snd_soc_dai_ops isabelle_line_dai_ops = {
|
||||
.hw_params = isabelle_hw_params,
|
||||
.set_fmt = isabelle_set_dai_fmt,
|
||||
.digital_mute = isabelle_line_mute,
|
||||
.mute_stream = isabelle_line_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static const struct snd_soc_dai_ops isabelle_ul_dai_ops = {
|
||||
|
||||
@@ -264,7 +264,7 @@ static int jz4770_codec_pcm_trigger(struct snd_pcm_substream *substream,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int jz4770_codec_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int jz4770_codec_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *codec = dai->component;
|
||||
struct jz_codec *jz_codec = snd_soc_component_get_drvdata(codec);
|
||||
@@ -752,7 +752,8 @@ static const struct snd_soc_dai_ops jz4770_codec_dai_ops = {
|
||||
.shutdown = jz4770_codec_shutdown,
|
||||
.hw_params = jz4770_codec_hw_params,
|
||||
.trigger = jz4770_codec_pcm_trigger,
|
||||
.digital_mute = jz4770_codec_digital_mute,
|
||||
.mute_stream = jz4770_codec_mute_stream,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
#define JZ_CODEC_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
|
||||
|
||||
@@ -1218,35 +1218,35 @@ static int lm49453_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lm49453_hp_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int lm49453_hp_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(1)|BIT(0),
|
||||
(mute ? (BIT(1)|BIT(0)) : 0));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lm49453_lo_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int lm49453_lo_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(3)|BIT(2),
|
||||
(mute ? (BIT(3)|BIT(2)) : 0));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lm49453_ls_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int lm49453_ls_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(5)|BIT(4),
|
||||
(mute ? (BIT(5)|BIT(4)) : 0));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lm49453_ep_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int lm49453_ep_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(4),
|
||||
(mute ? BIT(4) : 0));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lm49453_ha_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int lm49453_ha_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(7)|BIT(6),
|
||||
(mute ? (BIT(7)|BIT(6)) : 0));
|
||||
@@ -1288,35 +1288,40 @@ static const struct snd_soc_dai_ops lm49453_headset_dai_ops = {
|
||||
.hw_params = lm49453_hw_params,
|
||||
.set_sysclk = lm49453_set_dai_sysclk,
|
||||
.set_fmt = lm49453_set_dai_fmt,
|
||||
.digital_mute = lm49453_hp_mute,
|
||||
.mute_stream = lm49453_hp_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static const struct snd_soc_dai_ops lm49453_speaker_dai_ops = {
|
||||
.hw_params = lm49453_hw_params,
|
||||
.set_sysclk = lm49453_set_dai_sysclk,
|
||||
.set_fmt = lm49453_set_dai_fmt,
|
||||
.digital_mute = lm49453_ls_mute,
|
||||
.mute_stream = lm49453_ls_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static const struct snd_soc_dai_ops lm49453_haptic_dai_ops = {
|
||||
.hw_params = lm49453_hw_params,
|
||||
.set_sysclk = lm49453_set_dai_sysclk,
|
||||
.set_fmt = lm49453_set_dai_fmt,
|
||||
.digital_mute = lm49453_ha_mute,
|
||||
.mute_stream = lm49453_ha_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static const struct snd_soc_dai_ops lm49453_ep_dai_ops = {
|
||||
.hw_params = lm49453_hw_params,
|
||||
.set_sysclk = lm49453_set_dai_sysclk,
|
||||
.set_fmt = lm49453_set_dai_fmt,
|
||||
.digital_mute = lm49453_ep_mute,
|
||||
.mute_stream = lm49453_ep_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static const struct snd_soc_dai_ops lm49453_lineout_dai_ops = {
|
||||
.hw_params = lm49453_hw_params,
|
||||
.set_sysclk = lm49453_set_dai_sysclk,
|
||||
.set_fmt = lm49453_set_dai_fmt,
|
||||
.digital_mute = lm49453_lo_mute,
|
||||
.mute_stream = lm49453_lo_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
/* LM49453 dai structure. */
|
||||
|
||||
@@ -1274,7 +1274,8 @@ static int max98088_dai2_set_fmt(struct snd_soc_dai *codec_dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int max98088_dai1_digital_mute(struct snd_soc_dai *codec_dai, int mute)
|
||||
static int max98088_dai1_mute(struct snd_soc_dai *codec_dai, int mute,
|
||||
int direction)
|
||||
{
|
||||
struct snd_soc_component *component = codec_dai->component;
|
||||
int reg;
|
||||
@@ -1289,7 +1290,8 @@ static int max98088_dai1_digital_mute(struct snd_soc_dai *codec_dai, int mute)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int max98088_dai2_digital_mute(struct snd_soc_dai *codec_dai, int mute)
|
||||
static int max98088_dai2_mute(struct snd_soc_dai *codec_dai, int mute,
|
||||
int direction)
|
||||
{
|
||||
struct snd_soc_component *component = codec_dai->component;
|
||||
int reg;
|
||||
@@ -1354,14 +1356,16 @@ static const struct snd_soc_dai_ops max98088_dai1_ops = {
|
||||
.set_sysclk = max98088_dai_set_sysclk,
|
||||
.set_fmt = max98088_dai1_set_fmt,
|
||||
.hw_params = max98088_dai1_hw_params,
|
||||
.digital_mute = max98088_dai1_digital_mute,
|
||||
.mute_stream = max98088_dai1_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static const struct snd_soc_dai_ops max98088_dai2_ops = {
|
||||
.set_sysclk = max98088_dai_set_sysclk,
|
||||
.set_fmt = max98088_dai2_set_fmt,
|
||||
.hw_params = max98088_dai2_hw_params,
|
||||
.digital_mute = max98088_dai2_digital_mute,
|
||||
.mute_stream = max98088_dai2_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver max98088_dai[] = {
|
||||
|
||||
@@ -2017,7 +2017,8 @@ static int max98090_dai_set_sysclk(struct snd_soc_dai *dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int max98090_dai_digital_mute(struct snd_soc_dai *codec_dai, int mute)
|
||||
static int max98090_dai_mute(struct snd_soc_dai *codec_dai, int mute,
|
||||
int direction)
|
||||
{
|
||||
struct snd_soc_component *component = codec_dai->component;
|
||||
int regval;
|
||||
@@ -2347,8 +2348,9 @@ static const struct snd_soc_dai_ops max98090_dai_ops = {
|
||||
.set_fmt = max98090_dai_set_fmt,
|
||||
.set_tdm_slot = max98090_set_tdm_slot,
|
||||
.hw_params = max98090_dai_hw_params,
|
||||
.digital_mute = max98090_dai_digital_mute,
|
||||
.mute_stream = max98090_dai_mute,
|
||||
.trigger = max98090_dai_trigger,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver max98090_dai[] = {
|
||||
|
||||
@@ -283,7 +283,7 @@ static int max9867_dai_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int max9867_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int max9867_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component);
|
||||
@@ -393,9 +393,10 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai,
|
||||
static const struct snd_soc_dai_ops max9867_dai_ops = {
|
||||
.set_sysclk = max9867_set_dai_sysclk,
|
||||
.set_fmt = max9867_dai_set_fmt,
|
||||
.digital_mute = max9867_mute,
|
||||
.mute_stream = max9867_mute,
|
||||
.startup = max9867_startup,
|
||||
.hw_params = max9867_dai_hw_params,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver max9867_dai[] = {
|
||||
|
||||
@@ -372,7 +372,7 @@ static int ml26124_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ml26124_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int ml26124_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct ml26124_priv *priv = snd_soc_component_get_drvdata(component);
|
||||
@@ -492,9 +492,10 @@ static int ml26124_set_bias_level(struct snd_soc_component *component,
|
||||
|
||||
static const struct snd_soc_dai_ops ml26124_dai_ops = {
|
||||
.hw_params = ml26124_hw_params,
|
||||
.digital_mute = ml26124_mute,
|
||||
.mute_stream = ml26124_mute,
|
||||
.set_fmt = ml26124_set_dai_fmt,
|
||||
.set_sysclk = ml26124_set_dai_sysclk,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver ml26124_dai = {
|
||||
|
||||
@@ -900,7 +900,7 @@ static int nau8822_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nau8822_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int nau8822_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
|
||||
@@ -967,10 +967,11 @@ static int nau8822_set_bias_level(struct snd_soc_component *component,
|
||||
|
||||
static const struct snd_soc_dai_ops nau8822_dai_ops = {
|
||||
.hw_params = nau8822_hw_params,
|
||||
.digital_mute = nau8822_mute,
|
||||
.mute_stream = nau8822_mute,
|
||||
.set_fmt = nau8822_set_dai_fmt,
|
||||
.set_sysclk = nau8822_set_dai_sysclk,
|
||||
.set_pll = nau8822_set_pll,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver nau8822_dai = {
|
||||
|
||||
@@ -147,7 +147,7 @@ static int pcm1681_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pcm1681_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int pcm1681_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct pcm1681_private *priv = snd_soc_component_get_drvdata(component);
|
||||
@@ -205,7 +205,8 @@ static int pcm1681_hw_params(struct snd_pcm_substream *substream,
|
||||
static const struct snd_soc_dai_ops pcm1681_dai_ops = {
|
||||
.set_fmt = pcm1681_set_dai_fmt,
|
||||
.hw_params = pcm1681_hw_params,
|
||||
.digital_mute = pcm1681_digital_mute,
|
||||
.mute_stream = pcm1681_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_widget pcm1681_dapm_widgets[] = {
|
||||
|
||||
@@ -60,7 +60,7 @@ static int pcm1789_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pcm1789_digital_mute(struct snd_soc_dai *codec_dai, int mute)
|
||||
static int pcm1789_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = codec_dai->component;
|
||||
struct pcm1789_private *priv = snd_soc_component_get_drvdata(component);
|
||||
@@ -167,8 +167,9 @@ static int pcm1789_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
static const struct snd_soc_dai_ops pcm1789_dai_ops = {
|
||||
.set_fmt = pcm1789_set_dai_fmt,
|
||||
.hw_params = pcm1789_hw_params,
|
||||
.digital_mute = pcm1789_digital_mute,
|
||||
.mute_stream = pcm1789_mute,
|
||||
.trigger = pcm1789_trigger,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static const DECLARE_TLV_DB_SCALE(pcm1789_dac_tlv, -12000, 50, 1);
|
||||
|
||||
@@ -76,7 +76,7 @@ static int pcm179x_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pcm179x_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int pcm179x_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct pcm179x_private *priv = snd_soc_component_get_drvdata(component);
|
||||
@@ -145,7 +145,8 @@ static int pcm179x_hw_params(struct snd_pcm_substream *substream,
|
||||
static const struct snd_soc_dai_ops pcm179x_dai_ops = {
|
||||
.set_fmt = pcm179x_set_dai_fmt,
|
||||
.hw_params = pcm179x_hw_params,
|
||||
.digital_mute = pcm179x_digital_mute,
|
||||
.mute_stream = pcm179x_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static const DECLARE_TLV_DB_SCALE(pcm179x_dac_tlv, -12000, 50, 1);
|
||||
|
||||
@@ -290,7 +290,7 @@ static int pcm3168a_reset(struct pcm3168a_priv *pcm3168a)
|
||||
PCM3168A_MRST_MASK | PCM3168A_SRST_MASK);
|
||||
}
|
||||
|
||||
static int pcm3168a_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int pcm3168a_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct pcm3168a_priv *pcm3168a = snd_soc_component_get_drvdata(component);
|
||||
@@ -570,8 +570,9 @@ static const struct snd_soc_dai_ops pcm3168a_dai_ops = {
|
||||
.set_fmt = pcm3168a_set_dai_fmt,
|
||||
.set_sysclk = pcm3168a_set_dai_sysclk,
|
||||
.hw_params = pcm3168a_hw_params,
|
||||
.digital_mute = pcm3168a_digital_mute,
|
||||
.mute_stream = pcm3168a_mute,
|
||||
.set_tdm_slot = pcm3168a_set_tdm_slot,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver pcm3168a_dais[] = {
|
||||
|
||||
@@ -1394,7 +1394,7 @@ static int pcm512x_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pcm512x_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int pcm512x_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component);
|
||||
@@ -1445,8 +1445,9 @@ static const struct snd_soc_dai_ops pcm512x_dai_ops = {
|
||||
.startup = pcm512x_dai_startup,
|
||||
.hw_params = pcm512x_hw_params,
|
||||
.set_fmt = pcm512x_set_fmt,
|
||||
.digital_mute = pcm512x_digital_mute,
|
||||
.mute_stream = pcm512x_mute,
|
||||
.set_bclk_ratio = pcm512x_set_bclk_ratio,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver pcm512x_dai = {
|
||||
|
||||
@@ -107,7 +107,7 @@ static int rk3328_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rk3328_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int rk3328_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct rk3328_codec_priv *rk3328 =
|
||||
snd_soc_component_get_drvdata(dai->component);
|
||||
@@ -316,9 +316,10 @@ static void rk3328_pcm_shutdown(struct snd_pcm_substream *substream,
|
||||
static const struct snd_soc_dai_ops rk3328_dai_ops = {
|
||||
.hw_params = rk3328_hw_params,
|
||||
.set_fmt = rk3328_set_dai_fmt,
|
||||
.digital_mute = rk3328_digital_mute,
|
||||
.mute_stream = rk3328_mute_stream,
|
||||
.startup = rk3328_pcm_startup,
|
||||
.shutdown = rk3328_pcm_shutdown,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver rk3328_dai[] = {
|
||||
|
||||
@@ -775,7 +775,7 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = {
|
||||
};
|
||||
|
||||
/* mute the codec used by alsa core */
|
||||
static int sgtl5000_digital_mute(struct snd_soc_dai *codec_dai, int mute)
|
||||
static int sgtl5000_mute_stream(struct snd_soc_dai *codec_dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = codec_dai->component;
|
||||
u16 i2s_pwr = SGTL5000_I2S_IN_POWERUP;
|
||||
@@ -1160,9 +1160,10 @@ static int sgtl5000_set_bias_level(struct snd_soc_component *component,
|
||||
|
||||
static const struct snd_soc_dai_ops sgtl5000_ops = {
|
||||
.hw_params = sgtl5000_pcm_hw_params,
|
||||
.digital_mute = sgtl5000_digital_mute,
|
||||
.mute_stream = sgtl5000_mute_stream,
|
||||
.set_fmt = sgtl5000_set_dai_fmt,
|
||||
.set_sysclk = sgtl5000_set_dai_sysclk,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver sgtl5000_dai = {
|
||||
|
||||
@@ -388,7 +388,7 @@ static int ssm2518_hw_params(struct snd_pcm_substream *substream,
|
||||
SSM2518_POWER1_MCS_MASK, mcs << 1);
|
||||
}
|
||||
|
||||
static int ssm2518_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int ssm2518_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct ssm2518 *ssm2518 = snd_soc_component_get_drvdata(dai->component);
|
||||
unsigned int val;
|
||||
@@ -623,9 +623,10 @@ static int ssm2518_startup(struct snd_pcm_substream *substream,
|
||||
static const struct snd_soc_dai_ops ssm2518_dai_ops = {
|
||||
.startup = ssm2518_startup,
|
||||
.hw_params = ssm2518_hw_params,
|
||||
.digital_mute = ssm2518_mute,
|
||||
.mute_stream = ssm2518_mute,
|
||||
.set_fmt = ssm2518_set_dai_fmt,
|
||||
.set_tdm_slot = ssm2518_set_tdm_slot,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver ssm2518_dai = {
|
||||
|
||||
@@ -338,7 +338,7 @@ static int ssm2602_startup(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ssm2602_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int ssm2602_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct ssm2602_priv *ssm2602 = snd_soc_component_get_drvdata(dai->component);
|
||||
|
||||
@@ -505,9 +505,10 @@ static int ssm2602_set_bias_level(struct snd_soc_component *component,
|
||||
static const struct snd_soc_dai_ops ssm2602_dai_ops = {
|
||||
.startup = ssm2602_startup,
|
||||
.hw_params = ssm2602_hw_params,
|
||||
.digital_mute = ssm2602_mute,
|
||||
.mute_stream = ssm2602_mute,
|
||||
.set_sysclk = ssm2602_set_dai_sysclk,
|
||||
.set_fmt = ssm2602_set_dai_fmt,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver ssm2602_dai = {
|
||||
|
||||
@@ -220,7 +220,7 @@ static int ssm4567_hw_params(struct snd_pcm_substream *substream,
|
||||
SSM4567_DAC_FS_MASK, dacfs);
|
||||
}
|
||||
|
||||
static int ssm4567_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int ssm4567_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct ssm4567 *ssm4567 = snd_soc_component_get_drvdata(dai->component);
|
||||
unsigned int val;
|
||||
@@ -390,9 +390,10 @@ static int ssm4567_set_bias_level(struct snd_soc_component *component,
|
||||
|
||||
static const struct snd_soc_dai_ops ssm4567_dai_ops = {
|
||||
.hw_params = ssm4567_hw_params,
|
||||
.digital_mute = ssm4567_mute,
|
||||
.mute_stream = ssm4567_mute,
|
||||
.set_fmt = ssm4567_set_dai_fmt,
|
||||
.set_tdm_slot = ssm4567_set_tdm_slot,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver ssm4567_dai = {
|
||||
|
||||
@@ -251,7 +251,7 @@ static int sta529_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sta529_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int sta529_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
u8 val = 0;
|
||||
|
||||
@@ -291,7 +291,8 @@ static int sta529_set_dai_fmt(struct snd_soc_dai *codec_dai, u32 fmt)
|
||||
static const struct snd_soc_dai_ops sta529_dai_ops = {
|
||||
.hw_params = sta529_hw_params,
|
||||
.set_fmt = sta529_set_dai_fmt,
|
||||
.digital_mute = sta529_mute,
|
||||
.mute_stream = sta529_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver sta529_dai = {
|
||||
|
||||
@@ -465,7 +465,7 @@ static int tas2552_set_dai_tdm_slot(struct snd_soc_dai *dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tas2552_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int tas2552_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
u8 cfg1_reg = 0;
|
||||
struct snd_soc_component *component = dai->component;
|
||||
@@ -519,7 +519,8 @@ static const struct snd_soc_dai_ops tas2552_speaker_dai_ops = {
|
||||
.set_sysclk = tas2552_set_dai_sysclk,
|
||||
.set_fmt = tas2552_set_dai_fmt,
|
||||
.set_tdm_slot = tas2552_set_dai_tdm_slot,
|
||||
.digital_mute = tas2552_mute,
|
||||
.mute_stream = tas2552_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
/* Formats supported by TAS2552 driver. */
|
||||
|
||||
@@ -394,7 +394,7 @@ static int tas2562_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tas2562_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int tas2562_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
|
||||
@@ -612,7 +612,8 @@ static const struct snd_soc_dai_ops tas2562_speaker_dai_ops = {
|
||||
.hw_params = tas2562_hw_params,
|
||||
.set_fmt = tas2562_set_dai_fmt,
|
||||
.set_tdm_slot = tas2562_set_dai_tdm_slot,
|
||||
.digital_mute = tas2562_mute,
|
||||
.mute_stream = tas2562_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver tas2562_dai[] = {
|
||||
|
||||
@@ -189,7 +189,7 @@ static const struct snd_soc_dapm_route tas2770_audio_map[] = {
|
||||
{"VSENSE", "Switch", "VMON"},
|
||||
};
|
||||
|
||||
static int tas2770_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int tas2770_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
int ret;
|
||||
@@ -530,10 +530,11 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai,
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tas2770_dai_ops = {
|
||||
.digital_mute = tas2770_mute,
|
||||
.mute_stream = tas2770_mute,
|
||||
.hw_params = tas2770_hw_params,
|
||||
.set_fmt = tas2770_set_fmt,
|
||||
.set_tdm_slot = tas2770_set_dai_tdm_slot,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
#define TAS2770_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
|
||||
|
||||
@@ -301,7 +301,7 @@ static int tas571x_hw_params(struct snd_pcm_substream *substream,
|
||||
TAS571X_SDI_FMT_MASK, val);
|
||||
}
|
||||
|
||||
static int tas571x_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int tas571x_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
u8 sysctl2;
|
||||
@@ -354,7 +354,8 @@ static int tas571x_set_bias_level(struct snd_soc_component *component,
|
||||
static const struct snd_soc_dai_ops tas571x_dai_ops = {
|
||||
.set_fmt = tas571x_set_dai_fmt,
|
||||
.hw_params = tas571x_hw_params,
|
||||
.digital_mute = tas571x_mute,
|
||||
.mute_stream = tas571x_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ static int tas5720_set_dai_tdm_slot(struct snd_soc_dai *dai,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tas5720_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int tas5720_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
int ret;
|
||||
@@ -604,7 +604,8 @@ static const struct snd_soc_dai_ops tas5720_speaker_dai_ops = {
|
||||
.hw_params = tas5720_hw_params,
|
||||
.set_fmt = tas5720_set_dai_fmt,
|
||||
.set_tdm_slot = tas5720_set_dai_tdm_slot,
|
||||
.digital_mute = tas5720_mute,
|
||||
.mute_stream = tas5720_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -252,7 +252,7 @@ static int tas6424_set_dai_tdm_slot(struct snd_soc_dai *dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tas6424_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int tas6424_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct tas6424_data *tas6424 = snd_soc_component_get_drvdata(component);
|
||||
@@ -382,7 +382,8 @@ static const struct snd_soc_dai_ops tas6424_speaker_dai_ops = {
|
||||
.hw_params = tas6424_hw_params,
|
||||
.set_fmt = tas6424_set_dai_fmt,
|
||||
.set_tdm_slot = tas6424_set_dai_tdm_slot,
|
||||
.digital_mute = tas6424_mute,
|
||||
.mute_stream = tas6424_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver tas6424_dai[] = {
|
||||
|
||||
@@ -93,7 +93,7 @@ static int tfa9879_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tfa9879_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int tfa9879_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
|
||||
@@ -251,8 +251,9 @@ static const struct regmap_config tfa9879_regmap = {
|
||||
|
||||
static const struct snd_soc_dai_ops tfa9879_dai_ops = {
|
||||
.hw_params = tfa9879_hw_params,
|
||||
.digital_mute = tfa9879_digital_mute,
|
||||
.mute_stream = tfa9879_mute_stream,
|
||||
.set_fmt = tfa9879_set_fmt,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
#define TFA9879_RATES SNDRV_PCM_RATE_8000_96000
|
||||
|
||||
@@ -404,7 +404,7 @@ static void tlv320aic23_shutdown(struct snd_pcm_substream *substream,
|
||||
aic23->requested_adc = 0;
|
||||
}
|
||||
|
||||
static int tlv320aic23_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int tlv320aic23_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
u16 reg;
|
||||
@@ -512,9 +512,10 @@ static const struct snd_soc_dai_ops tlv320aic23_dai_ops = {
|
||||
.prepare = tlv320aic23_pcm_prepare,
|
||||
.hw_params = tlv320aic23_hw_params,
|
||||
.shutdown = tlv320aic23_shutdown,
|
||||
.digital_mute = tlv320aic23_mute,
|
||||
.mute_stream = tlv320aic23_mute,
|
||||
.set_fmt = tlv320aic23_set_dai_fmt,
|
||||
.set_sysclk = tlv320aic23_set_dai_sysclk,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver tlv320aic23_dai = {
|
||||
|
||||
@@ -134,7 +134,7 @@ static int aic26_hw_params(struct snd_pcm_substream *substream,
|
||||
/*
|
||||
* aic26_mute - Mute control to reduce noise when changing audio format
|
||||
*/
|
||||
static int aic26_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int aic26_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct aic26 *aic26 = snd_soc_component_get_drvdata(component);
|
||||
@@ -211,9 +211,10 @@ static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
|
||||
static const struct snd_soc_dai_ops aic26_dai_ops = {
|
||||
.hw_params = aic26_hw_params,
|
||||
.digital_mute = aic26_mute,
|
||||
.mute_stream = aic26_mute,
|
||||
.set_sysclk = aic26_set_sysclk,
|
||||
.set_fmt = aic26_set_fmt,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver aic26_dai = {
|
||||
|
||||
@@ -972,7 +972,8 @@ static int aic31xx_hw_params(struct snd_pcm_substream *substream,
|
||||
return aic31xx_setup_pll(component, params);
|
||||
}
|
||||
|
||||
static int aic31xx_dac_mute(struct snd_soc_dai *codec_dai, int mute)
|
||||
static int aic31xx_dac_mute(struct snd_soc_dai *codec_dai, int mute,
|
||||
int direction)
|
||||
{
|
||||
struct snd_soc_component *component = codec_dai->component;
|
||||
|
||||
@@ -1379,7 +1380,8 @@ static const struct snd_soc_dai_ops aic31xx_dai_ops = {
|
||||
.hw_params = aic31xx_hw_params,
|
||||
.set_sysclk = aic31xx_set_dai_sysclk,
|
||||
.set_fmt = aic31xx_set_dai_fmt,
|
||||
.digital_mute = aic31xx_dac_mute,
|
||||
.mute_stream = aic31xx_dac_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver dac31xx_dai_driver[] = {
|
||||
|
||||
@@ -812,7 +812,7 @@ static int aic32x4_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int aic32x4_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int aic32x4_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
|
||||
@@ -866,9 +866,10 @@ static int aic32x4_set_bias_level(struct snd_soc_component *component,
|
||||
|
||||
static const struct snd_soc_dai_ops aic32x4_ops = {
|
||||
.hw_params = aic32x4_hw_params,
|
||||
.digital_mute = aic32x4_mute,
|
||||
.mute_stream = aic32x4_mute,
|
||||
.set_fmt = aic32x4_set_dai_fmt,
|
||||
.set_sysclk = aic32x4_set_dai_sysclk,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver aic32x4_dai = {
|
||||
|
||||
@@ -1216,7 +1216,7 @@ static int aic3x_prepare(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int aic3x_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int aic3x_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
u8 ldac_reg = snd_soc_component_read(component, LDAC_VOL) & ~MUTE_ON;
|
||||
@@ -1481,10 +1481,11 @@ static int aic3x_set_bias_level(struct snd_soc_component *component,
|
||||
static const struct snd_soc_dai_ops aic3x_dai_ops = {
|
||||
.hw_params = aic3x_hw_params,
|
||||
.prepare = aic3x_prepare,
|
||||
.digital_mute = aic3x_mute,
|
||||
.mute_stream = aic3x_mute,
|
||||
.set_sysclk = aic3x_set_dai_sysclk,
|
||||
.set_fmt = aic3x_set_dai_fmt,
|
||||
.set_tdm_slot = aic3x_set_dai_tdm_slot,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver aic3x_dai = {
|
||||
|
||||
@@ -997,7 +997,7 @@ static void twl6040_mute_path(struct snd_soc_component *component, enum twl6040_
|
||||
}
|
||||
}
|
||||
|
||||
static int twl6040_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int twl6040_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
switch (dai->id) {
|
||||
case TWL6040_DAI_LEGACY:
|
||||
@@ -1020,7 +1020,8 @@ static const struct snd_soc_dai_ops twl6040_dai_ops = {
|
||||
.hw_params = twl6040_hw_params,
|
||||
.prepare = twl6040_prepare,
|
||||
.set_sysclk = twl6040_set_dai_sysclk,
|
||||
.digital_mute = twl6040_digital_mute,
|
||||
.mute_stream = twl6040_mute_stream,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver twl6040_dai[] = {
|
||||
|
||||
@@ -117,7 +117,7 @@ static inline void uda134x_reset(struct snd_soc_component *component)
|
||||
regmap_update_bits(uda134x->regmap, UDA134X_STATUS0, mask, 0);
|
||||
}
|
||||
|
||||
static int uda134x_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int uda134x_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct uda134x_priv *uda134x = snd_soc_component_get_drvdata(dai->component);
|
||||
unsigned int mask = 1<<2;
|
||||
@@ -416,9 +416,10 @@ static const struct snd_soc_dai_ops uda134x_dai_ops = {
|
||||
.startup = uda134x_startup,
|
||||
.shutdown = uda134x_shutdown,
|
||||
.hw_params = uda134x_hw_params,
|
||||
.digital_mute = uda134x_mute,
|
||||
.mute_stream = uda134x_mute,
|
||||
.set_sysclk = uda134x_set_dai_sysclk,
|
||||
.set_fmt = uda134x_set_dai_fmt,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver uda134x_dai = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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[] = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -452,7 +452,7 @@ static int wm8940_i2s_hw_params(struct snd_pcm_substream *substream,
|
||||
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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 | \
|
||||
|
||||
@@ -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 @@ static int wm8985_probe(struct snd_soc_component *component)
|
||||
}
|
||||
|
||||
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 | \
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -108,7 +108,7 @@ static int axg_spdifout_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
}
|
||||
}
|
||||
|
||||
static int axg_spdifout_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int axg_spdifout_mute(struct snd_soc_dai *dai, int mute, int direction)
|
||||
{
|
||||
struct axg_spdifout *priv = snd_soc_dai_get_drvdata(dai);
|
||||
|
||||
@@ -285,10 +285,11 @@ static void axg_spdifout_shutdown(struct snd_pcm_substream *substream,
|
||||
|
||||
static const struct snd_soc_dai_ops axg_spdifout_ops = {
|
||||
.trigger = axg_spdifout_trigger,
|
||||
.digital_mute = axg_spdifout_digital_mute,
|
||||
.mute_stream = axg_spdifout_mute,
|
||||
.hw_params = axg_spdifout_hw_params,
|
||||
.startup = axg_spdifout_startup,
|
||||
.shutdown = axg_spdifout_shutdown,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver axg_spdifout_dai_drv[] = {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user