linux-stable/sound
Kai Vehmanen 140f553d12
ASoC: soc-pcm: fix hwparams min/max init for dpcm
When runtime is initialized with dpcm_init_runtime_hw(), some of the
min/max calculations assume that defaults are set. For example
calculation of channel min/max values may be done using zero-initialized
data and soc_pcm_hw_update_chan() will always return max-channels of 0
in this case. This will result in failure to open the PCM at all.

Fix the issue by calling soc_pcm_hw_init() before calling any
soc_pcm_hw_update_*() functions.

Remove the conditional code on runtime->hw.formats as this field
is anyways set in soc_pcm_hw_init().

Fixes: 6cb56a4549 ("ASoC: soc-pcm: add soc_pcm_hw_update_chan()")
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210214220414.2876690-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-15 20:19:50 +00:00
..
ac97 ALSA: ac97: (cosmetic) align argument names 2020-09-03 09:27:27 +02:00
aoa ALSA: aoa: i2sbus: use DECLARE_COMPLETION_ONSTACK() macro 2020-09-03 09:26:52 +02:00
arm
atmel ALSA: atmel: ac97: clarify operator precedence 2020-09-03 09:27:34 +02:00
core ASoC: dmaengine_pcm: add peripheral configuration 2021-02-05 17:16:41 +00:00
drivers ALSA: aloop: Constify ops structs 2020-11-21 09:30:35 +01:00
firewire Merge branch 'topic/usb-audio-refactoring' into for-next 2020-11-24 09:13:00 +01:00
hda Auxiliary Bus support tag for 5.11-rc1 2020-12-04 20:39:45 +00:00
i2c
isa ALSA: sb: Fix fall-through warnings for Clang 2020-11-21 09:29:26 +01:00
mips hal2: convert to dma_alloc_noncoherent 2020-09-25 06:20:44 +02:00
oss
parisc
pci ALSA: hda/via: Fix runtime PM for Clevo W35xSS 2021-01-04 16:34:43 +01:00
pcmcia
ppc powerpc updates for 5.11 2020-12-17 13:34:25 -08:00
sh
soc ASoC: soc-pcm: fix hwparams min/max init for dpcm 2021-02-15 20:19:50 +00:00
sparc ALSA: sparc: dbri: fix repeated word 'the' 2020-10-17 09:58:35 +02:00
spi
synth
usb ALSA: usb-audio: Add quirk for RC-505 2021-01-03 08:58:39 +01:00
x86 ALSA: hda: use consistent HDAudio spelling in comments/docs 2020-09-02 19:31:32 +02:00
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c