linux/sound
Fabio Estevam 0984f34100 ASoC: fsl: imx-wm8962: Set the card owner field
The following crash happens when trying to unload the snd_soc_imx_wm8962 module
while playback is active:

[  208.666868] Unable to handle kernel paging request at virtc
[  208.674110] pgd = 80004000
[  208.676867] [7f06541c] *pgd=4c334811, *pte=00000000, *ppte=00000000
[  208.683211] Internal error: Oops: 80000007 [#1] SMP ARM
[  208.688445] Modules linked in: snd_soc_wm8962 snd_soc_fsl_ssi snd_soc_imx_audmux imx_pcm_fiq evbug]
...

In order to avoid such problem, fill the card owner field as suggested by
Lars-Peter Clausen:

"But looking at the source it seems that this is a core feature of ALSA and at
least for the card module itself it will do the ref-counting when a stream is
started/stopped. And we even support setting the owner of a card in ASoC.
It's just that pretty much no ASoC card driver bothers to set the owner field
in the snd_soc_card struct. So this particular problem can be fixed by updating
the imx-wm8962 driver to set the owner field."

By doing as suggested, we no longer see the crash when attempting to unload the
snd_soc_imx_wm8962 module while playback is active:

$ modprobe -r snd_soc_imx_wm8962
modprobe: can't unload module snd_soc_imx_wm8962: Resource temporarily
unavailable

Reported-by: Jiada Wang <jiada_wang@mentor.com>
Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14 17:13:46 +00:00
..
aoa ALSA: i2sbus: Deletion of unnecessary checks before the function call "release_and_free_resource" 2014-12-03 07:59:04 +01:00
arm Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
atmel Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
core Merge branch 'for-linus' into for-next 2014-11-28 18:30:19 +01:00
drivers Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
firewire ALSA: oxfw: some signedness bugs 2014-12-15 10:03:21 +01:00
i2c ALSA: ak4xxx-adda: Use snd_ctl_enum_info() 2014-10-21 08:29:54 +02:00
isa ALSA: sb: Deletion of unnecessary checks before two function calls 2014-11-21 20:07:36 +01:00
mips Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
oss Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
parisc ALSA: parisc: Use snd_ctl_enum_info() 2014-10-21 08:37:36 +02:00
pci sound fixes for 3.19-rc1 2014-12-19 18:07:17 -08:00
pcmcia ALSA: vx: Fix missing kerneldoc parameter descriptions 2014-11-11 09:39:10 +01:00
ppc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sh ALSA: sh: drop owner assignment from platform_drivers 2014-10-20 16:22:02 +02:00
soc ASoC: fsl: imx-wm8962: Set the card owner field 2015-01-14 17:13:46 +00:00
sparc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi
synth
usb sound fixes for 3.19-rc1 2014-12-19 18:07:17 -08:00
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c
sound_firmware.c