linux/sound/soc
Matteo Martelli 3e83957e8d
ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode
This fixes the LRCLK polarity for sun8i-h3 and sun50i-h6 in i2s mode
which was wrongly inverted.

The LRCLK was being set in reversed logic compared to the DAI format:
inverted LRCLK for SND_SOC_DAIFMT_IB_NF and SND_SOC_DAIFMT_NB_NF; normal
LRCLK for SND_SOC_DAIFMT_IB_IF and SND_SOC_DAIFMT_NB_IF. Such reversed
logic applies properly for DSP_A, DSP_B, LEFT_J and RIGHT_J modes but
not for I2S mode, for which the LRCLK signal results reversed to what
expected on the bus. The issue is due to a misinterpretation of the
LRCLK polarity bit of the H3 and H6 i2s controllers. Such bit in this
case does not mean "0 => normal" or "1 => inverted" according to the
expected bus operation, but it means "0 => frame starts on low edge" and
"1 => frame starts on high edge" (from the User Manuals).

This commit fixes the LRCLK polarity by setting the LRCLK polarity bit
according to the selected bus mode and renames the LRCLK polarity bit
definition to avoid further confusion.

Fixes: dd657eae81 ("ASoC: sun4i-i2s: Fix the LRCK polarity")
Fixes: 73adf87b7a ("ASoC: sun4i-i2s: Add support for H6 I2S")
Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com>
Link: https://patch.msgid.link/20240801-asoc-fix-sun4i-i2s-v2-1-a8e4e9daa363@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-29 15:57:07 +01:00
..
adi ASoC: adi: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:12 +09:00
amd ASoC: amd: yc: Add a quirk for MSI Bravo 17 (D7VEK) 2024-08-29 14:08:18 +01:00
apple ASoC: apple: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:14 +09:00
atmel ASoC: atmel: atmel-classd: Re-add dai_link->platform to fix card init 2024-06-06 14:04:00 +01:00
au1x ASoC: allow module autoloading for table db1200_pids 2024-08-21 16:25:02 +01:00
bcm ASoC: bcm: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:16 +09:00
cirrus ASoC: cirrus: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:17 +09:00
codecs ASoC: fix module autoloading 2024-08-26 15:52:09 +01:00
dwc
fsl ASoC: fsl_micfil: Differentiate register access permission for platforms 2024-07-29 13:36:14 +01:00
generic ASoC: simple-card: Use cleanup.h instead of devm_kfree() 2024-07-08 12:50:01 +01:00
google ASoC: google: fix module autoloading 2024-08-26 15:52:07 +01:00
hisilicon
img ASoC: img: Use snd_soc_substream_to_rtd() for accessing private_data 2024-05-06 23:59:52 +09:00
intel ASoC: intel: fix module autoloading 2024-08-26 15:52:06 +01:00
jz4740 ASoC: jz4740: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:21 +09:00
kirkwood ASoC: kirkwood: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:21 +09:00
loongson ASoC: loongson: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:22 +09:00
mediatek ASoC: mediatek: mt8188-mt6359: Modify key 2024-08-28 21:41:43 +01:00
meson ASoC: meson: axg-fifo: fix irq scheduling issue with PREEMPT_RT 2024-08-08 20:34:55 +01:00
mxs ASoC: mxs: add missing MODULE_DESCRIPTION() macro 2024-06-03 15:59:19 +01:00
pxa ASoC: pxa: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:26 +09:00
qcom ASoC: qcom: topology: Simplify with cleanup.h 2024-07-09 22:50:48 +01:00
rockchip ASoC: Merge up fixes 2024-06-21 13:17:21 +01:00
samsung ASoC: samsung: midas_wm1811: Fix error code in probe() 2024-06-11 17:14:00 +01:00
sh ASoC: Constify DAI ops auto_selectable_formats 2024-06-17 18:29:02 +01:00
sof ASoc: SOF: topology: Clear SOF link platform name upon unload 2024-08-28 13:01:44 +01:00
spear ASoC: spear: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:31 +09:00
sprd ASoC: sprd: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:32 +09:00
starfive
sti ASoC: sti: add missing probe entry for player and reader 2024-07-29 13:36:56 +01:00
stm ASoC: stm: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:34 +09:00
sunxi ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode 2024-08-29 15:57:07 +01:00
tegra ASoC: tegra: Fix CBB error during probe() 2024-08-23 23:07:55 +01:00
ti Fixes for McASP and dmaengine_pcm 2024-06-12 18:26:15 +01:00
uniphier ASoC: uniphier: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:36 +09:00
ux500 ASoC: Add missing module descriptions 2024-05-09 08:37:35 +02:00
xilinx ASoC: Add missing module descriptions 2024-05-09 08:37:35 +02:00
xtensa ASoC: xtensa: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:39 +09:00
Kconfig ASoC: soc-card: Add KUnit test case for snd_soc_card_get_kcontrol 2024-04-02 15:54:49 +01:00
Makefile ASoC: core: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:11 +09:00
soc-ac97.c
soc-acpi.c
soc-card-test.c ASoC: soc-card: soc-card-test: Fix some error handling in init() 2024-04-14 16:54:39 +09:00
soc-card.c
soc-component.c ASoC: soc-component: Add new snd_soc_component_get_kcontrol() helpers 2024-08-02 14:04:39 +01:00
soc-compress.c
soc-core.c ASoC: Constify passed data to core function 2024-06-18 14:19:54 +01:00
soc-dai.c ASoC: Constify return of snd_soc_dai_get_pcm_stream() 2024-06-18 14:19:56 +01:00
soc-dapm.c ASoC: dapm: Fix UAF for snd_soc_pcm_runtime object 2024-08-23 23:07:55 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ALSA: dmaengine: Synchronize dma channel after drop() 2024-06-11 17:13:31 +01:00
soc-jack.c
soc-link.c
soc-ops.c ASoC: ops: Simplify with cleanup.h 2024-07-08 12:50:02 +01:00
soc-pcm.c ASoC: Constify return of snd_soc_dai_get_pcm_stream() 2024-06-18 14:19:56 +01:00
soc-topology-test.c ASoC: topology-test: Add missing module description 2024-05-08 20:51:10 +09:00
soc-topology.c ASoC: topology: Unify code for creating standalone and widget enum control 2024-07-02 14:27:08 +01:00
soc-utils-test.c
soc-utils.c ASoC: soc-utils: allow sample rate up to 768kHz for the dummy dai 2024-06-28 13:39:29 +01:00