Commit 76aad74b authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: rt5640: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 61aad0b9
...@@ -1870,7 +1870,7 @@ static int rt5640_set_bias_level(struct snd_soc_codec *codec, ...@@ -1870,7 +1870,7 @@ static int rt5640_set_bias_level(struct snd_soc_codec *codec,
{ {
switch (level) { switch (level) {
case SND_SOC_BIAS_STANDBY: case SND_SOC_BIAS_STANDBY:
if (SND_SOC_BIAS_OFF == codec->dapm.bias_level) { if (SND_SOC_BIAS_OFF == snd_soc_codec_get_bias_level(codec)) {
snd_soc_update_bits(codec, RT5640_PWR_ANLG1, snd_soc_update_bits(codec, RT5640_PWR_ANLG1,
RT5640_PWR_VREF1 | RT5640_PWR_MB | RT5640_PWR_VREF1 | RT5640_PWR_MB |
RT5640_PWR_BG | RT5640_PWR_VREF2, RT5640_PWR_BG | RT5640_PWR_VREF2,
...@@ -1934,6 +1934,7 @@ EXPORT_SYMBOL_GPL(rt5640_dmic_enable); ...@@ -1934,6 +1934,7 @@ EXPORT_SYMBOL_GPL(rt5640_dmic_enable);
static int rt5640_probe(struct snd_soc_codec *codec) static int rt5640_probe(struct snd_soc_codec *codec)
{ {
struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec);
rt5640->codec = codec; rt5640->codec = codec;
...@@ -1950,18 +1951,18 @@ static int rt5640_probe(struct snd_soc_codec *codec) ...@@ -1950,18 +1951,18 @@ static int rt5640_probe(struct snd_soc_codec *codec)
snd_soc_add_codec_controls(codec, snd_soc_add_codec_controls(codec,
rt5640_specific_snd_controls, rt5640_specific_snd_controls,
ARRAY_SIZE(rt5640_specific_snd_controls)); ARRAY_SIZE(rt5640_specific_snd_controls));
snd_soc_dapm_new_controls(&codec->dapm, snd_soc_dapm_new_controls(dapm,
rt5640_specific_dapm_widgets, rt5640_specific_dapm_widgets,
ARRAY_SIZE(rt5640_specific_dapm_widgets)); ARRAY_SIZE(rt5640_specific_dapm_widgets));
snd_soc_dapm_add_routes(&codec->dapm, snd_soc_dapm_add_routes(dapm,
rt5640_specific_dapm_routes, rt5640_specific_dapm_routes,
ARRAY_SIZE(rt5640_specific_dapm_routes)); ARRAY_SIZE(rt5640_specific_dapm_routes));
break; break;
case RT5640_ID_5639: case RT5640_ID_5639:
snd_soc_dapm_new_controls(&codec->dapm, snd_soc_dapm_new_controls(dapm,
rt5639_specific_dapm_widgets, rt5639_specific_dapm_widgets,
ARRAY_SIZE(rt5639_specific_dapm_widgets)); ARRAY_SIZE(rt5639_specific_dapm_widgets));
snd_soc_dapm_add_routes(&codec->dapm, snd_soc_dapm_add_routes(dapm,
rt5639_specific_dapm_routes, rt5639_specific_dapm_routes,
ARRAY_SIZE(rt5639_specific_dapm_routes)); ARRAY_SIZE(rt5639_specific_dapm_routes));
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment