From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Shenghao Ding <shenghao-ding@ti.com>
Cc: broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
pierre-louis.bossart@linux.intel.com, 13916275206@139.com,
zhourui@huaqin.com, alsa-devel@alsa-project.org,
i-salazar@ti.com, linux-kernel@vger.kernel.org, j-chadha@ti.com,
liam.r.girdwood@intel.com, jaden-yue@ti.com,
yung-chuan.liao@linux.intel.com, dipa@ti.com, yuhsuan@google.com,
henry.lo@ti.com, tiwai@suse.de, baojun.xu@ti.com, soyer@irl.hu,
Baojun.Xu@fpt.com, judyhsiao@google.com, navada@ti.com,
cujomalainey@google.com, aanya@ti.com, nayeem.mahmud@ti.com,
savyasanchi.shukla@netradyne.com, flaviopr@microsoft.com,
jesse-ji@ti.com, darren.ye@mediatek.com
Subject: Re: [PATCH v1] ASoc: tas2781: Add new Kontrol to set tas2563 digital gain
Date: Fri, 9 Aug 2024 18:17:45 +0300 [thread overview]
Message-ID: <ZrYzGWQRdsTlYxQg@smile.fi.intel.com> (raw)
In-Reply-To: <20240628041844.1776-1-shenghao-ding@ti.com>
On Fri, Jun 28, 2024 at 12:18:43PM +0800, Shenghao Ding wrote:
> Requriment from customer to add new kcontrol to set tas2563 digital gain
> and set "Speaker Force Firmware Load" as the common kcontrol for both
> tas27871 and tas2563.
...
> #include <sound/tas2781.h>
> #include <sound/tlv.h>
> #include <sound/tas2781-tlv.h>
> +#include <asm/unaligned.h>
Before sound would be better, but I'm not insisting.
...
> + ret = tasdevice_dev_bulk_read(tas_dev, 0, reg, data, 4);
Too many spaces.
...
> + /* find out the member same as or closer to the current volume */
> + ucontrol->value.integer.value[0] =
> + abs(target - ar_l) <= abs(target - ar_r) ? l : r;
Why do you need to have target to be applied here? IIUC arithmetics correctly
it makes no value to use target in this equation.
...
> +out:
> + mutex_unlock(&tas_dev->codec_lock);
Why not using cleanup.h?
> + return 0;
...
This all reminds me that I already gave same/similar comments in the past...
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-08-09 15:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 4:18 [PATCH v1] ASoc: tas2781: Add new Kontrol to set tas2563 digital gain Shenghao Ding
2024-06-28 12:27 ` Mark Brown
2024-08-09 15:17 ` Andy Shevchenko [this message]
2024-08-11 9:22 ` [EXTERNAL] " Ding, Shenghao
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=ZrYzGWQRdsTlYxQg@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=13916275206@139.com \
--cc=Baojun.Xu@fpt.com \
--cc=aanya@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=cujomalainey@google.com \
--cc=darren.ye@mediatek.com \
--cc=dipa@ti.com \
--cc=flaviopr@microsoft.com \
--cc=henry.lo@ti.com \
--cc=i-salazar@ti.com \
--cc=j-chadha@ti.com \
--cc=jaden-yue@ti.com \
--cc=jesse-ji@ti.com \
--cc=judyhsiao@google.com \
--cc=lgirdwood@gmail.com \
--cc=liam.r.girdwood@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=navada@ti.com \
--cc=nayeem.mahmud@ti.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=savyasanchi.shukla@netradyne.com \
--cc=shenghao-ding@ti.com \
--cc=soyer@irl.hu \
--cc=tiwai@suse.de \
--cc=yuhsuan@google.com \
--cc=yung-chuan.liao@linux.intel.com \
--cc=zhourui@huaqin.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