diff mbox

[1/5] ASoC: tas571x: fix missing bias save level

Message ID 1475505650-8572-2-git-send-email-brain@jikos.cz (mailing list archive)
State New, archived
Headers show

Commit Message

Petr Kulhavy Oct. 3, 2016, 2:40 p.m. UTC
The tas571x_set_bias_level() was not saving the new bias level to
codec->dapm.bias_level. This had the effect that bias was switching between
standby and off levels and never entered the on level.

This fix saves the bias level before returning from the function.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
---
 sound/soc/codecs/tas571x.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Lars-Peter Clausen Oct. 3, 2016, 5:09 p.m. UTC | #1
On 10/03/2016 04:40 PM, Petr Kulhavy wrote:
> The tas571x_set_bias_level() was not saving the new bias level to
> codec->dapm.bias_level. This had the effect that bias was switching between
> standby and off levels and never entered the on level.
> 
> This fix saves the bias level before returning from the function.
> 

This is done by the ASoC core after the function completes, so this should
not be necessary.
Petr Kulhavy Oct. 3, 2016, 7 p.m. UTC | #2
On 03/10/16 19:09, Lars-Peter Clausen wrote:
> On 10/03/2016 04:40 PM, Petr Kulhavy wrote:
>> The tas571x_set_bias_level() was not saving the new bias level to
>> codec->dapm.bias_level. This had the effect that bias was switching between
>> standby and off levels and never entered the on level.
>>
>> This fix saves the bias level before returning from the function.
>>
> This is done by the ASoC core after the function completes, so this should
> not be necessary.
Hi Lars,

since what kernel version is it handled by the ASoC core?
I've been testing it on a 4.1 based iMX kernel and there the bias levels 
were handled improperly...

Thanks
Petr
Lars-Peter Clausen Oct. 3, 2016, 7:11 p.m. UTC | #3
On 10/03/2016 09:00 PM, Petr Kulhavy wrote:
> 
> On 03/10/16 19:09, Lars-Peter Clausen wrote:
>> On 10/03/2016 04:40 PM, Petr Kulhavy wrote:
>>> The tas571x_set_bias_level() was not saving the new bias level to
>>> codec->dapm.bias_level. This had the effect that bias was switching between
>>> standby and off levels and never entered the on level.
>>>
>>> This fix saves the bias level before returning from the function.
>>>
>> This is done by the ASoC core after the function completes, so this should
>> not be necessary.
> Hi Lars,
> 
> since what kernel version is it handled by the ASoC core?
> I've been testing it on a 4.1 based iMX kernel and there the bias levels

Since v4.2. This is the commit:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fa880775ab0d5a8d540972f7b6800fad1af16b75
Lars-Peter Clausen Oct. 3, 2016, 7:13 p.m. UTC | #4
On 10/03/2016 09:11 PM, Lars-Peter Clausen wrote:
> On 10/03/2016 09:00 PM, Petr Kulhavy wrote:
>>
>> On 03/10/16 19:09, Lars-Peter Clausen wrote:
>>> On 10/03/2016 04:40 PM, Petr Kulhavy wrote:
>>>> The tas571x_set_bias_level() was not saving the new bias level to
>>>> codec->dapm.bias_level. This had the effect that bias was switching between
>>>> standby and off levels and never entered the on level.
>>>>
>>>> This fix saves the bias level before returning from the function.
>>>>
>>> This is done by the ASoC core after the function completes, so this should
>>> not be necessary.
>> Hi Lars,
>>
>> since what kernel version is it handled by the ASoC core?
>> I've been testing it on a 4.1 based iMX kernel and there the bias levels
> 
> Since v4.2. This is the commit:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fa880775ab0d5a8d540972f7b6800fad1af16b75

Sorry, wrong ID, this one is it:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f4bf8d770b58862c2af9d17adc2fee05bef8f2c0
Petr Kulhavy Oct. 3, 2016, 8:24 p.m. UTC | #5
On 03/10/16 21:13, Lars-Peter Clausen wrote:
> On 10/03/2016 09:11 PM, Lars-Peter Clausen wrote:
>> On 10/03/2016 09:00 PM, Petr Kulhavy wrote:
>>> On 03/10/16 19:09, Lars-Peter Clausen wrote:
>>>> On 10/03/2016 04:40 PM, Petr Kulhavy wrote:
>>>>> The tas571x_set_bias_level() was not saving the new bias level to
>>>>> codec->dapm.bias_level. This had the effect that bias was switching between
>>>>> standby and off levels and never entered the on level.
>>>>>
>>>>> This fix saves the bias level before returning from the function.
>>>>>
>>>> This is done by the ASoC core after the function completes, so this should
>>>> not be necessary.
>>> Hi Lars,
>>>
>>> since what kernel version is it handled by the ASoC core?
>>> I've been testing it on a 4.1 based iMX kernel and there the bias levels
>> Since v4.2. This is the commit:
>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fa880775ab0d5a8d540972f7b6800fad1af16b75
> Sorry, wrong ID, this one is it:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f4bf8d770b58862c2af9d17adc2fee05bef8f2c0

OK, that explains. Then this patch can be dropped.

Thanks
Petr
diff mbox

Patch

diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
index df5e5cb..e996313 100644
--- a/sound/soc/codecs/tas571x.c
+++ b/sound/soc/codecs/tas571x.c
@@ -360,6 +360,7 @@  static int tas571x_set_bias_level(struct snd_soc_codec *codec,
 		break;
 	}
 
+	codec->dapm.bias_level = level;
 	return 0;
 }