diff options
author | Zidan Wang <zidan.wang@freescale.com> | 2016-01-20 09:50:40 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:50:04 +0800 |
commit | 5bc6557674611923916d7f02beec502fae087ae6 (patch) | |
tree | 1ad2e3131921328757ad7cc5b777336763017a13 /sound/soc/fsl/imx-wm8958.c | |
parent | c770ac5d82d0937d408e3c267027ea37660d0ebd (diff) |
MLK-12244 ASoC: fsl: Set the sound card owner field
When load sound card, the pulseaudio will using the sound card to
playback and record. It may be cause a kernel crash when the sound
card is unloaded while the playback/record is active
After setting the sound card owner field, when pulseaudio is running,
the sound card module ref-count will not be 0 and the sound card will
not be unloaded. So you should stop the pulseaudio when you want to
unload the sound card.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
[ Aisheng: hdmi change merged into hdmi branch ]
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Diffstat (limited to 'sound/soc/fsl/imx-wm8958.c')
-rw-r--r-- | sound/soc/fsl/imx-wm8958.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/fsl/imx-wm8958.c b/sound/soc/fsl/imx-wm8958.c index 047bdf9e70bb..e8ad44c315e8 100644 --- a/sound/soc/fsl/imx-wm8958.c +++ b/sound/soc/fsl/imx-wm8958.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Freescale Semiconductor, Inc. + * Copyright (C) 2015-2016 Freescale Semiconductor, Inc. * * The code contained herein is licensed under the GNU General Public * License. You may obtain a copy of the GNU General Public License @@ -485,6 +485,7 @@ static int imx_wm8958_probe(struct platform_device *pdev) data->dai.dai_fmt |= SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF; data->card.set_bias_level = imx_wm8958_set_bias_level; data->card.set_bias_level_post = imx_wm8958_set_bias_level_post; + data->card.owner = THIS_MODULE; data->card.dev = &pdev->dev; ret = snd_soc_of_parse_card_name(&data->card, "model"); |