Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: rt1316: fix key tone missing

This patch adds a control that there are three options to control the digital volume output.
The user could select "immediately" to make volume updates immediately
and avoid key tone missing issues.
In default, the driver selects that the volume update when a zero-crossing with a soft ramp.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Reported-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230726091051.658754-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Shuming Fan and committed by
Mark Brown
87447763 f6500ec1

+12
+12
sound/soc/codecs/rt1316-sdw.c
··· 424 424 SDW_SDCA_CTL(FUNC_NUM_SMART_AMP, RT1316_SDCA_ENT_UDMPU21, RT1316_SDCA_CTL_UDMPU_CLUSTER, 0), 0, 425 425 rt1316_rx_data_ch_select); 426 426 427 + static const char * const rt1316_dac_output_vol_select[] = { 428 + "immediately", 429 + "zero crossing", 430 + "zero crossing with soft ramp", 431 + }; 432 + 433 + static SOC_ENUM_SINGLE_DECL(rt1316_dac_vol_ctl_enum, 434 + 0xc010, 6, rt1316_dac_output_vol_select); 435 + 427 436 static const struct snd_kcontrol_new rt1316_snd_controls[] = { 428 437 429 438 /* I2S Data Channel Selection */ ··· 451 442 /* IV mixer Control */ 452 443 SOC_DOUBLE("Isense Mixer Switch", 0xc605, 2, 0, 1, 1), 453 444 SOC_DOUBLE("Vsense Mixer Switch", 0xc605, 3, 1, 1, 1), 445 + 446 + /* DAC Output Volume Control */ 447 + SOC_ENUM("DAC Output Vol Control", rt1316_dac_vol_ctl_enum), 454 448 }; 455 449 456 450 static const struct snd_kcontrol_new rt1316_sto_dac =