[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250215-apple-codec-changes-v1-4-723569b21b19@gmail.com>
Date: Sat, 15 Feb 2025 10:02:37 +1000
From: James Calligeros <jcalligeros99@...il.com>
To: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Shenghao Ding <shenghao-ding@...com>, Kevin Lu <kevin-lu@...com>,
Baojun Xu <baojun.xu@...com>, Dan Murphy <dmurphy@...com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Shi Fu <shifu0704@...ndersoft.com>
Cc: Alyssa Rosenzweig <alyssa@...enzweig.io>,
Martin Povišer <povik+lin@...ebit.org>,
Hector Martin <marcan@...can.st>, linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
asahi@...ts.linux.dev,
Martin Povišer <povik@...tonmail.com>,
James Calligeros <jcalligeros99@...il.com>
Subject: [PATCH 04/27] ASoC: tas2764: Add control concerning overcurrent
events
From: Martin Povišer <povik@...tonmail.com>
Add control to expose the option of autoretry behavior on overcurrent
events in the codec.
Signed-off-by: Martin Povišer <povik+lin@...ebit.org>
Signed-off-by: James Calligeros <jcalligeros99@...il.com>
---
sound/soc/codecs/tas2764.c | 9 +++++++++
sound/soc/codecs/tas2764.h | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c
index e04b8ecab819402b8c3d2b81a2a447730802e968..503bb7f8b729d3760194a6f6f6996ff6469c580f 100644
--- a/sound/soc/codecs/tas2764.c
+++ b/sound/soc/codecs/tas2764.c
@@ -623,12 +623,21 @@ static SOC_ENUM_SINGLE_DECL(
tas2764_hpf_enum, TAS2764_DC_BLK0,
TAS2764_DC_BLK0_HPF_FREQ_PB_SHIFT, tas2764_hpf_texts);
+static const char * const tas2764_oce_texts[] = {
+ "Disable", "Retry",
+};
+
+static SOC_ENUM_SINGLE_DECL(
+ tas2764_oce_enum, TAS2764_MISC_CFG1,
+ TAS2764_MISC_CFG1_OCE_RETRY_SHIFT, tas2764_oce_texts);
+
static const struct snd_kcontrol_new tas2764_snd_controls[] = {
SOC_SINGLE_TLV("Speaker Volume", TAS2764_DVC, 0,
TAS2764_DVC_MAX, 1, tas2764_playback_volume),
SOC_SINGLE_TLV("Amp Gain Volume", TAS2764_CHNL_0, 1, 0x14, 0,
tas2764_digital_tlv),
SOC_ENUM("HPF Corner Frequency", tas2764_hpf_enum),
+ SOC_ENUM("OCE Handling", tas2764_oce_enum),
};
static const struct snd_soc_component_driver soc_component_driver_tas2764 = {
diff --git a/sound/soc/codecs/tas2764.h b/sound/soc/codecs/tas2764.h
index 0a40166040e7e877ca5d23db6cb65531af12c40b..20628e51bf94f047e3dc7cac73ac01519ada1852 100644
--- a/sound/soc/codecs/tas2764.h
+++ b/sound/soc/codecs/tas2764.h
@@ -44,6 +44,10 @@
#define TAS2764_CHNL_0 TAS2764_REG(0X0, 0x03)
+/* Miscellaneous */
+#define TAS2764_MISC_CFG1 TAS2764_REG(0x0, 0x06)
+#define TAS2764_MISC_CFG1_OCE_RETRY_SHIFT 5
+
/* TDM Configuration Reg0 */
#define TAS2764_TDM_CFG0 TAS2764_REG(0X0, 0x08)
#define TAS2764_TDM_CFG0_SMP_MASK BIT(5)
--
2.48.1
Powered by blists - more mailing lists