Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120299
b: refs/heads/master
c: 6b05eda
h: refs/heads/master
i:
  120297: 0a58d16
  120295: 6e0e447
v: v3
  • Loading branch information
Mark Brown committed Dec 9, 2008
1 parent b449b34 commit c214e3f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 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: 435c5e2588893e3f7aba0bd4de67991bf00b3c9d
refs/heads/master: 6b05eda6383d89bffc21da654d148733e7839540
27 changes: 26 additions & 1 deletion trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
struct snd_soc_codec_device *codec_dev = card->socdev->codec_dev;
struct snd_soc_platform *platform;
struct snd_soc_dai *dai;
int i, found, ret;
int i, found, ret, ac97;

if (card->instantiated)
return;
Expand All @@ -805,6 +805,7 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
return;
}

ac97 = 0;
for (i = 0; i < card->num_links; i++) {
found = 0;
list_for_each_entry(dai, &dai_list, list)
Expand All @@ -817,8 +818,32 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
card->dai_link[i].cpu_dai->name);
return;
}

if (card->dai_link[i].cpu_dai->ac97_control)
ac97 = 1;
}

/* If we have AC97 in the system then don't wait for the
* codec. This will need revisiting if we have to handle
* systems with mixed AC97 and non-AC97 parts. Only check for
* DAIs currently; we can't do this per link since some AC97
* codecs have non-AC97 DAIs.
*/
if (!ac97)
for (i = 0; i < card->num_links; i++) {
found = 0;
list_for_each_entry(dai, &dai_list, list)
if (card->dai_link[i].codec_dai == dai) {
found = 1;
break;
}
if (!found) {
dev_dbg(card->dev, "DAI %s not registered\n",
card->dai_link[i].codec_dai->name);
return;
}
}

/* Note that we do not current check for codec components */

dev_dbg(card->dev, "All components present, instantiating\n");
Expand Down

0 comments on commit c214e3f

Please sign in to comment.