@@ -31,6 +31,7 @@
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
+#include "hdac_hdmi_common.h"
#define KBL_REALTEK_CODEC_DAI "rt5663-aif"
#define KBL_MAXIM_CODEC_DAI "max98927-aif1"
@@ -53,6 +54,7 @@ struct kbl_rt5663_private {
struct list_head hdmi_pcm_list;
struct clk *mclk;
struct clk *sclk;
+ struct device_link *link;
};
enum {
@@ -336,7 +338,8 @@ static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device)
list_add_tail(&pcm->head, &ctx->hdmi_pcm_list);
- return 0;
+ /* Setup a device_link between machine device and HDMI codec device. */
+ return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link);
}
static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd)