summaryrefslogtreecommitdiffstats
path: root/sound/sparc/dbri.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-12-09 10:49:34 +0100
committerTakashi Iwai <tiwai@suse.de>2019-12-11 07:25:21 +0100
commit786e90b0d0f4ffc16237c05ac5cfc7285bf4e1bc (patch)
tree76f1e91b2a29c920735efc5fe5bb46b2bda522f1 /sound/sparc/dbri.c
parentALSA: sh: Use managed buffer allocation (diff)
downloadlinux-786e90b0d0f4ffc16237c05ac5cfc7285bf4e1bc.tar.xz
linux-786e90b0d0f4ffc16237c05ac5cfc7285bf4e1bc.zip
ALSA: sparc: Use managed buffer allocation
Clean up the drivers with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and dropped. Link: https://lore.kernel.org/r/20191209094943.14984-63-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/sparc/dbri.c')
-rw-r--r--sound/sparc/dbri.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 4911103421ff..315d5a04a33e 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -2099,12 +2099,6 @@ static int snd_dbri_hw_params(struct snd_pcm_substream *substream,
if (ret != 0)
return ret;
- if ((ret = snd_pcm_lib_malloc_pages(substream,
- params_buffer_bytes(hw_params))) < 0) {
- printk(KERN_ERR "malloc_pages failed with %d\n", ret);
- return ret;
- }
-
/* hw_params can get called multiple times. Only map the DMA once.
*/
if (info->dvma_buffer == 0) {
@@ -2151,7 +2145,7 @@ static int snd_dbri_hw_free(struct snd_pcm_substream *substream)
info->pipe = -1;
}
- return snd_pcm_lib_free_pages(substream);
+ return 0;
}
static int snd_dbri_prepare(struct snd_pcm_substream *substream)
@@ -2248,9 +2242,8 @@ static int snd_dbri_pcm(struct snd_card *card)
pcm->info_flags = 0;
strcpy(pcm->name, card->shortname);
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
- NULL,
- 64 * 1024, 64 * 1024);
+ snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
+ NULL, 64 * 1024, 64 * 1024);
return 0;
}