]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: max98396: Fix TDM mode BSEL settings
authorDaniel Mack <daniel@zonque.org>
Wed, 29 Jun 2022 05:06:30 +0000 (07:06 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 29 Jun 2022 10:58:44 +0000 (11:58 +0100)
commitb0249a4618d709eb8ade46cae73c053b59c21928
tree11d90b6d711cc7bb909e59ae8d0c48d7b02f2154
parent2870f39da54033abdeec108b0be86413949def70
ASoC: max98396: Fix TDM mode BSEL settings

In TDM mode, the BSEL register value must be set according to table 5 in the
datasheet. This patch adds a lookup function and uses it in
max98396_dai_tdm_slot().

As the first 3 entries can also be used for non-TDM setups, the code re-uses
the same table for such scenarios.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20220629050630.2848317-1-daniel@zonque.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max98396.c
sound/soc/codecs/max98396.h