[alsa-cvslog] CVS: alsa-kernel/parisc harmony.c,1.15,1.16
Brought to you by:
perex
From: Takashi I. <ti...@us...> - 2004-07-30 13:23:14
|
Update of /cvsroot/alsa/alsa-kernel/parisc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7878/parisc Modified Files: harmony.c Log Message: Clean up DMA buffer allocation routines. - snd_dma_alloc_pages*() take the device type and device pointer directly as arguments. snd_dma_free_pages() takes only dma_buffer instance. - snd_dma_device struct is removed in each driver's instance (no longer needed due to the change above). - snd_malloc_pages_fallback() is removed since it's no longer used. - The buffer reservation / preallocation in snd-page-alloc module is performed only when the buffer id is given. Normal PCM buffers won't be reserved any more (unless the driver specifies). The module keeps the linked list of free-reserved buffers, instead of the whole buffers Reservation is done via snd_dma_reserve_buf(), and retrieved via snd_dma_get_reserved_buf()). - Other misc clean-ups/fixes. Index: harmony.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/parisc/harmony.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- harmony.c 20 Jul 2004 15:54:23 -0000 1.15 +++ harmony.c 30 Jul 2004 13:23:01 -0000 1.16 @@ -806,13 +806,17 @@ /* initialize graveyard buffer */ harmony->dma_dev.type = SNDRV_DMA_TYPE_DEV; harmony->dma_dev.dev = &harmony->pa_dev->dev; - err = snd_dma_alloc_pages(&harmony->dma_dev, HARMONY_BUF_SIZE*GRAVEYARD_BUFS, + err = snd_dma_alloc_pages(harmony->dma_dev.type, + harmony->dma_dev.dev, + HARMONY_BUF_SIZE*GRAVEYARD_BUFS, &harmony->graveyard_dma); if (err == -ENOMEM) { /* use continuous buffers */ harmony->dma_dev.type = SNDRV_DMA_TYPE_CONTINUOUS; harmony->dma_dev.dev = snd_dma_continuous_data(GFP_KERNEL); - err = snd_dma_alloc_pages(&harmony->dma_dev, HARMONY_BUF_SIZE*GRAVEYARD_BUFS, + err = snd_dma_alloc_pages(harmony->dma_dev.type, + harmony->dma_dev.dev, + HARMONY_BUF_SIZE*GRAVEYARD_BUFS, &harmony->graveyard_dma); } if (err < 0) { @@ -822,7 +826,9 @@ harmony->graveyard_count = 0; /* initialize silence buffers */ - err = snd_dma_alloc_pages(&harmony->dma_dev, HARMONY_BUF_SIZE*SILENCE_BUFS, + err = snd_dma_alloc_pages(harmony->dma_dev.type, + harmony->dma_dev.dev, + HARMONY_BUF_SIZE*SILENCE_BUFS, &harmony->silence_dma); if (err < 0) { printk(KERN_ERR PFX "can't allocate silence buffer\n"); |