]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
authorJaroslav Kysela <perex@suse.cz>
Wed, 1 Feb 2006 12:08:56 +0000 (13:08 +0100)
committerJaroslav Kysela <perex@suse.cz>
Wed, 1 Feb 2006 12:08:56 +0000 (13:08 +0100)
28 files changed:
drivers/pnp/card.c
sound/core/info.c
sound/isa/cmi8330.c
sound/isa/cs423x/cs4236.c
sound/isa/es18xx.c
sound/isa/opl3sa2.c
sound/isa/sb/sb16.c
sound/isa/sscape.c
sound/isa/wavefront/wavefront.c
sound/pci/ac97/ac97_patch.c
sound/pci/ali5451/ali5451.c
sound/pci/au88x0/au88x0_eq.c
sound/pci/bt87x.c
sound/pci/ca0106/ca0106_main.c
sound/pci/cs46xx/dsp_spos_scb_lib.c
sound/pci/cs5535audio/cs5535audio.c
sound/pci/emu10k1/emumixer.c
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_sigmatel.c
sound/pci/intel8x0.c
sound/pci/pcxhr/pcxhr.c
sound/pci/rme9652/hdspm.c
sound/pci/trident/trident.c
sound/pci/via82xx.c
sound/pci/ymfpci/ymfpci_main.c
sound/ppc/pmac.c
sound/usb/usbaudio.c

index 0ecbe4edbec13dd1e83b5101e312e4c127860765..aaa568a3806ea9e35873803f646989c9a3487a53 100644 (file)
@@ -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);
index ae88539214644d365506176561f3f4928adcd282..af123e3bdb24780aa9964275c46f61eac8ac9a8c 100644 (file)
@@ -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,
 };
 
 /**
index bd8e23818460272dfdd2257c48ddf312946e65c0..fd9bb2575de8c86c7e3deed8c92d5be8fafe4943 100644 (file)
@@ -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
index e1683337e6cd8cf3fa0336b4b561fe710c3666a9..edf9279bf9d95e2d9e6c4a794fcad3594ca9d254 100644 (file)
@@ -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 */
@@ -179,7 +182,6 @@ static struct pnp_card_device_id snd_cs423x_pnpids[] = {
        { .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 +749,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 +782,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 +795,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");
index bf5de0782eb05e5eb9c473de573ac6b3c9e935a5..08f032b51107169db3e508efb07cec1ff55dc6f1 100644 (file)
@@ -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
index ca359e0c674b9bad8d4f677ff544a52a07991d8a..9dc6b20e9a5c07145c8d4d6470729b638e55595a 100644 (file)
@@ -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
@@ -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
index c0be7a5a342588331807a03bda4d862ad2cae442..0667bd14ad603a442ae9909929702cd0ea616d27 100644 (file)
@@ -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 = "", }
 };
 
index 5fb981c0a281ca63ca283923e5fdeb045e50044f..29bba8cc3ef30d658315d3cee560e0cfa87989eb 100644 (file)
@@ -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;
 }
 
index a6dcb2f970ca9ebfbd6634b7582800ab98154d3b..fa3ab960de17c5144acc0961398b80ca2845dcad 100644 (file)
@@ -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
index 4aa5fdc5688e9c561787e70dddff9d717e978290..a444a78c7c9444c68724c36251c432c77457480a 100644 (file)
@@ -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[] = {
index bc4d1ef08efa5a5afe60d2b0c1f9d13ce64b2903..e264136e8fb44ad9508851158c9079c0ff80805b 100644 (file)
@@ -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);
index 13bc8ed301c572e8d3d78341bb9064f71ed7d889..c8280f82eb5ad4edde8141b3bea1b430683a8c23 100644 (file)
@@ -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);
index dc9cd3079b14412f07a3b8529dc8022c4a731652..c840a4c08e9814c197d30b631b782c420e26869a 100644 (file)
@@ -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)
index 6ed7c0bfa091c3c3790a48cb1e4cf3fe458c4b02..9477838a9c8814d78f037d3e0d1a751806c5b07f 100644 (file)
@@ -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]" }
 };
