summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/Kconfig8
-rw-r--r--drivers/mfd/mxc-hdmi-core.c10
2 files changed, 18 insertions, 0 deletions
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 3e894e84a46c..2e799bb277f0 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -146,6 +146,14 @@ config MFD_MXC_HDMI
This is the core driver for the Freescale i.MX6 on-chip HDMI.
This MFD driver connects with the video and audio drivers for HDMI.
+config MFD_MXC_HDMI_ANDROID
+ tristate "Freescale HDMI Core for Android"
+ select MFD_CORE
+ depends on MFD_MXC_HDMI=y
+ help
+ This is the core driver for the Freescale i.MX6 on-chip HDMI.
+ This MFD driver connects with the video and audio drivers for HDMI.
+
config MFD_MC13783
tristate
diff --git a/drivers/mfd/mxc-hdmi-core.c b/drivers/mfd/mxc-hdmi-core.c
index 29d43f9a085c..79568167f64c 100644
--- a/drivers/mfd/mxc-hdmi-core.c
+++ b/drivers/mfd/mxc-hdmi-core.c
@@ -77,10 +77,12 @@ unsigned int hdmi_set_cable_state(unsigned int state)
hdmi_cable_state = state;
spin_unlock_irqrestore(&hdmi_cable_state_lock, flags);
+#ifndef CONFIG_MFD_MXC_HDMI_ANDROID
if (check_hdmi_state() && substream && hdmi_abort_state) {
hdmi_abort_state = 0;
substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_START);
}
+#endif
return 0;
}
EXPORT_SYMBOL(hdmi_set_cable_state);
@@ -94,10 +96,13 @@ unsigned int hdmi_set_blank_state(unsigned int state)
hdmi_blank_state = state;
spin_unlock_irqrestore(&hdmi_blank_state_lock, flags);
+#ifndef CONFIG_MFD_MXC_HDMI_ANDROID
if (check_hdmi_state() && substream && hdmi_abort_state) {
hdmi_abort_state = 0;
substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_START);
}
+#endif
+
return 0;
}
EXPORT_SYMBOL(hdmi_set_blank_state);
@@ -108,10 +113,15 @@ static void hdmi_audio_abort_stream(struct snd_pcm_substream *substream)
snd_pcm_stream_lock_irqsave(substream, flags);
+#ifndef CONFIG_MFD_MXC_HDMI_ANDROID
if (snd_pcm_running(substream)) {
hdmi_abort_state = 1;
substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_STOP);
}
+#else
+ if (snd_pcm_running(substream))
+ snd_pcm_stop(substream, SNDRV_PCM_STATE_DISCONNECTED);
+#endif
snd_pcm_stream_unlock_irqrestore(substream, flags);
}