mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 07:06:45 +07:00
ASoC: adau17x1: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d7858bd647
commit
0e0f9b960a
@ -714,9 +714,9 @@ static int adau1761_codec_probe(struct snd_soc_codec *codec)
|
||||
|
||||
static const struct snd_soc_codec_driver adau1761_codec_driver = {
|
||||
.probe = adau1761_codec_probe,
|
||||
.suspend = adau17x1_suspend,
|
||||
.resume = adau17x1_resume,
|
||||
.set_bias_level = adau1761_set_bias_level,
|
||||
.suspend_bias_off = true,
|
||||
|
||||
.controls = adau1761_controls,
|
||||
.num_controls = ARRAY_SIZE(adau1761_controls),
|
||||
|
@ -446,9 +446,9 @@ static int adau1781_codec_probe(struct snd_soc_codec *codec)
|
||||
|
||||
static const struct snd_soc_codec_driver adau1781_codec_driver = {
|
||||
.probe = adau1781_codec_probe,
|
||||
.suspend = adau17x1_suspend,
|
||||
.resume = adau17x1_resume,
|
||||
.set_bias_level = adau1781_set_bias_level,
|
||||
.suspend_bias_off = true,
|
||||
|
||||
.controls = adau1781_controls,
|
||||
.num_controls = ARRAY_SIZE(adau1781_controls),
|
||||
|
@ -815,13 +815,6 @@ int adau17x1_add_routes(struct snd_soc_codec *codec)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(adau17x1_add_routes);
|
||||
|
||||
int adau17x1_suspend(struct snd_soc_codec *codec)
|
||||
{
|
||||
codec->driver->set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(adau17x1_suspend);
|
||||
|
||||
int adau17x1_resume(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct adau *adau = snd_soc_codec_get_drvdata(codec);
|
||||
@ -829,7 +822,6 @@ int adau17x1_resume(struct snd_soc_codec *codec)
|
||||
if (adau->switch_mode)
|
||||
adau->switch_mode(codec->dev);
|
||||
|
||||
codec->driver->set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
regcache_sync(adau->regmap);
|
||||
|
||||
return 0;
|
||||
|
@ -52,7 +52,6 @@ int adau17x1_set_micbias_voltage(struct snd_soc_codec *codec,
|
||||
enum adau17x1_micbias_voltage micbias);
|
||||
bool adau17x1_readable_register(struct device *dev, unsigned int reg);
|
||||
bool adau17x1_volatile_register(struct device *dev, unsigned int reg);
|
||||
int adau17x1_suspend(struct snd_soc_codec *codec);
|
||||
int adau17x1_resume(struct snd_soc_codec *codec);
|
||||
|
||||
extern const struct snd_soc_dai_ops adau17x1_dai_ops;
|
||||
|
Loading…
Reference in New Issue
Block a user