diff options
author | Chen Liangjun <b36089@freescale.com> | 2012-09-13 21:28:11 +0800 |
---|---|---|
committer | Chen Liangjun <b36089@freescale.com> | 2012-09-14 00:06:39 +0800 |
commit | f8dd4f6fea093e46a30d5e438baa33702f626372 (patch) | |
tree | e14fa2464a06b833110a86322f14262bc1b70a8a /sound | |
parent | fad389a8f39307be480ed7ff74b03c606d382e67 (diff) |
ENGR00224245 HDMI AUDIO: stop/start PCM while unplug,blank/plug, unblank
When unplug, blank happens, HDMI audio can't play properly. So in
driver, audio pcm would be disconnected when event above happens.
However, pulse audio can't process disconnect event properly and if an
blank or unplug event happens, HDMI sink would lost and can't be back
again.
In this patch, instead of disconnecting audio PCM stream, triggering
stop audio pcm while unplug and blank, triggering start again while plug
and unblank if the audio pcm is triggerd stop in the unplug/blank event.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/imx/imx-hdmi-dma.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/imx/imx-hdmi-dma.c b/sound/soc/imx/imx-hdmi-dma.c index ab0207a428d0..74d45558c97d 100644 --- a/sound/soc/imx/imx-hdmi-dma.c +++ b/sound/soc/imx/imx-hdmi-dma.c @@ -1115,6 +1115,8 @@ static int hdmi_dma_trigger(struct snd_pcm_substream *substream, int cmd) case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + if (!check_hdmi_state()) + return 0; rtd->frame_idx = 0; if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) { appl_bytes = frames_to_bytes(runtime, |