Skip to content
Snippets Groups Projects
  1. Mar 05, 2020
  2. Mar 04, 2020
    • Olivier Moysan's avatar
      ASoC: stm32: sai: manage rebind issue · 0d6defc7
      Olivier Moysan authored
      
      The commit e894efef ("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
      with STM32 SAI driver.
      
      1) DMA channel is not requested:
      
      With the sound card rebind the simplified call sequence is:
      stm32_sai_sub_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 SAI driver, to change the call sequence as follows:
      stm32_sai_sub_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 SAI driver, to have the right sequence.
      
      Signed-off-by: default avatarOlivier Moysan <olivier.moysan@st.com>
      Message-Id: <20200304102406.8093-1-olivier.moysan@st.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      0d6defc7
  3. Mar 03, 2020
  4. Mar 02, 2020
  5. Feb 28, 2020
  6. Feb 26, 2020
  7. Feb 24, 2020
  8. Feb 21, 2020
  9. Feb 20, 2020
  10. Feb 19, 2020
  11. Feb 18, 2020
  12. Feb 17, 2020
  13. Feb 14, 2020
  14. Feb 13, 2020
  15. Feb 12, 2020
  16. Feb 10, 2020
  17. Feb 06, 2020
  18. Feb 05, 2020
  19. Feb 04, 2020
  20. Feb 02, 2020
  21. Jan 29, 2020
Loading