mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Guillermo Rodriguez Garcia <guille.rodriguez@gmail.com>
Cc: linux-kernel@vger.kernel.org, "Tan Nayır" <tannayir@gmail.com>,
	"Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
	"Banajit Goswami" <bgoswami@codeaurora.org>,
	"Richard Fitzgerald" <rf@opensource.cirrus.com>,
	"Lucas Tanure" <tanureal@opensource.cirrus.com>,
	"David Rhodes" <david.rhodes@cirrus.com>,
	"James Schulman" <james.schulman@cirrus.com>,
	patches@opensource.cirrus.com, alsa-devel@alsa-project.org,
	"Mark Brown" <broonie@kernel.org>
Subject: Re: SOC_DOUBLE_R_SX_TLV controls broken in cs24l51 driver
Date: Thu, 24 Nov 2022 11:13:36 +0000	[thread overview]
Message-ID: <20221124111336.GE105268@ediswmail.ad.cirrus.com> (raw)
In-Reply-To: <CABDcavYdsk-O4x3oPX4i4+T5wsoZV26_kpEq6JvpD8A_cAGHxg@mail.gmail.com>

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@sirena.org.uk/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@kernel.org/

It looks like they somehow got lost around 5.18, I have been
meaning to chase up what happened to them.

Thanks,
Charles

  reply	other threads:[~2022-11-24 11:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  9:57 Guillermo Rodriguez Garcia
2022-11-24 11:13 ` Charles Keepax [this message]
2022-11-24 13:54   ` Guillermo Rodriguez Garcia
2022-11-25 15:50     ` Charles Keepax
2022-11-25 15:59       ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221124111336.GE105268@ediswmail.ad.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=broonie@kernel.org \
    --cc=david.rhodes@cirrus.com \
    --cc=guille.rodriguez@gmail.com \
    --cc=james.schulman@cirrus.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=rf@opensource.cirrus.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tannayir@gmail.com \
    --cc=tanureal@opensource.cirrus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®