]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - sound/ppc/snd_ps3.c
Merge tag 'thermal-v5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/therm...
[linux.git] / sound / ppc / snd_ps3.c
index c213eb7ca23c77c5c1be2c5c1715e9159a87db7c..6d2a33b8faa0eca923e84ba88b32a05c8bf1c3cc 100644 (file)
@@ -535,22 +535,6 @@ static int snd_ps3_pcm_close(struct snd_pcm_substream *substream)
        return 0;
 };
 
-static int snd_ps3_pcm_hw_params(struct snd_pcm_substream *substream,
-                                struct snd_pcm_hw_params *hw_params)
-{
-       size_t size;
-
-       /* alloc transport buffer */
-       size = params_buffer_bytes(hw_params);
-       snd_pcm_lib_malloc_pages(substream, size);
-       return 0;
-};
-
-static int snd_ps3_pcm_hw_free(struct snd_pcm_substream *substream)
-{
-       return snd_pcm_lib_free_pages(substream);
-};
-
 static int snd_ps3_delay_to_bytes(struct snd_pcm_substream *substream,
                                  unsigned int delay_ms)
 {
@@ -731,7 +715,7 @@ static int snd_ps3_spdif_default_put(struct snd_kcontrol *kcontrol,
        return 0;
 }
 
-static struct snd_kcontrol_new spdif_ctls[] = {
+static const struct snd_kcontrol_new spdif_ctls[] = {
        {
                .access = SNDRV_CTL_ELEM_ACCESS_READ,
                .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -758,9 +742,6 @@ static struct snd_kcontrol_new spdif_ctls[] = {
 static const struct snd_pcm_ops snd_ps3_pcm_spdif_ops = {
        .open = snd_ps3_pcm_open,
        .close = snd_ps3_pcm_close,
-       .ioctl = snd_pcm_lib_ioctl,
-       .hw_params = snd_ps3_pcm_hw_params,
-       .hw_free = snd_ps3_pcm_hw_free,
        .prepare = snd_ps3_pcm_prepare,
        .trigger = snd_ps3_pcm_trigger,
        .pointer = snd_ps3_pcm_pointer,
@@ -1007,11 +988,11 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
 
        the_card.pcm->info_flags = SNDRV_PCM_INFO_NONINTERLEAVED;
        /* pre-alloc PCM DMA buffer*/
-       snd_pcm_lib_preallocate_pages_for_all(the_card.pcm,
-                                       SNDRV_DMA_TYPE_DEV,
-                                       &dev->core,
-                                       SND_PS3_PCM_PREALLOC_SIZE,
-                                       SND_PS3_PCM_PREALLOC_SIZE);
+       snd_pcm_set_managed_buffer_all(the_card.pcm,
+                                      SNDRV_DMA_TYPE_DEV,
+                                      &dev->core,
+                                      SND_PS3_PCM_PREALLOC_SIZE,
+                                      SND_PS3_PCM_PREALLOC_SIZE);
 
        /*
         * allocate null buffer