aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/riptide/riptide.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-12-09 10:49:22 +0100
committerTakashi Iwai <tiwai@suse.de>2019-12-11 07:25:15 +0100
commit0dd323695c7b8dc33c6dc2d23bbe99a8ecd5d627 (patch)
tree2b56e365eafaf6911e2c3096a6a2b1526e0abb18 /sound/pci/riptide/riptide.c
parentALSA: oxygen: Use managed buffer allocation (diff)
downloadlinux-dev-0dd323695c7b8dc33c6dc2d23bbe99a8ecd5d627.tar.xz
linux-dev-0dd323695c7b8dc33c6dc2d23bbe99a8ecd5d627.zip
ALSA: riptide: 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-51-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r--sound/pci/riptide/riptide.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index abcea86045ec..b855de52e198 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -1558,8 +1558,7 @@ snd_riptide_hw_params(struct snd_pcm_substream *substream,
return err;
}
data->sgdbuf = (struct sgd *)sgdlist->area;
- return snd_pcm_lib_malloc_pages(substream,
- params_buffer_bytes(hw_params));
+ return 0;
}
static int snd_riptide_hw_free(struct snd_pcm_substream *substream)
@@ -1581,7 +1580,7 @@ static int snd_riptide_hw_free(struct snd_pcm_substream *substream)
data->sgdlist.area = NULL;
}
}
- return snd_pcm_lib_free_pages(substream);
+ return 0;
}
static int snd_riptide_playback_open(struct snd_pcm_substream *substream)
@@ -1692,9 +1691,8 @@ static int snd_riptide_pcm(struct snd_riptide *chip, int device)
pcm->info_flags = 0;
strcpy(pcm->name, "RIPTIDE");
chip->pcm = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
- &chip->pci->dev,
- 64 * 1024, 128 * 1024);
+ snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
+ &chip->pci->dev, 64 * 1024, 128 * 1024);
return 0;
}