From: Mark Brown <broonie@kernel.org>
To: cy_huang <u0084500@gmail.com>
Cc: oder_chiou@realtek.com, perex@perex.cz, tiwai@suse.com,
robh+dt@kernel.org, lgirdwood@gmail.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
cy_huang@richtek.com, devicetree@vger.kernel.org,
allen_lin@richtek.com
Subject: Re: [PATCH 2/2] ASoC: rt9120: Add rt9210 audio amplifier support
Date: Tue, 5 Oct 2021 12:54:22 +0100 [thread overview]
Message-ID: <YVw87lc4uXSvCiyC@sirena.org.uk> (raw)
In-Reply-To: <1633396615-14043-2-git-send-email-u0084500@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 917 bytes --]
On Tue, Oct 05, 2021 at 09:16:55AM +0800, cy_huang wrote:
> +static const char * const sdo_select_text[] = {
> + "NONE", "INTF", "FINAL", "RMS Detect"
> +};
Why not None and Final?
> + if (event == SND_SOC_DAPM_PRE_PMU)
> + snd_soc_component_write(comp, RT9120_REG_ERRRPT, 0);
> + else if (event == SND_SOC_DAPM_POST_PMU)
> + msleep(RT9120_AMPON_WAITMS);
> + else if (event == SND_SOC_DAPM_POST_PMD)
> + msleep(RT9120_AMPOFF_WAITMS);
This should be a switch statement, it'd be clearer.
> + /* Default config volume to 0dB */
> + snd_soc_component_write(comp, RT9120_REG_MSVOL, 0x180);
> + /* Mute by default */
> + snd_soc_component_update_bits(comp, RT9120_REG_VOLRAMP,
> + RT9120_MUTE_MASK, RT9120_MUTE_MASK);
As ever you should leave the defaults at whatever the hardware defaults
to, the defaults for one machine may not be suitable for another so we
shouldn't be trying to do that in software.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-10-05 11:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 1:16 [PATCH 1/2] ASoC: dt-bindings: rt9120: Add initial bindings cy_huang
2021-10-05 1:16 ` [PATCH 2/2] ASoC: rt9120: Add rt9210 audio amplifier support cy_huang
2021-10-05 11:54 ` Mark Brown [this message]
[not found] ` <CADiBU38X6nY1D7NpgW8+61AX6rUU7jngnPagryDKxUAKdtGjAg@mail.gmail.com>
2021-10-05 12:41 ` ChiYuan Huang
[not found] ` <YVxIv6NOiVdNSkXf@sirena.org.uk>
2021-10-06 9:09 ` ChiYuan Huang
2021-10-05 11:49 ` [PATCH 1/2] ASoC: dt-bindings: rt9120: Add initial bindings Mark Brown
[not found] ` <CADiBU39dvKS_a5FDgw9yMVFe8Uycn6bfjGwBWq+7MN_DdxkL1g@mail.gmail.com>
[not found] ` <YVxFMaPhZdAFniMa@sirena.org.uk>
2021-10-05 12:39 ` ChiYuan Huang
2021-10-06 8:47 ` ChiYuan Huang
2021-10-07 2:44 ` ChiYuan Huang
2021-10-07 13:45 ` Mark Brown
2021-10-08 0:25 ` ChiYuan Huang
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=YVw87lc4uXSvCiyC@sirena.org.uk \
--to=broonie@kernel.org \
--cc=allen_lin@richtek.com \
--cc=alsa-devel@alsa-project.org \
--cc=cy_huang@richtek.com \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
--cc=u0084500@gmail.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