Skip to content

Commit f8d5f28

Browse files
povikbroonie
authored andcommitted
ASoC: tas2764: Add control concerning overcurrent events
Add control to expose the option of autoretry behavior on overcurrent events in the codec. Reviewed-by: Neal Gompa <[email protected]> Signed-off-by: Martin Povišer <[email protected]> Signed-off-by: James Calligeros <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent ad18392 commit f8d5f28

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

sound/soc/codecs/tas2764.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,12 +634,21 @@ static SOC_ENUM_SINGLE_DECL(
634634
tas2764_hpf_enum, TAS2764_DC_BLK0,
635635
TAS2764_DC_BLK0_HPF_FREQ_PB_SHIFT, tas2764_hpf_texts);
636636

637+
static const char * const tas2764_oce_texts[] = {
638+
"Disable", "Retry",
639+
};
640+
641+
static SOC_ENUM_SINGLE_DECL(
642+
tas2764_oce_enum, TAS2764_MISC_CFG1,
643+
TAS2764_MISC_CFG1_OCE_RETRY_SHIFT, tas2764_oce_texts);
644+
637645
static const struct snd_kcontrol_new tas2764_snd_controls[] = {
638646
SOC_SINGLE_TLV("Speaker Volume", TAS2764_DVC, 0,
639647
TAS2764_DVC_MAX, 1, tas2764_playback_volume),
640648
SOC_SINGLE_TLV("Amp Gain Volume", TAS2764_CHNL_0, 1, 0x14, 0,
641649
tas2764_digital_tlv),
642650
SOC_ENUM("HPF Corner Frequency", tas2764_hpf_enum),
651+
SOC_ENUM("OCE Handling", tas2764_oce_enum),
643652
};
644653

645654
static const struct snd_soc_component_driver soc_component_driver_tas2764 = {

sound/soc/codecs/tas2764.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444

4545
#define TAS2764_CHNL_0 TAS2764_REG(0X0, 0x03)
4646

47+
/* Miscellaneous */
48+
#define TAS2764_MISC_CFG1 TAS2764_REG(0x0, 0x06)
49+
#define TAS2764_MISC_CFG1_OCE_RETRY_SHIFT 5
50+
4751
/* TDM Configuration Reg0 */
4852
#define TAS2764_TDM_CFG0 TAS2764_REG(0X0, 0x08)
4953
#define TAS2764_TDM_CFG0_SMP_MASK BIT(5)

0 commit comments

Comments
 (0)