pcm179x.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) pcm179x.c (1eb2c43d26a585bbbe196360e921c5ffe9d00fd1)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * PCM179X ASoC codec driver
4 *
5 * Copyright (c) Amarula Solutions B.V. 2013
6 *
7 * Michael Trimarchi <michael@amarulasolutions.com>
8 */

--- 62 unchanged lines hidden (view full) ---

71 struct snd_soc_component *component = codec_dai->component;
72 struct pcm179x_private *priv = snd_soc_component_get_drvdata(component);
73
74 priv->format = format;
75
76 return 0;
77}
78
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * PCM179X ASoC codec driver
4 *
5 * Copyright (c) Amarula Solutions B.V. 2013
6 *
7 * Michael Trimarchi <michael@amarulasolutions.com>
8 */

--- 62 unchanged lines hidden (view full) ---

71 struct snd_soc_component *component = codec_dai->component;
72 struct pcm179x_private *priv = snd_soc_component_get_drvdata(component);
73
74 priv->format = format;
75
76 return 0;
77}
78
79static int pcm179x_digital_mute(struct snd_soc_dai *dai, int mute)
79static int pcm179x_mute(struct snd_soc_dai *dai, int mute, int direction)
80{
81 struct snd_soc_component *component = dai->component;
82 struct pcm179x_private *priv = snd_soc_component_get_drvdata(component);
83 int ret;
84
85 ret = regmap_update_bits(priv->regmap, PCM179X_SOFT_MUTE,
86 PCM179X_MUTE_MASK, !!mute);
87 if (ret < 0)

--- 52 unchanged lines hidden (view full) ---

140 return ret;
141
142 return 0;
143}
144
145static const struct snd_soc_dai_ops pcm179x_dai_ops = {
146 .set_fmt = pcm179x_set_dai_fmt,
147 .hw_params = pcm179x_hw_params,
80{
81 struct snd_soc_component *component = dai->component;
82 struct pcm179x_private *priv = snd_soc_component_get_drvdata(component);
83 int ret;
84
85 ret = regmap_update_bits(priv->regmap, PCM179X_SOFT_MUTE,
86 PCM179X_MUTE_MASK, !!mute);
87 if (ret < 0)

--- 52 unchanged lines hidden (view full) ---

140 return ret;
141
142 return 0;
143}
144
145static const struct snd_soc_dai_ops pcm179x_dai_ops = {
146 .set_fmt = pcm179x_set_dai_fmt,
147 .hw_params = pcm179x_hw_params,
148 .digital_mute = pcm179x_digital_mute,
148 .mute_stream = pcm179x_mute,
149 .no_capture_mute = 1,
149};
150
151static const DECLARE_TLV_DB_SCALE(pcm179x_dac_tlv, -12000, 50, 1);
152
153static const struct snd_kcontrol_new pcm179x_controls[] = {
154 SOC_DOUBLE_R_RANGE_TLV("DAC Playback Volume", PCM179X_DAC_VOL_LEFT,
155 PCM179X_DAC_VOL_RIGHT, 0, 0xf, 0xff, 0,
156 pcm179x_dac_tlv),

--- 75 unchanged lines hidden ---
150};
151
152static const DECLARE_TLV_DB_SCALE(pcm179x_dac_tlv, -12000, 50, 1);
153
154static const struct snd_kcontrol_new pcm179x_controls[] = {
155 SOC_DOUBLE_R_RANGE_TLV("DAC Playback Volume", PCM179X_DAC_VOL_LEFT,
156 PCM179X_DAC_VOL_RIGHT, 0, 0xf, 0xff, 0,
157 pcm179x_dac_tlv),

--- 75 unchanged lines hidden ---