[PATCH] ASoC: ops: Don't modify the driver's plaform_max when reading state
Martin Povišer
povik+lin at cutebit.org
Fri Aug 19 18:33:26 CEST 2022
> On 19. 8. 2022, at 18:17, Martin Povišer <povik+lin at cutebit.org> wrote:
>
>>
>> On 3. 6. 2022, at 13:25, Mark Brown <broonie at kernel.org> wrote:
>> This means that platform_max is no longer treated as a direct register
>> value for controls were min is non-zero. The put() callbacks already
>> validate on this basis, and there do not appear to be any in tree users
>> that would be affected.
>
> At least ‘put_volsw' seem to validate on the other conflicting interpretation
> of platform_max [as was introduced in commit 9bdd10d57a88 (“ASoC: ops:
> Shift tested values in snd_soc_put_volsw() by +min”)].
>
> Also, the soc.h definitions of SOC_SINGLE_*/SOC_DOUBLE_* set platform_max
> to the register maximum, again interpreting platform_max the other way.
Another instance: snd_soc_limit_volume in checking the supplied platform
maximum against mc->max
More information about the Alsa-devel
mailing list