ASoC: tlv320dac33: small power handling updates
Subsystems (3)
cover ASoC: tlv320dac33: small power handling updates
Hello,
While testing suspend, it has been noticed, that the driver would try to power off the codec more than once.
Since this case handled in the driver, and results no functional defect we can lower the noise in the kernel log.
Also avoid the root cause of the multiple off calls by filtering BIAS_OFF request when the codec was already OFF.
---
Felipe Balbi (1):
ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function
Peter Ujfalusi (1):
ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF
sound/soc/codecs/tlv320dac33.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
PATCH 1/2 ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function
From: Felipe Balbi <[email protected]>
Since the cases when the same power state would be set again handled gracefully, we do not need to use dev_warn.
--- sound/soc/codecs/tlv320dac33.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/tlv320dac33.c +1 -1
@@ -352,7 +352,7 @@ static int dac33_hard_power(struct snd_soc_codec *codec, int power)/* Safety check */ if (unlikely (power == dac33->chip_power)) { -dev_warn (codec->dev,"Trying to set the same power state: %s\n" , +dev_dbg (codec->dev,"Trying to set the same power state: %s\n" , power ?"ON" :"OFF" ); goto exit; }
Signature · 1 line
1.7.1
PATCH 2/2 ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF
In reply to Peter UjfalusiAvoid calling the dac33_hard_power when the codec was already in BIAS_OFF state.
This could happen in device suspend and module removal time.
--- sound/soc/codecs/tlv320dac33.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
sound/soc/codecs/tlv320dac33.c +3 -0
@@ -589,6 +589,9 @@ static int dac33_set_bias_level(struct snd_soc_codec *codec, }break ;case SND_SOC_BIAS_OFF : +/* Do not power off, when the codec is already off */ +if (codec->bias_level ==SND_SOC_BIAS_OFF ) +return 0 ; ret =dac33_hard_power (codec,0 );if (ret !=0 )return ret;
Signature · 1 line
1.7.1
Quoted 5 lines · Peter Ujfalusi
Felipe Balbi (1):
ASoC: tlv320dac33: Usedev_dbgindac33_hard_powerfunctionPeter Ujfalusi (1):
ASoC: tlv320dac33: Avoid powering off while inBIAS_OFF
Both
Liam Girdwood
AppliedQuoted 14 lines · Peter Ujfalusi
Hello,
While testing suspend, it has been noticed, that the driver would try to power off the codec more than once.
Since this case handled in the driver, and results no functional defect we can lower the noise in the kernel log.Also avoid the root cause of the multiple off calls by filtering
BIAS_OFFrequest when the codec was already OFF.---
Felipe Balbi (1):
ASoC: tlv320dac33: Usedev_dbgindac33_hard_powerfunction
Quoted 6 lines
Peter Ujfalusi (1):
ASoC: tlv320dac33: Avoid powering off while inBIAS_OFFsound/soc/codecs/tlv320dac33.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
Applied.
Thanks
Liam
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk