diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-11-05 16:18:42 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-11-06 15:47:42 +0100 |
commit | a3f4f2d5d02095d098ff03c4d0bdbae2e53a5bba (patch) | |
tree | 2b010bf9dc8646e6ba99587912c22a9980e5f516 /sound/firewire/isight.c | |
parent | b29e5ef15115cd77cdd250b7ec4fdb4cb8d40ddd (diff) | |
download | linux-a3f4f2d5d02095d098ff03c4d0bdbae2e53a5bba.tar.gz linux-a3f4f2d5d02095d098ff03c4d0bdbae2e53a5bba.tar.bz2 linux-a3f4f2d5d02095d098ff03c4d0bdbae2e53a5bba.zip |
ALSA: firewire: Convert to the common vmalloc memalloc
The recent change (*) in the ALSA memalloc core allows us to drop the
special vmalloc-specific allocation and page handling. This patch
coverts to the common code.
(*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation
support
7e8edae39fd1: ALSA: pcm: Handle special page mapping in the
default mmap handler
Link: https://lore.kernel.org/r/20191105151856.10785-11-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/isight.c')
-rw-r--r-- | sound/firewire/isight.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c index a16beda7c530..d9f1b962bfef 100644 --- a/sound/firewire/isight.c +++ b/sound/firewire/isight.c @@ -288,8 +288,7 @@ static int isight_hw_params(struct snd_pcm_substream *substream, struct isight *isight = substream->private_data; int err; - err = snd_pcm_lib_alloc_vmalloc_buffer(substream, - params_buffer_bytes(hw_params)); + err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); if (err < 0) return err; @@ -337,7 +336,7 @@ static int isight_hw_free(struct snd_pcm_substream *substream) isight_stop_streaming(isight); mutex_unlock(&isight->mutex); - return snd_pcm_lib_free_vmalloc_buffer(substream); + return snd_pcm_lib_free_pages(substream); } static int isight_start_streaming(struct isight *isight) @@ -453,7 +452,6 @@ static int isight_create_pcm(struct isight *isight) .prepare = isight_prepare, .trigger = isight_trigger, .pointer = isight_pointer, - .page = snd_pcm_lib_get_vmalloc_page, }; struct snd_pcm *pcm; int err; @@ -465,6 +463,8 @@ static int isight_create_pcm(struct isight *isight) strcpy(pcm->name, "iSight"); isight->pcm = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; isight->pcm->ops = &ops; + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_VMALLOC, + NULL, 0, 0); return 0; } |