提交 155dbfd8 编写于 作者: L Linus Torvalds

Merge commit master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa of HEAD

* HEAD:
  [ALSA] Fix undefined (missing) references in ISA MIRO sound driver
  [ALSA] make sound/isa/gus/gusextreme.c:devices static
  [ALSA] hda-codec - Fix missing array terminators in AD1988 codec support
  [ALSA] Fix a deadlock in snd-rtctimer
  [ALSA] Fix section mismatch errors in ALSA PCI drivers
  [ALSA] remove unused snd_minor.name field
  [ALSA] Fix no mpu401 interface can cause hard freeze
  [ALSA] wavefront: fix __init/__devinit confusion
  [ALSA] Fix workaround for AD1988A rev2 codec
  [ALSA] trivial: Code clean up of i2c/cs8427.c
  [ALSA] sound/i2c/cs8427.c: don't export a static function
  [ALSA] intel8x0 - Add ac97 quirk for Tyan Thunder K8WE board
  [ALSA] Reduce the string length of Terratec Aureon 7.1 Universe
  [ALSA] sound/pci/Kconfig - fix broken indenting for SND_FM801_TEA575X
  [ALSA] fix the SND_FM801_TEA575X dependencies
  [ALSA] Memory leak in sound/pcmcia/pdaudiocf/pdaudiocf.c
