ALSA: dummy - Fake buffer allocations

Instead of allocating the real buffers, use a fake buffer and ignore
read/write in the dummy driver so that we can save the resources.
For mmap, a single page (unique to the direction, though) is reused
to all buffers.

When the app requires to read/write the real buffers, pass fake_buffer=0
module option at loading time.  This will get back to the old behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index bb488b5..ea16e7d 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -518,6 +518,7 @@
     pcm_substreams - Number of PCM substreams assigned to each PCM
                      (default = 8, up to 16)
     hrtimer        - Use hrtimer (=1, default) or system timer (=0)
+    fake_buffer    - Fake buffer allocations (default = 1)
 
     When multiple PCM devices are created, snd-dummy gives different
     behavior to each PCM device:
@@ -526,6 +527,12 @@
       2 = interleaved without mmap 
       3 = non-interleaved without mmap
 
+    As default, snd-dummy drivers doesn't allocate the real buffers
+    but either ignores read/write or mmap a single dummy page to all
+    buffer pages, in order to save the resouces.  If your apps need
+    the read/ written buffer data to be consistent, pass fake_buffer=0
+    option.
+
     The power-management is supported.
 
   Module snd-echo3g