Skip to content

Commit

Permalink
ASoC: Change how suspend and resume obtain the PCM runtime
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jassi brar authored and Mark Brown committed Feb 22, 2010
1 parent d273ebe commit 10cab26
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sound/soc/atmel/atmel-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,10 @@ static void atmel_pcm_free_dma_buffers(struct snd_pcm *pcm)
#ifdef CONFIG_PM
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 snd_pcm *pcm = dai_link->pcm;
struct snd_pcm_str *stream = &pcm->streams[0];
struct snd_pcm_substream *substream = stream->substream;
struct snd_pcm_runtime *runtime = substream->runtime;
struct atmel_runtime_data *prtd;
struct atmel_pcm_dma_params *params;

Expand All @@ -442,8 +444,10 @@ static int atmel_pcm_suspend(struct snd_soc_dai_link *dai_link)

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 snd_pcm *pcm = dai_link->pcm;
struct snd_pcm_str *stream = &pcm->streams[0];
struct snd_pcm_substream *substream = stream->substream;
struct snd_pcm_runtime *runtime = substream->runtime;
struct atmel_runtime_data *prtd;
struct atmel_pcm_dma_params *params;

Expand Down

0 comments on commit 10cab26

Please sign in to comment.