summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAlan Tull <r80115@freescale.com>2010-05-25 16:44:26 -0500
committerAlan Tull <r80115@freescale.com>2010-05-27 15:23:42 -0500
commit9d7d4eaf949824598a84e678b43479d0c4893076 (patch)
treeb0d0edfab97b536d5698209d53d1a3a65ca7c240 /sound
parent2e0a5b93fbcc7659283e221cb5bf8216627979d1 (diff)
ENGR00123838 alsa: fall back to external ram if iram fails
If iram_alloc fails, should warn and fall back to external ram. Signed-off-by: Alan Tull <r80115@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/imx-pcm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/imx/imx-pcm.c b/sound/soc/imx/imx-pcm.c
index 2487d9284ac3..3e8a90da35c2 100644
--- a/sound/soc/imx/imx-pcm.c
+++ b/sound/soc/imx/imx-pcm.c
@@ -579,6 +579,14 @@ static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
else {
buf->area = iram_alloc(size, &buf_paddr);
buf->addr = buf_paddr;
+
+ if (!buf->area) {
+ pr_warning("imx-pcm: Falling back to external ram.\n");
+ UseIram = 0;
+ buf->area =
+ dma_alloc_writecombine(pcm->card->dev, size,
+ &buf->addr, GFP_KERNEL);
+ }
}
if (!buf->area)