ASoC: rt286: set idle_bias_off to false
Subsystems (3)
PATCH 1/1 ASoC: rt286: set idle_bias_off to false
We do the power down process at bias level STANDBY. And do nothing at bias level OFF. As a result, the register setting is the same between bias level STANDBY and OFF. So we don't need to set idle_bias_off true.
--- sound/soc/codecs/rt286.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt286.c +1 -1
@@ -1144,7 +1144,7 @@ static struct snd_soc_codec_driver soc_codec_dev_rt286 = { .suspend = rt286_suspend, .resume = rt286_resume, .set_bias_level = rt286_set_bias_level, - .idle_bias_off = true, + .idle_bias_off = false, .controls = rt286_snd_controls, .num_controls = ARRAY_SIZE(rt286_snd_controls), .dapm_widgets = rt286_dapm_widgets,
Signature · 1 line
1.8.1.1.439.g50a6b54
Mark Brown
maintainersound/soc/codecs/rt286.c static struct snd_soc_codec_driver soc_codec_dev_rt286 = { · line 1147
Quoted 7 lines · Bard Liao
We do the power down process at bias level STANDBY. And do nothing at bias level OFF. As a result, the register setting is the same between bias level STANDBY and OFF. So we don't need to set
idle_bias_offtrue.sound/soc/codecs/rt286.c +1
-1- .idle_bias_off = true, + .idle_bias_off = false,
There is no need to set false explicitly, it's the default. It also seems better to keep the flag if it's true, even if we don't actively do anything at the minute we may in future (either in the framework or in the driver) so the information seems useful.
Quoted 14 lines
-----Original Message-----
From: Mark Brown [mailto:[email protected]]
Sent: Wednesday, January 28, 2015 7:36 PM
To: Bard Liao
Cc: [email protected]; [email protected]; Flove; Oder Chiou; [email protected]
Subject: Re: [PATCH] ASoC: rt286: setidle_bias_offto falseQuoted 4 lines · Bard Liao
We do the power down process at bias level STANDBY. And do nothing at bias level OFF. As a result, the register setting is the same between bias level STANDBY and OFF. So we don't need to set
idle_bias_offtrue.
Quoted 7 lines
sound/soc/codecs/rt286.c static struct snd_soc_codec_driver soc_codec_dev_rt286 = { · line 1147
Quoted 2 lines
sound/soc/codecs/rt286.c +1
-1- .idle_bias_off = true, + .idle_bias_off = false,There is no need to set false explicitly, it's the default. It also seems better to keep the flag if it's true, even if we don't actively do anything at the minute we may in future (either in the framework or in the driver) so the information seems useful.
Actually, we meet an issue. We use force enable in rt286_jack_detect. If a headset is inserted, the bias_level will not be OFF due to some widgets are ON. If idle_bias_off is true, rt286_suspend will not be invoked in suspend. And I "guess" rt286's power will be cut off in suspend. That's what we handle in rt286_suspend/resume functions. If rt286 's power is cut off and don't re-sync the cache, it will cause some unexpected issues.
Is there any good way to fix such issues?
Thanks.
Quoted 2 lines
------Please consider the environment before printing this e-mail.
Mark Brown
maintainerQuoted 9 lines · Bard Liao
Quoted 7 lines
sound/soc/codecs/rt286.c static struct snd_soc_codec_driver soc_codec_dev_rt286 = { · line 1147
Quoted 2 lines
sound/soc/codecs/rt286.c +1
-1- .idle_bias_off = true, + .idle_bias_off = false,There is no need to set false explicitly, it's the default. It also seems better to keep the flag if it's true, even if we don't actively do anything at the minute we may in future (either in the framework or in the driver) so the information seems useful.
Actually, we meet an issue. We use force enable in
rt286_jack_detect. If
So, this is one of the reasons why people ask for good, clear changelogs...
Quoted 7 lines
a headset is inserted, the
bias_levelwill not be OFF due to some widgets are ON. Ifidle_bias_offis true,rt286_suspendwill not be invoked in suspend. And I "guess" rt286's power will be cut off in suspend. That's what we handle in rt286_suspend/resume functions. If rt286 's power is cut off and don't re-sync the cache, it will cause some unexpected issues.Is there any good way to fix such issues?
If jack detection should be disabled over suspend the machine driver should do that (eg, by setting a NULL jack). It's actually common for systems to leave jack detection up over suspend as in systems like phones the jack can be a wake source, the hook switch is commonly expected to always be operational.
~Keyon
Quoted 28 lines
-----Original Message-----
From: Mark Brown [mailto:[email protected]]
Sent: Thursday, January 29, 2015 4:10 AM
To: Bard Liao
Cc: [email protected]; [email protected]; Flove; Oder Chiou; Jie, Yang
Subject: Re: [PATCH] ASoC: rt286: setidle_bias_offto falseQuoted 10 lines · Bard Liao
Quoted 7 lines
sound/soc/codecs/rt286.c static struct snd_soc_codec_driver soc_codec_dev_rt286 = { · line 1147
Quoted 2 lines
sound/soc/codecs/rt286.c +1
-1- .idle_bias_off = true, + .idle_bias_off = false,There is no need to set false explicitly, it's the default. It also seems better to keep the flag if it's true, even if we don't actively do anything at the minute we may in future (either in the framework or in the driver) so the information seems useful.
Actually, we meet an issue. We use force enable in
rt286_jack_detect. IfSo, this is one of the reasons why people ask for good, clear changelogs...
Quoted 5 lines
a headset is inserted, the
bias_levelwill not be OFF due to some widgets are ON. Ifidle_bias_offis true,rt286_suspendwill not be invoked in suspend. And I "guess" rt286's power will be cut off in suspend. That's what we handle in rt286_suspend/resume functions. If rt286 's power is cut off and don't re-sync the cache, it will cause some
Quoted 7 lines
unexpected issues.
Quoted 1 line
Is there any good way to fix such issues?
If jack detection should be disabled over suspend the machine driver should do that (eg, by setting a NULL jack). It's actually common for systems to leave jack detection up over suspend as in systems like phones the jack can be a wake
[Keyon] as my understanding, setting idle_bias_off to false won't disable jack detection over suspend, only the action that poweroff the codec will disable it, Bard, is it correct?
setting idle_bias_off to false is the easiest solution for us, it is also reasonable here, because rt286 don't need soc core to set BIAS OFF specially when in idle status, (BIAS_OFF and BIAS_STANDBY are same for it), and seems no side effect here.
Quoted 1 line
source, the hook switch is commonly expected to always be operational.
Mark Brown
maintainerOn Thu, Jan 29, 2015 at 09:07:08AM +0000, Jie, Yang wrote:
Please fix your mailer to word wrap within paragraphs, your mails are very hard to read.
Quoted 6 lines
Quoted 3 lines
If jack detection should be disabled over suspend the machine driver should do that (eg, by setting a NULL jack). It's actually common for systems to leave jack detection up over suspend as in systems like phones the jack can be a wake
[Keyon] as my understanding, setting
idle_bias_offto false won't disable jack detection over suspend, only the action that poweroff the codec will disable it, Bard, is it correct?
Right, you've got it the wrong way round - the goal is turn off the widgets that are holding the device on.
Quoted 3 lines
setting
idle_bias_offto false is the easiest solution for us, it is also reasonable here, because rt286 don't need soc core to set BIAS OFF specially when in idle status, (BIAS_OFFandBIAS_STANDBYare same for it), and seems no side effect here.
Currently. And to be honest I would have expected that the behaviour would be the same with widgets on regardless of the bias level so we probably want to fix that which would cause the same problem resurface even if it were bodged around for now.
Quoted 9 lines
-----Original Message-----
From: Mark Brown [mailto:[email protected]]
Sent: Thursday, January 29, 2015 6:52 PM
To: Jie, Yang
Cc: Bard Liao; [email protected]; [email protected]; Flove; Oder Chiou
Subject: Re: [PATCH] ASoC: rt286: setidle_bias_offto false
Quoted 4 lines
On Thu, Jan 29, 2015 at 09:07:08AM +0000, Jie, Yang wrote:
Please fix your mailer to word wrap within paragraphs, your mails are very hard to read.
[Keyon] sorry for that, should fix it this time.
Quoted 16 lines
Quoted 8 lines
Quoted 5 lines
If jack detection should be disabled over suspend the machine driver should do that (eg, by setting a NULL jack). It's actually common for systems to leave jack detection up over suspend as in systems like phones the jack can be a wake
[Keyon] as my understanding, setting
idle_bias_offto false won't disable jack detection over suspend, only the action that poweroff the codecwill disable it, Bard, is it correct?
Right, you've got it the wrong way round - the goal is turn off the widgets that are holding the device on.
Quoted 3 lines
setting
idle_bias_offto false is the easiest solution for us, it is also reasonable here, because rt286 don't need soc core to set BIAS OFF specially when in idle status, (BIAS_OFFandBIAS_STANDBYare same for
Quoted 6 lines
it), and seems no side effect here.
Currently. And to be honest I would have expected that the behaviour would be the same with widgets on regardless of the bias level so we probably want to fix that which would cause the same problem resurface even if it were bodged around for now.
[Keyon] OK, then I will try disable jack detection in the machine driver before calling snd_soc_suspend(), can you share example about how to set a NULL jack?
Mark Brown
maintainerQuoted 11 lines · Yang
Quoted 9 lines
Quoted 3 lines
setting
idle_bias_offto false is the easiest solution for us, it is also reasonable here, because rt286 don't need soc core to set BIAS OFF specially when in idle status, (BIAS_OFFandBIAS_STANDBYare same forit), and seems no side effect here.
Currently. And to be honest I would have expected that the behaviour would be the same with widgets on regardless of the bias level so we probably want to fix that which would cause the same problem resurface even if it were bodged around for now.
[Keyon] OK, then I will try disable jack detection in the machine driver before calling
snd_soc_suspend(), can you share example about how to set a NULL jack?
Several of the Wolfson drivers support setting a NULL jack to disable detection, I can't think of any boards that currently use it due to the need to use detection in suspend on platforms.
Looks like word wrapping is still not working in your mailer BTW.