ASOC: ATMEL: Getting cpu_dai method change
PATCH 2/3 ASOC: ATMEL: Getting cpu_dai method change
[PATCH 2/3] ASOC: ATMEL: Getting cpu_dai method change
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.
--- sound/soc/atmel/atmel-pcm.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
From 90c3aa85e17d4533086cc7f7cde10027c5d68996 Mon Sep 17 00:00:00 2001
From: Jassi Brar <[email protected]>
Date: Fri, 19 Feb 2010 17:54:21 +0900
Subject: [PATCH 2/3] ASOC: ATMEL: Getting cpu_dai method change
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.
--- sound/soc/atmel/atmel-pcm.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
sound/soc/atmel/atmel-pcm.c +8 -4
@@ -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;
@@ -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;
Signature · 1 line
1.6.2.5
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel