git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
sound
/
pci
/
als4000.c
diff --git
a/sound/pci/als4000.c
b/sound/pci/als4000.c
index
7b2ff5f
..
8fb55d3
100644
(file)
--- a/
sound/pci/als4000.c
+++ b/
sound/pci/als4000.c
@@
-70,6
+70,7
@@
#include <linux/slab.h>
#include <linux/gameport.h>
#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/gameport.h>
#include <linux/moduleparam.h>
+#include <linux/dma-mapping.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/rawmidi.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/rawmidi.h>
@@
-384,7
+385,7
@@
static snd_pcm_uframes_t snd_als4000_playback_pointer(struct snd_pcm_substream *
* SB IRQ status.
* And do we *really* need the lock here for *reading* SB_DSP4_IRQSTATUS??
* */
* SB IRQ status.
* And do we *really* need the lock here for *reading* SB_DSP4_IRQSTATUS??
* */
-static irqreturn_t snd_als4000_interrupt(int irq, void *dev_id
, struct pt_regs *regs
)
+static irqreturn_t snd_als4000_interrupt(int irq, void *dev_id)
{
struct snd_sb *chip = dev_id;
unsigned gcr_status;
{
struct snd_sb *chip = dev_id;
unsigned gcr_status;
@@
-398,7
+399,7
@@
static irqreturn_t snd_als4000_interrupt(int irq, void *dev_id, struct pt_regs *
if ((gcr_status & 0x40) && (chip->capture_substream)) /* capturing */
snd_pcm_period_elapsed(chip->capture_substream);
if ((gcr_status & 0x10) && (chip->rmidi)) /* MPU401 interrupt */
if ((gcr_status & 0x40) && (chip->capture_substream)) /* capturing */
snd_pcm_period_elapsed(chip->capture_substream);
if ((gcr_status & 0x10) && (chip->rmidi)) /* MPU401 interrupt */
- snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data
, regs
);
+ snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data);
/* release the gcr */
outb(gcr_status, chip->alt_port + 0xe);
/* release the gcr */
outb(gcr_status, chip->alt_port + 0xe);
@@
-688,8
+689,8
@@
static int __devinit snd_card_als4000_probe(struct pci_dev *pci,
return err;
}
/* check, if we can restrict PCI DMA transfers to 24 bits */
return err;
}
/* check, if we can restrict PCI DMA transfers to 24 bits */
- if (pci_set_dma_mask(pci,
0x00ffffff
) < 0 ||
- pci_set_consistent_dma_mask(pci,
0x00ffffff
) < 0) {
+ if (pci_set_dma_mask(pci,
DMA_24BIT_MASK
) < 0 ||
+ pci_set_consistent_dma_mask(pci,
DMA_24BIT_MASK
) < 0) {
snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
pci_disable_device(pci);
return -ENXIO;
snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
pci_disable_device(pci);
return -ENXIO;
@@
-745,8
+746,8
@@
static int __devinit snd_card_als4000_probe(struct pci_dev *pci,
card->shortname, chip->alt_port, chip->irq);
if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_ALS4000,
card->shortname, chip->alt_port, chip->irq);
if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_ALS4000,
- gcr+0x30,
1, pci->irq, 0
,
- &chip->rmidi)) < 0) {
+ gcr+0x30,
MPU401_INFO_INTEGRATED
,
+
pci->irq, 0,
&chip->rmidi)) < 0) {
printk(KERN_ERR "als4000: no MPU-401 device at 0x%lx?\n", gcr+0x30);
goto out_err;
}
printk(KERN_ERR "als4000: no MPU-401 device at 0x%lx?\n", gcr+0x30);
goto out_err;
}
@@
-803,9
+804,9
@@
static int snd_als4000_suspend(struct pci_dev *pci, pm_message_t state)
snd_pcm_suspend_all(chip->pcm);
snd_sbmixer_suspend(chip);
snd_pcm_suspend_all(chip->pcm);
snd_sbmixer_suspend(chip);
- pci_set_power_state(pci, PCI_D3hot);
pci_disable_device(pci);
pci_save_state(pci);
pci_disable_device(pci);
pci_save_state(pci);
+ pci_set_power_state(pci, pci_choose_state(pci, state));
return 0;
}
return 0;
}
@@
-815,9
+816,14
@@
static int snd_als4000_resume(struct pci_dev *pci)
struct snd_card_als4000 *acard = card->private_data;
struct snd_sb *chip = acard->chip;
struct snd_card_als4000 *acard = card->private_data;
struct snd_sb *chip = acard->chip;
- pci_restore_state(pci);
- pci_enable_device(pci);
pci_set_power_state(pci, PCI_D0);
pci_set_power_state(pci, PCI_D0);
+ pci_restore_state(pci);
+ if (pci_enable_device(pci) < 0) {
+ printk(KERN_ERR "als4000: pci_enable_device failed, "
+ "disabling device\n");
+ snd_card_disconnect(card);
+ return -EIO;
+ }
pci_set_master(pci);
snd_als4000_configure(chip);
pci_set_master(pci);
snd_als4000_configure(chip);