From: Mark Brown <broonie@kernel.org>
To: Claudius Heine <ch@denx.de>
Cc: Marek Vasut <marex@denx.de>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
alsa-devel@alsa-project.org,
Matthias Schiffer <matthias.schiffer@ew.tq-group.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
open list <linux-kernel@vger.kernel.org>,
Takashi Iwai <tiwai@suse.com>,
Sia Jee Heng <jee.heng.sia@intel.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Annaliese McDermond <nh6z@nh6z.net>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Subject: Re: [PATCH 2/3] ASoC: tlv320aic32x4: add support for TAS2505
Date: Tue, 15 Jun 2021 13:22:41 +0100 [thread overview]
Message-ID: <20210615122241.GE5149@sirena.org.uk> (raw)
In-Reply-To: <20210615094933.3076392-3-ch@denx.de>
[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]
On Tue, Jun 15, 2021 at 11:49:31AM +0200, Claudius Heine wrote:
> +static int aic32x4_tas2505_spkdrv_putvol(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_value *ucontrol)
> +{
> + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
> + struct soc_mixer_control *mc =
> + (struct soc_mixer_control *)kcontrol->private_value;
> + u8 val;
> +
> + val = (ucontrol->value.integer.value[0] & 0x7f);
> + val = mc->invert ? mc->max - val : val;
> + val = (val < 0) ? 0 : val;
> + snd_soc_component_write(component, TAS2505_SPKVOL1, val);
> +
> + return 0;
> +}
Controls should return a boolean indicating if they changed their value
when written. Other than the hard coded register what's device specific
here? It looks like a normal control with a maximum value, it is
unclear why this is being open coded.
> + SOC_DOUBLE_R_S_TLV("HP Driver Gain Playback Volume", AIC32X4_HPLGAIN,
> + AIC32X4_HPLGAIN, 0, -0x6, 0x1d, 5, 0,
> + tlv_driver_gain),
Drop the Gain. See control-names.rst.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-06-15 12:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 9:49 [PATCH 0/3] ASoC: tlv320aic32x4: Add support for TAS2505 Claudius Heine
2021-06-15 9:49 ` [PATCH 1/3] ASoC: tlv320aic32x4: prepare driver for different device variants Claudius Heine
2021-06-15 11:54 ` Mark Brown
2021-06-15 12:06 ` Claudius Heine
2021-06-15 12:30 ` Mark Brown
2021-06-15 9:49 ` [PATCH 2/3] ASoC: tlv320aic32x4: add support for TAS2505 Claudius Heine
2021-06-15 11:59 ` Claudius Heine
2021-06-15 12:22 ` Mark Brown [this message]
2021-06-15 12:39 ` Claudius Heine
2021-06-15 9:49 ` [PATCH 3/3] ASoC: tlv320aic32x4: dt-bindings: add TAS2505 to compatible Claudius Heine
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=20210615122241.GE5149@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=ch@denx.de \
--cc=jee.heng.sia@intel.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=matthias.schiffer@ew.tq-group.com \
--cc=michael.wei.hong.sit@intel.com \
--cc=miquel.raynal@bootlin.com \
--cc=nh6z@nh6z.net \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.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