aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/core/pcm_memory.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c
index 01f8eafebda6..54debc07f5cb 100644
--- a/sound/core/pcm_memory.c
+++ b/sound/core/pcm_memory.c
@@ -51,6 +51,7 @@ static const size_t snd_minimum_buffer = 16384;
51static int preallocate_pcm_pages(struct snd_pcm_substream *substream, size_t size) 51static int preallocate_pcm_pages(struct snd_pcm_substream *substream, size_t size)
52{ 52{
53 struct snd_dma_buffer *dmab = &substream->dma_buffer; 53 struct snd_dma_buffer *dmab = &substream->dma_buffer;
54 size_t orig_size = size;
54 int err; 55 int err;
55 56
56 do { 57 do {
@@ -63,6 +64,10 @@ static int preallocate_pcm_pages(struct snd_pcm_substream *substream, size_t siz
63 size >>= 1; 64 size >>= 1;
64 } while (size >= snd_minimum_buffer); 65 } while (size >= snd_minimum_buffer);
65 dmab->bytes = 0; /* tell error */ 66 dmab->bytes = 0; /* tell error */
67 pr_warn("ALSA pcmC%dD%d%c,%d:%s: cannot preallocate for size %zu\n",
68 substream->pcm->card->number, substream->pcm->device,
69 substream->stream ? 'c' : 'p', substream->number,
70 substream->pcm->name, orig_size);
66 return 0; 71 return 0;
67} 72}
68 73