diff options
author | jassi brar <jassisinghbrar@gmail.com> | 2010-02-22 01:59:02 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-02-22 09:15:15 -0500 |
commit | 10cab262f49ee4574a20ab4c445bc4fdc41c36a8 (patch) | |
tree | ca7242796d35338845dbe1a3a0574129022f2ec5 /sound/soc/atmel | |
parent | d273ebe77a780d3aba1f5b86615af3b0e87b76bf (diff) |
ASoC: Change how suspend and resume obtain the PCM runtime
Currently only the atmel driver make use of snd_soc_dai.runtime field.
If the dais are to be shared among two or more dai_links, the field
must be got rid of.
So, in atmel driver reach the substream via dai_link->pcm so as to
not depend of snd_soc_dai.runtime field.
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/soc/atmel')
-rw-r--r-- | sound/soc/atmel/atmel-pcm.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c index 67a32920af22..fdb255372127 100644 --- a/sound/soc/atmel/atmel-pcm.c +++ b/sound/soc/atmel/atmel-pcm.c | |||
@@ -417,8 +417,10 @@ static void atmel_pcm_free_dma_buffers(struct snd_pcm *pcm) | |||
417 | #ifdef CONFIG_PM | 417 | #ifdef CONFIG_PM |
418 | static int atmel_pcm_suspend(struct snd_soc_dai_link *dai_link) | 418 | static int atmel_pcm_suspend(struct snd_soc_dai_link *dai_link) |
419 | { | 419 | { |
420 | struct snd_soc_dai *dai = dai_link->cpu_dai; | 420 | struct snd_pcm *pcm = dai_link->pcm; |
421 | struct snd_pcm_runtime *runtime = dai->runtime; | 421 | struct snd_pcm_str *stream = &pcm->streams[0]; |
422 | struct snd_pcm_substream *substream = stream->substream; | ||
423 | struct snd_pcm_runtime *runtime = substream->runtime; | ||
422 | struct atmel_runtime_data *prtd; | 424 | struct atmel_runtime_data *prtd; |
423 | struct atmel_pcm_dma_params *params; | 425 | struct atmel_pcm_dma_params *params; |
424 | 426 | ||
@@ -442,8 +444,10 @@ static int atmel_pcm_suspend(struct snd_soc_dai_link *dai_link) | |||
442 | 444 | ||
443 | static int atmel_pcm_resume(struct snd_soc_dai_link *dai_link) | 445 | static int atmel_pcm_resume(struct snd_soc_dai_link *dai_link) |
444 | { | 446 | { |
445 | struct snd_soc_dai *dai = dai_link->cpu_dai; | 447 | struct snd_pcm *pcm = dai_link->pcm; |
446 | struct snd_pcm_runtime *runtime = dai->runtime; | 448 | struct snd_pcm_str *stream = &pcm->streams[0]; |
449 | struct snd_pcm_substream *substream = stream->substream; | ||
450 | struct snd_pcm_runtime *runtime = substream->runtime; | ||
447 | struct atmel_runtime_data *prtd; | 451 | struct atmel_runtime_data *prtd; |
448 | struct atmel_pcm_dma_params *params; | 452 | struct atmel_pcm_dma_params *params; |
449 | 453 | ||