In this patch:
1. Register substream into HDMI core driver when HDMI audio PCM is open.
2. Unregister substream out of HDMI core driver when HDMI audio PCM is
close.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
(int)clk_get_rate(hdmi_dma_priv->isfr_clk),
(int)clk_get_rate(hdmi_dma_priv->iahb_clk));
+ ret = mxc_hdmi_register_audio(substream);
+ if (ret < 0) {
+ pr_err("ERROR: HDMI is not ready!\n");
+ return ret;
+ }
+
hdmi_fifo_reset();
ret = snd_pcm_hw_constraint_integer(substream->runtime,
struct imx_hdmi_dma_runtime_data *rtd = runtime->private_data;
hdmi_dma_irq_disable(rtd);
+ mxc_hdmi_unregister_audio(substream);
clk_disable(rtd->iahb_clk);
clk_disable(rtd->isfr_clk);