[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YVw87lc4uXSvCiyC@sirena.org.uk>
Date: Tue, 5 Oct 2021 12:54:22 +0100
From: Mark Brown <broonie@...nel.org>
To: cy_huang <u0084500@...il.com>
Cc: oder_chiou@...ltek.com, perex@...ex.cz, tiwai@...e.com,
robh+dt@...nel.org, lgirdwood@...il.com,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
cy_huang@...htek.com, devicetree@...r.kernel.org,
allen_lin@...htek.com
Subject: Re: [PATCH 2/2] ASoC: rt9120: Add rt9210 audio amplifier support
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists