summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 22:08:23 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 22:08:23 -0800
commitb4103333d7904310d34de18d85e51e3d74f00a3b (patch)
treedd5fff309659f023fd5540896cb2db30562abaa6
parent59ed2f59e4ea6a32f9591e378da7935f713a7000 (diff)
parent1494a92f4c2b1d5abdaa1f823dd19f797bb137de (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt10
-rw-r--r--Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl4
-rw-r--r--drivers/pnp/card.c9
-rw-r--r--sound/core/info.c33
-rw-r--r--sound/drivers/serial-u16550.c2
-rw-r--r--sound/isa/cmi8330.c6
-rw-r--r--sound/isa/cs423x/cs4236.c13
-rw-r--r--sound/isa/es18xx.c6
-rw-r--r--sound/isa/gus/gusclassic.c2
-rw-r--r--sound/isa/opl3sa2.c12
-rw-r--r--sound/isa/opti9xx/opti92x-ad1848.c2
-rw-r--r--sound/isa/sb/sb16.c4
-rw-r--r--sound/isa/sscape.c6
-rw-r--r--sound/isa/wavefront/wavefront.c7
-rw-r--r--sound/isa/wavefront/wavefront_synth.c2
-rw-r--r--sound/pci/ac97/ac97_patch.c53
-rw-r--r--sound/pci/ali5451/ali5451.c2
-rw-r--r--sound/pci/au88x0/au88x0_eq.c2
-rw-r--r--sound/pci/bt87x.c4
-rw-r--r--sound/pci/ca0106/ca0106_main.c12
-rw-r--r--sound/pci/cs46xx/dsp_spos_scb_lib.c2
-rw-r--r--sound/pci/cs5535audio/cs5535audio.c6
-rw-r--r--sound/pci/emu10k1/emumixer.c10
-rw-r--r--sound/pci/hda/hda_intel.c2
-rw-r--r--sound/pci/hda/patch_realtek.c11
-rw-r--r--sound/pci/hda/patch_si3054.c1
-rw-r--r--sound/pci/hda/patch_sigmatel.c176
-rw-r--r--sound/pci/intel8x0.c15
-rw-r--r--sound/pci/pcxhr/pcxhr.c9
-rw-r--r--sound/pci/rme9652/hdspm.c6
-rw-r--r--sound/pci/trident/trident.c8
-rw-r--r--sound/pci/via82xx.c5
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c2
-rw-r--r--sound/usb/usbaudio.c31
34 files changed, 364 insertions, 111 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index d2578013e829..36b511c7cade 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -837,8 +837,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for AC'97 motherboards from Intel and compatibles.
* Intel i810/810E, i815, i820, i830, i84x, MX440
+ ICH5, ICH6, ICH7, ESB2
* SiS 7012 (SiS 735)
- * NVidia NForce, NForce2
+ * NVidia NForce, NForce2, NForce3, MCP04, CK804
+ CK8, CK8S, MCP501
* AMD AMD768, AMD8111
* ALi m5455
@@ -868,6 +870,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
--------------------
Module for Intel ICH (i8x0) chipset MC97 modems.
+ * Intel i810/810E, i815, i820, i830, i84x, MX440
+ ICH5, ICH6, ICH7
+ * SiS 7013 (SiS 735)
+ * NVidia NForce, NForce2, NForce2s, NForce3
+ * AMD AMD8111
+ * ALi m5455
ac97_clock - AC'97 codec clock base (0 = auto-detect)
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
index e651ed8d1e6f..4251085d38d3 100644
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -5206,14 +5206,14 @@ struct _snd_pcm_runtime {
You need to pass the <function>snd_dma_pci_data(pci)</function>,
where pci is the struct <structname>pci_dev</structname> pointer
of the chip as well.
- The <type>snd_sg_buf_t</type> instance is created as
+ The <type>struct snd_sg_buf</type> instance is created as
substream-&gt;dma_private. You can cast
the pointer like:
<informalexample>
<programlisting>
<![CDATA[
- struct snd_sg_buf *sgbuf = (struct snd_sg_buf_t*)substream->dma_private;
+ struct snd_sg_buf *sgbuf = (struct snd_sg_buf *)substream->dma_private;
]]>
</programlisting>
</informalexample>
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index 0ecbe4edbec1..aaa568a3806e 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -363,7 +363,7 @@ static int card_resume(struct pnp_dev *dev)
int pnp_register_card_driver(struct pnp_card_driver * drv)
{
- int count = 0;
+ int count;
struct list_head *pos, *temp;
drv->link.name = drv->name;
@@ -374,10 +374,15 @@ int pnp_register_card_driver(struct pnp_card_driver * drv)
drv->link.suspend = drv->suspend ? card_suspend : NULL;
drv->link.resume = drv->resume ? card_resume : NULL;
+ count = pnp_register_driver(&drv->link);
+ if (count < 0)
+ return count;
+
spin_lock(&pnp_lock);
list_add_tail(&drv->global_list, &pnp_card_drivers);
spin_unlock(&pnp_lock);
- pnp_register_driver(&drv->link);
+
+ count = 0;
list_for_each_safe(pos,temp,&pnp_cards){
struct pnp_card *card = list_entry(pos, struct pnp_card, global_list);
diff --git a/sound/core/info.c b/sound/core/info.c
index ae8853921464..af123e3bdb24 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -444,8 +444,8 @@ static unsigned int snd_info_entry_poll(struct file *file, poll_table * wait)
return mask;
}
-static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long snd_info_entry_ioctl(struct file *file, unsigned int cmd,
+ unsigned long arg)
{
struct snd_info_private_data *data;
struct snd_info_entry *entry;
@@ -465,17 +465,6 @@ static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file,
return -ENOTTY;
}
-/* FIXME: need to unlock BKL to allow preemption */
-static int snd_info_entry_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
-{
- int err;
- unlock_kernel();
- err = _snd_info_entry_ioctl(inode, file, cmd, arg);
- lock_kernel();
- return err;
-}
-
static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma)
{
struct inode *inode = file->f_dentry->d_inode;
@@ -499,15 +488,15 @@ static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma)
static struct file_operations snd_info_entry_operations =
{
- .owner = THIS_MODULE,
- .llseek = snd_info_entry_llseek,
- .read = snd_info_entry_read,
- .write = snd_info_entry_write,
- .poll = snd_info_entry_poll,
- .ioctl = snd_info_entry_ioctl,
- .mmap = snd_info_entry_mmap,
- .open = snd_info_entry_open,
- .release = snd_info_entry_release,
+ .owner = THIS_MODULE,
+ .llseek = snd_info_entry_llseek,
+ .read = snd_info_entry_read,
+ .write = snd_info_entry_write,
+ .poll = snd_info_entry_poll,
+ .unlocked_ioctl = snd_info_entry_ioctl,
+ .mmap = snd_info_entry_mmap,
+ .open = snd_info_entry_open,
+ .release = snd_info_entry_release,
};
/**
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index 29676d800cae..112ddf705402 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -789,7 +789,7 @@ static int __init snd_uart16550_create(struct snd_card *card,
if ((err = snd_uart16550_detect(uart)) <= 0) {
printk(KERN_ERR "no UART detected at 0x%lx\n", iobase);
- return err;
+ return -ENODEV;
}
if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index bd8e23818460..fd9bb2575de8 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -109,7 +109,9 @@ module_param_array(wssdma, int, NULL, 0444);
MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver.");
static struct platform_device *platform_devices[SNDRV_CARDS];
+#ifdef CONFIG_PNP
static int pnp_registered;
+#endif
#define CMI8330_RMUX3D 16
#define CMI8330_MUTEMUX 17
@@ -672,8 +674,10 @@ static void __init_or_module snd_cmi8330_unregister_all(void)
{
int i;
+#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&cmi8330_pnpc_driver);
+#endif
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
platform_device_unregister(platform_devices[i]);
platform_driver_unregister(&snd_cmi8330_driver);
@@ -700,11 +704,13 @@ static int __init alsa_card_cmi8330_init(void)
cards++;
}
+#ifdef CONFIG_PNP
err = pnp_register_card_driver(&cmi8330_pnpc_driver);
if (err >= 0) {
pnp_registered = 1;
cards += err;
}
+#endif
if (!cards) {
#ifdef MODULE
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index e1683337e6cd..4fa431040564 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -75,8 +75,10 @@ MODULE_SUPPORTED_DEVICE("{{Crystal Semiconductors,CS4235},"
#ifdef CS4232
#define IDENT "CS4232"
+#define CS423X_DRIVER "snd_cs4232"
#else
#define IDENT "CS4236+"
+#define CS423X_DRIVER "snd_cs4236"
#endif
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
@@ -125,10 +127,12 @@ module_param_array(dma2, int, NULL, 0444);
MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver.");
static struct platform_device *platform_devices[SNDRV_CARDS];
+#ifdef CONFIG_PNP
static int pnpc_registered;
#ifdef CS4232
static int pnp_registered;
#endif
+#endif /* CONFIG_PNP */
struct snd_card_cs4236 {
struct snd_cs4231 *chip;
@@ -158,7 +162,6 @@ MODULE_DEVICE_TABLE(pnp, snd_cs4232_pnpbiosids);
#endif /* CS4232 */
#ifdef CS4232
-#define CS423X_DRIVER "snd_cs4232"
#define CS423X_ISAPNP_DRIVER "cs4232_isapnp"
static struct pnp_card_device_id snd_cs423x_pnpids[] = {
/* Philips PCA70PS */
@@ -175,11 +178,12 @@ static struct pnp_card_device_id snd_cs423x_pnpids[] = {
{ .id = "CSC7632", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } },
/* SIC CrystalWave 32 (CS4232) */
{ .id = "CSCf032", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
+ /* Netfinity 3000 on-board soundcard */
+ { .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC010f" } } },
/* --- */
{ .id = "" } /* end */
};
#else /* CS4236 */
-#define CS423X_DRIVER "snd_cs4236"
#define CS423X_ISAPNP_DRIVER "cs4236_isapnp"
static struct pnp_card_device_id snd_cs423x_pnpids[] = {
/* Intel Marlin Spike Motherboard - CS4235 */
@@ -747,12 +751,14 @@ static void __init_or_module snd_cs423x_unregister_all(void)
{
int i;
+#ifdef CONFIG_PNP
if (pnpc_registered)
pnp_unregister_card_driver(&cs423x_pnpc_driver);
#ifdef CS4232
if (pnp_registered)
pnp_unregister_driver(&cs4232_pnp_driver);
#endif
+#endif /* CONFIG_PNP */
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
platform_device_unregister(platform_devices[i]);
platform_driver_unregister(&cs423x_nonpnp_driver);
@@ -778,6 +784,7 @@ static int __init alsa_card_cs423x_init(void)
platform_devices[i] = device;
cards++;
}
+#ifdef CONFIG_PNP
#ifdef CS4232
i = pnp_register_driver(&cs4232_pnp_driver);
if (i >= 0) {
@@ -790,6 +797,8 @@ static int __init alsa_card_cs423x_init(void)
pnpc_registered = 1;
cards += i;
}
+#endif /* CONFIG_PNP */
+
if (!cards) {
#ifdef MODULE
printk(KERN_ERR IDENT " soundcard not found or device busy\n");
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index bf5de0782eb0..08f032b51107 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -1878,9 +1878,9 @@ module_param_array(dma2, int, NULL, 0444);
MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver.");
static struct platform_device *platform_devices[SNDRV_CARDS];
-static int pnp_registered;
#ifdef CONFIG_PNP
+static int pnp_registered;
static struct pnp_card_device_id snd_audiodrive_pnpids[] = {
/* ESS 1868 (integrated on Compaq dual P-Pro motherboard and Genius 18PnP 3D) */
@@ -2209,8 +2209,10 @@ static void __init_or_module snd_es18xx_unregister_all(void)
{
int i;
+#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&es18xx_pnpc_driver);
+#endif
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
platform_device_unregister(platform_devices[i]);
platform_driver_unregister(&snd_es18xx_nonpnp_driver);
@@ -2237,11 +2239,13 @@ static int __init alsa_card_es18xx_init(void)
cards++;
}
+#ifdef CONFIG_PNP
i = pnp_register_card_driver(&es18xx_pnpc_driver);
if (i >= 0) {
pnp_registered = 1;
cards += i;
}
+#endif
if(!cards) {
#ifdef MODULE
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c
index d1165b96fa3f..91c219116d7a 100644
--- a/sound/isa/gus/gusclassic.c
+++ b/sound/isa/gus/gusclassic.c
@@ -195,7 +195,7 @@ static int __init snd_gusclassic_probe(struct platform_device *pdev)
goto _err;
}
sprintf(card->longname + strlen(card->longname), " at 0x%lx, irq %d, dma %d", gus->gf1.port, xirq, xdma1);
- if (dma2 >= 0)
+ if (xdma2 >= 0)
sprintf(card->longname + strlen(card->longname), "&%d", xdma2);
snd_card_set_dev(card, &pdev->dev);
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index ca359e0c674b..9d8431978501 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -91,8 +91,10 @@ module_param_array(opl3sa3_ymode, int, NULL, 0444);
MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi.");
static struct platform_device *platform_devices[SNDRV_CARDS];
+#ifdef CONFIG_PNP
static int pnp_registered;
static int pnpc_registered;
+#endif
/* control ports */
#define OPL3SA2_PM_CTRL 0x01
@@ -721,7 +723,7 @@ static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev)
}
sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d",
card->shortname, chip->port, xirq, xdma1);
- if (dma2 >= 0)
+ if (xdma2 >= 0)
sprintf(card->longname + strlen(card->longname), "&%d", xdma2);
return snd_card_register(card);
@@ -779,7 +781,7 @@ static int snd_opl3sa2_pnp_resume(struct pnp_dev *pdev)
#endif
static struct pnp_driver opl3sa2_pnp_driver = {
- .name = "opl3sa2-pnpbios",
+ .name = "snd-opl3sa2-pnpbios",
.id_table = snd_opl3sa2_pnpbiosids,
.probe = snd_opl3sa2_pnp_detect,
.remove = __devexit_p(snd_opl3sa2_pnp_remove),
@@ -846,7 +848,7 @@ static int snd_opl3sa2_pnp_cresume(struct pnp_card_link *pcard)
static struct pnp_card_driver opl3sa2_pnpc_driver = {
.flags = PNP_DRIVER_RES_DISABLE,
- .name = "opl3sa2",
+ .name = "snd-opl3sa2-cpnp",
.id_table = snd_opl3sa2_pnpids,
.probe = snd_opl3sa2_pnp_cdetect,
.remove = __devexit_p(snd_opl3sa2_pnp_cremove),
@@ -929,10 +931,12 @@ static void __init_or_module snd_opl3sa2_unregister_all(void)
{
int i;
+#ifdef CONFIG_PNP
if (pnpc_registered)
pnp_unregister_card_driver(&opl3sa2_pnpc_driver);
if (pnp_registered)
pnp_unregister_driver(&opl3sa2_pnp_driver);
+#endif
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
platform_device_unregister(platform_devices[i]);
platform_driver_unregister(&snd_opl3sa2_nonpnp_driver);
@@ -961,6 +965,7 @@ static int __init alsa_card_opl3sa2_init(void)
cards++;
}
+#ifdef CONFIG_PNP
err = pnp_register_driver(&opl3sa2_pnp_driver);
if (err >= 0) {
pnp_registered = 1;
@@ -971,6 +976,7 @@ static int __init alsa_card_opl3sa2_init(void)
pnpc_registered = 1;
cards += err;
}
+#endif
if (!cards) {
#ifdef MODULE
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index 1ea3944ef7ab..63d96be11b2b 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -1349,7 +1349,7 @@ static int snd_opti93x_pcm(struct snd_opti93x *codec, int device, struct snd_pcm
int error;
struct snd_pcm *pcm;
- if ((error = snd_pcm_new(codec->card, "OPTi 82C93X", device, 1, 1, &pcm)))
+ if ((error = snd_pcm_new(codec->card, "OPTi 82C93X", device, 1, 1, &pcm)) < 0)
return error;
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_opti93x_playback_ops);
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index c0be7a5a3425..0667bd14ad60 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -179,6 +179,8 @@ static struct pnp_card_device_id snd_sb16_pnpids[] = {
{ .id = "CTL0086", .devs = { { "CTL0041" } } },
/* Sound Blaster Vibra16X */
{ .id = "CTL00f0", .devs = { { "CTL0043" } } },
+ /* Sound Blaster 16 (Virtual PC 2004) */
+ { .id = "tBA03b0", .devs = { {.id="PNPb003" } } },
#else /* SNDRV_SBAWE defined */
/* Sound Blaster AWE 32 PnP */
{ .id = "CTL0035", .devs = { { "CTL0031" }, { "CTL0021" } } },
@@ -235,8 +237,6 @@ static struct pnp_card_device_id snd_sb16_pnpids[] = {
{ .id = "CTLXXXX" , .devs = { { "CTL0044" }, { "CTL0023" } } },
{ .id = "CTLXXXX" , .devs = { { "CTL0045" }, { "CTL0022" } } },
#endif /* SNDRV_SBAWE */
- /* Sound Blaster 16 PnP (Virtual PC 2004)*/
- { .id = "tBA03b0", .devs = { { "PNPb003" } } },
{ .id = "", }
};
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 5fb981c0a281..29bba8cc3ef3 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -69,9 +69,9 @@ module_param_array(dma, int, NULL, 0444);
MODULE_PARM_DESC(dma, "DMA # for SoundScape driver.");
static struct platform_device *platform_devices[SNDRV_CARDS];
-static int pnp_registered;
#ifdef CONFIG_PNP
+static int pnp_registered;
static struct pnp_card_device_id sscape_pnpids[] = {
{ .id = "ENS3081", .devs = { { "ENS0000" } } },
{ .id = "" } /* end */
@@ -1391,8 +1391,10 @@ static void __init_or_module sscape_unregister_all(void)
{
int i;
+#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&sscape_pnpc_driver);
+#endif
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
platform_device_unregister(platform_devices[i]);
platform_driver_unregister(&snd_sscape_driver);
@@ -1466,8 +1468,10 @@ static int __init sscape_init(void)
ret = sscape_manual_probe();
if (ret < 0)
return ret;
+#ifdef CONFIG_PNP
if (pnp_register_card_driver(&sscape_pnpc_driver) >= 0)
pnp_registered = 1;
+#endif
return 0;
}
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
index a6dcb2f970ca..fa3ab960de17 100644
--- a/sound/isa/wavefront/wavefront.c
+++ b/sound/isa/wavefront/wavefront.c
@@ -84,10 +84,9 @@ module_param_array(use_cs4232_midi, bool, NULL, 0444);
MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)");
static struct platform_device *platform_devices[SNDRV_CARDS];
-static int pnp_registered;
-
#ifdef CONFIG_PNP
+static int pnp_registered;
static struct pnp_card_device_id snd_wavefront_pnpids[] = {
/* Tropez */
@@ -695,8 +694,10 @@ static void __init_or_module snd_wavefront_unregister_all(void)
{
int i;
+#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&wavefront_pnpc_driver);
+#endif
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
platform_device_unregister(platform_devices[i]);
platform_driver_unregister(&snd_wavefront_driver);
@@ -725,11 +726,13 @@ static int __init alsa_card_wavefront_init(void)
cards++;
}
+#ifdef CONFIG_PNP
i = pnp_register_card_driver(&wavefront_pnpc_driver);
if (i >= 0) {
pnp_registered = 1;
cards += i;
}
+#endif
if (!cards) {
#ifdef MODULE
diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c
index ed81eec6e732..68aa091e8961 100644
--- a/sound/isa/wavefront/wavefront_synth.c
+++ b/sound/isa/wavefront/wavefront_synth.c
@@ -866,7 +866,7 @@ wavefront_send_sample (snd_wavefront_t *dev,
divided by 2.
*/
- u16 sample_short;
+ u16 sample_short = 0;
u32 length;
u16 __user *data_end = NULL;
unsigned int i;
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 4aa5fdc5688e..a444a78c7c94 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -1621,8 +1621,27 @@ static const struct snd_kcontrol_new snd_ac97_ad1981x_jack_sense[] = {
AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0),
};
+/* black list to avoid HP/Line jack-sense controls
+ * (SS vendor << 16 | device)
+ */
+static unsigned int ad1981_jacks_blacklist[] = {
+ 0x10140554, /* Thinkpad T42p/R50p */
+ 0 /* end */
+};
+
+static int check_list(struct snd_ac97 *ac97, const unsigned int *list)
+{
+ u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device;
+ for (; *list; list++)
+ if (*list == subid)
+ return 1;
+ return 0;
+}
+
static int patch_ad1981a_specific(struct snd_ac97 * ac97)
{
+ if (check_list(ac97, ad1981_jacks_blacklist))
+ return 0;
return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
}
@@ -1635,22 +1654,26 @@ static struct snd_ac97_build_ops patch_ad1981a_build_ops = {
#endif
};
+/* white list to enable HP jack-sense bits
+ * (SS vendor << 16 | device)
+ */
+static unsigned int ad1981_jacks_whitelist[] = {
+ 0x0e11005a, /* HP nc4000/4010 */
+ 0x103c0890, /* HP nc6000 */
+ 0x103c0938, /* HP nc4220 */
+ 0x103c099c, /* HP nx6110 */
+ 0x103c0944, /* HP nc6220 */
+ 0x103c0934, /* HP nc8220 */
+ 0x103c006d, /* HP nx9105 */
+ 0x17340088, /* FSC Scenic-W */
+ 0 /* end */
+};
+
static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97)
{
- u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device;
- switch (subid) {
- case 0x0e11005a: /* HP nc4000/4010 */
- case 0x103c0890: /* HP nc6000 */
- case 0x103c0938: /* HP nc4220 */
- case 0x103c099c: /* HP nx6110 */
- case 0x103c0944: /* HP nc6220 */
- case 0x103c0934: /* HP nc8220 */
- case 0x103c006d: /* HP nx9105 */
- case 0x17340088: /* FSC Scenic-W */
+ if (check_list(ac97, ad1981_jacks_whitelist))
/* enable headphone jack sense */
snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11);
- break;
- }
}
int patch_ad1981a(struct snd_ac97 *ac97)
@@ -1672,6 +1695,8 @@ static int patch_ad1981b_specific(struct snd_ac97 *ac97)
if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0)
return err;
+ if (check_list(ac97, ad1981_jacks_blacklist))
+ return 0;
return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
}
@@ -2210,9 +2235,9 @@ static void alc850_update_jacks(struct snd_ac97 *ac97)
/* Vref disable (bit12), 1kOhm (bit13) */
snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13),
shared ? (1<<12) : (1<<13));
- /* MIC-IN = 1, CENTER-LFE = 2 */
+ /* MIC-IN = 1, CENTER-LFE = 5 */
snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 4,
- shared ? (2<<4) : (1<<4));
+ shared ? (5<<4) : (1<<4));
}
static const struct snd_kcontrol_new snd_ac97_controls_alc850[] = {
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index bc4d1ef08efa..e264136e8fb4 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -279,7 +279,7 @@ struct snd_ali {
};
static struct pci_device_id snd_ali_ids[] = {
- {0x10b9, 0x5451, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
+ {PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0},
{0, }
};
MODULE_DEVICE_TABLE(pci, snd_ali_ids);
diff --git a/sound/pci/au88x0/au88x0_eq.c b/sound/pci/au88x0/au88x0_eq.c
index 13bc8ed301c5..c8280f82eb5a 100644
--- a/sound/pci/au88x0/au88x0_eq.c
+++ b/sound/pci/au88x0/au88x0_eq.c
@@ -849,7 +849,7 @@ static int
snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
- int i, count;
+ int i, count = 0;
u16 peaks[20];
vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count);
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index dc9cd3079b14..c840a4c08e98 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -781,6 +781,8 @@ static struct pci_device_id snd_bt87x_ids[] = {
BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, 0x0070, 0x13eb, 32000),
/* Viewcast Osprey 200 */
BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0xff01, 44100),
+ /* AVerMedia Studio No. 103, 203, ...? */
+ BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x1461, 0x0003, 48000),
{ }
};
MODULE_DEVICE_TABLE(pci, snd_bt87x_ids);
@@ -808,7 +810,7 @@ static int __devinit snd_bt87x_detect_card(struct pci_dev *pci)
const struct pci_device_id *supported;
supported = pci_match_device(&driver, pci);
- if (supported)
+ if (supported && supported->driver_data > 0)
return supported->driver_data;
for (i = 0; i < ARRAY_SIZE(blacklist); ++i)
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 6ed7c0bfa091..9477838a9c88 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -199,7 +199,8 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
.name = "MSI K8N Diamond MB [SB0438]",
.gpio_type = 1,
.i2c_adc = 1 } ,
- /* Shuttle XPC SD31P which has an onboard Creative Labs Sound Blaster Live! 24-bit EAX
+ /* Shuttle XPC SD31P which has an onboard Creative Labs
+ * Sound Blaster Live! 24-bit EAX
* high-definition 7.1 audio processor".
* Added using info from andrewvegan in alsa bug #1298
*/
@@ -207,6 +208,15 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
.name = "Shuttle XPC SD31P [SD31P]",
.gpio_type = 1,
.i2c_adc = 1 } ,
+ /* Shuttle XPC SD11G5 which has an onboard Creative Labs
+ * Sound Blaster Live! 24-bit EAX
+ * high-definition 7.1 audio processor".
+ * Fixes ALSA bug#1600
+ */
+ { .serial = 0x30411297,
+ .name = "Shuttle XPC SD11G5 [SD11G5]",
+ .gpio_type = 1,
+ .i2c_adc = 1 } ,
{ .serial = 0,
.name = "AudigyLS [Unknown]" }
};
diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c
index 509aa2b63331..d4e0fb39bd06 100644
--- a/sound/pci/cs46xx/dsp_spos_scb_lib.c
+++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c
@@ -675,7 +675,7 @@ cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name,
if (pass_through) {
/* wont work with any other rate than
the native DSP rate */
- snd_assert (rate = 48000);
+ snd_assert (rate == 48000);
scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&src_task_scb,
dest,"DMAREADER",parent_scb,
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c
index f36ede827479..02e3721030b7 100644
--- a/sound/pci/cs5535audio/cs5535audio.c
+++ b/sound/pci/cs5535audio/cs5535audio.c
@@ -46,8 +46,10 @@ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
static struct pci_device_id snd_cs5535audio_ids[] = {
- { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO, PCI_ANY_ID,
- PCI_ANY_ID, 0, 0, 0, },
+ { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
+ { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
{}
};
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c
index 2e86a901a0a4..2a9d12d10680 100644
--- a/sound/pci/emu10k1/emumixer.c
+++ b/sound/pci/emu10k1/emumixer.c
@@ -759,6 +759,8 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
"Master Mono Playback Volume",
"PCM Out Path & Mute",
"Mono Output Select",
+ "Front Playback Switch",
+ "Front Playback Volume",
"Surround Playback Switch",
"Surround Playback Volume",
"Center Playback Switch",
@@ -829,9 +831,9 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
}
if (emu->audigy) {
/* set master volume to 0 dB */
- snd_ac97_write(emu->ac97, AC97_MASTER, 0x0000);
+ snd_ac97_write_cache(emu->ac97, AC97_MASTER, 0x0000);
/* set capture source to mic */
- snd_ac97_write(emu->ac97, AC97_REC_SEL, 0x0000);
+ snd_ac97_write_cache(emu->ac97, AC97_REC_SEL, 0x0000);
c