From 5bc6557674611923916d7f02beec502fae087ae6 Mon Sep 17 00:00:00 2001 From: Zidan Wang Date: Wed, 20 Jan 2016 09:50:40 +0800 Subject: 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 [ Aisheng: hdmi change merged into hdmi branch ] Signed-off-by: Dong Aisheng --- sound/soc/fsl/imx-wm8958.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/soc/fsl/imx-wm8958.c') 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"); -- cgit v1.2.3