diff options
Diffstat (limited to 'sound/pci/lola/lola_pcm.c')
-rw-r--r-- | sound/pci/lola/lola_pcm.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sound/pci/lola/lola_pcm.c b/sound/pci/lola/lola_pcm.c index 684faaf40f31..738ec987000a 100644 --- a/sound/pci/lola/lola_pcm.c +++ b/sound/pci/lola/lola_pcm.c @@ -348,7 +348,7 @@ static int lola_setup_periods(struct lola *chip, struct lola_pcm *pcm, periods = str->bufsize / period_bytes; /* program the initial BDL entries */ - bdl = (__le32 *)(pcm->bdl.area + LOLA_BDL_ENTRY_SIZE * str->index); + bdl = (__le32 *)(pcm->bdl->area + LOLA_BDL_ENTRY_SIZE * str->index); ofs = 0; str->frags = 0; for (i = 0; i < periods; i++) { @@ -433,7 +433,7 @@ static int lola_setup_controller(struct lola *chip, struct lola_pcm *pcm, return -EINVAL; /* set up BDL */ - bdl = pcm->bdl.addr + LOLA_BDL_ENTRY_SIZE * str->index; + bdl = pcm->bdl->addr + LOLA_BDL_ENTRY_SIZE * str->index; lola_dsd_write(chip, str->dsd, BDPL, (u32)bdl); lola_dsd_write(chip, str->dsd, BDPU, upper_32_bits(bdl)); /* program the stream LVI (last valid index) of the BDL */ @@ -588,11 +588,11 @@ int lola_create_pcm(struct lola *chip) int i, err; for (i = 0; i < 2; i++) { - err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, - &chip->pci->dev, - PAGE_SIZE, &chip->pcm[i].bdl); - if (err < 0) - return err; + chip->pcm[i].bdl = + snd_devm_alloc_pages(&chip->pci->dev, SNDRV_DMA_TYPE_DEV, + PAGE_SIZE); + if (!chip->pcm[i].bdl) + return -ENOMEM; } err = snd_pcm_new(chip->card, "Digigram Lola", 0, @@ -614,12 +614,6 @@ int lola_create_pcm(struct lola *chip) return 0; } -void lola_free_pcm(struct lola *chip) -{ - snd_dma_free_pages(&chip->pcm[0].bdl); - snd_dma_free_pages(&chip->pcm[1].bdl); -} - /* */ |