Re: [PATCH 10/16] ASoC: codecs: rx-macro: fix tlv min max range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux