X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=sound%2Fpci%2Fsis7019.c;h=7bf6059d50fbc92c367fa6ac0adf12c3e618e226;hb=e46bfaba593c36de591a1153746af6bcb40ef67c;hp=ef7dd290ae05cf815f68c68d7b8d50deeada8d64;hpb=b19efcabb587e5470a423ef778905f47e5a47f1a;p=linux.git diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c index ef7dd290ae05..7bf6059d50fb 100644 --- a/sound/pci/sis7019.c +++ b/sound/pci/sis7019.c @@ -499,18 +499,6 @@ static int sis_substream_close(struct snd_pcm_substream *substream) return 0; } -static int sis_playback_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *hw_params) -{ - return snd_pcm_lib_malloc_pages(substream, - params_buffer_bytes(hw_params)); -} - -static int sis_hw_free(struct snd_pcm_substream *substream) -{ - return snd_pcm_lib_free_pages(substream); -} - static int sis_pcm_playback_prepare(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; @@ -701,11 +689,6 @@ static int sis_capture_hw_params(struct snd_pcm_substream *substream, if (rc) goto out; - rc = snd_pcm_lib_malloc_pages(substream, - params_buffer_bytes(hw_params)); - if (rc < 0) - goto out; - rc = sis_alloc_timing_voice(substream, hw_params); out: @@ -863,9 +846,6 @@ static int sis_pcm_capture_prepare(struct snd_pcm_substream *substream) static const struct snd_pcm_ops sis_playback_ops = { .open = sis_playback_open, .close = sis_substream_close, - .ioctl = snd_pcm_lib_ioctl, - .hw_params = sis_playback_hw_params, - .hw_free = sis_hw_free, .prepare = sis_pcm_playback_prepare, .trigger = sis_pcm_trigger, .pointer = sis_pcm_pointer, @@ -874,9 +854,7 @@ static const struct snd_pcm_ops sis_playback_ops = { static const struct snd_pcm_ops sis_capture_ops = { .open = sis_capture_open, .close = sis_substream_close, - .ioctl = snd_pcm_lib_ioctl, .hw_params = sis_capture_hw_params, - .hw_free = sis_hw_free, .prepare = sis_pcm_capture_prepare, .trigger = sis_pcm_trigger, .pointer = sis_pcm_pointer, @@ -904,9 +882,8 @@ static int sis_pcm_create(struct sis7019 *sis) /* Try to preallocate some memory, but it's not the end of the * world if this fails. */ - snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - &sis->pci->dev, - 64*1024, 128*1024); + snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, + &sis->pci->dev, 64*1024, 128*1024); return 0; } @@ -1006,7 +983,7 @@ static int sis_mixer_create(struct sis7019 *sis) { struct snd_ac97_bus *bus; struct snd_ac97_template ac97; - static struct snd_ac97_bus_ops ops = { + static const struct snd_ac97_bus_ops ops = { .write = sis_ac97_write, .read = sis_ac97_read, }; @@ -1303,7 +1280,7 @@ static int sis_chip_create(struct snd_card *card, { struct sis7019 *sis = card->private_data; struct voice *voice; - static struct snd_device_ops ops = { + static const struct snd_device_ops ops = { .dev_free = sis_dev_free, }; int rc; @@ -1334,7 +1311,7 @@ static int sis_chip_create(struct snd_card *card, } rc = -EIO; - sis->ioaddr = ioremap_nocache(pci_resource_start(pci, 1), 0x4000); + sis->ioaddr = ioremap(pci_resource_start(pci, 1), 0x4000); if (!sis->ioaddr) { dev_err(&pci->dev, "unable to remap MMIO, aborting\n"); goto error_out_cleanup; @@ -1358,6 +1335,7 @@ static int sis_chip_create(struct snd_card *card, } sis->irq = pci->irq; + card->sync_irq = sis->irq; pci_set_master(pci); for (i = 0; i < 64; i++) {