index 509aa2b63331082b7ea2d956e782e802eefb3be8..d4e0fb39bd069f9c3b13c57778cbc884374e7929 100644 (file)
@@ -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,
index f36ede827479aab96a7dd96ac6a31855bec1e630..02e3721030b70998913fef6581f2b317016e5910 100644 (file)
@@ -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, },
        {}
 };
 
index 2e86a901a0a4b2e7db0c50c876aabf06d7238e9e..2a9d12d106801025bd9870b3f94ddfdcae265483 100644 (file)
@@ -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 = audigy_remove_ctls;
                } else {
                        /*
@@ -844,8 +846,8 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
                                snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT);
                        }
                        /* remove unused AC97 controls */
-                       snd_ac97_write(emu->ac97, AC97_SURROUND_MASTER, 0x0202);
-                       snd_ac97_write(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202);
+                       snd_ac97_write_cache(emu->ac97, AC97_SURROUND_MASTER, 0x0202);
+                       snd_ac97_write_cache(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202);
                        c = emu10k1_remove_ctls;
                }
                for (; *c; c++)
index a983deba4025d7bc53f35ad1115a6a8f9a16dff3..fd12b6991fe403f3af807ce933dfb35f2395e134 100644 (file)
@@ -75,6 +75,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6},"
                         "{Intel, ICH6M},"
                         "{Intel, ICH7},"
                         "{Intel, ESB2},"
+                        "{Intel, ICH8},"
                         "{ATI, SB450},"
                         "{VIA, VT8251},"
                         "{VIA, VT8237A},"
