summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/sound/imx-audio-cdnhdmi.txt2
-rw-r--r--sound/soc/fsl/imx-cdnhdmi.c13
2 files changed, 13 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-cdnhdmi.txt b/Documentation/devicetree/bindings/sound/imx-audio-cdnhdmi.txt
index 2b46b385f021..6d41217dd7be 100644
--- a/Documentation/devicetree/bindings/sound/imx-audio-cdnhdmi.txt
+++ b/Documentation/devicetree/bindings/sound/imx-audio-cdnhdmi.txt
@@ -1,7 +1,7 @@
Freescale i.MX audio complex with Cadence HDMI
Required properties:
-- compatible : "fsl,imx-audio-cdnhdmi"
+- compatible : "fsl,imx-audio-cdnhdmi", "fsl,imx8mq-evk-cdnhdmi"
- model : The user-visible name of this sound complex
- audio-cpu : The phandle of the i.MX SAI controller
- protocol : 0 is hdmi, 1 is dp.
diff --git a/sound/soc/fsl/imx-cdnhdmi.c b/sound/soc/fsl/imx-cdnhdmi.c
index ba0b32f21d9d..8dc9953a26a0 100644
--- a/sound/soc/fsl/imx-cdnhdmi.c
+++ b/sound/soc/fsl/imx-cdnhdmi.c
@@ -23,6 +23,7 @@
#include <sound/soc-dapm.h>
#include <sound/hdmi-codec.h>
#include "../../../drivers/gpu/drm/imx/hdp/imx-hdp.h"
+#include "fsl_sai.h"
#define SUPPORT_RATE_NUM 10
#define SUPPORT_CHANNEL_NUM 10
@@ -98,7 +99,16 @@ static int imx_cdnhdmi_hw_params(struct snd_pcm_substream *substream,
return ret;
}
- ret = snd_soc_dai_set_sysclk(cpu_dai, 0, 0, tx ? SND_SOC_CLOCK_OUT : SND_SOC_CLOCK_IN);
+
+ if (of_device_is_compatible(dev->of_node,
+ "fsl,imx8mq-evk-cdnhdmi"))
+ ret = snd_soc_dai_set_sysclk(cpu_dai, FSL_SAI_CLK_MAST1,
+ 256 * params_rate(params),
+ SND_SOC_CLOCK_OUT);
+ else
+ ret = snd_soc_dai_set_sysclk(cpu_dai, 0,
+ 0,
+ tx ? SND_SOC_CLOCK_OUT : SND_SOC_CLOCK_IN);
if (ret) {
dev_err(dev, "failed to set cpu sysclk: %d\n", ret);
return ret;
@@ -516,6 +526,7 @@ fail:
}
static const struct of_device_id imx_cdnhdmi_dt_ids[] = {
+ { .compatible = "fsl,imx8mq-evk-cdnhdmi", },
{ .compatible = "fsl,imx-audio-cdnhdmi", },
{ /* sentinel */ }
};