summaryrefslogtreecommitdiffstats
path: root/sound/pci/lola
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-12-09 10:49:16 +0100
committerTakashi Iwai <tiwai@suse.de>2019-12-11 07:25:13 +0100
commit224a40c7511f1095d2b6cfd261cd84510b7cbe43 (patch)
treed4184617ed2b47552239a0b69f03f7ae3ddf576f /sound/pci/lola
parent28d52aa55436630327d938b165b7c37febcbd36f (diff)
downloadlinux-224a40c7511f1095d2b6cfd261cd84510b7cbe43.tar.bz2
ALSA: lola: Use managed buffer allocation
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-45-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/lola')
-rw-r--r--sound/pci/lola/lola_pcm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/pci/lola/lola_pcm.c b/sound/pci/lola/lola_pcm.c
index 856bcca60128..a01a06896084 100644
--- a/sound/pci/lola/lola_pcm.c
+++ b/sound/pci/lola/lola_pcm.c
@@ -282,8 +282,7 @@ static int lola_pcm_hw_params(struct snd_pcm_substream *substream,
str->bufsize = 0;
str->period_bytes = 0;
str->format_verb = 0;
- return snd_pcm_lib_malloc_pages(substream,
- params_buffer_bytes(hw_params));
+ return 0;
}
static int lola_pcm_hw_free(struct snd_pcm_substream *substream)
@@ -296,7 +295,7 @@ static int lola_pcm_hw_free(struct snd_pcm_substream *substream)
lola_stream_reset(chip, str);
lola_cleanup_slave_streams(pcm, str);
mutex_unlock(&chip->open_mutex);
- return snd_pcm_lib_free_pages(substream);
+ return 0;
}
/*
@@ -610,9 +609,9 @@ int lola_create_pcm(struct lola *chip)
snd_pcm_set_ops(pcm, i, &lola_pcm_ops);
}
/* buffer pre-allocation */
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
- &chip->pci->dev,
- 1024 * 64, 32 * 1024 * 1024);
+ snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
+ &chip->pci->dev,
+ 1024 * 64, 32 * 1024 * 1024);
return 0;
}