...@@ -1172,7 +1172,7 @@ ...@@ -1172,7 +1172,7 @@
} }
/* PCI IDs */ /* PCI IDs */
static struct pci_device_id snd_mychip_ids[] __devinitdata = { static struct pci_device_id snd_mychip_ids[] = {
{ PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
.... ....
...@@ -1565,7 +1565,7 @@ ...@@ -1565,7 +1565,7 @@
<informalexample> <informalexample>
<programlisting> <programlisting>
<![CDATA[ <![CDATA[
static struct pci_device_id snd_mychip_ids[] __devinitdata = { static struct pci_device_id snd_mychip_ids[] = {
{ PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
.... ....
......
...@@ -188,8 +188,6 @@ struct snd_minor { ...@@ -188,8 +188,6 @@ struct snd_minor {
int device; /* device number */ int device; /* device number */
const struct file_operations *f_ops; /* file operations */ const struct file_operations *f_ops; /* file operations */
void *private_data; /* private data for f_ops->open */ void *private_data; /* private data for f_ops->open */
char name[0]; /* device name (keep at the end of
structure) */
}; };
/* sound.c */ /* sound.c */
......
...@@ -1704,6 +1704,7 @@ struct snd_cs46xx { ...@@ -1704,6 +1704,7 @@ struct snd_cs46xx {
int acpi_port; int acpi_port;
struct snd_kcontrol *eapd_switch; /* for amplifier hack */ struct snd_kcontrol *eapd_switch; /* for amplifier hack */
int accept_valid; /* accept mmap valid (for OSS) */ int accept_valid; /* accept mmap valid (for OSS) */
int in_suspend;
struct gameport *gameport; struct gameport *gameport;
......
...@@ -244,7 +244,7 @@ int snd_register_device(int type, struct snd_card *card, int dev, ...@@ -244,7 +244,7 @@ int snd_register_device(int type, struct snd_card *card, int dev,
struct device *device = NULL; struct device *device = NULL;
snd_assert(name, return -EINVAL); snd_assert(name, return -EINVAL);
preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL); preg = kmalloc(sizeof *preg, GFP_KERNEL);
if (preg == NULL) if (preg == NULL)
return -ENOMEM; return -ENOMEM;
preg->type = type; preg->type = type;
...@@ -252,7 +252,6 @@ int snd_register_device(int type, struct snd_card *card, int dev, ...@@ -252,7 +252,6 @@ int snd_register_device(int type, struct snd_card *card, int dev,
preg->device = dev; preg->device = dev;
preg->f_ops = f_ops; preg->f_ops = f_ops;
preg->private_data = private_data; preg->private_data = private_data;
strcpy(preg->name, name);
mutex_lock(&sound_mutex); mutex_lock(&sound_mutex);
#ifdef CONFIG_SND_DYNAMIC_MINORS #ifdef CONFIG_SND_DYNAMIC_MINORS
minor = snd_find_free_minor(); minor = snd_find_free_minor();
......
...@@ -628,8 +628,9 @@ static void snd_timer_tasklet(unsigned long arg) ...@@ -628,8 +628,9 @@ static void snd_timer_tasklet(unsigned long arg)
struct snd_timer_instance *ti; struct snd_timer_instance *ti;
struct list_head *p; struct list_head *p;
unsigned long resolution, ticks; unsigned long resolution, ticks;
unsigned long flags;
spin_lock(&timer->lock); spin_lock_irqsave(&timer->lock, flags);
/* now process all callbacks */ /* now process all callbacks */
while (!list_empty(&timer->sack_list_head)) { while (!list_empty(&timer->sack_list_head)) {
p = timer->sack_list_head.next; /* get first item */ p = timer->sack_list_head.next; /* get first item */
...@@ -649,7 +650,7 @@ static void snd_timer_tasklet(unsigned long arg) ...@@ -649,7 +650,7 @@ static void snd_timer_tasklet(unsigned long arg)
spin_lock(&timer->lock); spin_lock(&timer->lock);
ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK; ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK;
} }
spin_unlock(&timer->lock); spin_unlock_irqrestore(&timer->lock, flags);
} }
/* /*
......
...@@ -76,23 +76,28 @@ int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg, ...@@ -76,23 +76,28 @@ int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg,
buf[0] = reg & 0x7f; buf[0] = reg & 0x7f;
buf[1] = val; buf[1] = val;
if ((err = snd_i2c_sendbytes(device, buf, 2)) != 2) { if ((err = snd_i2c_sendbytes(device, buf, 2)) != 2) {
snd_printk(KERN_ERR "unable to send bytes 0x%02x:0x%02x to CS8427 (%i)\n", buf[0], buf[1], err); snd_printk(KERN_ERR "unable to send bytes 0x%02x:0x%02x "
"to CS8427 (%i)\n", buf[0], buf[1], err);
return err < 0 ? err : -EIO; return err < 0 ? err : -EIO;
} }
return 0; return 0;
} }
EXPORT_SYMBOL(snd_cs8427_reg_write);
static int snd_cs8427_reg_read(struct snd_i2c_device *device, unsigned char reg) static int snd_cs8427_reg_read(struct snd_i2c_device *device, unsigned char reg)
{ {
int err; int err;
unsigned char buf; unsigned char buf;
if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) { if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) {
snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg); snd_printk(KERN_ERR "unable to send register 0x%x byte "
"to CS8427\n", reg);
return err < 0 ? err : -EIO; return err < 0 ? err : -EIO;
} }
if ((err = snd_i2c_readbytes(device, &buf, 1)) != 1) { if ((err = snd_i2c_readbytes(device, &buf, 1)) != 1) {
snd_printk(KERN_ERR "unable to read register 0x%x byte from CS8427\n", reg); snd_printk(KERN_ERR "unable to read register 0x%x byte "
"from CS8427\n", reg);
return err < 0 ? err : -EIO; return err < 0 ? err : -EIO;
} }
return buf; return buf;
...@@ -121,7 +126,8 @@ static int snd_cs8427_send_corudata(struct snd_i2c_device *device, ...@@ -121,7 +126,8 @@ static int snd_cs8427_send_corudata(struct snd_i2c_device *device,
int count) int count)
{ {
struct cs8427 *chip = device->private_data; struct cs8427 *chip = device->private_data;
char *hw_data = udata ? chip->playback.hw_udata : chip->playback.hw_status; char *hw_data = udata ?
chip->playback.hw_udata : chip->playback.hw_status;
char data[32]; char data[32];
int err, idx; int err, idx;
...@@ -134,11 +140,11 @@ static int snd_cs8427_send_corudata(struct snd_i2c_device *device, ...@@ -134,11 +140,11 @@ static int snd_cs8427_send_corudata(struct snd_i2c_device *device,
memset(data, 0, sizeof(data)); memset(data, 0, sizeof(data));
if (memcmp(hw_data, data, count) == 0) { if (memcmp(hw_data, data, count) == 0) {
chip->regmap[CS8427_REG_UDATABUF] &= ~CS8427_UBMMASK; chip->regmap[CS8427_REG_UDATABUF] &= ~CS8427_UBMMASK;
chip->regmap[CS8427_REG_UDATABUF] |= CS8427_UBMZEROS | CS8427_EFTUI; chip->regmap[CS8427_REG_UDATABUF] |= CS8427_UBMZEROS |
if ((err = snd_cs8427_reg_write(device, CS8427_REG_UDATABUF, CS8427_EFTUI;
chip->regmap[CS8427_REG_UDATABUF])) < 0) err = snd_cs8427_reg_write(device, CS8427_REG_UDATABUF,
return err; chip->regmap[CS8427_REG_UDATABUF]);
return 0; return err < 0 ? err : 0;
} }
} }
data[0] = CS8427_REG_AUTOINC | CS8427_REG_CORU_DATABUF; data[0] = CS8427_REG_AUTOINC | CS8427_REG_CORU_DATABUF;
...@@ -161,24 +167,32 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, ...@@ -161,24 +167,32 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
{ {
static unsigned char initvals1[] = { static unsigned char initvals1[] = {
CS8427_REG_CONTROL1 | CS8427_REG_AUTOINC, CS8427_REG_CONTROL1 | CS8427_REG_AUTOINC,
/* CS8427_REG_CONTROL1: RMCK to OMCK, valid PCM audio, disable mutes, TCBL=output */ /* CS8427_REG_CONTROL1: RMCK to OMCK, valid PCM audio, disable mutes,
TCBL=output */
CS8427_SWCLK | CS8427_TCBLDIR, CS8427_SWCLK | CS8427_TCBLDIR,
/* CS8427_REG_CONTROL2: hold last valid audio sample, RMCK=256*Fs, normal stereo operation */ /* CS8427_REG_CONTROL2: hold last valid audio sample, RMCK=256*Fs,
normal stereo operation */
0x00, 0x00,
/* CS8427_REG_DATAFLOW: output drivers normal operation, Tx<=serial, Rx=>serial */ /* CS8427_REG_DATAFLOW: output drivers normal operation, Tx<=serial,
Rx=>serial */
CS8427_TXDSERIAL | CS8427_SPDAES3RECEIVER, CS8427_TXDSERIAL | CS8427_SPDAES3RECEIVER,
/* CS8427_REG_CLOCKSOURCE: Run off, CMCK=256*Fs, output time base = OMCK, input time base = /* CS8427_REG_CLOCKSOURCE: Run off, CMCK=256*Fs,
recovered input clock, recovered input clock source is ILRCK changed to AES3INPUT (workaround, see snd_cs8427_reset) */ output time base = OMCK, input time base = recovered input clock,
recovered input clock source is ILRCK changed to AES3INPUT
(workaround, see snd_cs8427_reset) */
CS8427_RXDILRCK, CS8427_RXDILRCK,
/* CS8427_REG_SERIALINPUT: Serial audio input port data format = I2S, 24-bit, 64*Fsi */ /* CS8427_REG_SERIALINPUT: Serial audio input port data format = I2S,
24-bit, 64*Fsi */
CS8427_SIDEL | CS8427_SILRPOL, CS8427_SIDEL | CS8427_SILRPOL,
/* CS8427_REG_SERIALOUTPUT: Serial audio output port data format = I2S, 24-bit, 64*Fsi */ /* CS8427_REG_SERIALOUTPUT: Serial audio output port data format
= I2S, 24-bit, 64*Fsi */
CS8427_SODEL | CS8427_SOLRPOL, CS8427_SODEL | CS8427_SOLRPOL,
}; };
static unsigned char initvals2[] = { static unsigned char initvals2[] = {
CS8427_REG_RECVERRMASK | CS8427_REG_AUTOINC, CS8427_REG_RECVERRMASK | CS8427_REG_AUTOINC,
/* CS8427_REG_RECVERRMASK: unmask the input PLL clock, V, confidence, biphase, parity status bits */ /* CS8427_REG_RECVERRMASK: unmask the input PLL clock, V, confidence,
/* CS8427_UNLOCK | CS8427_V | CS8427_CONF | CS8427_BIP | CS8427_PAR, */ biphase, parity status bits */
/* CS8427_UNLOCK | CS8427_V | CS8427_CONF | CS8427_BIP | CS8427_PAR,*/
0xff, /* set everything */ 0xff, /* set everything */
/* CS8427_REG_CSDATABUF: /* CS8427_REG_CSDATABUF:
Registers 32-55 window to CS buffer Registers 32-55 window to CS buffer
...@@ -201,7 +215,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, ...@@ -201,7 +215,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
struct snd_i2c_device *device; struct snd_i2c_device *device;
unsigned char buf[24]; unsigned char buf[24];
if ((err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7), if ((err = snd_i2c_device_create(bus, "CS8427",
CS8427_ADDR | (addr & 7),
&device)) < 0) &device)) < 0)
return err; return err;
chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL); chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL);
...@@ -212,8 +227,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, ...@@ -212,8 +227,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
device->private_free = snd_cs8427_free; device->private_free = snd_cs8427_free;
snd_i2c_lock(bus); snd_i2c_lock(bus);
if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) != err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER);
CS8427_VER8427A) { if (err != CS8427_VER8427A) {
snd_i2c_unlock(bus); snd_i2c_unlock(bus);
snd_printk(KERN_ERR "unable to find CS8427 signature " snd_printk(KERN_ERR "unable to find CS8427 signature "
"(expected 0x%x, read 0x%x),\n", "(expected 0x%x, read 0x%x),\n",
...@@ -222,7 +237,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, ...@@ -222,7 +237,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
return -EFAULT; return -EFAULT;
} }
/* turn off run bit while making changes to configuration */ /* turn off run bit while making changes to configuration */
if ((err = snd_cs8427_reg_write(device, CS8427_REG_CLOCKSOURCE, 0x00)) < 0) err = snd_cs8427_reg_write(device, CS8427_REG_CLOCKSOURCE, 0x00);
if (err < 0)
goto __fail; goto __fail;
/* send initial values */ /* send initial values */
memcpy(chip->regmap + (initvals1[0] & 0x7f), initvals1 + 1, 6); memcpy(chip->regmap + (initvals1[0] & 0x7f), initvals1 + 1, 6);
...@@ -282,6 +298,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, ...@@ -282,6 +298,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
return err < 0 ? err : -EIO; return err < 0 ? err : -EIO;
} }
EXPORT_SYMBOL(snd_cs8427_create);
/* /*
* Reset the chip using run bit, also lock PLL using ILRCK and * Reset the chip using run bit, also lock PLL using ILRCK and
* put back AES3INPUT. This workaround is described in latest * put back AES3INPUT. This workaround is described in latest
...@@ -296,7 +314,8 @@ static void snd_cs8427_reset(struct snd_i2c_device *cs8427) ...@@ -296,7 +314,8 @@ static void snd_cs8427_reset(struct snd_i2c_device *cs8427)
snd_assert(cs8427, return); snd_assert(cs8427, return);
chip = cs8427->private_data; chip = cs8427->private_data;
snd_i2c_lock(cs8427->bus); snd_i2c_lock(cs8427->bus);
if ((chip->regmap[CS8427_REG_CLOCKSOURCE] & CS8427_RXDAES3INPUT) == CS8427_RXDAES3INPUT) /* AES3 bit is set */ if ((chip->regmap[CS8427_REG_CLOCKSOURCE] & CS8427_RXDAES3INPUT) ==
CS8427_RXDAES3INPUT) /* AES3 bit is set */
aes3input = 1; aes3input = 1;
chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~(CS8427_RUN | CS8427_RXDMASK); chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~(CS8427_RUN | CS8427_RXDMASK);
snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE,
...@@ -367,12 +386,15 @@ static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol, ...@@ -367,12 +386,15 @@ static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol,
snd_i2c_lock(device->bus); snd_i2c_lock(device->bus);
if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) { if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) {
snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg); snd_printk(KERN_ERR "unable to send register 0x%x byte "
"to CS8427\n", reg);
snd_i2c_unlock(device->bus); snd_i2c_unlock(device->bus);
return err < 0 ? err : -EIO; return err < 0 ? err : -EIO;
} }
if ((err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10)) != 10) { err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10);
snd_printk(KERN_ERR "unable to read Q-subcode bytes from CS8427\n"); if (err != 10) {
snd_printk(KERN_ERR "unable to read Q-subcode bytes "
"from CS8427\n");
snd_i2c_unlock(device->bus); snd_i2c_unlock(device->bus);
return err < 0 ? err : -EIO; return err < 0 ? err : -EIO;
} }
...@@ -380,7 +402,8 @@ static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol, ...@@ -380,7 +402,8 @@ static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol,
return 0; return 0;
} }
static int snd_cs8427_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) static int snd_cs8427_spdif_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
uinfo->count = 1; uinfo->count = 1;
...@@ -413,7 +436,8 @@ static int snd_cs8427_spdif_put(struct snd_kcontrol *kcontrol, ...@@ -413,7 +436,8 @@ static int snd_cs8427_spdif_put(struct snd_kcontrol *kcontrol,
snd_i2c_lock(device->bus); snd_i2c_lock(device->bus);
change = memcmp(ucontrol->value.iec958.status, status, 24) != 0; change = memcmp(ucontrol->value.iec958.status, status, 24) != 0;
memcpy(status, ucontrol->value.iec958.status, 24); memcpy(status, ucontrol->value.iec958.status, 24);
if (change && (kcontrol->private_value ? runtime != NULL : runtime == NULL)) { if (change && (kcontrol->private_value ?
runtime != NULL : runtime == NULL)) {
err = snd_cs8427_send_corudata(device, 0, status, 24); err = snd_cs8427_send_corudata(device, 0, status, 24);
if (err < 0) if (err < 0)
change = err; change = err;
...@@ -442,7 +466,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { ...@@ -442,7 +466,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = {
.iface = SNDRV_CTL_ELEM_IFACE_PCM, .iface = SNDRV_CTL_ELEM_IFACE_PCM,
.info = snd_cs8427_in_status_info, .info = snd_cs8427_in_status_info,
.name = "IEC958 CS8427 Input Status", .name = "IEC958 CS8427 Input Status",
.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .access = (SNDRV_CTL_ELEM_ACCESS_READ |
SNDRV_CTL_ELEM_ACCESS_VOLATILE),
.get = snd_cs8427_in_status_get, .get = snd_cs8427_in_status_get,
.private_value = 15, .private_value = 15,
}, },
...@@ -450,7 +475,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { ...@@ -450,7 +475,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = {
.iface = SNDRV_CTL_ELEM_IFACE_PCM, .iface = SNDRV_CTL_ELEM_IFACE_PCM,
.info = snd_cs8427_in_status_info, .info = snd_cs8427_in_status_info,
.name = "IEC958 CS8427 Error Status", .name = "IEC958 CS8427 Error Status",
.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .access = (SNDRV_CTL_ELEM_ACCESS_READ |
SNDRV_CTL_ELEM_ACCESS_VOLATILE),
.get = snd_cs8427_in_status_get, .get = snd_cs8427_in_status_get,
.private_value = 16, .private_value = 16,
}, },
...@@ -470,7 +496,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { ...@@ -470,7 +496,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = {
.private_value = 0 .private_value = 0
}, },
{ {
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
SNDRV_CTL_ELEM_ACCESS_INACTIVE),
.iface = SNDRV_CTL_ELEM_IFACE_PCM, .iface = SNDRV_CTL_ELEM_IFACE_PCM,
.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),
.info = snd_cs8427_spdif_info, .info = snd_cs8427_spdif_info,
...@@ -482,7 +509,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { ...@@ -482,7 +509,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = {
.iface = SNDRV_CTL_ELEM_IFACE_PCM, .iface = SNDRV_CTL_ELEM_IFACE_PCM,
.info = snd_cs8427_qsubcode_info, .info = snd_cs8427_qsubcode_info,
.name = "IEC958 Q-subcode Capture Default", .name = "IEC958 Q-subcode Capture Default",
.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .access = (SNDRV_CTL_ELEM_ACCESS_READ |
SNDRV_CTL_ELEM_ACCESS_VOLATILE),
.get = snd_cs8427_qsubcode_get .get = snd_cs8427_qsubcode_get
}}; }};
...@@ -505,7 +533,8 @@ int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427, ...@@ -505,7 +533,8 @@ int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427,
err = snd_ctl_add(cs8427->bus->card, kctl); err = snd_ctl_add(cs8427->bus->card, kctl);
if (err < 0) if (err < 0)
return err; return err;
if (!strcmp(kctl->id.name, SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM))) if (! strcmp(kctl->id.name,
SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM)))
chip->playback.pcm_ctl = kctl; chip->playback.pcm_ctl = kctl;
} }
...@@ -515,6 +544,8 @@ int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427, ...@@ -515,6 +544,8 @@ int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427,
return 0; return 0;
} }
EXPORT_SYMBOL(snd_cs8427_iec958_build);
int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active) int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active)
{ {
struct cs8427 *chip; struct cs8427 *chip;
...@@ -522,13 +553,17 @@ int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active) ...@@ -522,13 +553,17 @@ int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active)
snd_assert(cs8427, return -ENXIO); snd_assert(cs8427, return -ENXIO);
chip = cs8427->private_data; chip = cs8427->private_data;
if (active) if (active)
memcpy(chip->playback.pcm_status, chip->playback.def_status, 24); memcpy(chip->playback.pcm_status,
chip->playback.def_status, 24);
chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
snd_ctl_notify(cs8427->bus->card, SNDRV_CTL_EVENT_MASK_VALUE | snd_ctl_notify(cs8427->bus->card,
SNDRV_CTL_EVENT_MASK_INFO, &chip->playback.pcm_ctl->id); SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO,
&chip->playback.pcm_ctl->id);
return 0; return 0;
} }
EXPORT_SYMBOL(snd_cs8427_iec958_active);
int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate) int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate)
{ {
struct cs8427 *chip; struct cs8427 *chip;
...@@ -568,6 +603,8 @@ int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate) ...@@ -568,6 +603,8 @@ int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate)
return err < 0 ? err : 0; return err < 0 ? err : 0;
} }
EXPORT_SYMBOL(snd_cs8427_iec958_pcm);
static int __init alsa_cs8427_module_init(void) static int __init alsa_cs8427_module_init(void)
{ {
return 0; return 0;
...@@ -579,10 +616,3 @@ static void __exit alsa_cs8427_module_exit(void) ...@@ -579,10 +616,3 @@ static void __exit alsa_cs8427_module_exit(void)
module_init(alsa_cs8427_module_init) module_init(alsa_cs8427_module_init)
module_exit(alsa_cs8427_module_exit) module_exit(alsa_cs8427_module_exit)
EXPORT_SYMBOL(snd_cs8427_create);
EXPORT_SYMBOL(snd_cs8427_reset);
EXPORT_SYMBOL(snd_cs8427_reg_write);
EXPORT_SYMBOL(snd_cs8427_iec958_build);
EXPORT_SYMBOL(snd_cs8427_iec958_active);
EXPORT_SYMBOL(snd_cs8427_iec958_pcm);
...@@ -11,6 +11,7 @@ snd-cs4236-objs := cs4236.o ...@@ -11,6 +11,7 @@ snd-cs4236-objs := cs4236.o
# Toplevel Module Dependency # Toplevel Module Dependency
obj-$(CONFIG_SND_AZT2320) += snd-cs4231-lib.o obj-$(CONFIG_SND_AZT2320) += snd-cs4231-lib.o
obj-$(CONFIG_SND_MIRO) += snd-cs4231-lib.o
obj-$(CONFIG_SND_OPL3SA2) += snd-cs4231-lib.o obj-$(CONFIG_SND_OPL3SA2) += snd-cs4231-lib.o
obj-$(CONFIG_SND_CS4231) += snd-cs4231.o snd-cs4231-lib.o obj-$(CONFIG_SND_CS4231) += snd-cs4231.o snd-cs4231-lib.o
obj-$(CONFIG_SND_CS4232) += snd-cs4232.o snd-cs4231-lib.o obj-$(CONFIG_SND_CS4232) += snd-cs4232.o snd-cs4231-lib.o
......
...@@ -87,7 +87,7 @@ MODULE_PARM_DESC(channels, "GF1 channels for GUS Extreme driver."); ...@@ -87,7 +87,7 @@ MODULE_PARM_DESC(channels, "GF1 channels for GUS Extreme driver.");
module_param_array(pcm_channels, int, NULL, 0444); module_param_array(pcm_channels, int, NULL, 0444);
MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver."); MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver.");
struct platform_device *devices[SNDRV_CARDS]; static struct platform_device *devices[SNDRV_CARDS];
#define PFX "gusextreme: " #define PFX "gusextreme: "
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
/* weird stuff, derived from port I/O tracing with dosemu */ /* weird stuff, derived from port I/O tracing with dosemu */
static unsigned char page_zero[] __initdata = { static unsigned char page_zero[] __devinitdata = {
0x01, 0x7c, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00, 0x01, 0x7c, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00,
0x11, 0x00, 0x20, 0x00, 0x32, 0x00, 0x40, 0x00, 0x13, 0x00, 0x00, 0x11, 0x00, 0x20, 0x00, 0x32, 0x00, 0x40, 0x00, 0x13, 0x00, 0x00,
0x00, 0x14, 0x02, 0x76, 0x00, 0x60, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x14, 0x02, 0x76, 0x00, 0x60, 0x00, 0x80, 0x02, 0x00, 0x00,
...@@ -61,7 +61,7 @@ static unsigned char page_zero[] __initdata = { ...@@ -61,7 +61,7 @@ static unsigned char page_zero[] __initdata = {
0x1d, 0x02, 0xdf 0x1d, 0x02, 0xdf
}; };
static unsigned char page_one[] __initdata = { static unsigned char page_one[] __devinitdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00,
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xd8, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xd8, 0x00, 0x00,
0x02, 0x20, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01, 0x02, 0x20, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01,
...@@ -88,7 +88,7 @@ static unsigned char page_one[] __initdata = { ...@@ -88,7 +88,7 @@ static unsigned char page_one[] __initdata = {
0x60, 0x00, 0x1b 0x60, 0x00, 0x1b
}; };
static unsigned char page_two[] __initdata = { static unsigned char page_two[] __devinitdata = {
0xc4, 0x00, 0x44, 0x07, 0x44, 0x00, 0x40, 0x25, 0x01, 0x06, 0xc4, 0xc4, 0x00, 0x44, 0x07, 0x44, 0x00, 0x40, 0x25, 0x01, 0x06, 0xc4,
0x07, 0x40, 0x25, 0x01, 0x00, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x07, 0x40, 0x25, 0x01, 0x00, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -103,7 +103,7 @@ static unsigned char page_two[] __initdata = { ...@@ -103,7 +103,7 @@ static unsigned char page_two[] __initdata = {
0x46, 0x05, 0x46, 0x07, 0x46, 0x07, 0x44 0x46, 0x05, 0x46, 0x07, 0x46, 0x07, 0x44
}; };
static unsigned char page_three[] __initdata = { static unsigned char page_three[] __devinitdata = {
0x07, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x40, 0x00, 0x40, 0x06, 0x07, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x40, 0x00, 0x40, 0x06,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -118,7 +118,7 @@ static unsigned char page_three[] __initdata = { ...@@ -118,7 +118,7 @@ static unsigned char page_three[] __initdata = {
0x02, 0x00, 0x42, 0x00, 0xc0, 0x00, 0x40 0x02, 0x00, 0x42, 0x00, 0xc0, 0x00, 0x40
}; };
static unsigned char page_four[] __initdata = { static unsigned char page_four[] __devinitdata = {
0x63, 0x03, 0x26, 0x02, 0x2c, 0x00, 0x24, 0x00, 0x2e, 0x02, 0x02, 0x63, 0x03, 0x26, 0x02, 0x2c, 0x00, 0x24, 0x00, 0x2e, 0x02, 0x02,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -133,7 +133,7 @@ static unsigned char page_four[] __initdata = { ...@@ -133,7 +133,7 @@ static unsigned char page_four[] __initdata = {
0x02, 0x62, 0x02, 0x20, 0x01, 0x21, 0x01 0x02, 0x62, 0x02, 0x20, 0x01, 0x21, 0x01
}; };
static unsigned char page_six[] __initdata = { static unsigned char page_six[] __devinitdata = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00,
0x00, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e,
0x00, 0x00, 0x10, 0x00, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x00,
...@@ -154,7 +154,7 @@ static unsigned char page_six[] __initdata = { ...@@ -154,7 +154,7 @@ static unsigned char page_six[] __initdata = {
0x80, 0x00, 0x7e, 0x80, 0x80 0x80, 0x00, 0x7e, 0x80, 0x80
}; };
static unsigned char page_seven[] __initdata = { static unsigned char page_seven[] __devinitdata = {
0x0f, 0xff, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
0x08, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0f,
...@@ -181,7 +181,7 @@ static unsigned char page_seven[] __initdata = { ...@@ -181,7 +181,7 @@ static unsigned char page_seven[] __initdata = {
0x00, 0x02, 0x00 0x00, 0x02, 0x00
}; };
static unsigned char page_zero_v2[] __initdata = { static unsigned char page_zero_v2[] __devinitdata = {
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -193,7 +193,7 @@ static unsigned char page_zero_v2[] __initdata = { ...@@ -193,7 +193,7 @@ static unsigned char page_zero_v2[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}; };
static unsigned char page_one_v2[] __initdata = { static unsigned char page_one_v2[] __devinitdata = {
0x01, 0xc0, 0x01, 0xfa, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x01, 0xfa, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -205,21 +205,21 @@ static unsigned char page_one_v2[] __initdata = { ...@@ -205,21 +205,21 @@ static unsigned char page_one_v2[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}; };
static unsigned char page_two_v2[] __initdata = { static unsigned char page_two_v2[] __devinitdata = {
0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00
}; };
static unsigned char page_three_v2[] __initdata = { static unsigned char page_three_v2[] __devinitdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00
}; };
static unsigned char page_four_v2[] __initdata = { static unsigned char page_four_v2[] __devinitdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -227,7 +227,7 @@ static unsigned char page_four_v2[] __initdata = { ...@@ -227,7 +227,7 @@ static unsigned char page_four_v2[] __initdata = {
0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00
}; };
static unsigned char page_seven_v2[] __initdata = { static unsigned char page_seven_v2[] __devinitdata = {
0x0f, 0xff, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -239,7 +239,7 @@ static unsigned char page_seven_v2[] __initdata = { ...@@ -239,7 +239,7 @@ static unsigned char page_seven_v2[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}; };
static unsigned char mod_v2[] __initdata = { static unsigned char mod_v2[] __devinitdata = {
0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02,
0x00, 0x01, 0x03, 0x02, 0x00, 0x01, 0x04, 0x02, 0x00, 0x01, 0x05, 0x00, 0x01, 0x03, 0x02, 0x00, 0x01, 0x04, 0x02, 0x00, 0x01, 0x05,
0x02, 0x00, 0x01, 0x06, 0x02, 0x00, 0x01, 0x07, 0x02, 0x00, 0xb0, 0x02, 0x00, 0x01, 0x06, 0x02, 0x00, 0x01, 0x07, 0x02, 0x00, 0xb0,
...@@ -269,7 +269,7 @@ static unsigned char mod_v2[] __initdata = { ...@@ -269,7 +269,7 @@ static unsigned char mod_v2[] __initdata = {
0x02, 0x01, 0x01, 0x04, 0x02, 0x01, 0x01, 0x05, 0x02, 0x01, 0x01, 0x02, 0x01, 0x01, 0x04, 0x02, 0x01, 0x01, 0x05, 0x02, 0x01, 0x01,
0x06, 0x02, 0x01, 0x01, 0x07, 0x02, 0x01 0x06, 0x02, 0x01, 0x01, 0x07, 0x02, 0x01
}; };
static unsigned char coefficients[] __initdata = { static unsigned char coefficients[] __devinitdata = {
0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x00, 0x4b, 0x03, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x00, 0x4b, 0x03,
0x11, 0x00, 0x4d, 0x01, 0x32, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x11, 0x00, 0x4d, 0x01, 0x32, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49,
0x00, 0x00, 0x07, 0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x01,
...@@ -305,14 +305,14 @@ static unsigned char coefficients[] __initdata = { ...@@ -305,14 +305,14 @@ static unsigned char coefficients[] __initdata = {
0x06, 0x6c, 0x4c, 0x6c, 0x06, 0x50, 0x52, 0xe2, 0x06, 0x42, 0x02, 0x06, 0x6c, 0x4c, 0x6c, 0x06, 0x50, 0x52, 0xe2, 0x06, 0x42, 0x02,
0xba 0xba
}; };
static unsigned char coefficients2[] __initdata = { static unsigned char coefficients2[] __devinitdata = {
0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x45, 0x0f, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x45, 0x0f,
0xff, 0x07, 0x48, 0x0f, 0xff, 0x07, 0x7b, 0x04, 0xcc, 0x07, 0x7d, 0xff, 0x07, 0x48, 0x0f, 0xff, 0x07, 0x7b, 0x04, 0xcc, 0x07, 0x7d,
0x04, 0xcc, 0x07, 0x7c, 0x00, 0x00, 0x07, 0x7e, 0x00, 0x00, 0x07, 0x04, 0xcc, 0x07, 0x7c, 0x00, 0x00, 0x07, 0x7e, 0x00, 0x00, 0x07,
0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x47, 0x00, 0x00, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x47, 0x00, 0x00,
0x07, 0x4a, 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x07, 0x4e, 0x00, 0x00 0x07, 0x4a, 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x07, 0x4e, 0x00, 0x00
}; };
static unsigned char coefficients3[] __initdata = { static unsigned char coefficients3[] __devinitdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x00, 0x51, 0x00,
0x51, 0x00, 0x7a, 0x00, 0x7a, 0x00, 0xa3, 0x00, 0xa3, 0x00, 0xcc, 0x51, 0x00, 0x7a, 0x00, 0x7a, 0x00, 0xa3, 0x00, 0xa3, 0x00, 0xcc,
0x00, 0xcc, 0x00, 0xf5, 0x00, 0xf5, 0x01, 0x1e, 0x01, 0x1e, 0x01, 0x00, 0xcc, 0x00, 0xf5, 0x00, 0xf5, 0x01, 0x1e, 0x01, 0x1e, 0x01,
...@@ -563,7 +563,7 @@ snd_wavefront_fx_ioctl (struct snd_hwdep *sdev, struct file *file, ...@@ -563,7 +563,7 @@ snd_wavefront_fx_ioctl (struct snd_hwdep *sdev, struct file *file,
*/ */
int __init int __devinit
snd_wavefront_fx_start (snd_wavefront_t *dev) snd_wavefront_fx_start (snd_wavefront_t *dev)
{ {
......
...@@ -474,7 +474,7 @@ snd_wavefront_midi_disable_virtual (snd_wavefront_card_t *card) ...@@ -474,7 +474,7 @@ snd_wavefront_midi_disable_virtual (snd_wavefront_card_t *card)
spin_unlock_irqrestore (&card->wavefront.midi.virtual, flags); spin_unlock_irqrestore (&card->wavefront.midi.virtual, flags);
} }
int __init int __devinit
snd_wavefront_midi_start (snd_wavefront_card_t *card) snd_wavefront_midi_start (snd_wavefront_card_t *card)
{ {
......
...@@ -1738,7 +1738,7 @@ snd_wavefront_internal_interrupt (snd_wavefront_card_t *card) ...@@ -1738,7 +1738,7 @@ snd_wavefront_internal_interrupt (snd_wavefront_card_t *card)
7 Unused 7 Unused
*/ */
static int __init static int __devinit
snd_wavefront_interrupt_bits (int irq) snd_wavefront_interrupt_bits (int irq)
{ {
...@@ -1766,7 +1766,7 @@ snd_wavefront_interrupt_bits (int irq) ...@@ -1766,7 +1766,7 @@ snd_wavefront_interrupt_bits (int irq)
return bits; return bits;
} }
static void __init static void __devinit
wavefront_should_cause_interrupt (snd_wavefront_t *dev, wavefront_should_cause_interrupt (snd_wavefront_t *dev,
int val, int port, int timeout) int val, int port, int timeout)
...@@ -1787,7 +1787,7 @@ wavefront_should_cause_interrupt (snd_wavefront_t *dev, ...@@ -1787,7 +1787,7 @@ wavefront_should_cause_interrupt (snd_wavefront_t *dev,
} }
} }
static int __init static int __devinit
wavefront_reset_to_cleanliness (snd_wavefront_t *dev) wavefront_reset_to_cleanliness (snd_wavefront_t *dev)
{ {
...@@ -1946,7 +1946,7 @@ wavefront_reset_to_cleanliness (snd_wavefront_t *dev) ...@@ -1946,7 +1946,7 @@ wavefront_reset_to_cleanliness (snd_wavefront_t *dev)
#include <asm/uaccess.h> #include <asm/uaccess.h>
static int __init static int __devinit
wavefront_download_firmware (snd_wavefront_t *dev, char *path) wavefront_download_firmware (snd_wavefront_t *dev, char *path)
{ {
...@@ -2047,7 +2047,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path) ...@@ -2047,7 +2047,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path)
} }
static int __init static int __devinit
wavefront_do_reset (snd_wavefront_t *dev) wavefront_do_reset (snd_wavefront_t *dev)
{ {
...@@ -2136,7 +2136,7 @@ wavefront_do_reset (snd_wavefront_t *dev) ...@@ -2136,7 +2136,7 @@ wavefront_do_reset (snd_wavefront_t *dev)
return 1; return 1;
} }
int __init int __devinit
snd_wavefront_start (snd_wavefront_t *dev) snd_wavefront_start (snd_wavefront_t *dev)
{ {
...@@ -2178,7 +2178,7 @@ snd_wavefront_start (snd_wavefront_t *dev) ...@@ -2178,7 +2178,7 @@ snd_wavefront_start (snd_wavefront_t *dev)
return (0); return (0);
} }
int __init int __devinit
snd_wavefront_detect (snd_wavefront_card_t *card) snd_wavefront_detect (snd_wavefront_card_t *card)
{ {
......
...@@ -460,17 +460,19 @@ config SND_FM801 ...@@ -460,17 +460,19 @@ config SND_FM801
To compile this driver as a module, choose M here: the module To compile this driver as a module, choose M here: the module
will be called snd-fm801. will be called snd-fm801.
config SND_FM801_TEA575X config SND_FM801_TEA575X_BOOL
tristate "ForteMedia FM801 + TEA5757 tuner" bool "ForteMedia FM801 + TEA5757 tuner"
depends on SND_FM801 depends on SND_FM801
select VIDEO_DEV
help help
Say Y here to include support for soundcards based on the ForteMedia Say Y here to include support for soundcards based on the ForteMedia
FM801 chip with a TEA5757 tuner connected to GPIO1-3 pins (Media FM801 chip with a TEA5757 tuner connected to GPIO1-3 pins (Media
Forte SF256-PCS-02). Forte SF256-PCS-02) into the snd-fm801 driver.
To compile this driver as a module, choose M here: the module config SND_FM801_TEA575X
will be called snd-fm801-tea575x. tristate
depends on SND_FM801_TEA575X_BOOL
default SND_FM801
select VIDEO_DEV
config SND_HDA_INTEL config SND_HDA_INTEL
tristate "Intel HD Audio" tristate "Intel HD Audio"
......
...@@ -241,14 +241,14 @@ ad1889_channel_reset(struct snd_ad1889 *chip, unsigned int channel) ...@@ -241,14 +241,14 @@ ad1889_channel_reset(struct snd_ad1889 *chip, unsigned int channel)
} }
} }
static inline u16 static u16
snd_ad1889_ac97_read(struct snd_ac97 *ac97, unsigned short reg) snd_ad1889_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
{ {
struct snd_ad1889 *chip = ac97->private_data; struct snd_ad1889 *chip = ac97->private_data;
return ad1889_readw(chip, AD_AC97_BASE + reg); return ad1889_readw(chip, AD_AC97_BASE + reg);
} }
static inline void static void
snd_ad1889_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val) snd_ad1889_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
{ {
struct snd_ad1889 *chip = ac97->private_data; struct snd_ad1889 *chip = ac97->private_data;
...@@ -873,7 +873,7 @@ snd_ad1889_free(struct snd_ad1889 *chip) ...@@ -873,7 +873,7 @@ snd_ad1889_free(struct snd_ad1889 *chip)
return 0; return 0;
} }
static inline int static int
snd_ad1889_dev_free(struct snd_device *device) snd_ad1889_dev_free(struct snd_device *device)
{ {
struct snd_ad1889 *chip = device->device_data; struct snd_ad1889 *chip = device->device_data;
...@@ -1051,7 +1051,7 @@ snd_ad1889_remove(struct pci_dev *pci) ...@@ -1051,7 +1051,7 @@ snd_ad1889_remove(struct pci_dev *pci)
pci_set_drvdata(pci, NULL); pci_set_drvdata(pci, NULL);
} }
static struct pci_device_id snd_ad1889_ids[] __devinitdata = { static struct pci_device_id snd_ad1889_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS) }, { PCI_DEVICE(PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS) },
{ 0, }, { 0, },
}; };
......
...@@ -279,7 +279,7 @@ struct snd_ali { ...@@ -279,7 +279,7 @@ struct snd_ali {
#endif #endif
}; };
static struct pci_device_id snd_ali_ids[] __devinitdata = { static struct pci_device_id snd_ali_ids[] = {
{PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0},
{0, } {0, }
}; };
......
...@@ -146,7 +146,7 @@ struct snd_als300_substream_data { ...@@ -146,7 +146,7 @@ struct snd_als300_substream_data {
int block_counter_register; int block_counter_register;
}; };
static struct pci_device_id snd_als300_ids[] __devinitdata = { static struct pci_device_id snd_als300_ids[] = {
{ 0x4005, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300 }, { 0x4005, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300 },
{ 0x4005, 0x0308, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300_PLUS }, { 0x4005, 0x0308, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300_PLUS },
{ 0, } { 0, }
......
...@@ -116,7 +116,7 @@ struct snd_card_als4000 { ...@@ -116,7 +116,7 @@ struct snd_card_als4000 {
#endif #endif
}; };
static struct pci_device_id snd_als4000_ids[] __devinitdata = { static struct pci_device_id snd_als4000_ids[] = {
{ 0x4005, 0x4000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ALS4000 */ { 0x4005, 0x4000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ALS4000 */
{ 0, } { 0, }
}; };
......
...@@ -284,7 +284,7 @@ struct atiixp { ...@@ -284,7 +284,7 @@ struct atiixp {
/* /*
*/ */
static struct pci_device_id snd_atiixp_ids[] __devinitdata = { static struct pci_device_id snd_atiixp_ids[] = {
{ 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ { 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */
{ 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */ { 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */
{ 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ { 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */
......
...@@ -262,7 +262,7 @@ struct atiixp_modem { ...@@ -262,7 +262,7 @@ struct atiixp_modem {
/* /*
*/ */
static struct pci_device_id snd_atiixp_ids[] __devinitdata = { static struct pci_device_id snd_atiixp_ids[] = {
{ 0x1002, 0x434d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ { 0x1002, 0x434d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */
{ 0x1002, 0x4378, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ { 0x1002, 0x4378, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */
{ 0, } { 0, }
......
#include "au8810.h" #include "au8810.h"
#include "au88x0.h" #include "au88x0.h"
static struct pci_device_id snd_vortex_ids[] __devinitdata = { static struct pci_device_id snd_vortex_ids[] = {
{PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE, {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,}, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,},
{0,} {0,}
......
#include "au8820.h" #include "au8820.h"
#include "au88x0.h" #include "au88x0.h"
static struct pci_device_id snd_vortex_ids[] __devinitdata = { static struct pci_device_id snd_vortex_ids[] = {
{PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_1, {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_1,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
{0,} {0,}
......
#include "au8830.h" #include "au8830.h"
#include "au88x0.h" #include "au88x0.h"
static struct pci_device_id snd_vortex_ids[] __devinitdata = { static struct pci_device_id snd_vortex_ids[] = {
{PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_2, {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_2,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
{0,} {0,}
......
...@@ -270,7 +270,8 @@ static void vortex_mix_setvolumebyte(vortex_t * vortex, unsigned char mix, ...@@ -270,7 +270,8 @@ static void vortex_mix_setvolumebyte(vortex_t * vortex, unsigned char mix,
/* A3D functions. */ /* A3D functions. */
#ifndef CHIP_AU8820 #ifndef CHIP_AU8820
static void vortex_Vort3D(vortex_t * v, int en); static void vortex_Vort3D_enable(vortex_t * v);
static void vortex_Vort3D_disable(vortex_t * v);
static void vortex_Vort3D_connect(vortex_t * vortex, int en); static void vortex_Vort3D_connect(vortex_t * vortex, int en);
static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en); static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en);
#endif #endif
......
...@@ -593,24 +593,23 @@ static int Vort3DRend_Initialize(vortex_t * v, unsigned short mode) ...@@ -593,24 +593,23 @@ static int Vort3DRend_Initialize(vortex_t * v, unsigned short mode)
static int vortex_a3d_register_controls(vortex_t * vortex); static int vortex_a3d_register_controls(vortex_t * vortex);
static void vortex_a3d_unregister_controls(vortex_t * vortex); static void vortex_a3d_unregister_controls(vortex_t * vortex);
/* A3D base support init/shudown */ /* A3D base support init/shudown */
static void vortex_Vort3D(vortex_t * v, int en) static void __devinit vortex_Vort3D_enable(vortex_t * v)
{ {
int i; int i;
if (en) {
Vort3DRend_Initialize(v, XT_HEADPHONE); Vort3DRend_Initialize(v, XT_HEADPHONE);
for (i = 0; i < NR_A3D; i++) { for (i = 0; i < NR_A3D; i++) {
vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2); vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2);
a3dsrc_ZeroStateA3D(&(v->a3d[0])); a3dsrc_ZeroStateA3D(&(v->a3d[0]));
}
} else {
vortex_XtalkHw_Disable(v);
} }
/* Register ALSA controls */ /* Register ALSA controls */
if (en) { vortex_a3d_register_controls(v);
vortex_a3d_register_controls(v); }
} else {
vortex_a3d_unregister_controls(v); static void vortex_Vort3D_disable(vortex_t * v)
} {
vortex_XtalkHw_Disable(v);
vortex_a3d_unregister_controls(v);
} }
/* Make A3D subsystem connections. */ /* Make A3D subsystem connections. */
...@@ -855,7 +854,7 @@ static struct snd_kcontrol_new vortex_a3d_kcontrol __devinitdata = { ...@@ -855,7 +854,7 @@ static struct snd_kcontrol_new vortex_a3d_kcontrol __devinitdata = {
}; };
/* Control (un)registration. */ /* Control (un)registration. */
static int vortex_a3d_register_controls(vortex_t * vortex) static int __devinit vortex_a3d_register_controls(vortex_t * vortex)
{ {
struct snd_kcontrol *kcontrol; struct snd_kcontrol *kcontrol;
int err, i; int err, i;
......
...@@ -2690,7 +2690,7 @@ static int __devinit vortex_core_init(vortex_t * vortex) ...@@ -2690,7 +2690,7 @@ static int __devinit vortex_core_init(vortex_t * vortex)
#ifndef CHIP_AU8820 #ifndef CHIP_AU8820
vortex_eq_init(vortex); vortex_eq_init(vortex);
vortex_spdif_init(vortex, 48000, 1); vortex_spdif_init(vortex, 48000, 1);
vortex_Vort3D(vortex, 1); vortex_Vort3D_enable(vortex);
#endif #endif
#ifndef CHIP_AU8810 #ifndef CHIP_AU8810
vortex_wt_init(vortex); vortex_wt_init(vortex);
...@@ -2718,7 +2718,7 @@ static int vortex_core_shutdown(vortex_t * vortex) ...@@ -2718,7 +2718,7 @@ static int vortex_core_shutdown(vortex_t * vortex)
printk(KERN_INFO "Vortex: shutdown..."); printk(KERN_INFO "Vortex: shutdown...");
#ifndef CHIP_AU8820 #ifndef CHIP_AU8820
vortex_eq_free(vortex); vortex_eq_free(vortex);
vortex_Vort3D(vortex, 0); vortex_Vort3D_disable(vortex);
#endif #endif
//vortex_disable_timer_int(vortex); //vortex_disable_timer_int(vortex);
vortex_disable_int(vortex); vortex_disable_int(vortex);
......
...@@ -238,7 +238,7 @@ struct snd_azf3328 { ...@@ -238,7 +238,7 @@ struct snd_azf3328 {
#endif #endif
}; };
static const struct pci_device_id snd_azf3328_ids[] __devinitdata = { static const struct pci_device_id snd_azf3328_ids[] = {
{ 0x122D, 0x50DC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* PCI168/3328 */ { 0x122D, 0x50DC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* PCI168/3328 */
{ 0x122D, 0x80DA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* 3328 */ { 0x122D, 0x80DA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* 3328 */
{ 0, } { 0, }
......
...@@ -774,7 +774,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card, ...@@ -774,7 +774,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card,
.driver_data = rate } .driver_data = rate }
/* driver_data is the default digital_rate value for that device */ /* driver_data is the default digital_rate value for that device */
static struct pci_device_id snd_bt87x_ids[] __devinitdata = { static struct pci_device_id snd_bt87x_ids[] = {
/* Hauppauge WinTV series */ /* Hauppauge WinTV series */
BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0x13eb, 32000), BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0x13eb, 32000),
/* Hauppauge WinTV series */ /* Hauppauge WinTV series */
......
...@@ -1602,7 +1602,7 @@ static void __devexit snd_ca0106_remove(struct pci_dev *pci) ...@@ -1602,7 +1602,7 @@ static void __devexit snd_ca0106_remove(struct pci_dev *pci)
} }
// PCI IDs // PCI IDs
static struct pci_device_id snd_ca0106_ids[] __devinitdata = { static struct pci_device_id snd_ca0106_ids[] = {
{ 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Audigy LS or Live 24bit */ { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Audigy LS or Live 24bit */
{ 0, } { 0, }
}; };
......
...@@ -2609,7 +2609,7 @@ static inline void snd_cmipci_proc_init(struct cmipci *cm) {} ...@@ -2609,7 +2609,7 @@ static inline void snd_cmipci_proc_init(struct cmipci *cm) {}
#endif #endif
static struct pci_device_id snd_cmipci_ids[] __devinitdata = { static struct pci_device_id snd_cmipci_ids[] = {
{PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
......
...@@ -494,7 +494,7 @@ struct cs4281 { ...@@ -494,7 +494,7 @@ struct cs4281 {
static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs); static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static struct pci_device_id snd_cs4281_ids[] __devinitdata = { static struct pci_device_id snd_cs4281_ids[] = {
{ 0x1013, 0x6005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4281 */ { 0x1013, 0x6005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4281 */
{ 0, } { 0, }
}; };
......
...@@ -65,7 +65,7 @@ MODULE_PARM_DESC(thinkpad, "Force to enable Thinkpad's CLKRUN control."); ...@@ -65,7 +65,7 @@ MODULE_PARM_DESC(thinkpad, "Force to enable Thinkpad's CLKRUN control.");
module_param_array(mmap_valid, bool, NULL, 0444); module_param_array(mmap_valid, bool, NULL, 0444);
MODULE_PARM_DESC(mmap_valid, "Support OSS mmap."); MODULE_PARM_DESC(mmap_valid, "Support OSS mmap.");
static struct pci_device_id snd_cs46xx_ids[] __devinitdata = { static struct pci_device_id snd_cs46xx_ids[] = {
{ 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4280 */ { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4280 */
{ 0x1013, 0x6003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4612 */ { 0x1013, 0x6003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4612 */
{ 0x1013, 0x6004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4615 */ { 0x1013, 0x6004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4615 */
......
...@@ -2317,7 +2317,7 @@ static struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = { ...@@ -2317,7 +2317,7 @@ static struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = {
#ifdef CONFIG_SND_CS46XX_NEW_DSP #ifdef CONFIG_SND_CS46XX_NEW_DSP
/* Only available on the Hercules Game Theater XP soundcard */ /* Only available on the Hercules Game Theater XP soundcard */
static struct snd_kcontrol_new snd_hercules_controls[] __devinitdata = { static struct snd_kcontrol_new snd_hercules_controls[] = {
{ {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Optical/Coaxial SPDIF Input Switch", .name = "Optical/Coaxial SPDIF Input Switch",
...@@ -3458,6 +3458,9 @@ static void hercules_mixer_init (struct snd_cs46xx *chip) ...@@ -3458,6 +3458,9 @@ static void hercules_mixer_init (struct snd_cs46xx *chip)
snd_printdd ("initializing Hercules mixer\n"); snd_printdd ("initializing Hercules mixer\n");
#ifdef CONFIG_SND_CS46XX_NEW_DSP #ifdef CONFIG_SND_CS46XX_NEW_DSP
if (chip->in_suspend)
return;
for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) { for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) {
struct snd_kcontrol *kctl; struct snd_kcontrol *kctl;
...@@ -3669,6 +3672,7 @@ int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state) ...@@ -3669,6 +3672,7 @@ int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state)
int amp_saved; int amp_saved;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
chip->in_suspend = 1;
snd_pcm_suspend_all(chip->pcm); snd_pcm_suspend_all(chip->pcm);
// chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL); // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL);
// chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE); // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE);
...@@ -3722,6 +3726,7 @@ int snd_cs46xx_resume(struct pci_dev *pci) ...@@ -3722,6 +3726,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
else else
chip->active_ctrl(chip, -1); /* disable CLKRUN */ chip->active_ctrl(chip, -1); /* disable CLKRUN */
chip->amplifier = amp_saved; chip->amplifier = amp_saved;
chip->in_suspend = 0;
snd_power_change_state(card, SNDRV_CTL_POWER_D0); snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0; return 0;
} }
......
...@@ -67,7 +67,7 @@ MODULE_PARM_DESC(id, "ID string for " DRIVER_NAME); ...@@ -67,7 +67,7 @@ MODULE_PARM_DESC(id, "ID string for " DRIVER_NAME);
module_param_array(enable, bool, NULL, 0444); module_param_array(enable, bool, NULL, 0444);
MODULE_PARM_DESC(enable, "Enable " DRIVER_NAME); MODULE_PARM_DESC(enable, "Enable " DRIVER_NAME);
static struct pci_device_id snd_cs5535audio_ids[] __devinitdata = { static struct pci_device_id snd_cs5535audio_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) }, { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO) },
{} {}
......
...@@ -77,7 +77,7 @@ MODULE_PARM_DESC(subsystem, "Force card subsystem model."); ...@@ -77,7 +77,7 @@ MODULE_PARM_DESC(subsystem, "Force card subsystem model.");
/* /*
* Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400 * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400
*/ */
static struct pci_device_id snd_emu10k1_ids[] __devinitdata = { static struct pci_device_id snd_emu10k1_ids[] = {
{ 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* EMU10K1 */ { 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* EMU10K1 */
{ 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy */ { 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy */
{ 0x1102, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy 2 Value SB0400 */ { 0x1102, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy 2 Value SB0400 */
......
...@@ -531,7 +531,7 @@ static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 * emu, ...@@ -531,7 +531,7 @@ static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 * emu,
snd_emu10k1_ecard_write(emu, emu->ecard_ctrl); snd_emu10k1_ecard_write(emu, emu->ecard_ctrl);
} }
static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu) static int snd_emu10k1_ecard_init(struct snd_emu10k1 * emu)
{ {
unsigned int hc_value; unsigned int hc_value;
...@@ -571,7 +571,7 @@ static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu) ...@@ -571,7 +571,7 @@ static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu)
return 0; return 0;
} }
static int __devinit snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu) static int snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu)
{ {
unsigned long special_port; unsigned long special_port;
unsigned int value; unsigned int value;
...@@ -633,7 +633,7 @@ static int snd_emu1212m_fpga_netlist_write(struct snd_emu10k1 * emu, int reg, in ...@@ -633,7 +633,7 @@ static int snd_emu1212m_fpga_netlist_write(struct snd_emu10k1 * emu, int reg, in
return 0; return 0;
} }
static int __devinit snd_emu10k1_emu1212m_init(struct snd_emu10k1 * emu) static int snd_emu10k1_emu1212m_init(struct snd_emu10k1 * emu)
{ {
unsigned int i; unsigned int i;
int tmp; int tmp;
...@@ -1430,6 +1430,10 @@ void snd_emu10k1_resume_init(struct snd_emu10k1 *emu) ...@@ -1430,6 +1430,10 @@ void snd_emu10k1_resume_init(struct snd_emu10k1 *emu)
{ {
if (emu->card_capabilities->ecard) if (emu->card_capabilities->ecard)
snd_emu10k1_ecard_init(emu); snd_emu10k1_ecard_init(emu);
else if (emu->card_capabilities->ca_cardbus_chip)
snd_emu10k1_cardbus_init(emu);
else if (emu->card_capabilities->emu1212m)
snd_emu10k1_emu1212m_init(emu);
else else
snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE); snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE);
snd_emu10k1_init(emu, emu->enable_ir, 1); snd_emu10k1_init(emu, emu->enable_ir, 1);
......
...@@ -1286,7 +1286,7 @@ static void snd_emu10k1x_midi_interrupt(struct emu10k1x *emu, unsigned int statu ...@@ -1286,7 +1286,7 @@ static void snd_emu10k1x_midi_interrupt(struct emu10k1x *emu, unsigned int statu
do_emu10k1x_midi_interrupt(emu, &emu->midi, status); do_emu10k1x_midi_interrupt(emu, &emu->midi, status);
} }
static void snd_emu10k1x_midi_cmd(struct emu10k1x * emu, static int snd_emu10k1x_midi_cmd(struct emu10k1x * emu,
struct emu10k1x_midi *midi, unsigned char cmd, int ack) struct emu10k1x_midi *midi, unsigned char cmd, int ack)
{ {
unsigned long flags; unsigned long flags;
...@@ -1312,11 +1312,14 @@ static void snd_emu10k1x_midi_cmd(struct emu10k1x * emu, ...@@ -1312,11 +1312,14 @@ static void snd_emu10k1x_midi_cmd(struct emu10k1x * emu,
ok = 1; ok = 1;
} }
spin_unlock_irqrestore(&midi->input_lock, flags); spin_unlock_irqrestore(&midi->input_lock, flags);
if (!ok) if (!ok) {
snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n", snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n",
cmd, emu->port, cmd, emu->port,
mpu401_read_stat(emu, midi), mpu401_read_stat(emu, midi),
mpu401_read_data(emu, midi)); mpu401_read_data(emu, midi));
return 1;
}
return 0;
} }
static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream) static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream)
...@@ -1332,12 +1335,17 @@ static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream) ...@@ -1332,12 +1335,17 @@ static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream)
midi->substream_input = substream; midi->substream_input = substream;
if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) { if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1); if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1))
snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); goto error_out;
if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
goto error_out;
} else { } else {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
} }
return 0; return 0;
error_out:
return -EIO;
} }
static int snd_emu10k1x_midi_output_open(struct snd_rawmidi_substream *substream) static int snd_emu10k1x_midi_output_open(struct snd_rawmidi_substream *substream)
...@@ -1353,12 +1361,17 @@ static int snd_emu10k1x_midi_output_open(struct snd_rawmidi_substream *substream ...@@ -1353,12 +1361,17 @@ static int snd_emu10k1x_midi_output_open(struct snd_rawmidi_substream *substream
midi->substream_output = substream; midi->substream_output = substream;
if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) { if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1); if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1))
snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); goto error_out;
if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
goto error_out;
} else { } else {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
} }
return 0; return 0;
error_out:
return -EIO;
} }
static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream) static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream)
...@@ -1366,6 +1379,7 @@ static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream ...@@ -1366,6 +1379,7 @@ static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream
struct emu10k1x *emu; struct emu10k1x *emu;
struct emu10k1x_midi *midi = substream->rmidi->private_data; struct emu10k1x_midi *midi = substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
int err = 0;
emu = midi->emu; emu = midi->emu;
snd_assert(emu, return -ENXIO); snd_assert(emu, return -ENXIO);
...@@ -1375,11 +1389,11 @@ static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream ...@@ -1375,11 +1389,11 @@ static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream
midi->substream_input = NULL; midi->substream_input = NULL;
if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) { if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); err = snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0);
} else { } else {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
} }
return 0; return err;
} }
static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substream) static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substream)
...@@ -1387,6 +1401,7 @@ static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substrea ...@@ -1387,6 +1401,7 @@ static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substrea
struct emu10k1x *emu; struct emu10k1x *emu;
struct emu10k1x_midi *midi = substream->rmidi->private_data; struct emu10k1x_midi *midi = substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
int err = 0;
emu = midi->emu; emu = midi->emu;
snd_assert(emu, return -ENXIO); snd_assert(emu, return -ENXIO);
...@@ -1396,11 +1411,11 @@ static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substrea ...@@ -1396,11 +1411,11 @@ static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substrea
midi->substream_output = NULL; midi->substream_output = NULL;
if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) { if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); err = snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0);
} else { } else {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
} }
return 0; return err;
} }
static void snd_emu10k1x_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) static void snd_emu10k1x_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
...@@ -1594,7 +1609,7 @@ static void __devexit snd_emu10k1x_remove(struct pci_dev *pci) ...@@ -1594,7 +1609,7 @@ static void __devexit snd_emu10k1x_remove(struct pci_dev *pci)
} }
// PCI IDs // PCI IDs
static struct pci_device_id snd_emu10k1x_ids[] __devinitdata = { static struct pci_device_id snd_emu10k1x_ids[] = {
{ 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1) */ { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1) */
{ 0, } { 0, }
}; };
......
...@@ -116,7 +116,7 @@ static void snd_emu10k1_midi_interrupt2(struct snd_emu10k1 *emu, unsigned int st ...@@ -116,7 +116,7 @@ static void snd_emu10k1_midi_interrupt2(struct snd_emu10k1 *emu, unsigned int st
do_emu10k1_midi_interrupt(emu, &emu->midi2, status); do_emu10k1_midi_interrupt(emu, &emu->midi2, status);
} }
static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack) static int snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack)
{ {
unsigned long flags; unsigned long flags;
int timeout, ok; int timeout, ok;
...@@ -141,11 +141,14 @@ static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_mi ...@@ -141,11 +141,14 @@ static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_mi
ok = 1; ok = 1;
} }
spin_unlock_irqrestore(&midi->input_lock, flags); spin_unlock_irqrestore(&midi->input_lock, flags);
if (!ok) if (!ok) {
snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n", snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n",
cmd, emu->port, cmd, emu->port,
mpu401_read_stat(emu, midi), mpu401_read_stat(emu, midi),
mpu401_read_data(emu, midi)); mpu401_read_data(emu, midi));
return 1;
}
return 0;
} }
static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream) static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream)
...@@ -161,12 +164,17 @@ static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream) ...@@ -161,12 +164,17 @@ static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream)
midi->substream_input = substream; midi->substream_input = substream;
if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) { if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1); if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1))
snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); goto error_out;
if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
goto error_out;
} else { } else {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
} }
return 0; return 0;
error_out:
return -EIO;
} }
static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream) static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream)
...@@ -182,12 +190,17 @@ static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream) ...@@ -182,12 +190,17 @@ static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream)
midi->substream_output = substream; midi->substream_output = substream;
if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) { if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1); if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1))
snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); goto error_out;
if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
goto error_out;
} else { } else {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
} }
return 0; return 0;
error_out:
return -EIO;
} }
static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream)
...@@ -195,6 +208,7 @@ static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) ...@@ -195,6 +208,7 @@ static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream)
struct snd_emu10k1 *emu; struct snd_emu10k1 *emu;
struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
int err = 0;
emu = midi->emu; emu = midi->emu;
snd_assert(emu, return -ENXIO); snd_assert(emu, return -ENXIO);
...@@ -204,11 +218,11 @@ static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) ...@@ -204,11 +218,11 @@ static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream)
midi->substream_input = NULL; midi->substream_input = NULL;
if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) { if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); err = snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0);
} else { } else {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
} }
return 0; return err;
} }
static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream) static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream)
...@@ -216,6 +230,7 @@ static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream ...@@ -216,6 +230,7 @@ static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream
struct snd_emu10k1 *emu; struct snd_emu10k1 *emu;
struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
int err = 0;
emu = midi->emu; emu = midi->emu;
snd_assert(emu, return -ENXIO); snd_assert(emu, return -ENXIO);
...@@ -225,11 +240,11 @@ static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream ...@@ -225,11 +240,11 @@ static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream
midi->substream_output = NULL; midi->substream_output = NULL;
if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) { if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); err = snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0);
} else { } else {
spin_unlock_irqrestore(&midi->open_lock, flags); spin_unlock_irqrestore(&midi->open_lock, flags);
} }
return 0; return err;
} }
static void snd_emu10k1_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) static void snd_emu10k1_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
......
...@@ -446,7 +446,7 @@ struct ensoniq { ...@@ -446,7 +446,7 @@ struct ensoniq {
static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs); static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static struct pci_device_id snd_audiopci_ids[] __devinitdata = { static struct pci_device_id snd_audiopci_ids[] = {
#ifdef CHIP1370 #ifdef CHIP1370
{ 0x1274, 0x5000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ES1370 */ { 0x1274, 0x5000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ES1370 */
#endif #endif
......
...@@ -242,7 +242,7 @@ struct es1938 { ...@@ -242,7 +242,7 @@ struct es1938 {
static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs); static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static struct pci_device_id snd_es1938_ids[] __devinitdata = { static struct pci_device_id snd_es1938_ids[] = {
{ 0x125d, 0x1969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Solo-1 */ { 0x125d, 0x1969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Solo-1 */
{ 0, } { 0, }
}; };
......
...@@ -592,7 +592,7 @@ struct es1968 { ...@@ -592,7 +592,7 @@ struct es1968 {
static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs); static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static struct pci_device_id snd_es1968_ids[] __devinitdata = { static struct pci_device_id snd_es1968_ids[] = {
/* Maestro 1 */ /* Maestro 1 */
{ 0x1285, 0x0100, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, TYPE_MAESTRO }, { 0x1285, 0x0100, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, TYPE_MAESTRO },
/* Maestro 2 */ /* Maestro 2 */
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <asm/io.h> #include <asm/io.h>
#if (defined(CONFIG_SND_FM801_TEA575X) || defined(CONFIG_SND_FM801_TEA575X_MODULE)) && (defined(CONFIG_VIDEO_DEV) || defined(CONFIG_VIDEO_DEV_MODULE)) #ifdef CONFIG_SND_FM801_TEA575X_BOOL
#include <sound/tea575x-tuner.h> #include <sound/tea575x-tuner.h>
#define TEA575X_RADIO 1 #define TEA575X_RADIO 1
#endif #endif
...@@ -199,7 +199,7 @@ struct fm801 { ...@@ -199,7 +199,7 @@ struct fm801 {
#endif #endif
}; };
static struct pci_device_id snd_fm801_ids[] __devinitdata = { static struct pci_device_id snd_fm801_ids[] = {
{ 0x1319, 0x0801, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* FM801 */ { 0x1319, 0x0801, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* FM801 */
{ 0x5213, 0x0510, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* Gallant Odyssey Sound 4 */ { 0x5213, 0x0510, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* Gallant Odyssey Sound 4 */
{ 0, } { 0, }
......
...@@ -1629,7 +1629,7 @@ static void __devexit azx_remove(struct pci_dev *pci) ...@@ -1629,7 +1629,7 @@ static void __devexit azx_remove(struct pci_dev *pci)
} }
/* PCI IDs */ /* PCI IDs */
static struct pci_device_id azx_ids[] __devinitdata = { static struct pci_device_id azx_ids[] = {
{ 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */ { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */
{ 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */ { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */
{ 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */ { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */
......
...@@ -1545,6 +1545,9 @@ enum { ...@@ -1545,6 +1545,9 @@ enum {
/* reivision id to check workarounds */ /* reivision id to check workarounds */
#define AD1988A_REV2 0x100200 #define AD1988A_REV2 0x100200
#define is_rev2(codec) \
((codec)->vendor_id == 0x11d41988 && \
(codec)->revision_id == AD1988A_REV2)
/* /*
* mixers * mixers
...@@ -1636,6 +1639,7 @@ static struct snd_kcontrol_new ad1988_6stack_mixers1[] = { ...@@ -1636,6 +1639,7 @@ static struct snd_kcontrol_new ad1988_6stack_mixers1[] = {
HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("Side Playback Volume", 0x0a, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Side Playback Volume", 0x0a, 0x0, HDA_OUTPUT),
{ } /* end */
}; };
static struct snd_kcontrol_new ad1988_6stack_mixers1_rev2[] = { static struct snd_kcontrol_new ad1988_6stack_mixers1_rev2[] = {
...@@ -1644,6 +1648,7 @@ static struct snd_kcontrol_new ad1988_6stack_mixers1_rev2[] = { ...@@ -1644,6 +1648,7 @@ static struct snd_kcontrol_new ad1988_6stack_mixers1_rev2[] = {
HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0a, 2, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0a, 2, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("Side Playback Volume", 0x06, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Side Playback Volume", 0x06, 0x0, HDA_OUTPUT),
{ } /* end */
}; };
static struct snd_kcontrol_new ad1988_6stack_mixers2[] = { static struct snd_kcontrol_new ad1988_6stack_mixers2[] = {
...@@ -1682,6 +1687,7 @@ static struct snd_kcontrol_new ad1988_3stack_mixers1[] = { ...@@ -1682,6 +1687,7 @@ static struct snd_kcontrol_new ad1988_3stack_mixers1[] = {
HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT),
{ } /* end */
}; };
static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = { static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = {
...@@ -1689,6 +1695,7 @@ static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = { ...@@ -1689,6 +1695,7 @@ static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = {
HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x06, 1, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x06, 1, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x06, 2, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x06, 2, 0x0, HDA_OUTPUT),
{ } /* end */
}; };
static struct snd_kcontrol_new ad1988_3stack_mixers2[] = { static struct snd_kcontrol_new ad1988_3stack_mixers2[] = {
...@@ -2195,7 +2202,7 @@ static inline hda_nid_t ad1988_idx_to_dac(struct hda_codec *codec, int idx) ...@@ -2195,7 +2202,7 @@ static inline hda_nid_t ad1988_idx_to_dac(struct hda_codec *codec, int idx)
/* A B C D E F G H */ /* A B C D E F G H */
0x04, 0x05, 0x0a, 0x04, 0x06, 0x05, 0x0a, 0x06 0x04, 0x05, 0x0a, 0x04, 0x06, 0x05, 0x0a, 0x06
}; };
if (codec->revision_id == AD1988A_REV2) if (is_rev2(codec))
return idx_to_dac_rev2[idx]; return idx_to_dac_rev2[idx];
else else
return idx_to_dac[idx]; return idx_to_dac[idx];
...@@ -2564,7 +2571,7 @@ static int patch_ad1988(struct hda_codec *codec) ...@@ -2564,7 +2571,7 @@ static int patch_ad1988(struct hda_codec *codec)
mutex_init(&spec->amp_mutex); mutex_init(&spec->amp_mutex);
codec->spec = spec; codec->spec = spec;
if (codec->revision_id == AD1988A_REV2) if (is_rev2(codec))
snd_printk(KERN_INFO "patch_analog: AD1988A rev.2 is detected, enable workarounds\n"); snd_printk(KERN_INFO "patch_analog: AD1988A rev.2 is detected, enable workarounds\n");
board_config = snd_hda_check_board_config(codec, ad1988_cfg_tbl); board_config = snd_hda_check_board_config(codec, ad1988_cfg_tbl);
...@@ -2590,13 +2597,13 @@ static int patch_ad1988(struct hda_codec *codec) ...@@ -2590,13 +2597,13 @@ static int patch_ad1988(struct hda_codec *codec)
case AD1988_6STACK_DIG: case AD1988_6STACK_DIG:
spec->multiout.max_channels = 8; spec->multiout.max_channels = 8;
spec->multiout.num_dacs = 4; spec->multiout.num_dacs = 4;
if (codec->revision_id == AD1988A_REV2) if (is_rev2(codec))
spec->multiout.dac_nids = ad1988_6stack_dac_nids_rev2; spec->multiout.dac_nids = ad1988_6stack_dac_nids_rev2;
else else
spec->multiout.dac_nids = ad1988_6stack_dac_nids; spec->multiout.dac_nids = ad1988_6stack_dac_nids;
spec->input_mux = &ad1988_6stack_capture_source; spec->input_mux = &ad1988_6stack_capture_source;
spec->num_mixers = 2; spec->num_mixers = 2;
if (codec->revision_id == AD1988A_REV2) if (is_rev2(codec))
spec->mixers[0] = ad1988_6stack_mixers1_rev2; spec->mixers[0] = ad1988_6stack_mixers1_rev2;
else else
spec->mixers[0] = ad1988_6stack_mixers1; spec->mixers[0] = ad1988_6stack_mixers1;
...@@ -2612,7 +2619,7 @@ static int patch_ad1988(struct hda_codec *codec) ...@@ -2612,7 +2619,7 @@ static int patch_ad1988(struct hda_codec *codec)
case AD1988_3STACK_DIG: case AD1988_3STACK_DIG:
spec->multiout.max_channels = 6; spec->multiout.max_channels = 6;
spec->multiout.num_dacs = 3; spec->multiout.num_dacs = 3;
if (codec->revision_id == AD1988A_REV2) if (is_rev2(codec))
spec->multiout.dac_nids = ad1988_3stack_dac_nids_rev2; spec->multiout.dac_nids = ad1988_3stack_dac_nids_rev2;
else else
spec->multiout.dac_nids = ad1988_3stack_dac_nids; spec->multiout.dac_nids = ad1988_3stack_dac_nids;
...@@ -2620,7 +2627,7 @@ static int patch_ad1988(struct hda_codec *codec) ...@@ -2620,7 +2627,7 @@ static int patch_ad1988(struct hda_codec *codec)
spec->channel_mode = ad1988_3stack_modes; spec->channel_mode = ad1988_3stack_modes;
spec->num_channel_mode = ARRAY_SIZE(ad1988_3stack_modes); spec->num_channel_mode = ARRAY_SIZE(ad1988_3stack_modes);
spec->num_mixers = 2; spec->num_mixers = 2;
if (codec->revision_id == AD1988A_REV2) if (is_rev2(codec))
spec->mixers[0] = ad1988_3stack_mixers1_rev2; spec->mixers[0] = ad1988_3stack_mixers1_rev2;
else else
spec->mixers[0] = ad1988_3stack_mixers1; spec->mixers[0] = ad1988_3stack_mixers1;
......
...@@ -2131,7 +2131,7 @@ struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = { ...@@ -2131,7 +2131,7 @@ struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = {
.build_controls = aureon_add_controls, .build_controls = aureon_add_controls,
.eeprom_size = sizeof(aureon71_eeprom), .eeprom_size = sizeof(aureon71_eeprom),
.eeprom_data = aureon71_eeprom, .eeprom_data = aureon71_eeprom,
.driver = "Aureon71Universe", .driver = "Aureon71Univ", /* keep in 15 letters */
}, },
{ {
.subvendor = VT1724_SUBDEVICE_PRODIGY71, .subvendor = VT1724_SUBDEVICE_PRODIGY71,
......
...@@ -106,7 +106,7 @@ module_param_array(dxr_enable, int, NULL, 0444); ...@@ -106,7 +106,7 @@ module_param_array(dxr_enable, int, NULL, 0444);
MODULE_PARM_DESC(dxr_enable, "Enable DXR support for Terratec DMX6FIRE."); MODULE_PARM_DESC(dxr_enable, "Enable DXR support for Terratec DMX6FIRE.");
static struct pci_device_id snd_ice1712_ids[] __devinitdata = { static struct pci_device_id snd_ice1712_ids[] = {
{ PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICE1712 */ { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICE1712 */
{ 0, } { 0, }
}; };
......
...@@ -86,7 +86,7 @@ MODULE_PARM_DESC(model, "Use the given board model."); ...@@ -86,7 +86,7 @@ MODULE_PARM_DESC(model, "Use the given board model.");
/* Both VT1720 and VT1724 have the same PCI IDs */ /* Both VT1720 and VT1724 have the same PCI IDs */
static struct pci_device_id snd_vt1724_ids[] __devinitdata = { static struct pci_device_id snd_vt1724_ids[] = {
{ PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_VT1724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_VT1724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0, } { 0, }
}; };
......
...@@ -413,7 +413,7 @@ struct intel8x0 { ...@@ -413,7 +413,7 @@ struct intel8x0 {
u32 int_sta_mask; /* interrupt status mask */ u32 int_sta_mask; /* interrupt status mask */
}; };
static struct pci_device_id snd_intel8x0_ids[] __devinitdata = { static struct pci_device_id snd_intel8x0_ids[] = {
{ 0x8086, 0x2415, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ { 0x8086, 0x2415, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */
{ 0x8086, 0x2425, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ { 0x8086, 0x2425, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */
{ 0x8086, 0x2445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ { 0x8086, 0x2445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */
...@@ -1955,6 +1955,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { ...@@ -1955,6 +1955,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
.name = "AMD64 Mobo", /* ALC650 */ .name = "AMD64 Mobo", /* ALC650 */
.type = AC97_TUNE_HP_ONLY .type = AC97_TUNE_HP_ONLY
}, },
{
.subvendor = 0x10f1,
.subdevice = 0x2895,
.name = "Tyan Thunder K8WE",
.type = AC97_TUNE_HP_ONLY
},
{ {
.subvendor = 0x110a, .subvendor = 0x110a,
.subdevice = 0x0056, .subdevice = 0x0056,
......
...@@ -224,7 +224,7 @@ struct intel8x0m { ...@@ -224,7 +224,7 @@ struct intel8x0m {
unsigned int pcm_pos_shift; unsigned int pcm_pos_shift;
}; };
static struct pci_device_id snd_intel8x0m_ids[] __devinitdata = { static struct pci_device_id snd_intel8x0m_ids[] = {
{ 0x8086, 0x2416, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ { 0x8086, 0x2416, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */
{ 0x8086, 0x2426, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ { 0x8086, 0x2426, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */
{ 0x8086, 0x2446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ { 0x8086, 0x2446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */
......
...@@ -424,7 +424,7 @@ module_param_array(enable, bool, NULL, 0444); ...@@ -424,7 +424,7 @@ module_param_array(enable, bool, NULL, 0444);
MODULE_PARM_DESC(enable, "Enable Korg 1212 soundcard."); MODULE_PARM_DESC(enable, "Enable Korg 1212 soundcard.");
MODULE_AUTHOR("Haroldo Gamal <gamal@alternex.com.br>"); MODULE_AUTHOR("Haroldo Gamal <gamal@alternex.com.br>");
static struct pci_device_id snd_korg1212_ids[] __devinitdata = { static struct pci_device_id snd_korg1212_ids[] = {
{ {
.vendor = 0x10b5, .vendor = 0x10b5,
.device = 0x906d, .device = 0x906d,
......
...@@ -869,7 +869,7 @@ struct snd_m3 { ...@@ -869,7 +869,7 @@ struct snd_m3 {
/* /*
* pci ids * pci ids
*/ */
static struct pci_device_id snd_m3_ids[] __devinitdata = { static struct pci_device_id snd_m3_ids[] = {
{PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO_1, PCI_ANY_ID, PCI_ANY_ID, {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO_1, PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0},
{PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO, PCI_ANY_ID, PCI_ANY_ID, {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO, PCI_ANY_ID, PCI_ANY_ID,
...@@ -2137,7 +2137,7 @@ static int __devinit snd_m3_mixer(struct snd_m3 *chip) ...@@ -2137,7 +2137,7 @@ static int __devinit snd_m3_mixer(struct snd_m3 *chip)
* DSP Code images * DSP Code images
*/ */
static const u16 assp_kernel_image[] __devinitdata = { static const u16 assp_kernel_image[] = {
0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4, 0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4,
0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4,
0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4,
...@@ -2224,7 +2224,7 @@ static const u16 assp_kernel_image[] __devinitdata = { ...@@ -2224,7 +2224,7 @@ static const u16 assp_kernel_image[] __devinitdata = {
* Mini sample rate converter code image * Mini sample rate converter code image
* that is to be loaded at 0x400 on the DSP. * that is to be loaded at 0x400 on the DSP.
*/ */
static const u16 assp_minisrc_image[] __devinitdata = { static const u16 assp_minisrc_image[] = {
0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412, 0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412,
0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41, 0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41,
...@@ -2267,12 +2267,12 @@ static const u16 assp_minisrc_image[] __devinitdata = { ...@@ -2267,12 +2267,12 @@ static const u16 assp_minisrc_image[] __devinitdata = {
*/ */
#define MINISRC_LPF_LEN 10 #define MINISRC_LPF_LEN 10
static const u16 minisrc_lpf[MINISRC_LPF_LEN] __devinitdata = { static const u16 minisrc_lpf[MINISRC_LPF_LEN] = {
0X0743, 0X1104, 0X0A4C, 0XF88D, 0X242C, 0X0743, 0X1104, 0X0A4C, 0XF88D, 0X242C,
0X1023, 0X1AA9, 0X0B60, 0XEFDD, 0X186F 0X1023, 0X1AA9, 0X0B60, 0XEFDD, 0X186F
}; };
static void __devinit snd_m3_assp_init(struct snd_m3 *chip) static void snd_m3_assp_init(struct snd_m3 *chip)
{ {
unsigned int i; unsigned int i;
......
...@@ -61,7 +61,7 @@ MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard."); ...@@ -61,7 +61,7 @@ MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard.");
/* /*
*/ */
static struct pci_device_id snd_mixart_ids[] __devinitdata = { static struct pci_device_id snd_mixart_ids[] = {
{ 0x1057, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* MC8240 */ { 0x1057, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* MC8240 */
{ 0, } { 0, }
}; };
......
...@@ -263,7 +263,7 @@ struct nm256 { ...@@ -263,7 +263,7 @@ struct nm256 {
/* /*
* PCI ids * PCI ids
*/ */
static struct pci_device_id snd_nm256_ids[] __devinitdata = { static struct pci_device_id snd_nm256_ids[] = {
{PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
......
...@@ -73,7 +73,7 @@ enum { ...@@ -73,7 +73,7 @@ enum {
PCI_ID_LAST PCI_ID_LAST
}; };
static struct pci_device_id pcxhr_ids[] __devinitdata = { static struct pci_device_id pcxhr_ids[] = {
{ 0x10b5, 0x9656, 0x1369, 0xb001, 0, 0, PCI_ID_VX882HR, }, /* VX882HR */ { 0x10b5, 0x9656, 0x1369, 0xb001, 0, 0, PCI_ID_VX882HR, }, /* VX882HR */
{ 0x10b5, 0x9656, 0x1369, 0xb101, 0, 0, PCI_ID_PCX882HR, }, /* PCX882HR */ { 0x10b5, 0x9656, 0x1369, 0xb101, 0, 0, PCI_ID_PCX882HR, }, /* PCX882HR */
{ 0x10b5, 0x9656, 0x1369, 0xb201, 0, 0, PCI_ID_VX881HR, }, /* VX881HR */ { 0x10b5, 0x9656, 0x1369, 0xb201, 0, 0, PCI_ID_VX881HR, }, /* VX881HR */
......
...@@ -506,7 +506,7 @@ static int riptide_reset(struct cmdif *cif, struct snd_riptide *chip); ...@@ -506,7 +506,7 @@ static int riptide_reset(struct cmdif *cif, struct snd_riptide *chip);
/* /*
*/ */
static struct pci_device_id snd_riptide_ids[] __devinitdata = { static struct pci_device_id snd_riptide_ids[] = {
{ {
.vendor = 0x127a,.device = 0x4310, .vendor = 0x127a,.device = 0x4310,
.subvendor = PCI_ANY_ID,.subdevice = PCI_ANY_ID, .subvendor = PCI_ANY_ID,.subdevice = PCI_ANY_ID,
......
...@@ -227,7 +227,7 @@ struct rme32 { ...@@ -227,7 +227,7 @@ struct rme32 {
struct snd_kcontrol *spdif_ctl; struct snd_kcontrol *spdif_ctl;
}; };
static struct pci_device_id snd_rme32_ids[] __devinitdata = { static struct pci_device_id snd_rme32_ids[] = {
{PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32, {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
{PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8, {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8,
......
...@@ -232,7 +232,7 @@ struct rme96 { ...@@ -232,7 +232,7 @@ struct rme96 {
struct snd_kcontrol *spdif_ctl; struct snd_kcontrol *spdif_ctl;
}; };
static struct pci_device_id snd_rme96_ids[] __devinitdata = { static struct pci_device_id snd_rme96_ids[] = {
{ PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96, { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
{ PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8, { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8,
......
...@@ -568,7 +568,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d ...@@ -568,7 +568,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d
} }
static struct pci_device_id snd_hdsp_ids[] __devinitdata = { static struct pci_device_id snd_hdsp_ids[] = {
{ {
.vendor = PCI_VENDOR_ID_XILINX, .vendor = PCI_VENDOR_ID_XILINX,
.device = PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP, .device = PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP,
...@@ -1356,7 +1356,7 @@ static struct snd_rawmidi_ops snd_hdsp_midi_input = ...@@ -1356,7 +1356,7 @@ static struct snd_rawmidi_ops snd_hdsp_midi_input =
.trigger = snd_hdsp_midi_input_trigger, .trigger = snd_hdsp_midi_input_trigger,
}; };
static int __devinit snd_hdsp_create_midi (struct snd_card *card, struct hdsp *hdsp, int id) static int snd_hdsp_create_midi (struct snd_card *card, struct hdsp *hdsp, int id)
{ {
char buf[32]; char buf[32];
......
...@@ -315,7 +315,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d ...@@ -315,7 +315,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d
} }
static struct pci_device_id snd_rme9652_ids[] __devinitdata = { static struct pci_device_id snd_rme9652_ids[] = {
{ {
.vendor = 0x10ee, .vendor = 0x10ee,
.device = 0x3fc4, .device = 0x3fc4,
......
...@@ -243,7 +243,7 @@ struct sonicvibes { ...@@ -243,7 +243,7 @@ struct sonicvibes {
#endif #endif
}; };
static struct pci_device_id snd_sonic_ids[] __devinitdata = { static struct pci_device_id snd_sonic_ids[] = {
{ 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, { 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
{ 0, } { 0, }
}; };
......
...@@ -63,7 +63,7 @@ MODULE_PARM_DESC(pcm_channels, "Number of hardware channels assigned for PCM."); ...@@ -63,7 +63,7 @@ MODULE_PARM_DESC(pcm_channels, "Number of hardware channels assigned for PCM.");
module_param_array(wavetable_size, int, NULL, 0444); module_param_array(wavetable_size, int, NULL, 0444);
MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth.");
static struct pci_device_id snd_trident_ids[] __devinitdata = { static struct pci_device_id snd_trident_ids[] = {
{PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX),
PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0},
{PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX), {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX),
......
...@@ -396,7 +396,7 @@ struct via82xx { ...@@ -396,7 +396,7 @@ struct via82xx {
#endif #endif
}; };
static struct pci_device_id snd_via82xx_ids[] __devinitdata = { static struct pci_device_id snd_via82xx_ids[] = {
/* 0x1106, 0x3058 */ /* 0x1106, 0x3058 */
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA686, }, /* 686A */ { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA686, }, /* 686A */
/* 0x1106, 0x3059 */ /* 0x1106, 0x3059 */
......
...@@ -261,7 +261,7 @@ struct via82xx_modem { ...@@ -261,7 +261,7 @@ struct via82xx_modem {
struct snd_info_entry *proc_entry; struct snd_info_entry *proc_entry;
}; };
static struct pci_device_id snd_via82xx_modem_ids[] __devinitdata = { static struct pci_device_id snd_via82xx_modem_ids[] = {
{ 0x1106, 0x3068, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA82XX_MODEM, }, { 0x1106, 0x3068, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA82XX_MODEM, },
{ 0, } { 0, }
}; };
......
...@@ -60,7 +60,7 @@ enum { ...@@ -60,7 +60,7 @@ enum {
VX_PCI_VX222_NEW VX_PCI_VX222_NEW
}; };
static struct pci_device_id snd_vx222_ids[] __devinitdata = { static struct pci_device_id snd_vx222_ids[] = {
{ 0x10b5, 0x9050, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_OLD, }, /* PLX */ { 0x10b5, 0x9050, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_OLD, }, /* PLX */
{ 0x10b5, 0x9030, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_NEW, }, /* PLX */ { 0x10b5, 0x9030, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_NEW, }, /* PLX */
{ 0, } { 0, }
......
...@@ -70,7 +70,7 @@ MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch"); ...@@ -70,7 +70,7 @@ MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch");
module_param_array(rear_swap, bool, NULL, 0444); module_param_array(rear_swap, bool, NULL, 0444);
MODULE_PARM_DESC(rear_swap, "Swap rear channels (must be enabled for correct IEC958 (S/PDIF)) output"); MODULE_PARM_DESC(rear_swap, "Swap rear channels (must be enabled for correct IEC958 (S/PDIF)) output");
static struct pci_device_id snd_ymfpci_ids[] __devinitdata = { static struct pci_device_id snd_ymfpci_ids[] = {
{ 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724 */ { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724 */
{ 0x1073, 0x000d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724F */ { 0x1073, 0x000d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724F */
{ 0x1073, 0x000a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF740 */ { 0x1073, 0x000a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF740 */
......
...@@ -241,12 +241,13 @@ static int pdacf_config(struct pcmcia_device *link) ...@@ -241,12 +241,13 @@ static int pdacf_config(struct pcmcia_device *link)
CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, parse)); CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, parse));
link->conf.ConfigBase = parse->config.base; link->conf.ConfigBase = parse->config.base;
link->conf.ConfigIndex = 0x5; link->conf.ConfigIndex = 0x5;
kfree(parse);
CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io));
CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
kfree(parse);
if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0) if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0)
goto failed; goto failed;
...@@ -254,6 +255,7 @@ static int pdacf_config(struct pcmcia_device *link) ...@@ -254,6 +255,7 @@ static int pdacf_config(struct pcmcia_device *link)
return 0; return 0;
cs_failed: cs_failed:
kfree(parse);
cs_error(link, last_fn, last_ret); cs_error(link, last_fn, last_ret);
failed: failed:
pcmcia_disable_device(link); pcmcia_disable_device(link);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册