2021-12-22 13:54:47

by Vincent Knecht

[permalink] [raw]
Subject: [PATCH] ASoC: codecs: ak4375: Change invert controls to a stereo switch

Don't use enums for DACL/DACR Signal Invert controls,
and change them into a stereo "DAC Signal Invert Switch" control.

Signed-off-by: Vincent Knecht <[email protected]>
---
sound/soc/codecs/ak4375.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/sound/soc/codecs/ak4375.c b/sound/soc/codecs/ak4375.c
index a893aff42a01..22cda0699341 100644
--- a/sound/soc/codecs/ak4375.c
+++ b/sound/soc/codecs/ak4375.c
@@ -127,7 +127,6 @@ static DECLARE_TLV_DB_SCALE(hpg_tlv, -4200, 20, 0);

static const char * const ak4375_ovolcn_select_texts[] = { "Dependent", "Independent" };
static const char * const ak4375_mdac_select_texts[] = { "x1", "x1/2" };
-static const char * const ak4375_inv_select_texts[] = { "Normal", "Inverting" };
static const char * const ak4375_cpmode_select_texts[] = {
"Automatic Switching",
"+-VDD Operation",
@@ -157,12 +156,6 @@ static const struct soc_enum ak4375_mdacl_enum =
static const struct soc_enum ak4375_mdacr_enum =
SOC_ENUM_SINGLE(AK4375_07_DAC_MONO_MIXING, 6,
ARRAY_SIZE(ak4375_mdac_select_texts), ak4375_mdac_select_texts);
-static const struct soc_enum ak4375_invl_enum =
- SOC_ENUM_SINGLE(AK4375_07_DAC_MONO_MIXING, 3,
- ARRAY_SIZE(ak4375_inv_select_texts), ak4375_inv_select_texts);
-static const struct soc_enum ak4375_invr_enum =
- SOC_ENUM_SINGLE(AK4375_07_DAC_MONO_MIXING, 7,
- ARRAY_SIZE(ak4375_inv_select_texts), ak4375_inv_select_texts);
static const struct soc_enum ak4375_cpmode_enum =
SOC_ENUM_SINGLE(AK4375_03_POWER_MANAGEMENT4, 2,
ARRAY_SIZE(ak4375_cpmode_select_texts), ak4375_cpmode_select_texts);
@@ -176,11 +169,11 @@ static const struct snd_kcontrol_new ak4375_snd_controls[] = {
SOC_SINGLE_TLV("HP-Amp Analog Volume",
AK4375_0D_HP_VOLUME_CONTROL, 0, 0x1f, 0, hpg_tlv),

+ SOC_DOUBLE("DAC Signal Invert Switch", AK4375_07_DAC_MONO_MIXING, 3, 7, 1, 0),
+
SOC_ENUM("Digital Volume Control", ak4375_ovolcn_enum),
SOC_ENUM("DACL Signal Level", ak4375_mdacl_enum),
SOC_ENUM("DACR Signal Level", ak4375_mdacr_enum),
- SOC_ENUM("DACL Signal Invert", ak4375_invl_enum),
- SOC_ENUM("DACR Signal Invert", ak4375_invr_enum),
SOC_ENUM("Charge Pump Mode", ak4375_cpmode_enum),
SOC_ENUM("DAC Digital Filter Mode", ak4375_digfil_enum),
};
--
2.31.1





2021-12-22 15:33:44

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] ASoC: codecs: ak4375: Change invert controls to a stereo switch

On Wed, 22 Dec 2021 14:54:03 +0100, Vincent Knecht wrote:
> Don't use enums for DACL/DACR Signal Invert controls,
> and change them into a stereo "DAC Signal Invert Switch" control.
>
>

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: codecs: ak4375: Change invert controls to a stereo switch
commit: 37daf8d9e0bd85a2859721aec28e1eb6e9973262

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