On Thu, Nov 24, 2022 at 10:57:34AM +0100, Guillermo Rodriguez Garcia wrote: > Hi all, > > I am using a dev board with a Cirrus Logic cs24l51 codec. > > This used to work fine prior to kernel version 5.x, however after 5.x > it is not possible to set certain values for ALSA controls from > userspace. > > I believe this is related to the input validation that is mentioned in > this thread: https://lore.kernel.org/all/Yph8C3bRxcr6ogW7@xxxxxxxxxxxxx/T/, > and possibly in this commit: 4f1e50d6a9cf9c1b8c859d449b5031cacfa8404e > ("ASoC: ops: Reject out of bounds values in snd_soc_put_volsw_sx()") > > For the cs24l51, all the controls that fail are using the > SOC_DOUBLE_R_SX_TLV macro. > > I have traced this to the checks in snd_soc_put_volsw_sx, specifically > the (val > max - min) check: > Can you try these two patches: https://lore.kernel.org/all/165236477046.1016627.15470197691244479154.b4-ty@xxxxxxxxxx/ It looks like they somehow got lost around 5.18, I have been meaning to chase up what happened to them. Thanks, Charles