aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/cml_rt1011_rt5682.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/intel/boards/cml_rt1011_rt5682.c')
-rw-r--r--sound/soc/intel/boards/cml_rt1011_rt5682.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sound/soc/intel/boards/cml_rt1011_rt5682.c b/sound/soc/intel/boards/cml_rt1011_rt5682.c
index a22f97234201..dd80d0186a6c 100644
--- a/sound/soc/intel/boards/cml_rt1011_rt5682.c
+++ b/sound/soc/intel/boards/cml_rt1011_rt5682.c
@@ -11,7 +11,6 @@
#include <linux/clk.h>
#include <linux/dmi.h>
#include <linux/slab.h>
-#include <asm/cpu_device_id.h>
#include <linux/acpi.h>
#include <sound/core.h>
#include <sound/jack.h>
@@ -242,12 +241,15 @@ static int sof_card_late_probe(struct snd_soc_card *card)
struct hdmi_pcm *pcm;
int ret, i = 0;
- pcm = list_first_entry(&ctx->hdmi_pcm_list, struct hdmi_pcm,
- head);
- component = pcm->codec_dai->component;
+ if (list_empty(&ctx->hdmi_pcm_list))
+ return -EINVAL;
- if (ctx->common_hdmi_codec_drv)
+ if (ctx->common_hdmi_codec_drv) {
+ pcm = list_first_entry(&ctx->hdmi_pcm_list, struct hdmi_pcm,
+ head);
+ component = pcm->codec_dai->component;
return hda_dsp_hdmi_build_controls(card, component);
+ }
list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
component = pcm->codec_dai->component;
@@ -266,8 +268,6 @@ static int sof_card_late_probe(struct snd_soc_card *card)
i++;
}
- if (!component)
- return -EINVAL;
return hdac_hdmi_jack_port_init(component, &card->dapm);
}
@@ -406,19 +406,19 @@ static struct snd_soc_dai_link cml_rt1011_rt5682_dailink[] = {
static struct snd_soc_codec_conf rt1011_conf[] = {
{
- .dev_name = "i2c-10EC1011:00",
+ .dlc = COMP_CODEC_CONF("i2c-10EC1011:00"),
.name_prefix = "WL",
},
{
- .dev_name = "i2c-10EC1011:01",
+ .dlc = COMP_CODEC_CONF("i2c-10EC1011:01"),
.name_prefix = "WR",
},
{
- .dev_name = "i2c-10EC1011:02",
+ .dlc = COMP_CODEC_CONF("i2c-10EC1011:02"),
.name_prefix = "TL",
},
{
- .dev_name = "i2c-10EC1011:03",
+ .dlc = COMP_CODEC_CONF("i2c-10EC1011:03"),
.name_prefix = "TR",
},
};