aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_lib.c
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-07-24 15:59:44 -0400
committerPaolo Pisati <paolo.pisati@canonical.com>2012-08-17 04:18:25 -0400
commite9965c2a5d98e0d698afe45394b1c77ecc0c99ad (patch)
tree3cf2e7919ebfc75ca84a452442a7ec8cf3715309 /sound/core/pcm_lib.c
parentad578b9dd93624c073edc24bf5185cd8a90c748d (diff)
Subject: [PATCH 075/104] ALSA: pcm - add support for hostless audio
Allow some PCM devices to be hostless, i.e. there is no PCM data transferred to or from the host CPU. This can be used to minimise power on systems since the CPU can idle/sleep during the PCM device operation (e.g. a phone call where the DAI is between a MODEM and DSP) TODO: cleanup, look at adding a read/write blocker. Singed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r--sound/core/pcm_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 33884426a64..cd69b38622b 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -1961,6 +1961,9 @@ static int pcm_sanity_check(struct snd_pcm_substream *substream)
1961 struct snd_pcm_runtime *runtime; 1961 struct snd_pcm_runtime *runtime;
1962 if (PCM_RUNTIME_CHECK(substream)) 1962 if (PCM_RUNTIME_CHECK(substream))
1963 return -ENXIO; 1963 return -ENXIO;
1964 /* TODO: consider and -EINVAL here */
1965 if (substream->hw_no_buffer)
1966 snd_printd("%s: warning this PCM is host less\n", __func__);
1964 runtime = substream->runtime; 1967 runtime = substream->runtime;
1965 if (snd_BUG_ON(!substream->ops->copy && !runtime->dma_area)) 1968 if (snd_BUG_ON(!substream->ops->copy && !runtime->dma_area))
1966 return -EINVAL; 1969 return -EINVAL;