linux/sound
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
..
ac97 driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
aoa ALSA: aoa: Use *-y instead of *-objs in Makefile 2024-05-08 18:18:08 +02:00
arm ASoC: Updates for v6.10 2024-05-13 11:39:49 +02:00
atmel ALSA: misc: Use *-y instead of *-objs in Makefile 2024-05-08 18:18:13 +02:00
core sound fixes for 6.11-rc1 2024-07-26 11:01:31 -07:00
drivers parport: Remove parport_driver.devmodel 2024-07-03 16:44:22 +02:00
firewire ALSA: firewire-lib: fix wrong value as length of header for CIP_NO_HEADER case 2024-07-27 10:28:36 +09:00
hda Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
i2c ALSA: misc: Use *-y instead of *-objs in Makefile 2024-05-08 18:18:13 +02:00
isa ALSA: sb: Drop NULL check for snd_ctl_remove() 2024-06-18 12:51:50 +02:00
mips ALSA: misc: Use *-y instead of *-objs in Makefile 2024-05-08 18:18:13 +02:00
oss sound/oss/dmasound: add missing MODULE_DESCRIPTION() macro 2024-06-18 11:55:53 +02:00
parisc ALSA: misc: Use *-y instead of *-objs in Makefile 2024-05-08 18:18:13 +02:00
pci sound fixes for 6.11-rc1 2024-07-26 11:01:31 -07:00
pcmcia ALSA: misc: Use *-y instead of *-objs in Makefile 2024-05-08 18:18:13 +02:00
ppc ALSA: ppc: keywest: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-09 09:16:30 +02:00
sh ALSA: misc: Use *-y instead of *-objs in Makefile 2024-05-08 18:18:13 +02:00
soc ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode 2024-08-29 15:57:07 +01:00
sparc ALSA: misc: Use *-y instead of *-objs in Makefile 2024-05-08 18:18:13 +02:00
spi ALSA: spi: Drop NULL check for snd_ctl_remove() 2024-06-18 12:54:34 +02:00
synth ALSA: misc: Use *-y instead of *-objs in Makefile 2024-05-08 18:18:13 +02:00
usb ALSA: usb-audio: Add a quirk for Sonix HD USB Camera 2024-07-22 14:45:14 +02:00
virtio virtio: rename virtio_find_vqs_info() to virtio_find_vqs() 2024-07-17 05:20:58 -04:00
x86 Merge drm/drm-next into drm-intel-next 2024-06-19 11:38:31 +03:00
xen ALSA: xen-front: remove unused struct 'alsa_sndif_hw_param' 2024-06-13 14:14:46 +02:00
ac97_bus.c ALSA: ac97: legacy: Add missing module description 2024-05-09 10:13:07 +02:00
Kconfig
last.c
Makefile ALSA: core: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:32 +02:00
sound_core.c