]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: tas2770: Fix and redo I/V sense TDM slot setting logic
authorMartin Povišer <povik+lin@cutebit.org>
Thu, 27 Feb 2025 12:07:33 +0000 (22:07 +1000)
committerMark Brown <broonie@kernel.org>
Thu, 13 Mar 2025 22:39:04 +0000 (22:39 +0000)
commitf0066c8d1d3298e9f9d136a365139bac733e84c5
tree908f3aa96ad9c204d882509254aedb77b28cad67
parent6553ee024b4452ef861de10605156c9d79e208ab
ASoC: tas2770: Fix and redo I/V sense TDM slot setting logic

The former code sets the V slot from inside set_bitwidth according to
the bitwidth of the PCM format. That's wrong, since:

 * It overrides the V slot parsed from DT binding.

 * The V slot is set shifted behind the I slot by the length of the PCM
   bitwidth, but the PCM bitwidth has no assured relation to the TDM
   slot width.

Replace the former logic by setting up the I/V sense transmission only
in case of both I/V slots being specified in devicetree, and never
override those values. In case the slots are left unspecified, disable
the transmission completely.

There's an improbable case someone is relying on the old behavior, but
if so, that's a setup that only works by accident, and cannot be sanely
supported going forward. There's no indication anyone is consuming the
I/V sense data up to today, so break the former behavior.

Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Link: https://patch.msgid.link/20250227-apple-codec-changes-v3-6-cbb130030acf@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2770.c