Re: [PATCH 2/2] ASoC: rt9120: Add rt9210 audio amplifier support
5 Oct
2021
5 Oct
'21
1:54 p.m.
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.
1174
Age (days ago)
1174
Last active (days ago)
0 comments
1 participants
participants (1)
-
Mark Brown