@@ -1586,6 +1587,7 @@ static struct pci_device_id azx_ids[] = {
        { 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, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */
+       { 0x8086, 0x284b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH8 */
        { 0x1002, 0x437b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATI }, /* ATI SB450 */
        { 0x1106, 0x3288, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_VIA }, /* VIA VT8251/VT8237A */
        { 0x1039, 0x7502, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_SIS }, /* SIS966 */
index ad9e501a981892b99a8668b3e98c6dcbe1489a1b..543980d89b83c564335cc6d0bfaab814428a4822 100644 (file)
@@ -2945,6 +2945,8 @@ static int alc260_auto_init(struct hda_codec *codec)
  */
 static struct hda_board_config alc260_cfg_tbl[] = {
        { .modelname = "basic", .config = ALC260_BASIC },
+       { .pci_subvendor = 0x104d, .pci_subdevice = 0x81bb,
+         .config = ALC260_BASIC }, /* Sony VAIO */
        { .modelname = "hp", .config = ALC260_HP },
        { .pci_subvendor = 0x103c, .pci_subdevice = 0x3010, .config = ALC260_HP },
        { .pci_subvendor = 0x103c, .pci_subdevice = 0x3011, .config = ALC260_HP },
index 61903848cd43c9cf04405faef1a16b7a1099cbe1..4f78b58416a4d3de4f8dd65ad9dd06be004096fe 100644 (file)
@@ -183,6 +183,7 @@ static struct snd_kcontrol_new stac922x_mixer[] = {
                .put = stac92xx_mux_enum_put,
        },
        HDA_CODEC_VOLUME("Capture Volume", 0x17, 0x0, HDA_INPUT),
+       HDA_CODEC_MUTE("Capture Switch", 0x17, 0x0, HDA_INPUT),
        HDA_CODEC_VOLUME("Mux Capture Volume", 0x12, 0x0, HDA_OUTPUT),
        { } /* end */
 };
index 5466b1fa0cd58d7baaead97bad5d8eac6355447a..b345894659bb0ed5c9fc1a1489ff22356f20c9bf 100644 (file)
@@ -1803,6 +1803,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
                .name = "Dell", /* which model?  AD1981B*/
                .type = AC97_TUNE_HP_ONLY
        },
+       {
+               .subvendor = 0x1028,
+               .subdevice = 0x0151,
+               .name = "Dell Optiplex GX270",  /* AD1981B */
+               .type = AC97_TUNE_HP_ONLY
+       },
        {
                .subvendor = 0x1028,
                .subdevice = 0x0163,
@@ -1845,12 +1851,6 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
                .name = "HP nx8220",
                .type = AC97_TUNE_MUTE_LED
        },
-       {
-               .subvendor = 0x103c,
-               .subdevice = 0x099c,
-               .name = "HP nx6110",    /* AD1981B */
-               .type = AC97_TUNE_HP_ONLY
-       },
        {
                .subvendor = 0x103c,
                .subdevice = 0x129d,
@@ -1866,7 +1866,7 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
        {
                .subvendor = 0x103c,
                .subdevice = 0x099c,
-               .name = "HP nc6120",
+               .name = "HP nx6110/nc6120",
                .type = AC97_TUNE_HP_MUTE_LED
        },
        {
index b8c0853a8278167b15f68976d4ad2c4b27229808..b2cba75b6b167fb2f35ba319d85846ea964709e4 100644 (file)
@@ -454,7 +454,7 @@ static int pcxhr_update_r_buffer(struct pcxhr_stream *stream)
        is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE);
        stream_num = is_capture ? 0 : subs->number;
 
-       snd_printdd("pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%x) subs(%d)\n",
+       snd_printdd("pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%zx) subs(%d)\n",
                    is_capture ? 'c' : 'p',
                    chip->chip_idx, (void*)subs->runtime->dma_addr,
                    subs->runtime->dma_bytes, subs->number);
@@ -744,13 +744,14 @@ static int pcxhr_prepare(struct snd_pcm_substream *subs)
                /* only the first stream can choose the sample rate */
                /* the further opened streams will be limited to its frequency (see open) */
                /* set the clock only once (first stream) */
-               if (mgr->sample_rate == 0) {
+               if (mgr->sample_rate != subs->runtime->rate) {
                        err = pcxhr_set_clock(mgr, subs->runtime->rate);
                        if (err)
                                break;
+                       if (mgr->sample_rate == 0)
+                               /* start the DSP-timer */
+                               err = pcxhr_hardware_timer(mgr, 1);
                        mgr->sample_rate = subs->runtime->rate;
-
-                       err = pcxhr_hardware_timer(mgr, 1);     /* start the DSP-timer */
                }
        } while(0);     /* do only once (so we can use break instead of goto) */
 
index 3dec616bad6b1ba5eb38dfaf79e30543a888aaf8..103b4d715ff45125afc17efb58a736e3152cfa36 100644 (file)
@@ -3324,11 +3324,11 @@ static int __devinit snd_hdspm_preallocate_memory(struct hdspm * hdspm)
                                                   snd_dma_pci_data(hdspm->pci),
                                                   wanted,
                                                   wanted)) < 0) {
-               snd_printdd("Could not preallocate % Bytes\n", wanted);
+               snd_printdd("Could not preallocate %zd Bytes\n", wanted);
 
                return err;
        } else
-               snd_printdd(" Preallocated % Bytes\n", wanted);
+               snd_printdd(" Preallocated %zd Bytes\n", wanted);
 
        return 0;
 }
