diff options
author | Shengjiu Wang <b02247@freescale.com> | 2014-03-10 18:38:14 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-21 22:35:43 -0500 |
commit | 4b3d55a0101ac25f14cc6f58c65b85bf657224d3 (patch) | |
tree | 8201d9358e3794160017f3d0cbff4606d3c5e6d3 /drivers | |
parent | ddf15ba34336bf984bcc77f0563adee3097d9cc1 (diff) |
ENGR00303524 Plugout HDMI while video playing, the audio is blocked.
The requirement for Android is different. it need the driver exit ASAP.
Don't block the user space, android will restart the driver in user space.
Yocto need the driver to start the transfer by itself.
Add a specific kernel config for this case.
Signed-off-by: Shengjiu Wang <b02247@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/Kconfig | 8 | ||||
-rw-r--r-- | drivers/mfd/mxc-hdmi-core.c | 10 |
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); } |