On Thu, Dec 18, 2008 at 10:34:53AM -0800, sware wrote:
Patch is to 2.6.27.9 (yesterday), notice .10 is up today, patch should still apply.
Thanks for your patch. Unfortunately all this code has been moved about a lot in the latest code in order to share the code with the non-ASoC AC97 driver so your patch won't apply - see the topic/asoc branch of
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
for the latest code. Could you rebase your work against that, please? Also, please include a Signed-off-by line for patch submissions - for details see Documentation/SubmittingPatches
diff -uprN -X linux-2.6.27.9.orig/Documentation/dontdiff linux-2.6.27.9.orig/sound/soc/pxa/pxa2xx-pcm.c linux-2.6.27.9.snd_modified/sound/soc/pxa/pxa2xx-pcm.c --- linux-2.6.27.9.orig/sound/soc/pxa/pxa2xx-pcm.c 2008-12-13 15:56:16.000000000 -0800 +++ linux-2.6.27.9.snd_modified/sound/soc/pxa/pxa2xx-pcm.c 2008-12-17 14:09:02.000000000 -0800 @@ -137,13 +137,18 @@ static int pxa2xx_pcm_hw_free(struct snd { struct pxa2xx_runtime_data *prtd = substream->runtime->private_data;
- if (prtd && prtd->params)
- if (!prtd)
return 0;
- if (!prtd->params)
return 0;
prtd should always be there - the code should at least complain loudly if it's NULL. params might potentially be hit, though.
*prtd->params->drcmr = 0;
- if (prtd->dma_ch) {
- if (prtd->dma_ch >= 0) { snd_pcm_set_runtime_buffer(substream, NULL); pxa_free_dma(prtd->dma_ch);
prtd->dma_ch = 0;
prtd->dma_ch = -1; /* invalid channel */
}prtd->params = NULL;
This bit is good.
@@ -266,6 +271,8 @@ static int pxa2xx_pcm_close(struct snd_p dma_free_writecombine(substream->pcm->card->dev, PAGE_SIZE, prtd->dma_desc_array, prtd->dma_desc_array_phys); kfree(prtd);
- runtime->private_data = NULL;
- return 0;
}
As is this.