diff options
author | Zidan Wang <zidan.wang@freescale.com> | 2016-01-20 09:50:40 +0800 |
---|---|---|
committer | Zidan Wang <zidan.wang@freescale.com> | 2016-01-20 11:45:07 +0800 |
commit | 823aa893ac283884622296e1a30e37efb0fd2610 (patch) | |
tree | 4bab9c1c412bf7960be84b2d0d204387d7ad9189 /sound | |
parent | aeef9dcf716102f7d4639e5973251864af1b3514 (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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/fsl/imx-cs42888.c | 1 | ||||
-rw-r--r-- | sound/soc/fsl/imx-hdmi.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/imx-si476x.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/imx-sii902x.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/imx-wm8958.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/imx-wm8960.c | 3 |
6 files changed, 11 insertions, 5 deletions
diff --git a/sound/soc/fsl/imx-cs42888.c b/sound/soc/fsl/imx-cs42888.c index 82d56d54073b..51fa05b7df7b 100644 --- a/sound/soc/fsl/imx-cs42888.c +++ b/sound/soc/fsl/imx-cs42888.c @@ -215,6 +215,7 @@ static struct snd_soc_card snd_soc_card_imx_cs42888 = { .num_dapm_widgets = ARRAY_SIZE(imx_cs42888_dapm_widgets), .dapm_routes = audio_map, .num_dapm_routes = ARRAY_SIZE(audio_map), + .owner = THIS_MODULE, }; /* diff --git a/sound/soc/fsl/imx-hdmi.c b/sound/soc/fsl/imx-hdmi.c index 9733e67c8718..a66ea0d6355e 100644 --- a/sound/soc/fsl/imx-hdmi.c +++ b/sound/soc/fsl/imx-hdmi.c @@ -1,7 +1,7 @@ /* * ASoC HDMI Transmitter driver for IMX development boards * - * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. + * Copyright (C) 2011-2016 Freescale Semiconductor, Inc. * * based on stmp3780_devb_hdmi.c * @@ -35,6 +35,7 @@ static struct snd_soc_card snd_soc_card_imx_hdmi = { .name = "imx-hdmi-soc", .dai_link = &imx_hdmi_dai_link, .num_links = 1, + .owner = THIS_MODULE, }; static int imx_hdmi_audio_probe(struct platform_device *pdev) diff --git a/sound/soc/fsl/imx-si476x.c b/sound/soc/fsl/imx-si476x.c index f40280a39c0a..767667f135a0 100644 --- a/sound/soc/fsl/imx-si476x.c +++ b/sound/soc/fsl/imx-si476x.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2015 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2008-2016 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -98,6 +98,7 @@ static struct snd_soc_card snd_soc_card_imx_3stack = { .name = "imx-audio-si476x", .dai_link = &imx_dai, .num_links = 1, + .owner = THIS_MODULE, }; static int imx_si476x_probe(struct platform_device *pdev) diff --git a/sound/soc/fsl/imx-sii902x.c b/sound/soc/fsl/imx-sii902x.c index 7cd19faa8617..f66ecf59c016 100644 --- a/sound/soc/fsl/imx-sii902x.c +++ b/sound/soc/fsl/imx-sii902x.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 @@ -225,6 +225,7 @@ static int imx_sii902x_probe(struct platform_device *pdev) SND_SOC_DAIFMT_CBS_CFS; data->card.dev = &pdev->dev; + data->card.owner = THIS_MODULE; ret = snd_soc_of_parse_card_name(&data->card, "model"); if (ret) goto fail; diff --git a/sound/soc/fsl/imx-wm8958.c b/sound/soc/fsl/imx-wm8958.c index 4217e8ab6def..a2adfb7a3fcf 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 @@ -479,6 +479,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"); diff --git a/sound/soc/fsl/imx-wm8960.c b/sound/soc/fsl/imx-wm8960.c index bbf3424483ca..3154679dde32 100644 --- a/sound/soc/fsl/imx-wm8960.c +++ b/sound/soc/fsl/imx-wm8960.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 @@ -536,6 +536,7 @@ static int imx_wm8960_probe(struct platform_device *pdev) } data->card.dev = &pdev->dev; + data->card.owner = THIS_MODULE; ret = snd_soc_of_parse_card_name(&data->card, "model"); if (ret) goto fail; |