Skip to content

Commit

Permalink
ASoC: SOF: topology: continue parsing when num_hw_configs is not 1
Browse files Browse the repository at this point in the history
Only give warning and continue parsing when num_hw_configs is not 1.
this is needed for HDA dai parsing.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
  • Loading branch information
keyonjie committed Aug 31, 2018
1 parent 05964c6 commit 83c3eb7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sound/soc/sof/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -1786,12 +1786,10 @@ static int sof_link_load(struct snd_soc_component *scomp, int index,
if (!link->no_pcm)
return 0;

/* only support 1 config atm */
if (le32_to_cpu(cfg->num_hw_configs) != 1) {
dev_err(sdev->dev, "error: unexpected DAI config count %d\n",
/* usually we use 1 config, but for HDA it may be 0 ATM */
if (le32_to_cpu(cfg->num_hw_configs) != 1)
dev_warn(sdev->dev, "warn: unexpected DAI config count %d!\n",
le32_to_cpu(cfg->num_hw_configs));
return -EINVAL;
}

/* check we have some tokens - we need at least DAI type */
if (le32_to_cpu(private->size) == 0) {
Expand Down

0 comments on commit 83c3eb7

Please sign in to comment.