summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/imx-cdnhdmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/fsl/imx-cdnhdmi.c')
-rw-r--r--sound/soc/fsl/imx-cdnhdmi.c13
1 files changed, 12 insertions, 1 deletions
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 */ }
};