alistair23-linux/sound/soc
Mark Brown b4a5675334
Merge series "ASoC: stm32: manage rebind issue" from Olivier Moysan <olivier.moysan@st.com>:
This patchset corrects a rebind issue on STM32 SPDIFRX and I2S drivers.

The same correction has already been applied for SAI driver:
0d6defc7e0 ("ASoC: stm32: sai: manage rebind issue")

The commit e894efef9a ("ASoC: core: add support to card rebind")
allows to rebind the sound card after a rebind of one of its component.
With this commit, the sound card is actually rebound,
but may be no more functional.

The following problems have been seen on STM32 drivers.

1) DMA channel is not requested:

With the sound card rebind the simplified call sequence is:
    probe
        snd_soc_register_component
                snd_soc_try_rebind_card
                        snd_soc_instantiate_card
        devm_snd_dmaengine_pcm_register

The problem occurs because the pcm must be registered,
before snd_soc_instantiate_card() is called.

Modify the driver, to change the call sequence as follows:
    probe
        devm_snd_dmaengine_pcm_register
        snd_soc_register_component
                snd_soc_try_rebind_card

2) DMA channel is not released:

dma_release_channel() is not called when
devm_dmaengine_pcm_release() is executed.
This occurs because SND_DMAENGINE_PCM_DRV_NAME component,
has already been released through devm_component_release().

devm_dmaengine_pcm_release() should be called before
devm_component_release() to avoid this problem.

Call snd_dmaengine_pcm_unregister() and snd_soc_unregister_component()
explicitly from the driver, to have the right sequence.

Olivier Moysan (3):
  ASoC: stm32: spdifrx: fix regmap status check
  ASoC: stm32: spdifrx: manage rebind issue
  ASoC: stm32: i2s: manage rebind issue

 sound/soc/stm/stm32_i2s.c     | 40 ++++++++++++++++------
 sound/soc/stm/stm32_spdifrx.c | 64 +++++++++++++++++++----------------
 2 files changed, 63 insertions(+), 41 deletions(-)

--
2.17.1
2020-03-18 21:41:27 +00:00
..
adi
amd ASoC: amd: Adding TDM support in hw_params. 2020-03-09 14:25:04 +00:00
atmel
au1x
bcm ASoC: brcm: Add DSL/PON SoC audio driver 2020-03-13 16:01:35 +00:00
cirrus
codecs Merge series "ASoC: sdm845: fix soundwire stream handling" from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>: 2020-03-18 21:41:26 +00:00
dwc ASoC: dwc: dwc-i2s: use for_each_pcm_streams() macro 2020-02-18 23:37:09 +00:00
fsl ASoC: fsl: fsl_asrc_dma: use for_each_pcm_streams() macro 2020-02-18 23:37:10 +00:00
generic ASoC: simple-card-utils: use for_each_pcm_streams() 2020-03-09 14:25:03 +00:00
hisilicon
img
intel Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7 2020-03-13 18:52:23 +00:00
jz4740 Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7 2020-03-13 18:52:23 +00:00
kirkwood
mediatek ASoC: mediatek: use for_each_rtd_codecs/cpus_dai() macro 2020-03-10 13:35:21 +00:00
meson ASoC: meson: use for_each_rtd_codecs/cpus_dai() macro 2020-03-10 13:35:22 +00:00
mxs
pxa
qcom ASoC: qcom: sdm845: handle soundwire stream 2020-03-18 21:25:53 +00:00
rockchip
samsung ASoC: samsung: Silence warnings during deferred probe 2020-02-28 17:28:29 +00:00
sh
sirf
sof Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7 2020-03-13 18:52:23 +00:00
spear
sprd ASoC: sprd: Allow the MCDT driver to build into modules 2020-03-05 13:15:17 +00:00
sti
stm ASoC: stm32: i2s: manage rebind issue 2020-03-18 19:55:26 +00:00
sunxi Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7 2020-02-24 22:26:06 +00:00
tegra
ti
txx9
uniphier
ux500
xilinx
xtensa
zte ASoC: zte: zx-tdm: remove redundant variables dev 2020-03-11 17:59:49 +00:00
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-component.c ASoC: soc-component: tidyup snd_soc_pcm_component_sync_stop() 2020-02-28 17:06:09 +00:00
soc-compress.c ASoC: Return error if the function does not support multi-cpu 2020-02-26 17:35:04 +00:00
soc-core.c Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7 2020-03-13 18:52:23 +00:00
soc-dai.c ASoC: soc-pcm: add snd_soc_dai_get_pcm_stream() 2020-02-24 21:18:28 +00:00
soc-dapm.c ASoC: export DPCM runtime update functions 2020-03-12 13:30:38 +00:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: Return error if the function does not support multi-cpu 2020-02-26 17:35:04 +00:00
soc-io.c
soc-jack.c
soc-ops.c
soc-pcm.c ASoC: export DPCM runtime update functions 2020-03-12 13:30:38 +00:00
soc-topology.c Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7 2020-03-13 18:52:23 +00:00
soc-utils.c