summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAlan Tull <r80115@freescale.com>2012-02-17 13:34:53 -0600
committerAlan Tull <r80115@freescale.com>2012-02-17 13:45:10 -0600
commit6b063b2e6f2b5a258f2b3bcc92f81810af77a825 (patch)
tree3cc38b101143dcac23924b10ac22f626a097d348 /sound
parent4f01f76f4e60713cba46b754f99e785c6d46e597 (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.c3
-rw-r--r--sound/soc/imx/imx-hdmi-dai.c5
-rw-r--r--sound/soc/imx/imx-hdmi.c5
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__);