@@ -3510,7 +3510,7 @@ static int __devinit snd_hdspm_create(struct snd_card *card, struct hdspm * hdsp
 
        hdspm->monitor_outs = enable_monitor;
 
-       snd_printdd("kmalloc Mixer memory of %d Bytes\n",
+       snd_printdd("kmalloc Mixer memory of %zd Bytes\n",
                   sizeof(struct hdspm_mixer));
        if ((hdspm->mixer = kmalloc(sizeof(struct hdspm_mixer), GFP_KERNEL))
            == NULL) {
index 2b21df16ad6a38ba3a82e97feb8e1b2ec1e6bc65..b4538045049ffcd2be5de1cd31aaadaab22d768c 100644 (file)
@@ -64,9 +64,11 @@ module_param_array(wavetable_size, int, NULL, 0444);
 MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth.");
 
 static struct pci_device_id snd_trident_ids[] = {
-       { 0x1023, 0x2000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* Trident 4DWave DX PCI Audio */
-       { 0x1023, 0x2001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* Trident 4DWave NX PCI Audio */
-       { 0x1039, 0x7018, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* SiS SI7018 PCI Audio */
+       {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), 
+               PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0},
+       {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX), 
+               0, 0, 0},
+       {PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7018), 0, 0, 0},
        { 0, }
 };
 
index ed26a155c3448a53acddacb498a7169b701f58cc..d59fe3e83f17c4d3dcab541f65741c4a853c46c1 100644 (file)
@@ -2340,6 +2340,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci)
                { .subvendor = 0x1043, .subdevice = 0x80b0, .action = VIA_DXS_NO_VRA }, /* ASUS A7V600 & K8V*/ 
                { .subvendor = 0x1043, .subdevice = 0x810d, .action = VIA_DXS_SRC }, /* ASUS */
                { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC    }, /* ASUS A8V Deluxe */ 
+               { .subvendor = 0x1043, .subdevice = 0x8174, .action = VIA_DXS_SRC    }, /* ASUS */
                { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */
                { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */
                { .subvendor = 0x10cf, .subdevice = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */
@@ -2371,6 +2372,8 @@ static int __devinit check_dxs_list(struct pci_dev *pci)
                { .subvendor = 0x161f, .subdevice = 0x2032, .action = VIA_DXS_48K }, /* m680x machines */
                { .subvendor = 0x1631, .subdevice = 0xe004, .action = VIA_DXS_ENABLE }, /* Easy Note 3174, Packard Bell */
                { .subvendor = 0x1695, .subdevice = 0x3005, .action = VIA_DXS_ENABLE }, /* EPoX EP-8K9A */
+               { .subvendor = 0x1695, .subdevice = 0x300e, .action = VIA_DXS_SRC }, /* EPoX 9HEAI */
+               { .subvendor = 0x16f3, .subdevice = 0x6405, .action = VIA_DXS_SRC }, /* Jetway K8M8MS */
                { .subvendor = 0x1849, .subdevice = 0x3059, .action = VIA_DXS_NO_VRA }, /* ASRock K7VM2 */
                { .subvendor = 0x1849, .subdevice = 0x9761, .action = VIA_DXS_SRC }, /* ASRock mobo(?) */
                { .subvendor = 0x1919, .subdevice = 0x200a, .action = VIA_DXS_NO_VRA }, /* Soltek SL-K8Tpro-939 */
index 1dfc7233c6a804efb457ceae5ae2c2cadd268454..a1aa74b79b3d9c2086aa6acc21df188cbbcf12b9 100644 (file)
@@ -1229,6 +1229,7 @@ static int snd_ymfpci_spdif_default_get(struct snd_kcontrol *kcontrol,
        spin_lock_irq(&chip->reg_lock);
        ucontrol->value.iec958.status[0] = (chip->spdif_bits >> 0) & 0xff;
        ucontrol->value.iec958.status[1] = (chip->spdif_bits >> 8) & 0xff;
+       ucontrol->value.iec958.status[3] = IEC958_AES3_CON_FS_48000;
        spin_unlock_irq(&chip->reg_lock);
        return 0;
 }
@@ -1303,6 +1304,7 @@ static int snd_ymfpci_spdif_stream_get(struct snd_kcontrol *kcontrol,
        spin_lock_irq(&chip->reg_lock);
        ucontrol->value.iec958.status[0] = (chip->spdif_pcm_bits >> 0) & 0xff;
        ucontrol->value.iec958.status[1] = (chip->spdif_pcm_bits >> 8) & 0xff;
+       ucontrol->value.iec958.status[3] = IEC958_AES3_CON_FS_48000;
        spin_unlock_irq(&chip->reg_lock);
        return 0;
 }
index a642e4cfcf45e2188104b0b4488f26c6d6c12e97..4988f873a7bacc6bd1749bea5f1d137823401da1 100644 (file)
@@ -1216,7 +1216,7 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
                        goto __error;
                }
                for (i = 0; i < 3; i ++) {
-                       if (of_address_to_resource(np->parent, i,
+                       if (of_address_to_resource(np, i,
                                                   &chip->rsrc[i])) {
                                printk(KERN_ERR "snd: can't translate rsrc "
                                       " %d (%s)\n", i, rnames[i]);
index a1bd8040dea441a06a487ef9943a8e31997bb457..d5013383fad71dec63557b5207cc38f08ba0578c 100644 (file)
@@ -478,22 +478,38 @@ static int retire_playback_sync_urb_hs(struct snd_usb_substream *subs,
 /*
  * Prepare urb for streaming before playback starts.
  *
- * We don't care about (or have) any data, so we just send a transfer delimiter.
+ * We don't yet have data, so we send a frame of silence.
  */
 static int prepare_startup_playback_urb(struct snd_usb_substream *subs,
                                        struct snd_pcm_runtime *runtime,
                                        struct urb *urb)
 {
-       unsigned int i;
+       unsigned int i, offs, counts;
        struct snd_urb_ctx *ctx = urb->context;
+       int stride = runtime->frame_bits >> 3;
 
+       offs = 0;
        urb->dev = ctx->subs->dev;
        urb->number_of_packets = subs->packs_per_ms;
        for (i = 0; i < subs->packs_per_ms; ++i) {
-               urb->iso_frame_desc[i].offset = 0;
-               urb->iso_frame_desc[i].length = 0;
+               /* calculate the size of a packet */
+               if (subs->fill_max)
+                       counts = subs->maxframesize; /* fixed */
+               else {
+                       subs->phase = (subs->phase & 0xffff)
+                               + (subs->freqm << subs->datainterval);
+                       counts = subs->phase >> 16;
+                       if (counts > subs->maxframesize)
+                               counts = subs->maxframesize;
+               }
+               urb->iso_frame_desc[i].offset = offs * stride;
+               urb->iso_frame_desc[i].length = counts * stride;
+               offs += counts;
        }
-       urb->transfer_buffer_length = 0;
+       urb->transfer_buffer_length = offs * stride;
+       memset(urb->transfer_buffer,
+              subs->cur_audiofmt->format == SNDRV_PCM_FORMAT_U8 ? 0x80 : 0,
+              offs * stride);
        return 0;
 }
 
@@ -2477,12 +2493,13 @@ static int parse_audio_format(struct snd_usb_audio *chip, struct audioformat *fp
        if (err < 0)
                return err;
 #if 1
-       /* FIXME: temporary hack for extigy/audigy 2 nx */
+       /* FIXME: temporary hack for extigy/audigy 2 nx/zs */
        /* extigy apparently supports sample rates other than 48k
         * but not in ordinary way.  so we enable only 48k atm.
         */
        if (chip->usb_id == USB_ID(0x041e, 0x3000) ||
-           chip->usb_id == USB_ID(0x041e, 0x3020)) {
+           chip->usb_id == USB_ID(0x041e, 0x3020) ||
+           chip->usb_id == USB_ID(0x041e, 0x3061)) {
                if (fmt[3] == USB_FORMAT_TYPE_I &&
                    fp->rates != SNDRV_PCM_RATE_48000 &&
                    fp->rates != SNDRV_PCM_RATE_96000)