android_kernel_oneplus_msm8998/sound
Peter Ujfalusi 25772b11f8 ASoC: ti: davinci-mcasp: Correct slot_width posed constraint
[ Upstream commit 1e112c35e3c96db7c8ca6ddaa96574f00c06e7db ]

The slot_width is a property for the bus while the constraint for
SNDRV_PCM_HW_PARAM_SAMPLE_BITS is for the in memory format.

Applying slot_width constraint to sample_bits works most of the time, but
it will blacklist valid formats in some cases.

With slot_width 24 we can support S24_3LE and S24_LE formats as they both
look the same on the bus, but a a 24 constraint on sample_bits would not
allow S24_LE as it is stored in 32bits in memory.

Implement a simple hw_rule function to allow all formats which require less
or equal number of bits on the bus as slot_width (if configured).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20190726064244.3762-2-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-09-06 10:18:06 +02:00
..
aoa ALSA: snd-aoa: add of_node_put() in error path 2018-10-10 08:52:05 +02:00
arm ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm 2015-09-30 23:21:16 +01:00
atmel ALSA: sound/atmel/ac97c.c: remove unused variable 2015-05-20 06:18:25 +02:00
core ALSA: compress: Be more restrictive about when a drain is allowed 2019-08-25 10:52:49 +02:00
drivers ALSA: opl3: fix mismatch between snd_opl3_drum_switch definition and declaration 2019-04-27 09:33:57 +02:00
firewire ALSA: firewire: fix a memory leak bug 2019-08-25 10:52:52 +02:00
hda sound: enable interrupt after dma buffer initialization 2018-10-20 09:52:33 +02:00
i2c ALSA: ak4xxx-adda: Drop unnecessary ifdef CONFIG_PROC_FS 2015-05-29 07:51:23 +02:00
isa ALSA: sb8: add a check for request_region 2019-04-27 09:33:56 +02:00
mips ALSA: mips: let SND_SGI_O2 select SND_PCM 2015-06-15 13:21:58 +02:00
oss sound: oss/sb_audio: use swap() in sb_audio_close() 2015-06-12 20:46:29 +02:00
parisc
pci ALSA: hda - Fix a memory leak bug 2019-08-25 10:52:56 +02:00
pcmcia ALSA: vxpocket: Fix invalid endian conversions 2018-08-22 07:48:36 +02:00
ppc ALSA: ppc/awacs: shut up maybe-uninitialized warning 2017-05-08 07:46:01 +02:00
sh
soc ASoC: ti: davinci-mcasp: Correct slot_width posed constraint 2019-09-06 10:18:06 +02:00
sparc ALSA: sparc: Fix invalid snd_free_pages() at error path 2018-12-13 09:21:27 +01:00
spi
synth ALSA: emux: Fix potential Spectre v1 vulnerabilities 2019-01-13 10:05:29 +01:00
usb ALSA: line6: Fix wrong altsetting for LINE6_PODHD500_1 2019-08-04 09:35:00 +02:00
ac97_bus.c ASoC: Updates for v4.3 2015-08-31 16:25:22 +02:00
Kconfig ALSA: hda - Make snd_hda_bus_type public 2015-03-23 13:15:51 +01:00
last.c
Makefile ALSA: hda - Make snd_hda_bus_type public 2015-03-23 13:15:51 +01:00
sound_core.c sound: fix a memory leak bug 2019-08-25 10:52:43 +02:00
sound_firmware.c sound: sound_firmware: Fix invalid use of vfs_read() 2015-05-26 13:48:58 +02:00