diff options
author | Alan Tull <r80115@freescale.com> | 2012-02-17 13:34:53 -0600 |
---|---|---|
committer | Alan Tull <r80115@freescale.com> | 2012-02-17 16:02:01 -0600 |
commit | 8374a2fad38f2ab478a051d9e0b90651cb0999bf (patch) | |
tree | 4d6df3367959634d5a7289b9fa7e40a19cc24d5f /sound | |
parent | e6a7e5716447809af73f57964770e35badf7baa5 (diff) |
ENGR00173964 make hdmi audio init dependent on hdmi video init
Don't show hdmi as an audio playback device if hdmi isn't
configured on the command line.
Signed-off-by: Alan Tull <r80115@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/mxc_hdmi.c | 3 | ||||
-rw-r--r-- | sound/soc/imx/imx-hdmi-dai.c | 5 | ||||
-rw-r--r-- | sound/soc/imx/imx-hdmi.c | 5 |
3 files changed, 11 insertions, 2 deletions
diff --git a/sound/soc/codecs/mxc_hdmi.c b/sound/soc/codecs/mxc_hdmi.c index 70c9b8c9bfe0..4d9a5719eeae 100644 --- a/sound/soc/codecs/mxc_hdmi.c +++ b/sound/soc/codecs/mxc_hdmi.c @@ -348,6 +348,9 @@ static int mxc_hdmi_codec_soc_probe(struct snd_soc_codec *codec) struct mxc_hdmi_priv *hdmi_priv; int ret = 0; + if (!hdmi_get_registered()) + return -ENOMEM; + hdmi_priv = kzalloc(sizeof(struct mxc_hdmi_priv), GFP_KERNEL); if (hdmi_priv == NULL) return -ENOMEM; diff --git a/sound/soc/imx/imx-hdmi-dai.c b/sound/soc/imx/imx-hdmi-dai.c index 71cb3a56530f..0a1686bfcacd 100644 --- a/sound/soc/imx/imx-hdmi-dai.c +++ b/sound/soc/imx/imx-hdmi-dai.c @@ -1,7 +1,7 @@ /* * ALSA SoC HDMI Audio Layer for MXS * - * Copyright (C) 2011 Freescale Semiconductor, Inc. + * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. * * Based on stmp3xxx_spdif_dai.c * Vladimir Barinov <vbarinov@embeddedalley.com> @@ -42,6 +42,9 @@ static int imx_hdmi_dai_probe(struct platform_device *pdev) struct imx_hdmi *hdmi_data; int ret = 0; + if (!hdmi_get_registered()) + return -ENOMEM; + hdmi_data = kzalloc(sizeof(*hdmi_data), GFP_KERNEL); if (!hdmi_data) return -ENOMEM; diff --git a/sound/soc/imx/imx-hdmi.c b/sound/soc/imx/imx-hdmi.c index f2316c1fe081..a30d478af9de 100644 --- a/sound/soc/imx/imx-hdmi.c +++ b/sound/soc/imx/imx-hdmi.c @@ -1,7 +1,7 @@ /* * ASoC HDMI Transmitter driver for IMX development boards * - * Copyright (C) 2011 Freescale Semiconductor, Inc. + * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. * * based on stmp3780_devb_spdif.c * @@ -57,6 +57,9 @@ static int __init imx_hdmi_init(void) { int ret = 0; + if (!hdmi_get_registered()) + return -ENOMEM; + imx_hdmi_snd_device = platform_device_alloc("soc-audio", 4); if (!imx_hdmi_snd_device) { pr_err("%s - failed platform_device_alloc\n", __func__); |