diff options
author | jassi brar <jassisinghbrar@gmail.com> | 2010-02-22 15:58:04 +0900 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-02-22 14:14:58 +0000 |
commit | d273ebe77a780d3aba1f5b86615af3b0e87b76bf (patch) | |
tree | fd863113cd506960992495659e13aa1c7a4ef315 /sound | |
parent | 6c5f1fed49f96a0600aa9a97ac3faf972c33a341 (diff) | |
download | talos-op-linux-d273ebe77a780d3aba1f5b86615af3b0e87b76bf.tar.gz talos-op-linux-d273ebe77a780d3aba1f5b86615af3b0e87b76bf.zip |
ASoC: Pass dai_link as argument to platform suspend and resume
Passing pointer to relevant dai_link provides easier reach to the
ASoC tree in suspend/resume of snd_soc_platform. It also provides
direct access to the dai at the other end of the dai_link.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/atmel/atmel-pcm.c | 6 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c index 9ef6b96373f5..67a32920af22 100644 --- a/sound/soc/atmel/atmel-pcm.c +++ b/sound/soc/atmel/atmel-pcm.c @@ -415,8 +415,9 @@ static void atmel_pcm_free_dma_buffers(struct snd_pcm *pcm) } #ifdef CONFIG_PM -static int atmel_pcm_suspend(struct snd_soc_dai *dai) +static int atmel_pcm_suspend(struct snd_soc_dai_link *dai_link) { + struct snd_soc_dai *dai = dai_link->cpu_dai; struct snd_pcm_runtime *runtime = dai->runtime; struct atmel_runtime_data *prtd; struct atmel_pcm_dma_params *params; @@ -439,8 +440,9 @@ static int atmel_pcm_suspend(struct snd_soc_dai *dai) return 0; } -static int atmel_pcm_resume(struct snd_soc_dai *dai) +static int atmel_pcm_resume(struct snd_soc_dai_link *dai_link) { + struct snd_soc_dai *dai = dai_link->cpu_dai; struct snd_pcm_runtime *runtime = dai->runtime; struct atmel_runtime_data *prtd; struct atmel_pcm_dma_params *params; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index e1c0336868e1..524a85a73aca 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -854,7 +854,7 @@ static int soc_suspend(struct device *dev) if (cpu_dai->suspend && !cpu_dai->ac97_control) cpu_dai->suspend(cpu_dai); if (platform->suspend) - platform->suspend(cpu_dai); + platform->suspend(&card->dai_link[i]); } /* close any waiting streams and save state */ @@ -943,7 +943,7 @@ static void soc_resume_deferred(struct work_struct *work) if (cpu_dai->resume && !cpu_dai->ac97_control) cpu_dai->resume(cpu_dai); if (platform->resume) - platform->resume(cpu_dai); + platform->resume(&card->dai_link[i]); } if (card->resume_post) |