]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: imx-spdif: Use snd-soc-dummy CODEC driver to link card
authorNicolin Chen <Guangyu.Chen@freescale.com>
Mon, 23 Dec 2013 09:28:53 +0000 (17:28 +0800)
committerMark Brown <broonie@linaro.org>
Tue, 31 Dec 2013 16:32:37 +0000 (16:32 +0000)
commit3704f04bea767ce02b31a57a3efcf19085e39796
tree285b5bb04929f258839266e2384404ba7167a0b0
parent1386d2af13b0b2ba423da1adf79ceabb7ea834e9
ASoC: imx-spdif: Use snd-soc-dummy CODEC driver to link card

This is a quick fix for the below two issues when building spdif as modules.

1) If modprobing modules in order: (Step 1) snd-soc-fsl-spdif -> (Step 2)
snd-soc-imx-spdif -> (Step 3) snd-soc-spdif-tx/rx, we will fail to create
imx-spdif card and dai link unless we rmmod snd-soc-imx-spdif and modprobe
it again due to the execution platform_driver_unregister() in probe() when
meeting -EPROBE_DEFER at Step 2.

2) After "imx-spdif sound-spdif.17: dit-hifi <-> 2004000.spdif mapping ok",
'rmmod snd-soc-imx-spdif' would cause kernel dump with warning:
WARNING: CPU: 0 PID: 1301 at /home/rmk/git/linux-rmk/fs/sysfs/dir.c:915 sysfs_hash_and_remove+0x84/0x90()
sysfs: can not remove 'dapm_widget', no directory
This should be caused by disordered resourse releasing of the whole link.
And trying to unregister the card and then CODEC dev can't fix this issue.

Thus this patch just provides a simple fix to these two bugs by using the
snd-soc-dummy in the core instead of seperate snd-soc-spdif-tx/rx so that
there's no need to handle the registering and unregistering of CODEC or
CODEC dai any more.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/fsl/Kconfig
sound/soc/fsl/imx-spdif.c