Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142696
b: refs/heads/master
c: 64ab9ba
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Apr 2, 2009
1 parent 8406ea1 commit 4498674
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 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: a7808331f1ea6c7f89a14d1d94eafc62615b997b
refs/heads/master: 64ab9baa00fa99070da993f00173c35a8e99abfa
18 changes: 14 additions & 4 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,11 +767,21 @@ static int soc_resume(struct platform_device *pdev)
{
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
struct snd_soc_card *card = socdev->card;
struct snd_soc_dai *cpu_dai = card->dai_link[0].cpu_dai;

dev_dbg(socdev->dev, "scheduling resume work\n");

if (!schedule_work(&card->deferred_resume_work))
dev_err(socdev->dev, "resume work item may be lost\n");
/* AC97 devices might have other drivers hanging off them so
* need to resume immediately. Other drivers don't have that
* problem and may take a substantial amount of time to resume
* due to I/O costs and anti-pop so handle them out of line.
*/
if (cpu_dai->ac97_control) {
dev_dbg(socdev->dev, "Resuming AC97 immediately\n");
soc_resume_deferred(&card->deferred_resume_work);
} else {
dev_dbg(socdev->dev, "Scheduling resume work\n");
if (!schedule_work(&card->deferred_resume_work))
dev_err(socdev->dev, "resume work item may be lost\n");
}

return 0;
}
Expand Down

0 comments on commit 4498674

Please sign in to comment.