Merge git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa

+364 -111
+9 -1
Documentation/sound/alsa/ALSA-Configuration.txt
··· 837 837 838 838 Module for AC'97 motherboards from Intel and compatibles. 839 839 * Intel i810/810E, i815, i820, i830, i84x, MX440 840 + ICH5, ICH6, ICH7, ESB2 840 841 * SiS 7012 (SiS 735) 841 - * NVidia NForce, NForce2 842 + * NVidia NForce, NForce2, NForce3, MCP04, CK804 843 + CK8, CK8S, MCP501 842 844 * AMD AMD768, AMD8111 843 845 * ALi m5455 844 846 ··· 870 868 -------------------- 871 869 872 870 Module for Intel ICH (i8x0) chipset MC97 modems. 871 + * Intel i810/810E, i815, i820, i830, i84x, MX440 872 + ICH5, ICH6, ICH7 873 + * SiS 7013 (SiS 735) 874 + * NVidia NForce, NForce2, NForce2s, NForce3 875 + * AMD AMD8111 876 + * ALi m5455 873 877 874 878 ac97_clock - AC'97 codec clock base (0 = auto-detect) 875 879
+2 -2
Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
··· 5206 5206 You need to pass the <function>snd_dma_pci_data(pci)</function>, 5207 5207 where pci is the struct <structname>pci_dev</structname> pointer 5208 5208 of the chip as well. 5209 - The <type>snd_sg_buf_t</type> instance is created as 5209 + The <type>struct snd_sg_buf</type> instance is created as 5210 5210 substream-&gt;dma_private. You can cast 5211 5211 the pointer like: 5212 5212 5213 5213 <informalexample> 5214 5214 <programlisting> 5215 5215 <![CDATA[ 5216 - struct snd_sg_buf *sgbuf = (struct snd_sg_buf_t*)substream->dma_private; 5216 + struct snd_sg_buf *sgbuf = (struct snd_sg_buf *)substream->dma_private; 5217 5217 ]]> 5218 5218 </programlisting> 5219 5219 </informalexample>
+7 -2
drivers/pnp/card.c
··· 363 363 364 364 int pnp_register_card_driver(struct pnp_card_driver * drv) 365 365 { 366 - int count = 0; 366 + int count; 367 367 struct list_head *pos, *temp; 368 368 369 369 drv->link.name = drv->name; ··· 374 374 drv->link.suspend = drv->suspend ? card_suspend : NULL; 375 375 drv->link.resume = drv->resume ? card_resume : NULL; 376 376 377 + count = pnp_register_driver(&drv->link); 378 + if (count < 0) 379 + return count; 380 + 377 381 spin_lock(&pnp_lock); 378 382 list_add_tail(&drv->global_list, &pnp_card_drivers); 379 383 spin_unlock(&pnp_lock); 380 - pnp_register_driver(&drv->link); 384 + 385 + count = 0; 381 386 382 387 list_for_each_safe(pos,temp,&pnp_cards){ 383 388 struct pnp_card *card = list_entry(pos, struct pnp_card, global_list);
+11 -22
sound/core/info.c
··· 444 444 return mask; 445 445 } 446 446 447 - static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file, 448 - unsigned int cmd, unsigned long arg) 447 + static long snd_info_entry_ioctl(struct file *file, unsigned int cmd, 448 + unsigned long arg) 449 449 { 450 450 struct snd_info_private_data *data; 451 451 struct snd_info_entry *entry; ··· 463 463 break; 464 464 } 465 465 return -ENOTTY; 466 - } 467 - 468 - /* FIXME: need to unlock BKL to allow preemption */ 469 - static int snd_info_entry_ioctl(struct inode *inode, struct file *file, 470 - unsigned int cmd, unsigned long arg) 471 - { 472 - int err; 473 - unlock_kernel(); 474 - err = _snd_info_entry_ioctl(inode, file, cmd, arg); 475 - lock_kernel(); 476 - return err; 477 466 } 478 467 479 468 static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma) ··· 488 499 489 500 static struct file_operations snd_info_entry_operations = 490 501 { 491 - .owner = THIS_MODULE, 492 - .llseek = snd_info_entry_llseek, 493 - .read = snd_info_entry_read, 494 - .write = snd_info_entry_write, 495 - .poll = snd_info_entry_poll, 496 - .ioctl = snd_info_entry_ioctl, 497 - .mmap = snd_info_entry_mmap, 498 - .open = snd_info_entry_open, 499 - .release = snd_info_entry_release, 502 + .owner = THIS_MODULE, 503 + .llseek = snd_info_entry_llseek, 504 + .read = snd_info_entry_read, 505 + .write = snd_info_entry_write, 506 + .poll = snd_info_entry_poll, 507 + .unlocked_ioctl = snd_info_entry_ioctl, 508 + .mmap = snd_info_entry_mmap, 509 + .open = snd_info_entry_open, 510 + .release = snd_info_entry_release, 500 511 }; 501 512 502 513 /**
+1 -1
sound/drivers/serial-u16550.c
··· 789 789 790 790 if ((err = snd_uart16550_detect(uart)) <= 0) { 791 791 printk(KERN_ERR "no UART detected at 0x%lx\n", iobase); 792 - return err; 792 + return -ENODEV; 793 793 } 794 794 795 795 if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
+6
sound/isa/cmi8330.c
··· 109 109 MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); 110 110 111 111 static struct platform_device *platform_devices[SNDRV_CARDS]; 112 + #ifdef CONFIG_PNP 112 113 static int pnp_registered; 114 + #endif 113 115 114 116 #define CMI8330_RMUX3D 16 115 117 #define CMI8330_MUTEMUX 17 ··· 674 672 { 675 673 int i; 676 674 675 + #ifdef CONFIG_PNP 677 676 if (pnp_registered) 678 677 pnp_unregister_card_driver(&cmi8330_pnpc_driver); 678 + #endif 679 679 for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) 680 680 platform_device_unregister(platform_devices[i]); 681 681 platform_driver_unregister(&snd_cmi8330_driver); ··· 704 700 cards++; 705 701 } 706 702 703 + #ifdef CONFIG_PNP 707 704 err = pnp_register_card_driver(&cmi8330_pnpc_driver); 708 705 if (err >= 0) { 709 706 pnp_registered = 1; 710 707 cards += err; 711 708 } 709 + #endif 712 710 713 711 if (!cards) { 714 712 #ifdef MODULE
+11 -2
sound/isa/cs423x/cs4236.c
··· 75 75 76 76 #ifdef CS4232 77 77 #define IDENT "CS4232" 78 + #define CS423X_DRIVER "snd_cs4232" 78 79 #else 79 80 #define IDENT "CS4236+" 81 + #define CS423X_DRIVER "snd_cs4236" 80 82 #endif 81 83 82 84 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ ··· 127 125 MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver."); 128 126 129 127 static struct platform_device *platform_devices[SNDRV_CARDS]; 128 + #ifdef CONFIG_PNP 130 129 static int pnpc_registered; 131 130 #ifdef CS4232 132 131 static int pnp_registered; 133 132 #endif 133 + #endif /* CONFIG_PNP */ 134 134 135 135 struct snd_card_cs4236 { 136 136 struct snd_cs4231 *chip; ··· 162 158 #endif /* CS4232 */ 163 159 164 160 #ifdef CS4232 165 - #define CS423X_DRIVER "snd_cs4232" 166 161 #define CS423X_ISAPNP_DRIVER "cs4232_isapnp" 167 162 static struct pnp_card_device_id snd_cs423x_pnpids[] = { 168 163 /* Philips PCA70PS */ ··· 178 175 { .id = "CSC7632", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } }, 179 176 /* SIC CrystalWave 32 (CS4232) */ 180 177 { .id = "CSCf032", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, 178 + /* Netfinity 3000 on-board soundcard */ 179 + { .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC010f" } } }, 181 180 /* --- */ 182 181 { .id = "" } /* end */ 183 182 }; 184 183 #else /* CS4236 */ 185 - #define CS423X_DRIVER "snd_cs4236" 186 184 #define CS423X_ISAPNP_DRIVER "cs4236_isapnp" 187 185 static struct pnp_card_device_id snd_cs423x_pnpids[] = { 188 186 /* Intel Marlin Spike Motherboard - CS4235 */ ··· 751 747 { 752 748 int i; 753 749 750 + #ifdef CONFIG_PNP 754 751 if (pnpc_registered) 755 752 pnp_unregister_card_driver(&cs423x_pnpc_driver); 756 753 #ifdef CS4232 757 754 if (pnp_registered) 758 755 pnp_unregister_driver(&cs4232_pnp_driver); 759 756 #endif 757 + #endif /* CONFIG_PNP */ 760 758 for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) 761 759 platform_device_unregister(platform_devices[i]); 762 760 platform_driver_unregister(&cs423x_nonpnp_driver); ··· 784 778 platform_devices[i] = device; 785 779 cards++; 786 780 } 781 + #ifdef CONFIG_PNP 787 782 #ifdef CS4232 788 783 i = pnp_register_driver(&cs4232_pnp_driver); 789 784 if (i >= 0) { ··· 797 790 pnpc_registered = 1; 798 791 cards += i; 799 792 } 793 + #endif /* CONFIG_PNP */ 794 + 800 795 if (!cards) { 801 796 #ifdef MODULE 802 797 printk(KERN_ERR IDENT " soundcard not found or device busy\n");
+5 -1
sound/isa/es18xx.c
··· 1878 1878 MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver."); 1879 1879 1880 1880 static struct platform_device *platform_devices[SNDRV_CARDS]; 1881 - static int pnp_registered; 1882 1881 1883 1882 #ifdef CONFIG_PNP 1883 + static int pnp_registered; 1884 1884 1885 1885 static struct pnp_card_device_id snd_audiodrive_pnpids[] = { 1886 1886 /* ESS 1868 (integrated on Compaq dual P-Pro motherboard and Genius 18PnP 3D) */ ··· 2209 2209 { 2210 2210 int i; 2211 2211 2212 + #ifdef CONFIG_PNP 2212 2213 if (pnp_registered) 2213 2214 pnp_unregister_card_driver(&es18xx_pnpc_driver); 2215 + #endif 2214 2216 for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) 2215 2217 platform_device_unregister(platform_devices[i]); 2216 2218 platform_driver_unregister(&snd_es18xx_nonpnp_driver); ··· 2239 2237 cards++; 2240 2238 } 2241 2239 2240 + #ifdef CONFIG_PNP 2242 2241 i = pnp_register_card_driver(&es18xx_pnpc_driver); 2243 2242 if (i >= 0) { 2244 2243 pnp_registered = 1; 2245 2244 cards += i; 2246 2245 } 2246 + #endif 2247 2247 2248 2248 if(!cards) { 2249 2249 #ifdef MODULE
+1 -1
sound/isa/gus/gusclassic.c
··· 195 195 goto _err; 196 196 } 197 197 sprintf(card->longname + strlen(card->longname), " at 0x%lx, irq %d, dma %d", gus->gf1.port, xirq, xdma1); 198 - if (dma2 >= 0) 198 + if (xdma2 >= 0) 199 199 sprintf(card->longname + strlen(card->longname), "&%d", xdma2); 200 200 201 201 snd_card_set_dev(card, &pdev->dev);
+9 -3
sound/isa/opl3sa2.c
··· 91 91 MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi."); 92 92 93 93 static struct platform_device *platform_devices[SNDRV_CARDS]; 94 + #ifdef CONFIG_PNP 94 95 static int pnp_registered; 95 96 static int pnpc_registered; 97 + #endif 96 98 97 99 /* control ports */ 98 100 #define OPL3SA2_PM_CTRL 0x01 ··· 723 721 } 724 722 sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d", 725 723 card->shortname, chip->port, xirq, xdma1); 726 - if (dma2 >= 0) 724 + if (xdma2 >= 0) 727 725 sprintf(card->longname + strlen(card->longname), "&%d", xdma2); 728 726 729 727 return snd_card_register(card); ··· 781 779 #endif 782 780 783 781 static struct pnp_driver opl3sa2_pnp_driver = { 784 - .name = "opl3sa2-pnpbios", 782 + .name = "snd-opl3sa2-pnpbios", 785 783 .id_table = snd_opl3sa2_pnpbiosids, 786 784 .probe = snd_opl3sa2_pnp_detect, 787 785 .remove = __devexit_p(snd_opl3sa2_pnp_remove), ··· 848 846 849 847 static struct pnp_card_driver opl3sa2_pnpc_driver = { 850 848 .flags = PNP_DRIVER_RES_DISABLE, 851 - .name = "opl3sa2", 849 + .name = "snd-opl3sa2-cpnp", 852 850 .id_table = snd_opl3sa2_pnpids, 853 851 .probe = snd_opl3sa2_pnp_cdetect, 854 852 .remove = __devexit_p(snd_opl3sa2_pnp_cremove), ··· 931 929 { 932 930 int i; 933 931 932 + #ifdef CONFIG_PNP 934 933 if (pnpc_registered) 935 934 pnp_unregister_card_driver(&opl3sa2_pnpc_driver); 936 935 if (pnp_registered) 937 936 pnp_unregister_driver(&opl3sa2_pnp_driver); 937 + #endif 938 938 for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) 939 939 platform_device_unregister(platform_devices[i]); 940 940 platform_driver_unregister(&snd_opl3sa2_nonpnp_driver); ··· 965 961 cards++; 966 962 } 967 963 964 + #ifdef CONFIG_PNP 968 965 err = pnp_register_driver(&opl3sa2_pnp_driver); 969 966 if (err >= 0) { 970 967 pnp_registered = 1; ··· 976 971 pnpc_registered = 1; 977 972 cards += err; 978 973 } 974 + #endif 979 975 980 976 if (!cards) { 981 977 #ifdef MODULE
+1 -1
sound/isa/opti9xx/opti92x-ad1848.c
··· 1349 1349 int error; 1350 1350 struct snd_pcm *pcm; 1351 1351 1352 - if ((error = snd_pcm_new(codec->card, "OPTi 82C93X", device, 1, 1, &pcm))) 1352 + if ((error = snd_pcm_new(codec->card, "OPTi 82C93X", device, 1, 1, &pcm)) < 0) 1353 1353 return error; 1354 1354 1355 1355 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_opti93x_playback_ops);
+2 -2
sound/isa/sb/sb16.c
··· 179 179 { .id = "CTL0086", .devs = { { "CTL0041" } } }, 180 180 /* Sound Blaster Vibra16X */ 181 181 { .id = "CTL00f0", .devs = { { "CTL0043" } } }, 182 + /* Sound Blaster 16 (Virtual PC 2004) */ 183 + { .id = "tBA03b0", .devs = { {.id="PNPb003" } } }, 182 184 #else /* SNDRV_SBAWE defined */ 183 185 /* Sound Blaster AWE 32 PnP */ 184 186 { .id = "CTL0035", .devs = { { "CTL0031" }, { "CTL0021" } } }, ··· 237 235 { .id = "CTLXXXX" , .devs = { { "CTL0044" }, { "CTL0023" } } }, 238 236 { .id = "CTLXXXX" , .devs = { { "CTL0045" }, { "CTL0022" } } }, 239 237 #endif /* SNDRV_SBAWE */ 240 - /* Sound Blaster 16 PnP (Virtual PC 2004)*/ 241 - { .id = "tBA03b0", .devs = { { "PNPb003" } } }, 242 238 { .id = "", } 243 239 }; 244 240
+5 -1
sound/isa/sscape.c
··· 69 69 MODULE_PARM_DESC(dma, "DMA # for SoundScape driver."); 70 70 71 71 static struct platform_device *platform_devices[SNDRV_CARDS]; 72 - static int pnp_registered; 73 72 74 73 #ifdef CONFIG_PNP 74 + static int pnp_registered; 75 75 static struct pnp_card_device_id sscape_pnpids[] = { 76 76 { .id = "ENS3081", .devs = { { "ENS0000" } } }, 77 77 { .id = "" } /* end */ ··· 1391 1391 { 1392 1392 int i; 1393 1393 1394 + #ifdef CONFIG_PNP 1394 1395 if (pnp_registered) 1395 1396 pnp_unregister_card_driver(&sscape_pnpc_driver); 1397 + #endif 1396 1398 for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) 1397 1399 platform_device_unregister(platform_devices[i]); 1398 1400 platform_driver_unregister(&snd_sscape_driver); ··· 1468 1466 ret = sscape_manual_probe(); 1469 1467 if (ret < 0) 1470 1468 return ret; 1469 + #ifdef CONFIG_PNP 1471 1470 if (pnp_register_card_driver(&sscape_pnpc_driver) >= 0) 1472 1471 pnp_registered = 1; 1472 + #endif 1473 1473 return 0; 1474 1474 } 1475 1475
+5 -2
sound/isa/wavefront/wavefront.c
··· 84 84 MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)"); 85 85 86 86 static struct platform_device *platform_devices[SNDRV_CARDS]; 87 - static int pnp_registered; 88 - 89 87 90 88 #ifdef CONFIG_PNP 89 + static int pnp_registered; 91 90 92 91 static struct pnp_card_device_id snd_wavefront_pnpids[] = { 93 92 /* Tropez */ ··· 694 695 { 695 696 int i; 696 697 698 + #ifdef CONFIG_PNP 697 699 if (pnp_registered) 698 700 pnp_unregister_card_driver(&wavefront_pnpc_driver); 701 + #endif 699 702 for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) 700 703 platform_device_unregister(platform_devices[i]); 701 704 platform_driver_unregister(&snd_wavefront_driver); ··· 726 725 cards++; 727 726 } 728 727 728 + #ifdef CONFIG_PNP 729 729 i = pnp_register_card_driver(&wavefront_pnpc_driver); 730 730 if (i >= 0) { 731 731 pnp_registered = 1; 732 732 cards += i; 733 733 } 734 + #endif 734 735 735 736 if (!cards) { 736 737 #ifdef MODULE
+1 -1
sound/isa/wavefront/wavefront_synth.c
··· 866 866 divided by 2. 867 867 */ 868 868 869 - u16 sample_short; 869 + u16 sample_short = 0; 870 870 u32 length; 871 871 u16 __user *data_end = NULL; 872 872 unsigned int i;
+39 -14
sound/pci/ac97/ac97_patch.c
··· 1621 1621 AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0), 1622 1622 }; 1623 1623 1624 + /* black list to avoid HP/Line jack-sense controls 1625 + * (SS vendor << 16 | device) 1626 + */ 1627 + static unsigned int ad1981_jacks_blacklist[] = { 1628 + 0x10140554, /* Thinkpad T42p/R50p */ 1629 + 0 /* end */ 1630 + }; 1631 + 1632 + static int check_list(struct snd_ac97 *ac97, const unsigned int *list) 1633 + { 1634 + u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device; 1635 + for (; *list; list++) 1636 + if (*list == subid) 1637 + return 1; 1638 + return 0; 1639 + } 1640 + 1624 1641 static int patch_ad1981a_specific(struct snd_ac97 * ac97) 1625 1642 { 1643 + if (check_list(ac97, ad1981_jacks_blacklist)) 1644 + return 0; 1626 1645 return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense, 1627 1646 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); 1628 1647 } ··· 1654 1635 #endif 1655 1636 }; 1656 1637 1638 + /* white list to enable HP jack-sense bits 1639 + * (SS vendor << 16 | device) 1640 + */ 1641 + static unsigned int ad1981_jacks_whitelist[] = { 1642 + 0x0e11005a, /* HP nc4000/4010 */ 1643 + 0x103c0890, /* HP nc6000 */ 1644 + 0x103c0938, /* HP nc4220 */ 1645 + 0x103c099c, /* HP nx6110 */ 1646 + 0x103c0944, /* HP nc6220 */ 1647 + 0x103c0934, /* HP nc8220 */ 1648 + 0x103c006d, /* HP nx9105 */ 1649 + 0x17340088, /* FSC Scenic-W */ 1650 + 0 /* end */ 1651 + }; 1652 + 1657 1653 static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97) 1658 1654 { 1659 - u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device; 1660 - switch (subid) { 1661 - case 0x0e11005a: /* HP nc4000/4010 */ 1662 - case 0x103c0890: /* HP nc6000 */ 1663 - case 0x103c0938: /* HP nc4220 */ 1664 - case 0x103c099c: /* HP nx6110 */ 1665 - case 0x103c0944: /* HP nc6220 */ 1666 - case 0x103c0934: /* HP nc8220 */ 1667 - case 0x103c006d: /* HP nx9105 */ 1668 - case 0x17340088: /* FSC Scenic-W */ 1655 + if (check_list(ac97, ad1981_jacks_whitelist)) 1669 1656 /* enable headphone jack sense */ 1670 1657 snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11); 1671 - break; 1672 - } 1673 1658 } 1674 1659 1675 1660 int patch_ad1981a(struct snd_ac97 *ac97) ··· 1695 1672 1696 1673 if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0) 1697 1674 return err; 1675 + if (check_list(ac97, ad1981_jacks_blacklist)) 1676 + return 0; 1698 1677 return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense, 1699 1678 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); 1700 1679 } ··· 2235 2210 /* Vref disable (bit12), 1kOhm (bit13) */ 2236 2211 snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13), 2237 2212 shared ? (1<<12) : (1<<13)); 2238 - /* MIC-IN = 1, CENTER-LFE = 2 */ 2213 + /* MIC-IN = 1, CENTER-LFE = 5 */ 2239 2214 snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 4, 2240 - shared ? (2<<4) : (1<<4)); 2215 + shared ? (5<<4) : (1<<4)); 2241 2216 } 2242 2217 2243 2218 static const struct snd_kcontrol_new snd_ac97_controls_alc850[] = {
+1 -1
sound/pci/ali5451/ali5451.c
··· 279 279 }; 280 280 281 281 static struct pci_device_id snd_ali_ids[] = { 282 - {0x10b9, 0x5451, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, 282 + {PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0}, 283 283 {0, } 284 284 }; 285 285 MODULE_DEVICE_TABLE(pci, snd_ali_ids);
+1 -1
sound/pci/au88x0/au88x0_eq.c
··· 849 849 snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 850 850 { 851 851 vortex_t *vortex = snd_kcontrol_chip(kcontrol); 852 - int i, count; 852 + int i, count = 0; 853 853 u16 peaks[20]; 854 854 855 855 vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count);
+3 -1
sound/pci/bt87x.c
··· 781 781 BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, 0x0070, 0x13eb, 32000), 782 782 /* Viewcast Osprey 200 */ 783 783 BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0xff01, 44100), 784 + /* AVerMedia Studio No. 103, 203, ...? */ 785 + BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x1461, 0x0003, 48000), 784 786 { } 785 787 }; 786 788 MODULE_DEVICE_TABLE(pci, snd_bt87x_ids); ··· 810 808 const struct pci_device_id *supported; 811 809 812 810 supported = pci_match_device(&driver, pci); 813 - if (supported) 811 + if (supported && supported->driver_data > 0) 814 812 return supported->driver_data; 815 813 816 814 for (i = 0; i < ARRAY_SIZE(blacklist); ++i)
+11 -1
sound/pci/ca0106/ca0106_main.c
··· 199 199 .name = "MSI K8N Diamond MB [SB0438]", 200 200 .gpio_type = 1, 201 201 .i2c_adc = 1 } , 202 - /* Shuttle XPC SD31P which has an onboard Creative Labs Sound Blaster Live! 24-bit EAX 202 + /* Shuttle XPC SD31P which has an onboard Creative Labs 203 + * Sound Blaster Live! 24-bit EAX 203 204 * high-definition 7.1 audio processor". 204 205 * Added using info from andrewvegan in alsa bug #1298 205 206 */ ··· 208 207 .name = "Shuttle XPC SD31P [SD31P]", 209 208 .gpio_type = 1, 210 209 .i2c_adc = 1 } , 210 + /* Shuttle XPC SD11G5 which has an onboard Creative Labs 211 + * Sound Blaster Live! 24-bit EAX 212 + * high-definition 7.1 audio processor". 213 + * Fixes ALSA bug#1600 214 + */ 215 + { .serial = 0x30411297, 216 + .name = "Shuttle XPC SD11G5 [SD11G5]", 217 + .gpio_type = 1, 218 + .i2c_adc = 1 } , 211 219 { .serial = 0, 212 220 .name = "AudigyLS [Unknown]" } 213 221 };
+1 -1
sound/pci/cs46xx/dsp_spos_scb_lib.c
··· 675 675 if (pass_through) { 676 676 /* wont work with any other rate than 677 677 the native DSP rate */ 678 - snd_assert (rate = 48000); 678 + snd_assert (rate == 48000); 679 679 680 680 scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&src_task_scb, 681 681 dest,"DMAREADER",parent_scb,
+4 -2
sound/pci/cs5535audio/cs5535audio.c
··· 46 46 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; 47 47 48 48 static struct pci_device_id snd_cs5535audio_ids[] = { 49 - { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO, PCI_ANY_ID, 50 - PCI_ANY_ID, 0, 0, 0, }, 49 + { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO, 50 + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, 51 + { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO, 52 + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, 51 53 {} 52 54 }; 53 55
+6 -4
sound/pci/emu10k1/emumixer.c
··· 759 759 "Master Mono Playback Volume", 760 760 "PCM Out Path & Mute", 761 761 "Mono Output Select", 762 + "Front Playback Switch", 763 + "Front Playback Volume", 762 764 "Surround Playback Switch", 763 765 "Surround Playback Volume", 764 766 "Center Playback Switch", ··· 831 829 } 832 830 if (emu->audigy) { 833 831 /* set master volume to 0 dB */ 834 - snd_ac97_write(emu->ac97, AC97_MASTER, 0x0000); 832 + snd_ac97_write_cache(emu->ac97, AC97_MASTER, 0x0000); 835 833 /* set capture source to mic */ 836 - snd_ac97_write(emu->ac97, AC97_REC_SEL, 0x0000); 834 + snd_ac97_write_cache(emu->ac97, AC97_REC_SEL, 0x0000); 837 835 c = audigy_remove_ctls; 838 836 } else { 839 837 /* ··· 846 844 snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT); 847 845 } 848 846 /* remove unused AC97 controls */ 849 - snd_ac97_write(emu->ac97, AC97_SURROUND_MASTER, 0x0202); 850 - snd_ac97_write(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202); 847 + snd_ac97_write_cache(emu->ac97, AC97_SURROUND_MASTER, 0x0202); 848 + snd_ac97_write_cache(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202); 851 849 c = emu10k1_remove_ctls; 852 850 } 853 851 for (; *c; c++)
+2
sound/pci/hda/hda_intel.c
··· 75 75 "{Intel, ICH6M}," 76 76 "{Intel, ICH7}," 77 77 "{Intel, ESB2}," 78 + "{Intel, ICH8}," 78 79 "{ATI, SB450}," 79 80 "{VIA, VT8251}," 80 81 "{VIA, VT8237A}," ··· 1587 1586 { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */ 1588 1587 { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */ 1589 1588 { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */ 1589 + { 0x8086, 0x284b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH8 */ 1590 1590 { 0x1002, 0x437b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATI }, /* ATI SB450 */ 1591 1591 { 0x1106, 0x3288, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_VIA }, /* VIA VT8251/VT8237A */ 1592 1592 { 0x1039, 0x7502, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_SIS }, /* SIS966 */
+7 -4
sound/pci/hda/patch_realtek.c
··· 1668 1668 { .pci_subvendor = 0x1043, .pci_subdevice = 0x8196, .config = ALC880_6ST }, /* ASUS P5GD1-HVM */ 1669 1669 { .pci_subvendor = 0x1043, .pci_subdevice = 0x81b4, .config = ALC880_6ST }, 1670 1670 { .pci_subvendor = 0x1019, .pci_subdevice = 0xa884, .config = ALC880_6ST }, /* Acer APFV */ 1671 + { .pci_subvendor = 0x1458, .pci_subdevice = 0xa102, .config = ALC880_6ST }, /* Gigabyte K8N51 */ 1671 1672 1672 1673 { .modelname = "6stack-digout", .config = ALC880_6ST_DIG }, 1673 1674 { .pci_subvendor = 0x2668, .pci_subdevice = 0x8086, .config = ALC880_6ST_DIG }, ··· 2476 2475 /* LINE-2 is used for line-out in rear */ 2477 2476 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 2478 2477 /* select line-out */ 2479 - {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, 2478 + {0x0e, AC_VERB_SET_CONNECT_SEL, 0x00}, 2480 2479 /* LINE-OUT pin */ 2481 2480 {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 2482 2481 /* enable HP */ ··· 2946 2945 */ 2947 2946 static struct hda_board_config alc260_cfg_tbl[] = { 2948 2947 { .modelname = "basic", .config = ALC260_BASIC }, 2948 + { .pci_subvendor = 0x104d, .pci_subdevice = 0x81bb, 2949 + .config = ALC260_BASIC }, /* Sony VAIO */ 2949 2950 { .modelname = "hp", .config = ALC260_HP }, 2950 2951 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3010, .config = ALC260_HP }, 2951 2952 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3011, .config = ALC260_HP }, ··· 3417 3414 * configuration and preset 3418 3415 */ 3419 3416 static struct hda_board_config alc882_cfg_tbl[] = { 3420 - { .modelname = "3stack-dig", .config = ALC861_3ST_DIG }, 3421 - { .modelname = "6stack-dig", .config = ALC861_6ST_DIG }, 3417 + { .modelname = "3stack-dig", .config = ALC882_3ST_DIG }, 3418 + { .modelname = "6stack-dig", .config = ALC882_6ST_DIG }, 3422 3419 { .pci_subvendor = 0x1462, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* MSI */ 3423 3420 { .pci_subvendor = 0x105b, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* Foxconn */ 3424 3421 { .pci_subvendor = 0x1019, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* ECS */ 3425 - { .modelname = "auto", .config = ALC861_AUTO }, 3422 + { .modelname = "auto", .config = ALC882_AUTO }, 3426 3423 {} 3427 3424 }; 3428 3425
+1
sound/pci/hda/patch_si3054.c
··· 297 297 struct hda_codec_preset snd_hda_preset_si3054[] = { 298 298 { .id = 0x163c3055, .name = "Si3054", .patch = patch_si3054 }, 299 299 { .id = 0x163c3155, .name = "Si3054", .patch = patch_si3054 }, 300 + { .id = 0x11c13026, .name = "Si3054", .patch = patch_si3054 }, 300 301 {} 301 302 }; 302 303
+160 -16
sound/pci/hda/patch_sigmatel.c
··· 50 50 unsigned int surr_switch: 1; 51 51 unsigned int line_switch: 1; 52 52 unsigned int mic_switch: 1; 53 + unsigned int alt_switch: 1; 53 54 54 55 /* playback */ 55 56 struct hda_multi_out multiout; 56 - hda_nid_t dac_nids[4]; 57 + hda_nid_t dac_nids[5]; 57 58 58 59 /* capture */ 59 60 hda_nid_t *adc_nids; ··· 74 73 75 74 /* capture source */ 76 75 struct hda_input_mux *input_mux; 77 - unsigned int cur_mux[2]; 76 + unsigned int cur_mux[3]; 78 77 79 78 /* i/o switches */ 80 79 unsigned int io_switch[2]; ··· 108 107 0x12, 0x13, 109 108 }; 110 109 110 + static hda_nid_t stac927x_adc_nids[3] = { 111 + 0x07, 0x08, 0x09 112 + }; 113 + 114 + static hda_nid_t stac927x_mux_nids[3] = { 115 + 0x15, 0x16, 0x17 116 + }; 117 + 111 118 static hda_nid_t stac9200_pin_nids[8] = { 112 119 0x08, 0x09, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 113 120 }; ··· 123 114 static hda_nid_t stac922x_pin_nids[10] = { 124 115 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 125 116 0x0f, 0x10, 0x11, 0x15, 0x1b, 117 + }; 118 + 119 + static hda_nid_t stac927x_pin_nids[14] = { 120 + 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 121 + 0x0f, 0x10, 0x11, 0x12, 0x13, 122 + 0x14, 0x21, 0x22, 0x23, 126 123 }; 127 124 128 125 static int stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) ··· 170 155 {} 171 156 }; 172 157 158 + static struct hda_verb stac927x_core_init[] = { 159 + /* set master volume and direct control */ 160 + { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, 161 + {} 162 + }; 163 + 173 164 static struct snd_kcontrol_new stac9200_mixer[] = { 174 165 HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT), 175 166 HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT), ··· 204 183 .put = stac92xx_mux_enum_put, 205 184 }, 206 185 HDA_CODEC_VOLUME("Capture Volume", 0x17, 0x0, HDA_INPUT), 186 + HDA_CODEC_MUTE("Capture Switch", 0x17, 0x0, HDA_INPUT), 207 187 HDA_CODEC_VOLUME("Mux Capture Volume", 0x12, 0x0, HDA_OUTPUT), 188 + { } /* end */ 189 + }; 190 + 191 + static snd_kcontrol_new_t stac927x_mixer[] = { 192 + { 193 + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 194 + .name = "Input Source", 195 + .count = 1, 196 + .info = stac92xx_mux_enum_info, 197 + .get = stac92xx_mux_enum_get, 198 + .put = stac92xx_mux_enum_put, 199 + }, 200 + HDA_CODEC_VOLUME("InMux Capture Volume", 0x15, 0x0, HDA_OUTPUT), 201 + HDA_CODEC_VOLUME("InVol Capture Volume", 0x18, 0x0, HDA_INPUT), 202 + HDA_CODEC_MUTE("ADCMux Capture Switch", 0x1b, 0x0, HDA_OUTPUT), 208 203 { } /* end */ 209 204 }; 210 205 ··· 277 240 }; 278 241 279 242 static unsigned int d945gtp3_pin_configs[10] = { 280 - 0x0221401f, 0x01a19022, 0x01813021, 0x01114010, 243 + 0x0221401f, 0x01a19022, 0x01813021, 0x01014010, 281 244 0x40000100, 0x40000100, 0x40000100, 0x40000100, 282 245 0x02a19120, 0x40000100, 283 246 }; 284 247 285 248 static unsigned int d945gtp5_pin_configs[10] = { 286 - 0x0221401f, 0x01111012, 0x01813024, 0x01114010, 287 - 0x01a19021, 0x01116011, 0x01452130, 0x40000100, 249 + 0x0221401f, 0x01011012, 0x01813024, 0x01014010, 250 + 0x01a19021, 0x01016011, 0x01452130, 0x40000100, 288 251 0x02a19320, 0x40000100, 289 252 }; 290 253 ··· 311 274 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 312 275 .pci_subdevice = 0x0013, 313 276 .config = STAC_D945GTP5 }, /* Intel D955XBK - 5 Stack */ 277 + { .pci_subvendor = PCI_VENDOR_ID_INTEL, 278 + .pci_subdevice = 0x0417, 279 + .config = STAC_D945GTP5 }, /* Intel D975XBK - 5 Stack */ 280 + {} /* terminator */ 281 + }; 282 + 283 + static unsigned int ref927x_pin_configs[14] = { 284 + 0x01813122, 0x01a19021, 0x01014010, 0x01016011, 285 + 0x01012012, 0x01011014, 0x40000100, 0x40000100, 286 + 0x40000100, 0x40000100, 0x40000100, 0x01441030, 287 + 0x01c41030, 0x40000100, 288 + }; 289 + 290 + static unsigned int *stac927x_brd_tbl[] = { 291 + ref927x_pin_configs, 292 + }; 293 + 294 + static struct hda_board_config stac927x_cfg_tbl[] = { 295 + { .modelname = "ref", 296 + .pci_subvendor = PCI_VENDOR_ID_INTEL, 297 + .pci_subdevice = 0x2668, /* DFI LanParty */ 298 + .config = STAC_REF }, /* SigmaTel reference board */ 314 299 {} /* terminator */ 315 300 }; 316 301 ··· 467 408 }, 468 409 }; 469 410 411 + static struct hda_pcm_stream stac92xx_pcm_analog_alt_playback = { 412 + .substreams = 1, 413 + .channels_min = 2, 414 + .channels_max = 2, 415 + .nid = 0x06, /* NID to query formats and rates */ 416 + .ops = { 417 + .open = stac92xx_playback_pcm_open, 418 + .prepare = stac92xx_playback_pcm_prepare, 419 + .cleanup = stac92xx_playback_pcm_cleanup 420 + }, 421 + }; 422 + 470 423 static struct hda_pcm_stream stac92xx_pcm_analog_capture = { 471 424 .substreams = 2, 472 425 .channels_min = 2, 473 426 .channels_max = 2, 474 - .nid = 0x06, /* NID to query formats and rates */ 427 + /* NID is set in stac92xx_build_pcms */ 475 428 .ops = { 476 429 .prepare = stac92xx_capture_pcm_prepare, 477 430 .cleanup = stac92xx_capture_pcm_cleanup ··· 501 430 info->name = "STAC92xx Analog"; 502 431 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback; 503 432 info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; 433 + info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0]; 434 + 435 + if (spec->alt_switch) { 436 + codec->num_pcms++; 437 + info++; 438 + info->name = "STAC92xx Analog Alt"; 439 + info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_alt_playback; 440 + } 504 441 505 442 if (spec->multiout.dig_out_nid || spec->dig_in_nid) { 506 443 codec->num_pcms++; ··· 667 588 return 0; 668 589 } 669 590 591 + /* 592 + * XXX The line_out pin widget connection list may not be set to the 593 + * desired DAC nid. This is the case on 927x where ports A and B can 594 + * be routed to several DACs. 595 + * 596 + * This requires an analysis of the line-out/hp pin configuration 597 + * to provide a best fit for pin/DAC configurations that are routable. 598 + * For now, 927x DAC4 is not supported and 927x DAC1 output to ports 599 + * A and B is not supported. 600 + */ 670 601 /* fill in the dac_nids table from the parsed pin configuration */ 671 602 static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, const struct auto_pin_cfg *cfg) 672 603 { ··· 691 602 AC_VERB_GET_CONNECT_LIST, 0) & 0xff; 692 603 } 693 604 694 - spec->multiout.num_dacs = cfg->line_outs; 605 + if (cfg->line_outs) 606 + spec->multiout.num_dacs = cfg->line_outs; 607 + else if (cfg->hp_pin) { 608 + spec->multiout.dac_nids[0] = snd_hda_codec_read(codec, cfg->hp_pin, 0, 609 + AC_VERB_GET_CONNECT_LIST, 0) & 0xff; 610 + spec->multiout.num_dacs = 1; 611 + } 695 612 696 613 return 0; 697 614 } ··· 848 753 stac92xx_auto_set_pinctl(codec, pin, AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN); 849 754 } 850 755 851 - static int stac922x_parse_auto_config(struct hda_codec *codec) 756 + static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out, hda_nid_t dig_in) 852 757 { 853 758 struct sigmatel_spec *spec = codec->spec; 854 759 int err; 855 760 856 761 if ((err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, NULL)) < 0) 857 762 return err; 763 + if (! spec->autocfg.line_outs && ! spec->autocfg.hp_pin) 764 + return 0; /* can't find valid pin config */ 765 + stac92xx_auto_init_multi_out(codec); 766 + stac92xx_auto_init_hp_out(codec); 858 767 if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0) 859 768 return err; 860 769 if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0) 861 770 return err; 862 - if (! spec->autocfg.line_outs && ! spec->autocfg.hp_pin) 863 - return 0; /* can't find valid pin config */ 864 771 865 772 if ((err = stac92xx_auto_create_multi_out_ctls(spec, &spec->autocfg)) < 0 || 866 773 (err = stac92xx_auto_create_hp_ctls(codec, &spec->autocfg)) < 0 || ··· 874 777 spec->surr_switch = 1; 875 778 876 779 if (spec->autocfg.dig_out_pin) { 877 - spec->multiout.dig_out_nid = 0x08; 780 + spec->multiout.dig_out_nid = dig_out; 878 781 stac92xx_auto_set_pinctl(codec, spec->autocfg.dig_out_pin, AC_PINCTL_OUT_EN); 879 782 } 880 783 if (spec->autocfg.dig_in_pin) { 881 - spec->dig_in_nid = 0x09; 784 + spec->dig_in_nid = dig_in; 882 785 stac92xx_auto_set_pinctl(codec, spec->autocfg.dig_in_pin, AC_PINCTL_IN_EN); 883 786 } 884 787 ··· 923 826 struct sigmatel_spec *spec = codec->spec; 924 827 925 828 snd_hda_sequence_write(codec, spec->init); 926 - 927 - stac92xx_auto_init_multi_out(codec); 928 - stac92xx_auto_init_hp_out(codec); 929 829 930 830 return 0; 931 831 } ··· 1090 996 1091 997 spec->multiout.dac_nids = spec->dac_nids; 1092 998 1093 - err = stac922x_parse_auto_config(codec); 999 + err = stac92xx_parse_auto_config(codec, 0x08, 0x09); 1000 + if (err < 0) { 1001 + stac92xx_free(codec); 1002 + return err; 1003 + } 1004 + 1005 + codec->patch_ops = stac92xx_patch_ops; 1006 + 1007 + return 0; 1008 + } 1009 + 1010 + static int patch_stac927x(struct hda_codec *codec) 1011 + { 1012 + struct sigmatel_spec *spec; 1013 + int err; 1014 + 1015 + spec = kzalloc(sizeof(*spec), GFP_KERNEL); 1016 + if (spec == NULL) 1017 + return -ENOMEM; 1018 + 1019 + codec->spec = spec; 1020 + spec->board_config = snd_hda_check_board_config(codec, stac927x_cfg_tbl); 1021 + if (spec->board_config < 0) 1022 + snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC927x, using BIOS defaults\n"); 1023 + else { 1024 + spec->num_pins = 14; 1025 + spec->pin_nids = stac927x_pin_nids; 1026 + spec->pin_configs = stac927x_brd_tbl[spec->board_config]; 1027 + stac92xx_set_config_regs(codec); 1028 + } 1029 + 1030 + spec->adc_nids = stac927x_adc_nids; 1031 + spec->mux_nids = stac927x_mux_nids; 1032 + spec->num_muxes = 3; 1033 + 1034 + spec->init = stac927x_core_init; 1035 + spec->mixer = stac927x_mixer; 1036 + 1037 + spec->multiout.dac_nids = spec->dac_nids; 1038 + 1039 + err = stac92xx_parse_auto_config(codec, 0x1e, 0x20); 1094 1040 if (err < 0) { 1095 1041 stac92xx_free(codec); 1096 1042 return err; ··· 1152 1018 { .id = 0x83847681, .name = "STAC9220D/9223D A2", .patch = patch_stac922x }, 1153 1019 { .id = 0x83847682, .name = "STAC9221 A2", .patch = patch_stac922x }, 1154 1020 { .id = 0x83847683, .name = "STAC9221D A2", .patch = patch_stac922x }, 1021 + { .id = 0x83847620, .name = "STAC9274", .patch = patch_stac927x }, 1022 + { .id = 0x83847621, .name = "STAC9274D", .patch = patch_stac927x }, 1023 + { .id = 0x83847622, .name = "STAC9273X", .patch = patch_stac927x }, 1024 + { .id = 0x83847623, .name = "STAC9273D", .patch = patch_stac927x }, 1025 + { .id = 0x83847624, .name = "STAC9272X", .patch = patch_stac927x }, 1026 + { .id = 0x83847625, .name = "STAC9272D", .patch = patch_stac927x }, 1027 + { .id = 0x83847626, .name = "STAC9271X", .patch = patch_stac927x }, 1028 + { .id = 0x83847627, .name = "STAC9271D", .patch = patch_stac927x }, 1029 + { .id = 0x83847628, .name = "STAC9274X5NH", .patch = patch_stac927x }, 1030 + { .id = 0x83847629, .name = "STAC9274D5NH", .patch = patch_stac927x }, 1155 1031 {} /* terminator */ 1156 1032 };
+8 -7
sound/pci/intel8x0.c
··· 427 427 { 0x10de, 0x008a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8 */ 428 428 { 0x10de, 0x00da, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE3 */ 429 429 { 0x10de, 0x00ea, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8S */ 430 + { 0x10de, 0x026b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* MCP51 */ 430 431 { 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */ 431 432 { 0x1022, 0x7445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD768 */ 432 433 { 0x10b9, 0x5455, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALI }, /* Ali5455 */ ··· 1806 1805 }, 1807 1806 { 1808 1807 .subvendor = 0x1028, 1808 + .subdevice = 0x0151, 1809 + .name = "Dell Optiplex GX270", /* AD1981B */ 1810 + .type = AC97_TUNE_HP_ONLY 1811 + }, 1812 + { 1813 + .subvendor = 0x1028, 1809 1814 .subdevice = 0x0163, 1810 1815 .name = "Dell Unknown", /* STAC9750/51 */ 1811 1816 .type = AC97_TUNE_HP_ONLY ··· 1854 1847 }, 1855 1848 { 1856 1849 .subvendor = 0x103c, 1857 - .subdevice = 0x099c, 1858 - .name = "HP nx6110", /* AD1981B */ 1859 - .type = AC97_TUNE_HP_ONLY 1860 - }, 1861 - { 1862 - .subvendor = 0x103c, 1863 1850 .subdevice = 0x129d, 1864 1851 .name = "HP xw8000", 1865 1852 .type = AC97_TUNE_HP_ONLY ··· 1867 1866 { 1868 1867 .subvendor = 0x103c, 1869 1868 .subdevice = 0x099c, 1870 - .name = "HP nc6120", 1869 + .name = "HP nx6110/nc6120", 1871 1870 .type = AC97_TUNE_HP_MUTE_LED 1872 1871 }, 1873 1872 {
+5 -4
sound/pci/pcxhr/pcxhr.c
··· 454 454 is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE); 455 455 stream_num = is_capture ? 0 : subs->number; 456 456 457 - snd_printdd("pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%x) subs(%d)\n", 457 + snd_printdd("pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%zx) subs(%d)\n", 458 458 is_capture ? 'c' : 'p', 459 459 chip->chip_idx, (void*)subs->runtime->dma_addr, 460 460 subs->runtime->dma_bytes, subs->number); ··· 744 744 /* only the first stream can choose the sample rate */ 745 745 /* the further opened streams will be limited to its frequency (see open) */ 746 746 /* set the clock only once (first stream) */ 747 - if (mgr->sample_rate == 0) { 747 + if (mgr->sample_rate != subs->runtime->rate) { 748 748 err = pcxhr_set_clock(mgr, subs->runtime->rate); 749 749 if (err) 750 750 break; 751 + if (mgr->sample_rate == 0) 752 + /* start the DSP-timer */ 753 + err = pcxhr_hardware_timer(mgr, 1); 751 754 mgr->sample_rate = subs->runtime->rate; 752 - 753 - err = pcxhr_hardware_timer(mgr, 1); /* start the DSP-timer */ 754 755 } 755 756 } while(0); /* do only once (so we can use break instead of goto) */ 756 757
+3 -3
sound/pci/rme9652/hdspm.c
··· 3324 3324 snd_dma_pci_data(hdspm->pci), 3325 3325 wanted, 3326 3326 wanted)) < 0) { 3327 - snd_printdd("Could not preallocate %d Bytes\n", wanted); 3327 + snd_printdd("Could not preallocate %zd Bytes\n", wanted); 3328 3328 3329 3329 return err; 3330 3330 } else 3331 - snd_printdd(" Preallocated %d Bytes\n", wanted); 3331 + snd_printdd(" Preallocated %zd Bytes\n", wanted); 3332 3332 3333 3333 return 0; 3334 3334 } ··· 3510 3510 3511 3511 hdspm->monitor_outs = enable_monitor; 3512 3512 3513 - snd_printdd("kmalloc Mixer memory of %d Bytes\n", 3513 + snd_printdd("kmalloc Mixer memory of %zd Bytes\n", 3514 3514 sizeof(struct hdspm_mixer)); 3515 3515 if ((hdspm->mixer = kmalloc(sizeof(struct hdspm_mixer), GFP_KERNEL)) 3516 3516 == NULL) {
+5 -3
sound/pci/trident/trident.c
··· 64 64 MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); 65 65 66 66 static struct pci_device_id snd_trident_ids[] = { 67 - { 0x1023, 0x2000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Trident 4DWave DX PCI Audio */ 68 - { 0x1023, 0x2001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Trident 4DWave NX PCI Audio */ 69 - { 0x1039, 0x7018, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* SiS SI7018 PCI Audio */ 67 + {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), 68 + PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, 69 + {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX), 70 + 0, 0, 0}, 71 + {PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7018), 0, 0, 0}, 70 72 { 0, } 71 73 }; 72 74
+5
sound/pci/via82xx.c
··· 2340 2340 { .subvendor = 0x1043, .subdevice = 0x80b0, .action = VIA_DXS_NO_VRA }, /* ASUS A7V600 & K8V*/ 2341 2341 { .subvendor = 0x1043, .subdevice = 0x810d, .action = VIA_DXS_SRC }, /* ASUS */ 2342 2342 { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC }, /* ASUS A8V Deluxe */ 2343 + { .subvendor = 0x1043, .subdevice = 0x8174, .action = VIA_DXS_SRC }, /* ASUS */ 2343 2344 { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */ 2344 2345 { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */ 2345 2346 { .subvendor = 0x10cf, .subdevice = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */ ··· 2359 2358 { .subvendor = 0x1462, .subdevice = 0x7023, .action = VIA_DXS_NO_VRA }, /* MSI K8T Neo2-FI */ 2360 2359 { .subvendor = 0x1462, .subdevice = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */ 2361 2360 { .subvendor = 0x1462, .subdevice = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */ 2361 + { .subvendor = 0x1462, .subdevice = 0xb012, .action = VIA_DXS_SRC }, /* P4M800/VIA8237R */ 2362 2362 { .subvendor = 0x147b, .subdevice = 0x1401, .action = VIA_DXS_ENABLE }, /* ABIT KD7(-RAID) */ 2363 2363 { .subvendor = 0x147b, .subdevice = 0x1411, .action = VIA_DXS_ENABLE }, /* ABIT VA-20 */ 2364 2364 { .subvendor = 0x147b, .subdevice = 0x1413, .action = VIA_DXS_ENABLE }, /* ABIT KV8 Pro */ ··· 2373 2371 { .subvendor = 0x161f, .subdevice = 0x2032, .action = VIA_DXS_48K }, /* m680x machines */ 2374 2372 { .subvendor = 0x1631, .subdevice = 0xe004, .action = VIA_DXS_ENABLE }, /* Easy Note 3174, Packard Bell */ 2375 2373 { .subvendor = 0x1695, .subdevice = 0x3005, .action = VIA_DXS_ENABLE }, /* EPoX EP-8K9A */ 2374 + { .subvendor = 0x1695, .subdevice = 0x300e, .action = VIA_DXS_SRC }, /* EPoX 9HEAI */ 2375 + { .subvendor = 0x16f3, .subdevice = 0x6405, .action = VIA_DXS_SRC }, /* Jetway K8M8MS */ 2376 + { .subvendor = 0x1734, .subdevice = 0x1093, .action = VIA_DXS_SRC }, /* FSC */ 2376 2377 { .subvendor = 0x1849, .subdevice = 0x3059, .action = VIA_DXS_NO_VRA }, /* ASRock K7VM2 */ 2377 2378 { .subvendor = 0x1849, .subdevice = 0x9761, .action = VIA_DXS_SRC }, /* ASRock mobo(?) */ 2378 2379 { .subvendor = 0x1919, .subdevice = 0x200a, .action = VIA_DXS_NO_VRA }, /* Soltek SL-K8Tpro-939 */
+2
sound/pci/ymfpci/ymfpci_main.c
··· 1229 1229 spin_lock_irq(&chip->reg_lock); 1230 1230 ucontrol->value.iec958.status[0] = (chip->spdif_bits >> 0) & 0xff; 1231 1231 ucontrol->value.iec958.status[1] = (chip->spdif_bits >> 8) & 0xff; 1232 + ucontrol->value.iec958.status[3] = IEC958_AES3_CON_FS_48000; 1232 1233 spin_unlock_irq(&chip->reg_lock); 1233 1234 return 0; 1234 1235 } ··· 1304 1303 spin_lock_irq(&chip->reg_lock); 1305 1304 ucontrol->value.iec958.status[0] = (chip->spdif_pcm_bits >> 0) & 0xff; 1306 1305 ucontrol->value.iec958.status[1] = (chip->spdif_pcm_bits >> 8) & 0xff; 1306 + ucontrol->value.iec958.status[3] = IEC958_AES3_CON_FS_48000; 1307 1307 spin_unlock_irq(&chip->reg_lock); 1308 1308 return 0; 1309 1309 }
+24 -7
sound/usb/usbaudio.c
··· 478 478 /* 479 479 * Prepare urb for streaming before playback starts. 480 480 * 481 - * We don't care about (or have) any data, so we just send a transfer delimiter. 481 + * We don't yet have data, so we send a frame of silence. 482 482 */ 483 483 static int prepare_startup_playback_urb(struct snd_usb_substream *subs, 484 484 struct snd_pcm_runtime *runtime, 485 485 struct urb *urb) 486 486 { 487 - unsigned int i; 487 + unsigned int i, offs, counts; 488 488 struct snd_urb_ctx *ctx = urb->context; 489 + int stride = runtime->frame_bits >> 3; 489 490 491 + offs = 0; 490 492 urb->dev = ctx->subs->dev; 491 493 urb->number_of_packets = subs->packs_per_ms; 492 494 for (i = 0; i < subs->packs_per_ms; ++i) { 493 - urb->iso_frame_desc[i].offset = 0; 494 - urb->iso_frame_desc[i].length = 0; 495 + /* calculate the size of a packet */ 496 + if (subs->fill_max) 497 + counts = subs->maxframesize; /* fixed */ 498 + else { 499 + subs->phase = (subs->phase & 0xffff) 500 + + (subs->freqm << subs->datainterval); 501 + counts = subs->phase >> 16; 502 + if (counts > subs->maxframesize) 503 + counts = subs->maxframesize; 504 + } 505 + urb->iso_frame_desc[i].offset = offs * stride; 506 + urb->iso_frame_desc[i].length = counts * stride; 507 + offs += counts; 495 508 } 496 - urb->transfer_buffer_length = 0; 509 + urb->transfer_buffer_length = offs * stride; 510 + memset(urb->transfer_buffer, 511 + subs->cur_audiofmt->format == SNDRV_PCM_FORMAT_U8 ? 0x80 : 0, 512 + offs * stride); 497 513 return 0; 498 514 } 499 515 ··· 2493 2477 if (err < 0) 2494 2478 return err; 2495 2479 #if 1 2496 - /* FIXME: temporary hack for extigy/audigy 2 nx */ 2480 + /* FIXME: temporary hack for extigy/audigy 2 nx/zs */ 2497 2481 /* extigy apparently supports sample rates other than 48k 2498 2482 * but not in ordinary way. so we enable only 48k atm. 2499 2483 */ 2500 2484 if (chip->usb_id == USB_ID(0x041e, 0x3000) || 2501 - chip->usb_id == USB_ID(0x041e, 0x3020)) { 2485 + chip->usb_id == USB_ID(0x041e, 0x3020) || 2486 + chip->usb_id == USB_ID(0x041e, 0x3061)) { 2502 2487 if (fmt[3] == USB_FORMAT_TYPE_I && 2503 2488 fp->rates != SNDRV_PCM_RATE_48000 && 2504 2489 fp->rates != SNDRV_PCM_RATE_96000)