Linux Sound subsystem development
 help / color / mirror / Atom feed
From: "Holalu Yogendra, Niranjan" <niranjan.hy@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-sound@vger.kernel.org" <linux-sound@vger.kernel.org>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"perex@perex.cz" <perex@perex.cz>,
	"tiwai@suse.com" <tiwai@suse.com>,
	"yung-chuan.liao@linux.intel.com"
	<yung-chuan.liao@linux.intel.com>,
	"cezary.rojewski@intel.com" <cezary.rojewski@intel.com>,
	"peter.ujfalusi@linux.intel.com" <peter.ujfalusi@linux.intel.com>,
	"ranjani.sridharan@linux.intel.com"
	<ranjani.sridharan@linux.intel.com>,
	"kai.vehmanen@linux.intel.com" <kai.vehmanen@linux.intel.com>,
	"pierre-louis.bossart@linux.dev" <pierre-louis.bossart@linux.dev>,
	"Navada Kanyana, Mukund" <navada@ti.com>,
	"Ding, Shenghao" <shenghao-ding@ti.com>,
	"Hampiholi, Vallabha" <v-hampiholi@ti.com>,
	"Xu, Baojun" <baojun.xu@ti.com>
Subject: RE: [EXTERNAL] Re: [PATCH v4 2/6] ASoC: ops: add snd_soc_get_volsw_clamped
Date: Thu, 11 Sep 2025 17:21:14 +0000	[thread overview]
Message-ID: <41a87c2b7f21467d833b7eefde8e63a0@ti.com> (raw)
In-Reply-To: <652726cc-b286-4ba0-b49c-8b981d6d0244@sirena.org.uk>

> From: Mark Brown <broonie@kernel.org>
> Sent: Thursday, September 11, 2025 9:34 PM
> To: Holalu Yogendra, Niranjan <niranjan.hy@ti.com>
> Subject: Re: [PATCH v4 2/6] ASoC: ops: add
> snd_soc_get_volsw_clamped
> 
> On Thu, Sep 11, 2025 at 09:26:59PM +0530, Niranjan H Y wrote:
> >   Add API snd_soc_get_volsw_clamped to read
> >   the volume from device. This similar to
> >   existing API snd_soc_get_volsw. But has
> >   additional step to clamp the value to max value
> >   if the register value is larger than max value.
> 
> Why is this a separate API, what is the situation where we would want to
> report an invalid value from a control?  I was thinking of just adding
> this to the existing operations rather than adding separate ones that
> need to be explicitly set.
  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 
some issue (like IO) and, for some reason if register value was modified
to have the value greater than mc->max value, the volume is report erroneously.
  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.

Thanks,
Niranjan H Y



  reply	other threads:[~2025-09-11 17:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11 15:56 [PATCH v4 1/6] ASoC: ops: improve snd_soc_get_volsw Niranjan H Y
2025-09-11 15:56 ` [PATCH v4 2/6] ASoC: ops: add snd_soc_get_volsw_clamped Niranjan H Y
2025-09-11 16:04   ` Mark Brown
2025-09-11 17:21     ` Holalu Yogendra, Niranjan [this message]
2025-09-11 18:32       ` [EXTERNAL] " Mark Brown
2025-09-11 15:57 ` [PATCH v4 3/6] ASoc: tas2783A: Add soundwire based codec driver Niranjan H Y
2025-09-11 15:57 ` [PATCH v4 4/6] ASoc: tas2783A: machine driver amp utility for TI devices Niranjan H Y
2025-09-11 15:57 ` [PATCH v4 5/6] ASoc: tas2783A: add machine driver changes Niranjan H Y
2025-09-11 15:57 ` [PATCH v4 6/6] tas2783A: Add acpi match changes for Intel MTL Niranjan H Y

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=41a87c2b7f21467d833b7eefde8e63a0@ti.com \
    --to=niranjan.hy@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=navada@ti.com \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=shenghao-ding@ti.com \
    --cc=tiwai@suse.com \
    --cc=v-hampiholi@ti.com \
    --cc=yung-chuan.liao@linux.intel.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