X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=sound%2Fmips%2Fau1x00.c;h=ee0741f9eb5322c26f782a9fe59460db1568b1cf;hb=2a56f51bcc3650ecff806450f7fdab5edf57618f;hp=961453b77fc935cc95e4fafc9cf16889d20f4d92;hpb=bb160b850d7e285f8b15906d9c0d1916acfdb953;p=safe%2Fjmp%2Flinux-2.6 diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c index 961453b..ee0741f 100644 --- a/sound/mips/au1x00.c +++ b/sound/mips/au1x00.c @@ -36,7 +36,6 @@ #include #include -#include #include #include #include @@ -220,7 +219,7 @@ au1000_dma_start(struct audio_stream *stream) } static irqreturn_t -au1000_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs) +au1000_dma_interrupt(int irq, void *dev_id) { struct audio_stream *stream = (struct audio_stream *) dev_id; struct snd_pcm_substream *substream = stream->substream; @@ -258,7 +257,7 @@ au1000_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs) static unsigned int rates[] = {8000, 11025, 16000, 22050}; static struct snd_pcm_hw_constraint_list hw_constraints_rates = { - .count = sizeof(rates) / sizeof(rates[0]), + .count = ARRAY_SIZE(rates), .list = rates, .mask = 0, }; @@ -465,13 +464,13 @@ snd_au1000_pcm_new(struct snd_au1000 *au1000) flags = claim_dma_lock(); if ((au1000->stream[PLAYBACK]->dma = request_au1000_dma(DMA_ID_AC97C_TX, - "AC97 TX", au1000_dma_interrupt, SA_INTERRUPT, + "AC97 TX", au1000_dma_interrupt, IRQF_DISABLED, au1000->stream[PLAYBACK])) < 0) { release_dma_lock(flags); return -EBUSY; } if ((au1000->stream[CAPTURE]->dma = request_au1000_dma(DMA_ID_AC97C_RX, - "AC97 RX", au1000_dma_interrupt, SA_INTERRUPT, + "AC97 RX", au1000_dma_interrupt, IRQF_DISABLED, au1000->stream[CAPTURE])) < 0){ release_dma_lock(flags); return -EBUSY; @@ -498,8 +497,8 @@ snd_au1000_ac97_read(struct snd_ac97 *ac97, unsigned short reg) int i; spin_lock(&au1000->ac97_lock); -/* would rather use the interupt than this polling but it works and I can't -get the interupt driven case to work efficiently */ +/* would rather use the interrupt than this polling but it works and I can't +get the interrupt driven case to work efficiently */ for (i = 0; i < 0x5000; i++) if (!(au1000->ac97_ioport->status & AC97C_CP)) break; @@ -535,8 +534,8 @@ snd_au1000_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short int i; spin_lock(&au1000->ac97_lock); -/* would rather use the interupt than this polling but it works and I can't -get the interupt driven case to work efficiently */ +/* would rather use the interrupt than this polling but it works and I can't +get the interrupt driven case to work efficiently */ for (i = 0; i < 0x5000; i++) if (!(au1000->ac97_ioport->status & AC97C_CP)) break; @@ -561,12 +560,13 @@ snd_au1000_ac97_new(struct snd_au1000 *au1000) .read = snd_au1000_ac97_read, }; - if ((au1000->ac97_res_port = request_region(AC97C_CONFIG, - sizeof(struct au1000_ac97_reg), "Au1x00 AC97")) == NULL) { + if ((au1000->ac97_res_port = request_mem_region(CPHYSADDR(AC97C_CONFIG), + 0x100000, "Au1x00 AC97")) == NULL) { snd_printk(KERN_ERR "ALSA AC97: can't grap AC97 port\n"); return -EBUSY; } - au1000->ac97_ioport = (struct au1000_ac97_reg *) au1000->ac97_res_port->start; + au1000->ac97_ioport = (struct au1000_ac97_reg *) + KSEG1ADDR(au1000->ac97_res_port->start); spin_lock_init(&au1000->ac97_lock);