aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs/max98396.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2022-06-24 12:47:11 +0200
committerMark Brown <broonie@kernel.org>2022-06-27 13:16:12 +0100
commitf42924b49bf7935d21e2f2e98fdc9aa8dd176699 (patch)
treed4c6c6dacf76d2d269c199643261c1a596de52c1 /sound/soc/codecs/max98396.c
parentASoC: max98396: Fix register access for PCM format settings (diff)
downloadwireguard-linux-f42924b49bf7935d21e2f2e98fdc9aa8dd176699.tar.xz
wireguard-linux-f42924b49bf7935d21e2f2e98fdc9aa8dd176699.zip
ASoC: max98396: Implement DSP speaker monitor
Allow the selection of the TDM slot that is used to send back speaker monitor data. The DT property adi,spkfb-slot-no can be used to configure this setting which defaults to 2. Signed-off-by: Daniel Mack <daniel@zonque.org> Link: https://lore.kernel.org/r/20220624104712.1934484-8-daniel@zonque.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/max98396.c')
-rw-r--r--sound/soc/codecs/max98396.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/max98396.c b/sound/soc/codecs/max98396.c
index 0a1d98279a3e..f28831f4e74b 100644
--- a/sound/soc/codecs/max98396.c
+++ b/sound/soc/codecs/max98396.c
@@ -1377,6 +1377,9 @@ static int max98396_probe(struct snd_soc_component *component)
regmap_write(max98396->regmap,
MAX98396_R2045_PCM_TX_CTRL_2,
max98396->i_slot);
+ regmap_write(max98396->regmap,
+ MAX98396_R204A_PCM_TX_CTRL_7,
+ max98396->spkfb_slot);
if (max98396->v_slot < 8)
if (max98396->device_id == CODEC_TYPE_MAX98396)
@@ -1552,6 +1555,11 @@ static void max98396_read_device_property(struct device *dev,
else
max98396->i_slot = 1;
+ if (!device_property_read_u32(dev, "adi,spkfb-slot-no", &value))
+ max98396->spkfb_slot = value & 0xF;
+ else
+ max98396->spkfb_slot = 2;
+
if (!device_property_read_u32(dev, "adi,bypass-slot-no", &value))
max98396->bypass_slot = value & 0xF;
else