Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283907
b: refs/heads/master
c: 2610ab7
h: refs/heads/master
i:
  283905: 525ad23
  283903: e1e6aed
v: v3
  • Loading branch information
Stephen Warren authored and Mark Brown committed Dec 9, 2011
1 parent 6ebd09f commit 60b0868
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b9b5e11704afb8f05aa6490c3b4bb2cc328647c
refs/heads/master: 2610ab7767bba916f65094d71cfed3b8281cba08
52 changes: 30 additions & 22 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,10 +763,11 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
}
/* no, then find CPU DAI from registered DAIs*/
list_for_each_entry(cpu_dai, &dai_list, list) {
if (!strcmp(cpu_dai->name, dai_link->cpu_dai_name)) {
rtd->cpu_dai = cpu_dai;
goto find_codec;
}
if (strcmp(cpu_dai->name, dai_link->cpu_dai_name))
continue;

rtd->cpu_dai = cpu_dai;
goto find_codec;
}
dev_dbg(card->dev, "CPU DAI %s not registered\n",
dai_link->cpu_dai_name);
Expand All @@ -779,22 +780,28 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)

/* no, then find CODEC from registered CODECs*/
list_for_each_entry(codec, &codec_list, list) {
if (!strcmp(codec->name, dai_link->codec_name)) {
rtd->codec = codec;

/* CODEC found, so find CODEC DAI from registered DAIs from this CODEC*/
list_for_each_entry(codec_dai, &dai_list, list) {
if (codec->dev == codec_dai->dev &&
!strcmp(codec_dai->name, dai_link->codec_dai_name)) {
rtd->codec_dai = codec_dai;
goto find_platform;
}
}
dev_dbg(card->dev, "CODEC DAI %s not registered\n",
dai_link->codec_dai_name);
if (strcmp(codec->name, dai_link->codec_name))
continue;

rtd->codec = codec;

goto find_platform;
/*
* CODEC found, so find CODEC DAI from registered DAIs from
* this CODEC
*/
list_for_each_entry(codec_dai, &dai_list, list) {
if (codec->dev == codec_dai->dev &&
!strcmp(codec_dai->name,
dai_link->codec_dai_name)) {

rtd->codec_dai = codec_dai;
goto find_platform;
}
}
dev_dbg(card->dev, "CODEC DAI %s not registered\n",
dai_link->codec_dai_name);

goto find_platform;
}
dev_dbg(card->dev, "CODEC %s not registered\n",
dai_link->codec_name);
Expand All @@ -811,10 +818,11 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)

/* no, then find one from the set of registered platforms */
list_for_each_entry(platform, &platform_list, list) {
if (!strcmp(platform->name, platform_name)) {
rtd->platform = platform;
goto out;
}
if (strcmp(platform->name, platform_name))
continue;

rtd->platform = platform;
goto out;
}

dev_dbg(card->dev, "platform %s not registered\n",
Expand Down

0 comments on commit 60b0868

Please sign in to comment.