lkml.org 
[lkml]   [2022]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/16] ASoC: codecs: rx-macro: fix tlv min max range
On Tue, Feb 22, 2022 at 11:59:27AM +0000, Srinivas Kandagatla wrote:
> on Qualcomm codecs gain tlv control specifies min max range as both
> negative to positive numbers like
>
> SOC_SINGLE_S8_TLV("... Volume", .., -84, 40, gain)
>
> However with recent boundary checks added in commit 817f7c9335ec0
> ("ASoC: ops: Reject out of bounds values in snd_soc_put_volsw())
> setting a value above 40 gain will fail.
>
> So fix this min max range correctly to
> SOC_SINGLE_S8_TLV("... Volume", .., 0, 124, gain)
> so that users can now set gain correctly

Are you sure this isn't a bug in the core? -84..40 should be a valid
range for a signed control. See Marek's fix in 9bdd10d57a ("ASoC: ops:
Shift tested values in snd_soc_put_volsw() by +min") though that only
kicks in for systems with a platform_max. I can't immediately spot any
other issues for S8 but I could be missing something.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-02-22 19:05    [W:0.079 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site