diff options
author | John Hsu <KCHSU0@nuvoton.com> | 2018-03-21 03:30:23 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-04-17 12:13:43 -0400 |
commit | 7b0037fa2d6048284e90de4131fc53c0ac1d4430 (patch) | |
tree | 9738233040a1b485623a8daa7d284fabbf5f53e7 /sound/soc | |
parent | 13838c11c31e764d8143fdfcccea47691afd5ff2 (diff) |
ASoC: nau8824: user configuration of key detection
The SAR ADC of key press detection varies depending on headset.
We can't make a set of common threshold values for every case.
Therefore, the driver provides configuration for user and
they can set up values by UCM configuration.
Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/nau8824.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c index 637e9527805f..76502c090654 100644 --- a/sound/soc/codecs/nau8824.c +++ b/sound/soc/codecs/nau8824.c | |||
@@ -409,6 +409,15 @@ static const struct snd_kcontrol_new nau8824_snd_controls[] = { | |||
409 | 409 | ||
410 | SOC_SINGLE("DACL LR Mix", NAU8824_REG_DAC_MUTE_CTRL, 0, 1, 0), | 410 | SOC_SINGLE("DACL LR Mix", NAU8824_REG_DAC_MUTE_CTRL, 0, 1, 0), |
411 | SOC_SINGLE("DACR LR Mix", NAU8824_REG_DAC_MUTE_CTRL, 1, 1, 0), | 411 | SOC_SINGLE("DACR LR Mix", NAU8824_REG_DAC_MUTE_CTRL, 1, 1, 0), |
412 | |||
413 | SOC_SINGLE("THD for key media", | ||
414 | NAU8824_REG_VDET_THRESHOLD_1, 8, 0xff, 0), | ||
415 | SOC_SINGLE("THD for key voice command", | ||
416 | NAU8824_REG_VDET_THRESHOLD_1, 0, 0xff, 0), | ||
417 | SOC_SINGLE("THD for key volume up", | ||
418 | NAU8824_REG_VDET_THRESHOLD_2, 8, 0xff, 0), | ||
419 | SOC_SINGLE("THD for key volume down", | ||
420 | NAU8824_REG_VDET_THRESHOLD_2, 0, 0xff, 0), | ||
412 | }; | 421 | }; |
413 | 422 | ||
414 | static int nau8824_output_dac_event(struct snd_soc_dapm_widget *w, | 423 | static int nau8824_output_dac_event(struct snd_soc_dapm_widget *w, |