/* hw_params callback NOTE: this may be called not only once per pcm open!  */
static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t size)
/* hw_params callback NOTE: this may be called not only once per pcm open!  */
static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t size)
{
	struct snd_pcm_runtime *runtime = subs->runtime;
	if (runtime->dma_area) {
		if (runtime->dma_bytes >= size)
			return 0;
		vfree(runtime->dma_area);
	}
	runtime->dma_area = vmalloc_32_user(size);
	if (! runtime->dma_area)
		return -ENOMEM;
	runtime->dma_bytes = size;
	return 0;
}