From: Mark Brown broonie@kernel.org Sent: Friday, September 12, 2025 12:02 AM Subject: Re: [EXTERNAL] Re: [PATCH v4 2/6] ASoC: ops: add snd_soc_get_volsw_clamped
On Thu, Sep 11, 2025 at 05:21:14PM +0000, Holalu Yogendra, Niranjan wrote:
From: Mark Brown broonie@kernel.org
Since few of the drivers as still using the original API, and was not sure if everyone wanted to clamp the register value, did not want to disturb the original API snd_soc_get_volsw. Per my analysis, if register read fails due to
In what situation would anything want to report an invalid value?
I am not sure if I fully follow. But in my case, for one of the cases, valid amp volume is 0x0 to 0x14 with mask 0x1f - so if the register value read is 0x15 to 0x1f, it is invalid. But in the next patch, I will add the logic to clamp the value.
Are you thinking that this patch could be dropped and clamp the value to max in 'soc_get_volsw' (as in 1st patch) and use the same API ? Please suggest.
Yes, everything should report valid values. I/O errors should be propagated as errors.
I will update the next patch accordingly.
Thanks Niranjan H Y