ASoC: rt5645: add DAC1 soft volume func control
Subsystems (3)
PATCH v2 1/1 ASoC: rt5645: add DAC1 soft volume func control
This patch add an alsa control for DAC1 digital volume control function selection. The options are:
0: Gain update immediately
1: Gain update when a zero crossing
2: Gain update when a zero crossing with a soft ramp
---
v2
* Use SOC_ENUM
--- sound/soc/codecs/rt5645.c | 11 +++++++++++ sound/soc/codecs/rt5645.h | 3 +++ 2 files changed, 14 insertions(+)
sound/soc/codecs/rt5645.c +11 -0
@@ -742,6 +742,14 @@ static int rt5645_spk_put_volsw(struct snd_kcontrol *kcontrol,return ret; } +static const char *const rt5645_dac1_vol_ctrl_mode_text[] = { +"immediately" ,"zero crossing" ,"soft ramp" +}; + +static SOC_ENUM_SINGLE_DECL ( + rt5645_dac1_vol_ctrl_mode, RT5645_PR_BASE, + RT5645_DA1_ZDET_SFT, rt5645_dac1_vol_ctrl_mode_text); +static const struct snd_kcontrol_new rt5645_snd_controls[] = {/* Speaker Output Volume */ SOC_DOUBLE("Speaker Channel Switch", RT5645_SPK_VOL,
@@ -808,6 +816,9 @@ static const struct snd_kcontrol_new rt5645_snd_controls[] = {SOC_SINGLE ("I2S2 Func Switch" ,RT5645_GPIO_CTRL1 ,RT5645_I2S2_SEL_SFT ,1 ,1 ),RT5645_HWEQ ("Speaker HWEQ" ), + +/* Digital Soft Volume Control */ + SOC_ENUM("DAC1 Digital Volume Control Func", rt5645_dac1_vol_ctrl_mode), };/**
sound/soc/codecs/rt5645.h +3 -0
@@ -2018,6 +2018,9 @@/* Codec Private Register definition */ +/* DAC ADC Digital Volume (0x00) */ +#define RT5645_DA1_ZDET_SFT 6 +/* 3D Speaker Control (0x63) */ #define RT5645_3D_SPK_MASK (0x1 << 15)#define RT5645_3D_SPK_SFT 15
Signature · 1 line
1.8.1.1.439.g50a6b54
Mark Brown
maintainerApplied "ASoC: rt5645: add DAC1 soft volume func control" to the asoc tree
The patch
ASoC: rt5645: add DAC1 soft volume func control
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
467b147982bb063369a1222523fa503e0c077c30Mon Sep 17 00:00:00 2001
From: Bard Liao <[email protected]>
Date: Thu, 7 Jul 2016 18:56:31 +0800
Subject: [PATCH] ASoC: rt5645: add DAC1 soft volume func control
This patch add an alsa control for DAC1 digital volume control function selection. The options are:
0: Gain update immediately
1: Gain update when a zero crossing
2: Gain update when a zero crossing with a soft ramp
--- sound/soc/codecs/rt5645.c | 11 +++++++++++ sound/soc/codecs/rt5645.h | 3 +++ 2 files changed, 14 insertions(+)
sound/soc/codecs/rt5645.c +11 -0
@@ -741,6 +741,14 @@ static int rt5645_spk_put_volsw(struct snd_kcontrol *kcontrol,return ret; } +static const char *const rt5645_dac1_vol_ctrl_mode_text[] = { +"immediately" ,"zero crossing" ,"soft ramp" +}; + +static SOC_ENUM_SINGLE_DECL ( + rt5645_dac1_vol_ctrl_mode, RT5645_PR_BASE, + RT5645_DA1_ZDET_SFT, rt5645_dac1_vol_ctrl_mode_text); +static const struct snd_kcontrol_new rt5645_snd_controls[] = {/* Speaker Output Volume */ SOC_DOUBLE("Speaker Channel Switch", RT5645_SPK_VOL,
@@ -807,6 +815,9 @@ static const struct snd_kcontrol_new rt5645_snd_controls[] = {SOC_SINGLE ("I2S2 Func Switch" ,RT5645_GPIO_CTRL1 ,RT5645_I2S2_SEL_SFT ,1 ,1 ),RT5645_HWEQ ("Speaker HWEQ" ), + +/* Digital Soft Volume Control */ + SOC_ENUM("DAC1 Digital Volume Control Func", rt5645_dac1_vol_ctrl_mode), };/**
sound/soc/codecs/rt5645.h +3 -0
@@ -2018,6 +2018,9 @@/* Codec Private Register definition */ +/* DAC ADC Digital Volume (0x00) */ +#define RT5645_DA1_ZDET_SFT 6 +/* 3D Speaker Control (0x63) */ #define RT5645_3D_SPK_MASK (0x1 << 15)#define RT5645_3D_SPK_SFT 15
Signature · 1 line
2.8.1