diff options
Diffstat (limited to 'sound')
32 files changed, 347 insertions, 107 deletions
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) | |||
444 | return mask; | 444 | return mask; |
445 | } | 445 | } |
446 | 446 | ||
447 | static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file, | 447 | static long snd_info_entry_ioctl(struct file *file, unsigned int cmd, |
448 | unsigned int cmd, unsigned long arg) | 448 | unsigned long arg) |
449 | { | 449 | { |
450 | struct snd_info_private_data *data; | 450 | struct snd_info_private_data *data; |
451 | struct snd_info_entry *entry; | 451 | struct snd_info_entry *entry; |
@@ -465,17 +465,6 @@ static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file, | |||
465 | return -ENOTTY; | 465 | return -ENOTTY; |
466 | } | 466 | } |
467 | 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 | } | ||
478 | |||
479 | static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma) | 468 | static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma) |
480 | { | 469 | { |
481 | struct inode *inode = file->f_dentry->d_inode; | 470 | 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) | |||
499 | 488 | ||
500 | static struct file_operations snd_info_entry_operations = | 489 | static struct file_operations snd_info_entry_operations = |
501 | { | 490 | { |
502 | .owner = THIS_MODULE, | 491 | .owner = THIS_MODULE, |
503 | .llseek = snd_info_entry_llseek, | 492 | .llseek = snd_info_entry_llseek, |
504 | .read = snd_info_entry_read, | 493 | .read = snd_info_entry_read, |
505 | .write = snd_info_entry_write, | 494 | .write = snd_info_entry_write, |
506 | .poll = snd_info_entry_poll, | 495 | .poll = snd_info_entry_poll, |
507 | .ioctl = snd_info_entry_ioctl, | 496 | .unlocked_ioctl = snd_info_entry_ioctl, |
508 | .mmap = snd_info_entry_mmap, | 497 | .mmap = snd_info_entry_mmap, |
509 | .open = snd_info_entry_open, | 498 | .open = snd_info_entry_open, |
510 | .release = snd_info_entry_release, | 499 | .release = snd_info_entry_release, |
511 | }; | 500 | }; |
512 | 501 | ||
513 | /** | 502 | /** |
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, | |||
789 | 789 | ||
790 | if ((err = snd_uart16550_detect(uart)) <= 0) { | 790 | if ((err = snd_uart16550_detect(uart)) <= 0) { |
791 | printk(KERN_ERR "no UART detected at 0x%lx\n", iobase); | 791 | printk(KERN_ERR "no UART detected at 0x%lx\n", iobase); |
792 | return err; | 792 | return -ENODEV; |
793 | } | 793 | } |
794 | 794 | ||
795 | if (irq >= 0 && irq != SNDRV_AUTO_IRQ) { | 795 | 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); | |||
109 | MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); | 109 | MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); |
110 | 110 | ||
111 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 111 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
112 | #ifdef CONFIG_PNP | ||
112 | static int pnp_registered; | 113 | static int pnp_registered; |
114 | #endif | ||
113 | 115 | ||
114 | #define CMI8330_RMUX3D 16 | 116 | #define CMI8330_RMUX3D 16 |
115 | #define CMI8330_MUTEMUX 17 | 117 | #define CMI8330_MUTEMUX 17 |
@@ -672,8 +674,10 @@ static void __init_or_module snd_cmi8330_unregister_all(void) | |||
672 | { | 674 | { |
673 | int i; | 675 | int i; |
674 | 676 | ||
677 | #ifdef CONFIG_PNP | ||
675 | if (pnp_registered) | 678 | if (pnp_registered) |
676 | pnp_unregister_card_driver(&cmi8330_pnpc_driver); | 679 | pnp_unregister_card_driver(&cmi8330_pnpc_driver); |
680 | #endif | ||
677 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 681 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
678 | platform_device_unregister(platform_devices[i]); | 682 | platform_device_unregister(platform_devices[i]); |
679 | platform_driver_unregister(&snd_cmi8330_driver); | 683 | platform_driver_unregister(&snd_cmi8330_driver); |
@@ -700,11 +704,13 @@ static int __init alsa_card_cmi8330_init(void) | |||
700 | cards++; | 704 | cards++; |
701 | } | 705 | } |
702 | 706 | ||
707 | #ifdef CONFIG_PNP | ||
703 | err = pnp_register_card_driver(&cmi8330_pnpc_driver); | 708 | err = pnp_register_card_driver(&cmi8330_pnpc_driver); |
704 | if (err >= 0) { | 709 | if (err >= 0) { |
705 | pnp_registered = 1; | 710 | pnp_registered = 1; |
706 | cards += err; | 711 | cards += err; |
707 | } | 712 | } |
713 | #endif | ||
708 | 714 | ||
709 | if (!cards) { | 715 | if (!cards) { |
710 | #ifdef MODULE | 716 | #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}," | |||
75 | 75 | ||
76 | #ifdef CS4232 | 76 | #ifdef CS4232 |
77 | #define IDENT "CS4232" | 77 | #define IDENT "CS4232" |
78 | #define CS423X_DRIVER "snd_cs4232" | ||
78 | #else | 79 | #else |
79 | #define IDENT "CS4236+" | 80 | #define IDENT "CS4236+" |
81 | #define CS423X_DRIVER "snd_cs4236" | ||
80 | #endif | 82 | #endif |
81 | 83 | ||
82 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ | 84 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ |
@@ -125,10 +127,12 @@ module_param_array(dma2, int, NULL, 0444); | |||
125 | MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver."); | 127 | MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver."); |
126 | 128 | ||
127 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 129 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
130 | #ifdef CONFIG_PNP | ||
128 | static int pnpc_registered; | 131 | static int pnpc_registered; |
129 | #ifdef CS4232 | 132 | #ifdef CS4232 |
130 | static int pnp_registered; | 133 | static int pnp_registered; |
131 | #endif | 134 | #endif |
135 | #endif /* CONFIG_PNP */ | ||
132 | 136 | ||
133 | struct snd_card_cs4236 { | 137 | struct snd_card_cs4236 { |
134 | struct snd_cs4231 *chip; | 138 | struct snd_cs4231 *chip; |
@@ -158,7 +162,6 @@ MODULE_DEVICE_TABLE(pnp, snd_cs4232_pnpbiosids); | |||
158 | #endif /* CS4232 */ | 162 | #endif /* CS4232 */ |
159 | 163 | ||
160 | #ifdef CS4232 | 164 | #ifdef CS4232 |
161 | #define CS423X_DRIVER "snd_cs4232" | ||
162 | #define CS423X_ISAPNP_DRIVER "cs4232_isapnp" | 165 | #define CS423X_ISAPNP_DRIVER "cs4232_isapnp" |
163 | static struct pnp_card_device_id snd_cs423x_pnpids[] = { | 166 | static struct pnp_card_device_id snd_cs423x_pnpids[] = { |
164 | /* Philips PCA70PS */ | 167 | /* Philips PCA70PS */ |
@@ -175,11 +178,12 @@ static struct pnp_card_device_id snd_cs423x_pnpids[] = { | |||
175 | { .id = "CSC7632", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } }, | 178 | { .id = "CSC7632", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } }, |
176 | /* SIC CrystalWave 32 (CS4232) */ | 179 | /* SIC CrystalWave 32 (CS4232) */ |
177 | { .id = "CSCf032", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, | 180 | { .id = "CSCf032", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, |
181 | /* Netfinity 3000 on-board soundcard */ | ||
182 | { .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC010f" } } }, | ||
178 | /* --- */ | 183 | /* --- */ |
179 | { .id = "" } /* end */ | 184 | { .id = "" } /* end */ |
180 | }; | 185 | }; |
181 | #else /* CS4236 */ | 186 | #else /* CS4236 */ |
182 | #define CS423X_DRIVER "snd_cs4236" | ||
183 | #define CS423X_ISAPNP_DRIVER "cs4236_isapnp" | 187 | #define CS423X_ISAPNP_DRIVER "cs4236_isapnp" |
184 | static struct pnp_card_device_id snd_cs423x_pnpids[] = { | 188 | static struct pnp_card_device_id snd_cs423x_pnpids[] = { |
185 | /* Intel Marlin Spike Motherboard - CS4235 */ | 189 | /* Intel Marlin Spike Motherboard - CS4235 */ |
@@ -747,12 +751,14 @@ static void __init_or_module snd_cs423x_unregister_all(void) | |||
747 | { | 751 | { |
748 | int i; | 752 | int i; |
749 | 753 | ||
754 | #ifdef CONFIG_PNP | ||
750 | if (pnpc_registered) | 755 | if (pnpc_registered) |
751 | pnp_unregister_card_driver(&cs423x_pnpc_driver); | 756 | pnp_unregister_card_driver(&cs423x_pnpc_driver); |
752 | #ifdef CS4232 | 757 | #ifdef CS4232 |
753 | if (pnp_registered) | 758 | if (pnp_registered) |
754 | pnp_unregister_driver(&cs4232_pnp_driver); | 759 | pnp_unregister_driver(&cs4232_pnp_driver); |
755 | #endif | 760 | #endif |
761 | #endif /* CONFIG_PNP */ | ||
756 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 762 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
757 | platform_device_unregister(platform_devices[i]); | 763 | platform_device_unregister(platform_devices[i]); |
758 | platform_driver_unregister(&cs423x_nonpnp_driver); | 764 | platform_driver_unregister(&cs423x_nonpnp_driver); |
@@ -778,6 +784,7 @@ static int __init alsa_card_cs423x_init(void) | |||
778 | platform_devices[i] = device; | 784 | platform_devices[i] = device; |
779 | cards++; | 785 | cards++; |
780 | } | 786 | } |
787 | #ifdef CONFIG_PNP | ||
781 | #ifdef CS4232 | 788 | #ifdef CS4232 |
782 | i = pnp_register_driver(&cs4232_pnp_driver); | 789 | i = pnp_register_driver(&cs4232_pnp_driver); |
783 | if (i >= 0) { | 790 | if (i >= 0) { |
@@ -790,6 +797,8 @@ static int __init alsa_card_cs423x_init(void) | |||
790 | pnpc_registered = 1; | 797 | pnpc_registered = 1; |
791 | cards += i; | 798 | cards += i; |
792 | } | 799 | } |
800 | #endif /* CONFIG_PNP */ | ||
801 | |||
793 | if (!cards) { | 802 | if (!cards) { |
794 | #ifdef MODULE | 803 | #ifdef MODULE |
795 | printk(KERN_ERR IDENT " soundcard not found or device busy\n"); | 804 | 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); | |||
1878 | MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver."); | 1878 | MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver."); |
1879 | 1879 | ||
1880 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 1880 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
1881 | static int pnp_registered; | ||
1882 | 1881 | ||
1883 | #ifdef CONFIG_PNP | 1882 | #ifdef CONFIG_PNP |
1883 | static int pnp_registered; | ||
1884 | 1884 | ||
1885 | static struct pnp_card_device_id snd_audiodrive_pnpids[] = { | 1885 | static struct pnp_card_device_id snd_audiodrive_pnpids[] = { |
1886 | /* ESS 1868 (integrated on Compaq dual P-Pro motherboard and Genius 18PnP 3D) */ | 1886 | /* 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) | |||
2209 | { | 2209 | { |
2210 | int i; | 2210 | int i; |
2211 | 2211 | ||
2212 | #ifdef CONFIG_PNP | ||
2212 | if (pnp_registered) | 2213 | if (pnp_registered) |
2213 | pnp_unregister_card_driver(&es18xx_pnpc_driver); | 2214 | pnp_unregister_card_driver(&es18xx_pnpc_driver); |
2215 | #endif | ||
2214 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 2216 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
2215 | platform_device_unregister(platform_devices[i]); | 2217 | platform_device_unregister(platform_devices[i]); |
2216 | platform_driver_unregister(&snd_es18xx_nonpnp_driver); | 2218 | platform_driver_unregister(&snd_es18xx_nonpnp_driver); |
@@ -2237,11 +2239,13 @@ static int __init alsa_card_es18xx_init(void) | |||
2237 | cards++; | 2239 | cards++; |
2238 | } | 2240 | } |
2239 | 2241 | ||
2242 | #ifdef CONFIG_PNP | ||
2240 | i = pnp_register_card_driver(&es18xx_pnpc_driver); | 2243 | i = pnp_register_card_driver(&es18xx_pnpc_driver); |
2241 | if (i >= 0) { | 2244 | if (i >= 0) { |
2242 | pnp_registered = 1; | 2245 | pnp_registered = 1; |
2243 | cards += i; | 2246 | cards += i; |
2244 | } | 2247 | } |
2248 | #endif | ||
2245 | 2249 | ||
2246 | if(!cards) { | 2250 | if(!cards) { |
2247 | #ifdef MODULE | 2251 | #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) | |||
195 | goto _err; | 195 | goto _err; |
196 | } | 196 | } |
197 | sprintf(card->longname + strlen(card->longname), " at 0x%lx, irq %d, dma %d", gus->gf1.port, xirq, xdma1); | 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 | sprintf(card->longname + strlen(card->longname), "&%d", xdma2); | 199 | sprintf(card->longname + strlen(card->longname), "&%d", xdma2); |
200 | 200 | ||
201 | snd_card_set_dev(card, &pdev->dev); | 201 | 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); | |||
91 | MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi."); | 91 | MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi."); |
92 | 92 | ||
93 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 93 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
94 | #ifdef CONFIG_PNP | ||
94 | static int pnp_registered; | 95 | static int pnp_registered; |
95 | static int pnpc_registered; | 96 | static int pnpc_registered; |
97 | #endif | ||
96 | 98 | ||
97 | /* control ports */ | 99 | /* control ports */ |
98 | #define OPL3SA2_PM_CTRL 0x01 | 100 | #define OPL3SA2_PM_CTRL 0x01 |
@@ -721,7 +723,7 @@ static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev) | |||
721 | } | 723 | } |
722 | sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d", | 724 | sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d", |
723 | card->shortname, chip->port, xirq, xdma1); | 725 | card->shortname, chip->port, xirq, xdma1); |
724 | if (dma2 >= 0) | 726 | if (xdma2 >= 0) |
725 | sprintf(card->longname + strlen(card->longname), "&%d", xdma2); | 727 | sprintf(card->longname + strlen(card->longname), "&%d", xdma2); |
726 | 728 | ||
727 | return snd_card_register(card); | 729 | return snd_card_register(card); |
@@ -779,7 +781,7 @@ static int snd_opl3sa2_pnp_resume(struct pnp_dev *pdev) | |||
779 | #endif | 781 | #endif |
780 | 782 | ||
781 | static struct pnp_driver opl3sa2_pnp_driver = { | 783 | static struct pnp_driver opl3sa2_pnp_driver = { |
782 | .name = "opl3sa2-pnpbios", | 784 | .name = "snd-opl3sa2-pnpbios", |
783 | .id_table = snd_opl3sa2_pnpbiosids, | 785 | .id_table = snd_opl3sa2_pnpbiosids, |
784 | .probe = snd_opl3sa2_pnp_detect, | 786 | .probe = snd_opl3sa2_pnp_detect, |
785 | .remove = __devexit_p(snd_opl3sa2_pnp_remove), | 787 | .remove = __devexit_p(snd_opl3sa2_pnp_remove), |
@@ -846,7 +848,7 @@ static int snd_opl3sa2_pnp_cresume(struct pnp_card_link *pcard) | |||
846 | 848 | ||
847 | static struct pnp_card_driver opl3sa2_pnpc_driver = { | 849 | static struct pnp_card_driver opl3sa2_pnpc_driver = { |
848 | .flags = PNP_DRIVER_RES_DISABLE, | 850 | .flags = PNP_DRIVER_RES_DISABLE, |
849 | .name = "opl3sa2", | 851 | .name = "snd-opl3sa2-cpnp", |
850 | .id_table = snd_opl3sa2_pnpids, | 852 | .id_table = snd_opl3sa2_pnpids, |
851 | .probe = snd_opl3sa2_pnp_cdetect, | 853 | .probe = snd_opl3sa2_pnp_cdetect, |
852 | .remove = __devexit_p(snd_opl3sa2_pnp_cremove), | 854 | .remove = __devexit_p(snd_opl3sa2_pnp_cremove), |
@@ -929,10 +931,12 @@ static void __init_or_module snd_opl3sa2_unregister_all(void) | |||
929 | { | 931 | { |
930 | int i; | 932 | int i; |
931 | 933 | ||
934 | #ifdef CONFIG_PNP | ||
932 | if (pnpc_registered) | 935 | if (pnpc_registered) |
933 | pnp_unregister_card_driver(&opl3sa2_pnpc_driver); | 936 | pnp_unregister_card_driver(&opl3sa2_pnpc_driver); |
934 | if (pnp_registered) | 937 | if (pnp_registered) |
935 | pnp_unregister_driver(&opl3sa2_pnp_driver); | 938 | pnp_unregister_driver(&opl3sa2_pnp_driver); |
939 | #endif | ||
936 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 940 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
937 | platform_device_unregister(platform_devices[i]); | 941 | platform_device_unregister(platform_devices[i]); |
938 | platform_driver_unregister(&snd_opl3sa2_nonpnp_driver); | 942 | platform_driver_unregister(&snd_opl3sa2_nonpnp_driver); |
@@ -961,6 +965,7 @@ static int __init alsa_card_opl3sa2_init(void) | |||
961 | cards++; | 965 | cards++; |
962 | } | 966 | } |
963 | 967 | ||
968 | #ifdef CONFIG_PNP | ||
964 | err = pnp_register_driver(&opl3sa2_pnp_driver); | 969 | err = pnp_register_driver(&opl3sa2_pnp_driver); |
965 | if (err >= 0) { | 970 | if (err >= 0) { |
966 | pnp_registered = 1; | 971 | pnp_registered = 1; |
@@ -971,6 +976,7 @@ static int __init alsa_card_opl3sa2_init(void) | |||
971 | pnpc_registered = 1; | 976 | pnpc_registered = 1; |
972 | cards += err; | 977 | cards += err; |
973 | } | 978 | } |
979 | #endif | ||
974 | 980 | ||
975 | if (!cards) { | 981 | if (!cards) { |
976 | #ifdef MODULE | 982 | #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 | |||
1349 | int error; | 1349 | int error; |
1350 | struct snd_pcm *pcm; | 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 | return error; | 1353 | return error; |
1354 | 1354 | ||
1355 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_opti93x_playback_ops); | 1355 | 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[] = { | |||
179 | { .id = "CTL0086", .devs = { { "CTL0041" } } }, | 179 | { .id = "CTL0086", .devs = { { "CTL0041" } } }, |
180 | /* Sound Blaster Vibra16X */ | 180 | /* Sound Blaster Vibra16X */ |
181 | { .id = "CTL00f0", .devs = { { "CTL0043" } } }, | 181 | { .id = "CTL00f0", .devs = { { "CTL0043" } } }, |
182 | /* Sound Blaster 16 (Virtual PC 2004) */ | ||
183 | { .id = "tBA03b0", .devs = { {.id="PNPb003" } } }, | ||
182 | #else /* SNDRV_SBAWE defined */ | 184 | #else /* SNDRV_SBAWE defined */ |
183 | /* Sound Blaster AWE 32 PnP */ | 185 | /* Sound Blaster AWE 32 PnP */ |
184 | { .id = "CTL0035", .devs = { { "CTL0031" }, { "CTL0021" } } }, | 186 | { .id = "CTL0035", .devs = { { "CTL0031" }, { "CTL0021" } } }, |
@@ -235,8 +237,6 @@ static struct pnp_card_device_id snd_sb16_pnpids[] = { | |||
235 | { .id = "CTLXXXX" , .devs = { { "CTL0044" }, { "CTL0023" } } }, | 237 | { .id = "CTLXXXX" , .devs = { { "CTL0044" }, { "CTL0023" } } }, |
236 | { .id = "CTLXXXX" , .devs = { { "CTL0045" }, { "CTL0022" } } }, | 238 | { .id = "CTLXXXX" , .devs = { { "CTL0045" }, { "CTL0022" } } }, |
237 | #endif /* SNDRV_SBAWE */ | 239 | #endif /* SNDRV_SBAWE */ |
238 | /* Sound Blaster 16 PnP (Virtual PC 2004)*/ | ||
239 | { .id = "tBA03b0", .devs = { { "PNPb003" } } }, | ||
240 | { .id = "", } | 240 | { .id = "", } |
241 | }; | 241 | }; |
242 | 242 | ||
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); | |||
69 | MODULE_PARM_DESC(dma, "DMA # for SoundScape driver."); | 69 | MODULE_PARM_DESC(dma, "DMA # for SoundScape driver."); |
70 | 70 | ||
71 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 71 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
72 | static int pnp_registered; | ||
73 | 72 | ||
74 | #ifdef CONFIG_PNP | 73 | #ifdef CONFIG_PNP |
74 | static int pnp_registered; | ||
75 | static struct pnp_card_device_id sscape_pnpids[] = { | 75 | static struct pnp_card_device_id sscape_pnpids[] = { |
76 | { .id = "ENS3081", .devs = { { "ENS0000" } } }, | 76 | { .id = "ENS3081", .devs = { { "ENS0000" } } }, |
77 | { .id = "" } /* end */ | 77 | { .id = "" } /* end */ |
@@ -1391,8 +1391,10 @@ static void __init_or_module sscape_unregister_all(void) | |||
1391 | { | 1391 | { |
1392 | int i; | 1392 | int i; |
1393 | 1393 | ||
1394 | #ifdef CONFIG_PNP | ||
1394 | if (pnp_registered) | 1395 | if (pnp_registered) |
1395 | pnp_unregister_card_driver(&sscape_pnpc_driver); | 1396 | pnp_unregister_card_driver(&sscape_pnpc_driver); |
1397 | #endif | ||
1396 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 1398 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
1397 | platform_device_unregister(platform_devices[i]); | 1399 | platform_device_unregister(platform_devices[i]); |
1398 | platform_driver_unregister(&snd_sscape_driver); | 1400 | platform_driver_unregister(&snd_sscape_driver); |
@@ -1466,8 +1468,10 @@ static int __init sscape_init(void) | |||
1466 | ret = sscape_manual_probe(); | 1468 | ret = sscape_manual_probe(); |
1467 | if (ret < 0) | 1469 | if (ret < 0) |
1468 | return ret; | 1470 | return ret; |
1471 | #ifdef CONFIG_PNP | ||
1469 | if (pnp_register_card_driver(&sscape_pnpc_driver) >= 0) | 1472 | if (pnp_register_card_driver(&sscape_pnpc_driver) >= 0) |
1470 | pnp_registered = 1; | 1473 | pnp_registered = 1; |
1474 | #endif | ||
1471 | return 0; | 1475 | return 0; |
1472 | } | 1476 | } |
1473 | 1477 | ||
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); | |||
84 | MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)"); | 84 | MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)"); |
85 | 85 | ||
86 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 86 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
87 | static int pnp_registered; | ||
88 | |||
89 | 87 | ||
90 | #ifdef CONFIG_PNP | 88 | #ifdef CONFIG_PNP |
89 | static int pnp_registered; | ||
91 | 90 | ||
92 | static struct pnp_card_device_id snd_wavefront_pnpids[] = { | 91 | static struct pnp_card_device_id snd_wavefront_pnpids[] = { |
93 | /* Tropez */ | 92 | /* Tropez */ |
@@ -695,8 +694,10 @@ static void __init_or_module snd_wavefront_unregister_all(void) | |||
695 | { | 694 | { |
696 | int i; | 695 | int i; |
697 | 696 | ||
697 | #ifdef CONFIG_PNP | ||
698 | if (pnp_registered) | 698 | if (pnp_registered) |
699 | pnp_unregister_card_driver(&wavefront_pnpc_driver); | 699 | pnp_unregister_card_driver(&wavefront_pnpc_driver); |
700 | #endif | ||
700 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 701 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
701 | platform_device_unregister(platform_devices[i]); | 702 | platform_device_unregister(platform_devices[i]); |
702 | platform_driver_unregister(&snd_wavefront_driver); | 703 | platform_driver_unregister(&snd_wavefront_driver); |
@@ -725,11 +726,13 @@ static int __init alsa_card_wavefront_init(void) | |||
725 | cards++; | 726 | cards++; |
726 | } | 727 | } |
727 | 728 | ||
729 | #ifdef CONFIG_PNP | ||
728 | i = pnp_register_card_driver(&wavefront_pnpc_driver); | 730 | i = pnp_register_card_driver(&wavefront_pnpc_driver); |
729 | if (i >= 0) { | 731 | if (i >= 0) { |
730 | pnp_registered = 1; | 732 | pnp_registered = 1; |
731 | cards += i; | 733 | cards += i; |
732 | } | 734 | } |
735 | #endif | ||
733 | 736 | ||
734 | if (!cards) { | 737 | if (!cards) { |
735 | #ifdef MODULE | 738 | #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, | |||
866 | divided by 2. | 866 | divided by 2. |
867 | */ | 867 | */ |
868 | 868 | ||
869 | u16 sample_short; | 869 | u16 sample_short = 0; |
870 | u32 length; | 870 | u32 length; |
871 | u16 __user *data_end = NULL; | 871 | u16 __user *data_end = NULL; |
872 | unsigned int i; | 872 | 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[] = { | |||
1621 | AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0), | 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 | static int patch_ad1981a_specific(struct snd_ac97 * ac97) | 1641 | static int patch_ad1981a_specific(struct snd_ac97 * ac97) |
1625 | { | 1642 | { |
1643 | if (check_list(ac97, ad1981_jacks_blacklist)) | ||
1644 | return 0; | ||
1626 | return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense, | 1645 | return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense, |
1627 | ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); | 1646 | ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); |
1628 | } | 1647 | } |
@@ -1635,22 +1654,26 @@ static struct snd_ac97_build_ops patch_ad1981a_build_ops = { | |||
1635 | #endif | 1654 | #endif |
1636 | }; | 1655 | }; |
1637 | 1656 | ||
1657 | /* white list to enable HP jack-sense bits | ||
1658 | * (SS vendor << 16 | device) | ||
1659 | */ | ||
1660 | static unsigned int ad1981_jacks_whitelist[] = { | ||
1661 | 0x0e11005a, /* HP nc4000/4010 */ | ||
1662 | 0x103c0890, /* HP nc6000 */ | ||
1663 | 0x103c0938, /* HP nc4220 */ | ||
1664 | 0x103c099c, /* HP nx6110 */ | ||
1665 | 0x103c0944, /* HP nc6220 */ | ||
1666 | 0x103c0934, /* HP nc8220 */ | ||
1667 | 0x103c006d, /* HP nx9105 */ | ||
1668 | 0x17340088, /* FSC Scenic-W */ | ||
1669 | 0 /* end */ | ||
1670 | }; | ||
1671 | |||
1638 | static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97) | 1672 | static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97) |
1639 | { | 1673 | { |
1640 | u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device; | 1674 | if (check_list(ac97, ad1981_jacks_whitelist)) |
1641 | switch (subid) { | ||
1642 | case 0x0e11005a: /* HP nc4000/4010 */ | ||
1643 | case 0x103c0890: /* HP nc6000 */ | ||
1644 | case 0x103c0938: /* HP nc4220 */ | ||
1645 | case 0x103c099c: /* HP nx6110 */ | ||
1646 | case 0x103c0944: /* HP nc6220 */ | ||
1647 | case 0x103c0934: /* HP nc8220 */ | ||
1648 | case 0x103c006d: /* HP nx9105 */ | ||
1649 | case 0x17340088: /* FSC Scenic-W */ | ||
1650 | /* enable headphone jack sense */ | 1675 | /* enable headphone jack sense */ |
1651 | snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11); | 1676 | snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11); |
1652 | break; | ||
1653 | } | ||
1654 | } | 1677 | } |
1655 | 1678 | ||
1656 | int patch_ad1981a(struct snd_ac97 *ac97) | 1679 | int patch_ad1981a(struct snd_ac97 *ac97) |
@@ -1672,6 +1695,8 @@ static int patch_ad1981b_specific(struct snd_ac97 *ac97) | |||
1672 | 1695 | ||
1673 | if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0) | 1696 | if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0) |
1674 | return err; | 1697 | return err; |
1698 | if (check_list(ac97, ad1981_jacks_blacklist)) | ||
1699 | return 0; | ||
1675 | return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense, | 1700 | return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense, |
1676 | ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); | 1701 | ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); |
1677 | } | 1702 | } |
@@ -2210,9 +2235,9 @@ static void alc850_update_jacks(struct snd_ac97 *ac97) | |||
2210 | /* Vref disable (bit12), 1kOhm (bit13) */ | 2235 | /* Vref disable (bit12), 1kOhm (bit13) */ |
2211 | snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13), | 2236 | snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13), |
2212 | shared ? (1<<12) : (1<<13)); | 2237 | shared ? (1<<12) : (1<<13)); |
2213 | /* MIC-IN = 1, CENTER-LFE = 2 */ | 2238 | /* MIC-IN = 1, CENTER-LFE = 5 */ |
2214 | snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 4, | 2239 | snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 4, |
2215 | shared ? (2<<4) : (1<<4)); | 2240 | shared ? (5<<4) : (1<<4)); |
2216 | } | 2241 | } |
2217 | 2242 | ||
2218 | static const struct snd_kcontrol_new snd_ac97_controls_alc850[] = { | 2243 | 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 { | |||
279 | }; | 279 | }; |
280 | 280 | ||
281 | static struct pci_device_id snd_ali_ids[] = { | 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 | {0, } | 283 | {0, } |
284 | }; | 284 | }; |
285 | MODULE_DEVICE_TABLE(pci, snd_ali_ids); | 285 | 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 | |||
849 | snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 849 | snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
850 | { | 850 | { |
851 | vortex_t *vortex = snd_kcontrol_chip(kcontrol); | 851 | vortex_t *vortex = snd_kcontrol_chip(kcontrol); |
852 | int i, count; | 852 | int i, count = 0; |
853 | u16 peaks[20]; | 853 | u16 peaks[20]; |
854 | 854 | ||
855 | vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count); | 855 | 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[] = { | |||
781 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, 0x0070, 0x13eb, 32000), | 781 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, 0x0070, 0x13eb, 32000), |
782 | /* Viewcast Osprey 200 */ | 782 | /* Viewcast Osprey 200 */ |
783 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0xff01, 44100), | 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 | MODULE_DEVICE_TABLE(pci, snd_bt87x_ids); | 788 | MODULE_DEVICE_TABLE(pci, snd_bt87x_ids); |
@@ -808,7 +810,7 @@ static int __devinit snd_bt87x_detect_card(struct pci_dev *pci) | |||
808 | const struct pci_device_id *supported; | 810 | const struct pci_device_id *supported; |
809 | 811 | ||
810 | supported = pci_match_device(&driver, pci); | 812 | supported = pci_match_device(&driver, pci); |
811 | if (supported) | 813 | if (supported && supported->driver_data > 0) |
812 | return supported->driver_data; | 814 | return supported->driver_data; |
813 | 815 | ||
814 | for (i = 0; i < ARRAY_SIZE(blacklist); ++i) | 816 | 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[] = { | |||
199 | .name = "MSI K8N Diamond MB [SB0438]", | 199 | .name = "MSI K8N Diamond MB [SB0438]", |
200 | .gpio_type = 1, | 200 | .gpio_type = 1, |
201 | .i2c_adc = 1 } , | 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 | * high-definition 7.1 audio processor". | 204 | * high-definition 7.1 audio processor". |
204 | * Added using info from andrewvegan in alsa bug #1298 | 205 | * Added using info from andrewvegan in alsa bug #1298 |
205 | */ | 206 | */ |
@@ -207,6 +208,15 @@ static struct snd_ca0106_details ca0106_chip_details[] = { | |||
207 | .name = "Shuttle XPC SD31P [SD31P]", | 208 | .name = "Shuttle XPC SD31P [SD31P]", |
208 | .gpio_type = 1, | 209 | .gpio_type = 1, |
209 | .i2c_adc = 1 } , | 210 | .i2c_adc = 1 } , |
211 | /* Shuttle XPC SD11G5 which has an onboard Creative Labs | ||
212 | * Sound Blaster Live! 24-bit EAX | ||
213 | * high-definition 7.1 audio processor". | ||
214 | * Fixes ALSA bug#1600 | ||
215 | */ | ||
216 | { .serial = 0x30411297, | ||
217 | .name = "Shuttle XPC SD11G5 [SD11G5]", | ||
218 | .gpio_type = 1, | ||
219 | .i2c_adc = 1 } , | ||
210 | { .serial = 0, | 220 | { .serial = 0, |
211 | .name = "AudigyLS [Unknown]" } | 221 | .name = "AudigyLS [Unknown]" } |
212 | }; | 222 | }; |
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, | |||
675 | if (pass_through) { | 675 | if (pass_through) { |
676 | /* wont work with any other rate than | 676 | /* wont work with any other rate than |
677 | the native DSP rate */ | 677 | the native DSP rate */ |
678 | snd_assert (rate = 48000); | 678 | snd_assert (rate == 48000); |
679 | 679 | ||
680 | scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&src_task_scb, | 680 | scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&src_task_scb, |
681 | dest,"DMAREADER",parent_scb, | 681 | 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; | |||
46 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; | 46 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; |
47 | 47 | ||
48 | static struct pci_device_id snd_cs5535audio_ids[] = { | 48 | static struct pci_device_id snd_cs5535audio_ids[] = { |
49 | { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO, PCI_ANY_ID, | 49 | { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO, |
50 | PCI_ANY_ID, 0, 0, 0, }, | 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 | ||
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, | |||
759 | "Master Mono Playback Volume", | 759 | "Master Mono Playback Volume", |
760 | "PCM Out Path & Mute", | 760 | "PCM Out Path & Mute", |
761 | "Mono Output Select", | 761 | "Mono Output Select", |
762 | "Front Playback Switch", | ||
763 | "Front Playback Volume", | ||
762 | "Surround Playback Switch", | 764 | "Surround Playback Switch", |
763 | "Surround Playback Volume", | 765 | "Surround Playback Volume", |
764 | "Center Playback Switch", | 766 | "Center Playback Switch", |
@@ -829,9 +831,9 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, | |||
829 | } | 831 | } |
830 | if (emu->audigy) { | 832 | if (emu->audigy) { |
831 | /* set master volume to 0 dB */ | 833 | /* set master volume to 0 dB */ |
832 | snd_ac97_write(emu->ac97, AC97_MASTER, 0x0000); | 834 | snd_ac97_write_cache(emu->ac97, AC97_MASTER, 0x0000); |
833 | /* set capture source to mic */ | 835 | /* set capture source to mic */ |
834 | snd_ac97_write(emu->ac97, AC97_REC_SEL, 0x0000); | 836 | snd_ac97_write_cache(emu->ac97, AC97_REC_SEL, 0x0000); |
835 | c = audigy_remove_ctls; | 837 | c = audigy_remove_ctls; |
836 | } else { | 838 | } else { |
837 | /* | 839 | /* |
@@ -844,8 +846,8 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, | |||
844 | snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT); | 846 | snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT); |
845 | } | 847 | } |
846 | /* remove unused AC97 controls */ | 848 | /* remove unused AC97 controls */ |
847 | snd_ac97_write(emu->ac97, AC97_SURROUND_MASTER, 0x0202); | 849 | snd_ac97_write_cache(emu->ac97, AC97_SURROUND_MASTER, 0x0202); |
848 | snd_ac97_write(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202); | 850 | snd_ac97_write_cache(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202); |
849 | c = emu10k1_remove_ctls; | 851 | c = emu10k1_remove_ctls; |
850 | } | 852 | } |
851 | for (; *c; c++) | 853 | for (; *c; c++) |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index a983deba4025..fd12b6991fe4 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -75,6 +75,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6}," | |||
75 | "{Intel, ICH6M}," | 75 | "{Intel, ICH6M}," |
76 | "{Intel, ICH7}," | 76 | "{Intel, ICH7}," |
77 | "{Intel, ESB2}," | 77 | "{Intel, ESB2}," |
78 | "{Intel, ICH8}," | ||
78 | "{ATI, SB450}," | 79 | "{ATI, SB450}," |
79 | "{VIA, VT8251}," | 80 | "{VIA, VT8251}," |
80 | "{VIA, VT8237A}," | 81 | "{VIA, VT8237A}," |
@@ -1586,6 +1587,7 @@ static struct pci_device_id azx_ids[] = { | |||
1586 | { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */ | 1587 | { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */ |
1587 | { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */ | 1588 | { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */ |
1588 | { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */ | 1589 | { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */ |
1590 | { 0x8086, 0x284b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH8 */ | ||
1589 | { 0x1002, 0x437b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATI }, /* ATI SB450 */ | 1591 | { 0x1002, 0x437b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATI }, /* ATI SB450 */ |
1590 | { 0x1106, 0x3288, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_VIA }, /* VIA VT8251/VT8237A */ | 1592 | { 0x1106, 0x3288, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_VIA }, /* VIA VT8251/VT8237A */ |
1591 | { 0x1039, 0x7502, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_SIS }, /* SIS966 */ | 1593 | { 0x1039, 0x7502, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_SIS }, /* SIS966 */ |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ad9e501a9818..b76755264730 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1668,6 +1668,7 @@ static struct hda_board_config alc880_cfg_tbl[] = { | |||
1668 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x8196, .config = ALC880_6ST }, /* ASUS P5GD1-HVM */ | 1668 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x8196, .config = ALC880_6ST }, /* ASUS P5GD1-HVM */ |
1669 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x81b4, .config = ALC880_6ST }, | 1669 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x81b4, .config = ALC880_6ST }, |
1670 | { .pci_subvendor = 0x1019, .pci_subdevice = 0xa884, .config = ALC880_6ST }, /* Acer APFV */ | 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 | { .modelname = "6stack-digout", .config = ALC880_6ST_DIG }, | 1673 | { .modelname = "6stack-digout", .config = ALC880_6ST_DIG }, |
1673 | { .pci_subvendor = 0x2668, .pci_subdevice = 0x8086, .config = ALC880_6ST_DIG }, | 1674 | { .pci_subvendor = 0x2668, .pci_subdevice = 0x8086, .config = ALC880_6ST_DIG }, |
@@ -2475,7 +2476,7 @@ static struct hda_verb alc260_init_verbs[] = { | |||
2475 | /* LINE-2 is used for line-out in rear */ | 2476 | /* LINE-2 is used for line-out in rear */ |
2476 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | 2477 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, |
2477 | /* select line-out */ | 2478 | /* select line-out */ |
2478 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | 2479 | {0x0e, AC_VERB_SET_CONNECT_SEL, 0x00}, |
2479 | /* LINE-OUT pin */ | 2480 | /* LINE-OUT pin */ |
2480 | {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | 2481 | {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, |
2481 | /* enable HP */ | 2482 | /* enable HP */ |
@@ -2945,6 +2946,8 @@ static int alc260_auto_init(struct hda_codec *codec) | |||
2945 | */ | 2946 | */ |
2946 | static struct hda_board_config alc260_cfg_tbl[] = { | 2947 | static struct hda_board_config alc260_cfg_tbl[] = { |
2947 | { .modelname = "basic", .config = ALC260_BASIC }, | 2948 | { .modelname = "basic", .config = ALC260_BASIC }, |
2949 | { .pci_subvendor = 0x104d, .pci_subdevice = 0x81bb, | ||
2950 | .config = ALC260_BASIC }, /* Sony VAIO */ | ||
2948 | { .modelname = "hp", .config = ALC260_HP }, | 2951 | { .modelname = "hp", .config = ALC260_HP }, |
2949 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x3010, .config = ALC260_HP }, | 2952 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x3010, .config = ALC260_HP }, |
2950 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x3011, .config = ALC260_HP }, | 2953 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x3011, .config = ALC260_HP }, |
@@ -3414,12 +3417,12 @@ static struct snd_kcontrol_new alc882_capture_mixer[] = { | |||
3414 | * configuration and preset | 3417 | * configuration and preset |
3415 | */ | 3418 | */ |
3416 | static struct hda_board_config alc882_cfg_tbl[] = { | 3419 | static struct hda_board_config alc882_cfg_tbl[] = { |
3417 | { .modelname = "3stack-dig", .config = ALC861_3ST_DIG }, | 3420 | { .modelname = "3stack-dig", .config = ALC882_3ST_DIG }, |
3418 | { .modelname = "6stack-dig", .config = ALC861_6ST_DIG }, | 3421 | { .modelname = "6stack-dig", .config = ALC882_6ST_DIG }, |
3419 | { .pci_subvendor = 0x1462, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* MSI */ | 3422 | { .pci_subvendor = 0x1462, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* MSI */ |
3420 | { .pci_subvendor = 0x105b, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* Foxconn */ | 3423 | { .pci_subvendor = 0x105b, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* Foxconn */ |
3421 | { .pci_subvendor = 0x1019, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* ECS */ | 3424 | { .pci_subvendor = 0x1019, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* ECS */ |
3422 | { .modelname = "auto", .config = ALC861_AUTO }, | 3425 | { .modelname = "auto", .config = ALC882_AUTO }, |
3423 | {} | 3426 | {} |
3424 | }; | 3427 | }; |
3425 | 3428 | ||
diff --git a/sound/pci/hda/patch_si3054.c b/sound/pci/hda/patch_si3054.c index 8f8840e6002b..250242cd6c70 100644 --- a/sound/pci/hda/patch_si3054.c +++ b/sound/pci/hda/patch_si3054.c | |||
@@ -297,6 +297,7 @@ static int patch_si3054(struct hda_codec *codec) | |||
297 | struct hda_codec_preset snd_hda_preset_si3054[] = { | 297 | struct hda_codec_preset snd_hda_preset_si3054[] = { |
298 | { .id = 0x163c3055, .name = "Si3054", .patch = patch_si3054 }, | 298 | { .id = 0x163c3055, .name = "Si3054", .patch = patch_si3054 }, |
299 | { .id = 0x163c3155, .name = "Si3054", .patch = patch_si3054 }, | 299 | { .id = 0x163c3155, .name = "Si3054", .patch = patch_si3054 }, |
300 | { .id = 0x11c13026, .name = "Si3054", .patch = patch_si3054 }, | ||
300 | {} | 301 | {} |
301 | }; | 302 | }; |
302 | 303 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 61903848cd43..35c2823a0a2b 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -50,10 +50,11 @@ struct sigmatel_spec { | |||
50 | unsigned int surr_switch: 1; | 50 | unsigned int surr_switch: 1; |
51 | unsigned int line_switch: 1; | 51 | unsigned int line_switch: 1; |
52 | unsigned int mic_switch: 1; | 52 | unsigned int mic_switch: 1; |
53 | unsigned int alt_switch: 1; | ||
53 | 54 | ||
54 | /* playback */ | 55 | /* playback */ |
55 | struct hda_multi_out multiout; | 56 | struct hda_multi_out multiout; |
56 | hda_nid_t dac_nids[4]; | 57 | hda_nid_t dac_nids[5]; |
57 | 58 | ||
58 | /* capture */ | 59 | /* capture */ |
59 | hda_nid_t *adc_nids; | 60 | hda_nid_t *adc_nids; |
@@ -73,7 +74,7 @@ struct sigmatel_spec { | |||
73 | 74 | ||
74 | /* capture source */ | 75 | /* capture source */ |
75 | struct hda_input_mux *input_mux; | 76 | struct hda_input_mux *input_mux; |
76 | unsigned int cur_mux[2]; | 77 | unsigned int cur_mux[3]; |
77 | 78 | ||
78 | /* i/o switches */ | 79 | /* i/o switches */ |
79 | unsigned int io_switch[2]; | 80 | unsigned int io_switch[2]; |
@@ -107,6 +108,14 @@ static hda_nid_t stac922x_mux_nids[2] = { | |||
107 | 0x12, 0x13, | 108 | 0x12, 0x13, |
108 | }; | 109 | }; |
109 | 110 | ||
111 | static hda_nid_t stac927x_adc_nids[3] = { | ||
112 | 0x07, 0x08, 0x09 | ||
113 | }; | ||
114 | |||
115 | static hda_nid_t stac927x_mux_nids[3] = { | ||
116 | 0x15, 0x16, 0x17 | ||
117 | }; | ||
118 | |||
110 | static hda_nid_t stac9200_pin_nids[8] = { | 119 | static hda_nid_t stac9200_pin_nids[8] = { |
111 | 0x08, 0x09, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, | 120 | 0x08, 0x09, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, |
112 | }; | 121 | }; |
@@ -116,6 +125,12 @@ static hda_nid_t stac922x_pin_nids[10] = { | |||
116 | 0x0f, 0x10, 0x11, 0x15, 0x1b, | 125 | 0x0f, 0x10, 0x11, 0x15, 0x1b, |
117 | }; | 126 | }; |
118 | 127 | ||
128 | static hda_nid_t stac927x_pin_nids[14] = { | ||
129 | 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, | ||
130 | 0x0f, 0x10, 0x11, 0x12, 0x13, | ||
131 | 0x14, 0x21, 0x22, 0x23, | ||
132 | }; | ||
133 | |||
119 | static int stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 134 | static int stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
120 | { | 135 | { |
121 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 136 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
@@ -155,6 +170,12 @@ static struct hda_verb stac922x_core_init[] = { | |||
155 | {} | 170 | {} |
156 | }; | 171 | }; |
157 | 172 | ||
173 | static struct hda_verb stac927x_core_init[] = { | ||
174 | /* set master volume and direct control */ | ||
175 | { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | ||
176 | {} | ||
177 | }; | ||
178 | |||
158 | static struct snd_kcontrol_new stac9200_mixer[] = { | 179 | static struct snd_kcontrol_new stac9200_mixer[] = { |
159 | HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT), | 180 | HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT), |
160 | HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT), | 181 | HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT), |
@@ -183,10 +204,26 @@ static struct snd_kcontrol_new stac922x_mixer[] = { | |||
183 | .put = stac92xx_mux_enum_put, | 204 | .put = stac92xx_mux_enum_put, |
184 | }, | 205 | }, |
185 | HDA_CODEC_VOLUME("Capture Volume", 0x17, 0x0, HDA_INPUT), | 206 | HDA_CODEC_VOLUME("Capture Volume", 0x17, 0x0, HDA_INPUT), |
207 | HDA_CODEC_MUTE("Capture Switch", 0x17, 0x0, HDA_INPUT), | ||
186 | HDA_CODEC_VOLUME("Mux Capture Volume", 0x12, 0x0, HDA_OUTPUT), | 208 | HDA_CODEC_VOLUME("Mux Capture Volume", 0x12, 0x0, HDA_OUTPUT), |
187 | { } /* end */ | 209 | { } /* end */ |
188 | }; | 210 | }; |
189 | 211 | ||
212 | static snd_kcontrol_new_t stac927x_mixer[] = { | ||
213 | { | ||
214 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
215 | .name = "Input Source", | ||
216 | .count = 1, | ||
217 | .info = stac92xx_mux_enum_info, | ||
218 | .get = stac92xx_mux_enum_get, | ||
219 | .put = stac92xx_mux_enum_put, | ||
220 | }, | ||
221 | HDA_CODEC_VOLUME("InMux Capture Volume", 0x15, 0x0, HDA_OUTPUT), | ||
222 | HDA_CODEC_VOLUME("InVol Capture Volume", 0x18, 0x0, HDA_INPUT), | ||
223 | HDA_CODEC_MUTE("ADCMux Capture Switch", 0x1b, 0x0, HDA_OUTPUT), | ||
224 | { } /* end */ | ||
225 | }; | ||
226 | |||
190 | static int stac92xx_build_controls(struct hda_codec *codec) | 227 | static int stac92xx_build_controls(struct hda_codec *codec) |
191 | { | 228 | { |
192 | struct sigmatel_spec *spec = codec->spec; | 229 | struct sigmatel_spec *spec = codec->spec; |
@@ -240,14 +277,14 @@ static unsigned int ref922x_pin_configs[10] = { | |||
240 | }; | 277 | }; |
241 | 278 | ||
242 | static unsigned int d945gtp3_pin_configs[10] = { | 279 | static unsigned int d945gtp3_pin_configs[10] = { |
243 | 0x0221401f, 0x01a19022, 0x01813021, 0x01114010, | 280 | 0x0221401f, 0x01a19022, 0x01813021, 0x01014010, |
244 | 0x40000100, 0x40000100, 0x40000100, 0x40000100, | 281 | 0x40000100, 0x40000100, 0x40000100, 0x40000100, |
245 | 0x02a19120, 0x40000100, | 282 | 0x02a19120, 0x40000100, |
246 | }; | 283 | }; |
247 | 284 | ||
248 | static unsigned int d945gtp5_pin_configs[10] = { | 285 | static unsigned int d945gtp5_pin_configs[10] = { |
249 | 0x0221401f, 0x01111012, 0x01813024, 0x01114010, | 286 | 0x0221401f, 0x01011012, 0x01813024, 0x01014010, |
250 | 0x01a19021, 0x01116011, 0x01452130, 0x40000100, | 287 | 0x01a19021, 0x01016011, 0x01452130, 0x40000100, |
251 | 0x02a19320, 0x40000100, | 288 | 0x02a19320, 0x40000100, |
252 | }; | 289 | }; |
253 | 290 | ||
@@ -274,6 +311,28 @@ static struct hda_board_config stac922x_cfg_tbl[] = { | |||
274 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | 311 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, |
275 | .pci_subdevice = 0x0013, | 312 | .pci_subdevice = 0x0013, |
276 | .config = STAC_D945GTP5 }, /* Intel D955XBK - 5 Stack */ | 313 | .config = STAC_D945GTP5 }, /* Intel D955XBK - 5 Stack */ |
314 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
315 | .pci_subdevice = 0x0417, | ||
316 | .config = STAC_D945GTP5 }, /* Intel D975XBK - 5 Stack */ | ||
317 | {} /* terminator */ | ||
318 | }; | ||
319 | |||
320 | static unsigned int ref927x_pin_configs[14] = { | ||
321 | 0x01813122, 0x01a19021, 0x01014010, 0x01016011, | ||
322 | 0x01012012, 0x01011014, 0x40000100, 0x40000100, | ||
323 | 0x40000100, 0x40000100, 0x40000100, 0x01441030, | ||
324 | 0x01c41030, 0x40000100, | ||
325 | }; | ||
326 | |||
327 | static unsigned int *stac927x_brd_tbl[] = { | ||
328 | ref927x_pin_configs, | ||
329 | }; | ||
330 | |||
331 | static struct hda_board_config stac927x_cfg_tbl[] = { | ||
332 | { .modelname = "ref", | ||
333 | .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
334 | .pci_subdevice = 0x2668, /* DFI LanParty */ | ||
335 | .config = STAC_REF }, /* SigmaTel reference board */ | ||
277 | {} /* terminator */ | 336 | {} /* terminator */ |
278 | }; | 337 | }; |
279 | 338 | ||
@@ -408,11 +467,23 @@ static struct hda_pcm_stream stac92xx_pcm_analog_playback = { | |||
408 | }, | 467 | }, |
409 | }; | 468 | }; |
410 | 469 | ||
470 | static struct hda_pcm_stream stac92xx_pcm_analog_alt_playback = { | ||
471 | .substreams = 1, | ||
472 | .channels_min = 2, | ||
473 | .channels_max = 2, | ||
474 | .nid = 0x06, /* NID to query formats and rates */ | ||
475 | .ops = { | ||
476 | .open = stac92xx_playback_pcm_open, | ||
477 | .prepare = stac92xx_playback_pcm_prepare, | ||
478 | .cleanup = stac92xx_playback_pcm_cleanup | ||
479 | }, | ||
480 | }; | ||
481 | |||
411 | static struct hda_pcm_stream stac92xx_pcm_analog_capture = { | 482 | static struct hda_pcm_stream stac92xx_pcm_analog_capture = { |
412 | .substreams = 2, | 483 | .substreams = 2, |
413 | .channels_min = 2, | 484 | .channels_min = 2, |
414 | .channels_max = 2, | 485 | .channels_max = 2, |
415 | .nid = 0x06, /* NID to query formats and rates */ | 486 | /* NID is set in stac92xx_build_pcms */ |
416 | .ops = { | 487 | .ops = { |
417 | .prepare = stac92xx_capture_pcm_prepare, | 488 | .prepare = stac92xx_capture_pcm_prepare, |
418 | .cleanup = stac92xx_capture_pcm_cleanup | 489 | .cleanup = stac92xx_capture_pcm_cleanup |
@@ -430,6 +501,14 @@ static int stac92xx_build_pcms(struct hda_codec *codec) | |||
430 | info->name = "STAC92xx Analog"; | 501 | info->name = "STAC92xx Analog"; |
431 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback; | 502 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback; |
432 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; | 503 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; |
504 | info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0]; | ||
505 | |||
506 | if (spec->alt_switch) { | ||
507 | codec->num_pcms++; | ||
508 | info++; | ||
509 | info->name = "STAC92xx Analog Alt"; | ||
510 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_alt_playback; | ||
511 | } | ||
433 | 512 | ||
434 | if (spec->multiout.dig_out_nid || spec->dig_in_nid) { | 513 | if (spec->multiout.dig_out_nid || spec->dig_in_nid) { |
435 | codec->num_pcms++; | 514 | codec->num_pcms++; |
@@ -588,6 +667,16 @@ static int stac92xx_add_dyn_out_pins(struct hda_codec *codec, struct auto_pin_cf | |||
588 | return 0; | 667 | return 0; |
589 | } | 668 | } |
590 | 669 | ||
670 | /* | ||
671 | * XXX The line_out pin widget connection list may not be set to the | ||
672 | * desired DAC nid. This is the case on 927x where ports A and B can | ||
673 | * be routed to several DACs. | ||
674 | * | ||
675 | * This requires an analysis of the line-out/hp pin configuration | ||
676 | * to provide a best fit for pin/DAC configurations that are routable. | ||
677 | * For now, 927x DAC4 is not supported and 927x DAC1 output to ports | ||
678 | * A and B is not supported. | ||
679 | */ | ||
591 | /* fill in the dac_nids table from the parsed pin configuration */ | 680 | /* fill in the dac_nids table from the parsed pin configuration */ |
592 | static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, const struct auto_pin_cfg *cfg) | 681 | static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, const struct auto_pin_cfg *cfg) |
593 | { | 682 | { |
@@ -602,7 +691,13 @@ static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, const struct aut | |||
602 | AC_VERB_GET_CONNECT_LIST, 0) & 0xff; | 691 | AC_VERB_GET_CONNECT_LIST, 0) & 0xff; |
603 | } | 692 | } |
604 | 693 | ||
605 | spec->multiout.num_dacs = cfg->line_outs; | 694 | if (cfg->line_outs) |
695 | spec->multiout.num_dacs = cfg->line_outs; | ||
696 | else if (cfg->hp_pin) { | ||
697 | spec->multiout.dac_nids[0] = snd_hda_codec_read(codec, cfg->hp_pin, 0, | ||
698 | AC_VERB_GET_CONNECT_LIST, 0) & 0xff; | ||
699 | spec->multiout.num_dacs = 1; | ||
700 | } | ||
606 | 701 | ||
607 | return 0; | 702 | return 0; |
608 | } | 703 | } |
@@ -753,19 +848,21 @@ static void stac92xx_auto_init_hp_out(struct hda_codec *codec) | |||
753 | stac92xx_auto_set_pinctl(codec, pin, AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN); | 848 | stac92xx_auto_set_pinctl(codec, pin, AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN); |
754 | } | 849 | } |
755 | 850 | ||
756 | static int stac922x_parse_auto_config(struct hda_codec *codec) | 851 | static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out, hda_nid_t dig_in) |
757 | { | 852 | { |
758 | struct sigmatel_spec *spec = codec->spec; | 853 | struct sigmatel_spec *spec = codec->spec; |
759 | int err; | 854 | int err; |
760 | 855 | ||
761 | if ((err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, NULL)) < 0) | 856 | if ((err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, NULL)) < 0) |
762 | return err; | 857 | return err; |
858 | if (! spec->autocfg.line_outs && ! spec->autocfg.hp_pin) | ||
859 | return 0; /* can't find valid pin config */ | ||
860 | stac92xx_auto_init_multi_out(codec); | ||
861 | stac92xx_auto_init_hp_out(codec); | ||
763 | if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0) | 862 | if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0) |
764 | return err; | 863 | return err; |
765 | if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0) | 864 | if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0) |
766 | return err; | 865 | return err; |
767 | if (! spec->autocfg.line_outs && ! spec->autocfg.hp_pin) | ||
768 | return 0; /* can't find valid pin config */ | ||
769 | 866 | ||
770 | if ((err = stac92xx_auto_create_multi_out_ctls(spec, &spec->autocfg)) < 0 || | 867 | if ((err = stac92xx_auto_create_multi_out_ctls(spec, &spec->autocfg)) < 0 || |
771 | (err = stac92xx_auto_create_hp_ctls(codec, &spec->autocfg)) < 0 || | 868 | (err = stac92xx_auto_create_hp_ctls(codec, &spec->autocfg)) < 0 || |
@@ -777,11 +874,11 @@ static int stac922x_parse_auto_config(struct hda_codec *codec) | |||
777 | spec->surr_switch = 1; | 874 | spec->surr_switch = 1; |
778 | 875 | ||
779 | if (spec->autocfg.dig_out_pin) { | 876 | if (spec->autocfg.dig_out_pin) { |
780 | spec->multiout.dig_out_nid = 0x08; | 877 | spec->multiout.dig_out_nid = dig_out; |
781 | stac92xx_auto_set_pinctl(codec, spec->autocfg.dig_out_pin, AC_PINCTL_OUT_EN); | 878 | stac92xx_auto_set_pinctl(codec, spec->autocfg.dig_out_pin, AC_PINCTL_OUT_EN); |
782 | } | 879 | } |
783 | if (spec->autocfg.dig_in_pin) { | 880 | if (spec->autocfg.dig_in_pin) { |
784 | spec->dig_in_nid = 0x09; | 881 | spec->dig_in_nid = dig_in; |
785 | stac92xx_auto_set_pinctl(codec, spec->autocfg.dig_in_pin, AC_PINCTL_IN_EN); | 882 | stac92xx_auto_set_pinctl(codec, spec->autocfg.dig_in_pin, AC_PINCTL_IN_EN); |
786 | } | 883 | } |
787 | 884 | ||
@@ -827,9 +924,6 @@ static int stac92xx_init(struct hda_codec *codec) | |||
827 | 924 | ||
828 | snd_hda_sequence_write(codec, spec->init); | 925 | snd_hda_sequence_write(codec, spec->init); |
829 | 926 | ||
830 | stac92xx_auto_init_multi_out(codec); | ||
831 | stac92xx_auto_init_hp_out(codec); | ||
832 | |||
833 | return 0; | 927 | return 0; |
834 | } | 928 | } |
835 | 929 | ||
@@ -996,7 +1090,47 @@ static int patch_stac922x(struct hda_codec *codec) | |||
996 | 1090 | ||
997 | spec->multiout.dac_nids = spec->dac_nids; | 1091 | spec->multiout.dac_nids = spec->dac_nids; |
998 | 1092 | ||
999 | err = stac922x_parse_auto_config(codec); | 1093 | err = stac92xx_parse_auto_config(codec, 0x08, 0x09); |
1094 | if (err < 0) { | ||
1095 | stac92xx_free(codec); | ||
1096 | return err; | ||
1097 | } | ||
1098 | |||
1099 | codec->patch_ops = stac92xx_patch_ops; | ||
1100 | |||
1101 | return 0; | ||
1102 | } | ||
1103 | |||
1104 | static int patch_stac927x(struct hda_codec *codec) | ||
1105 | { | ||
1106 | struct sigmatel_spec *spec; | ||
1107 | int err; | ||
1108 | |||
1109 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | ||
1110 | if (spec == NULL) | ||
1111 | return -ENOMEM; | ||
1112 | |||
1113 | codec->spec = spec; | ||
1114 | spec->board_config = snd_hda_check_board_config(codec, stac927x_cfg_tbl); | ||
1115 | if (spec->board_config < 0) | ||
1116 | snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC927x, using BIOS defaults\n"); | ||
1117 | else { | ||
1118 | spec->num_pins = 14; | ||
1119 | spec->pin_nids = stac927x_pin_nids; | ||
1120 | spec->pin_configs = stac927x_brd_tbl[spec->board_config]; | ||
1121 | stac92xx_set_config_regs(codec); | ||
1122 | } | ||
1123 | |||
1124 | spec->adc_nids = stac927x_adc_nids; | ||
1125 | spec->mux_nids = stac927x_mux_nids; | ||
1126 | spec->num_muxes = 3; | ||
1127 | |||
1128 | spec->init = stac927x_core_init; | ||
1129 | spec->mixer = stac927x_mixer; | ||
1130 | |||
1131 | spec->multiout.dac_nids = spec->dac_nids; | ||
1132 | |||
1133 | err = stac92xx_parse_auto_config(codec, 0x1e, 0x20); | ||
1000 | if (err < 0) { | 1134 | if (err < 0) { |
1001 | stac92xx_free(codec); | 1135 | stac92xx_free(codec); |
1002 | return err; | 1136 | return err; |
@@ -1018,5 +1152,15 @@ struct hda_codec_preset snd_hda_preset_sigmatel[] = { | |||
1018 | { .id = 0x83847681, .name = "STAC9220D/9223D A2", .patch = patch_stac922x }, | 1152 | { .id = 0x83847681, .name = "STAC9220D/9223D A2", .patch = patch_stac922x }, |
1019 | { .id = 0x83847682, .name = "STAC9221 A2", .patch = patch_stac922x }, | 1153 | { .id = 0x83847682, .name = "STAC9221 A2", .patch = patch_stac922x }, |
1020 | { .id = 0x83847683, .name = "STAC9221D A2", .patch = patch_stac922x }, | 1154 | { .id = 0x83847683, .name = "STAC9221D A2", .patch = patch_stac922x }, |
1155 | { .id = 0x83847620, .name = "STAC9274", .patch = patch_stac927x }, | ||
1156 | { .id = 0x83847621, .name = "STAC9274D", .patch = patch_stac927x }, | ||
1157 | { .id = 0x83847622, .name = "STAC9273X", .patch = patch_stac927x }, | ||
1158 | { .id = 0x83847623, .name = "STAC9273D", .patch = patch_stac927x }, | ||
1159 | { .id = 0x83847624, .name = "STAC9272X", .patch = patch_stac927x }, | ||
1160 | { .id = 0x83847625, .name = "STAC9272D", .patch = patch_stac927x }, | ||
1161 | { .id = 0x83847626, .name = "STAC9271X", .patch = patch_stac927x }, | ||
1162 | { .id = 0x83847627, .name = "STAC9271D", .patch = patch_stac927x }, | ||
1163 | { .id = 0x83847628, .name = "STAC9274X5NH", .patch = patch_stac927x }, | ||
1164 | { .id = 0x83847629, .name = "STAC9274D5NH", .patch = patch_stac927x }, | ||
1021 | {} /* terminator */ | 1165 | {} /* terminator */ |
1022 | }; | 1166 | }; |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 5466b1fa0cd5..174237f4a22c 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -427,6 +427,7 @@ static struct pci_device_id snd_intel8x0_ids[] = { | |||
427 | { 0x10de, 0x008a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8 */ | 427 | { 0x10de, 0x008a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8 */ |
428 | { 0x10de, 0x00da, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE3 */ | 428 | { 0x10de, 0x00da, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE3 */ |
429 | { 0x10de, 0x00ea, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8S */ | 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 | { 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */ | 431 | { 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */ |
431 | { 0x1022, 0x7445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD768 */ | 432 | { 0x1022, 0x7445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD768 */ |
432 | { 0x10b9, 0x5455, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALI }, /* Ali5455 */ | 433 | { 0x10b9, 0x5455, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALI }, /* Ali5455 */ |
@@ -1805,6 +1806,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { | |||
1805 | }, | 1806 | }, |
1806 | { | 1807 | { |
1807 | .subvendor = 0x1028, | 1808 | .subvendor = 0x1028, |
1809 | .subdevice = 0x0151, | ||
1810 | .name = "Dell Optiplex GX270", /* AD1981B */ | ||
1811 | .type = AC97_TUNE_HP_ONLY | ||
1812 | }, | ||
1813 | { | ||
1814 | .subvendor = 0x1028, | ||
1808 | .subdevice = 0x0163, | 1815 | .subdevice = 0x0163, |
1809 | .name = "Dell Unknown", /* STAC9750/51 */ | 1816 | .name = "Dell Unknown", /* STAC9750/51 */ |
1810 | .type = AC97_TUNE_HP_ONLY | 1817 | .type = AC97_TUNE_HP_ONLY |
@@ -1847,12 +1854,6 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { | |||
1847 | }, | 1854 | }, |
1848 | { | 1855 | { |
1849 | .subvendor = 0x103c, | 1856 | .subvendor = 0x103c, |
1850 | .subdevice = 0x099c, | ||
1851 | .name = "HP nx6110", /* AD1981B */ | ||
1852 | .type = AC97_TUNE_HP_ONLY | ||
1853 | }, | ||
1854 | { | ||
1855 | .subvendor = 0x103c, | ||
1856 | .subdevice = 0x129d, | 1857 | .subdevice = 0x129d, |
1857 | .name = "HP xw8000", | 1858 | .name = "HP xw8000", |
1858 | .type = AC97_TUNE_HP_ONLY | 1859 | .type = AC97_TUNE_HP_ONLY |
@@ -1866,7 +1867,7 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { | |||
1866 | { | 1867 | { |
1867 | .subvendor = 0x103c, | 1868 | .subvendor = 0x103c, |
1868 | .subdevice = 0x099c, | 1869 | .subdevice = 0x099c, |
1869 | .name = "HP nc6120", | 1870 | .name = "HP nx6110/nc6120", |
1870 | .type = AC97_TUNE_HP_MUTE_LED | 1871 | .type = AC97_TUNE_HP_MUTE_LED |
1871 | }, | 1872 | }, |
1872 | { | 1873 | { |
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index b8c0853a8278..b2cba75b6b16 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c | |||
@@ -454,7 +454,7 @@ static int pcxhr_update_r_buffer(struct pcxhr_stream *stream) | |||
454 | is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE); | 454 | is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE); |
455 | stream_num = is_capture ? 0 : subs->number; | 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 | is_capture ? 'c' : 'p', | 458 | is_capture ? 'c' : 'p', |
459 | chip->chip_idx, (void*)subs->runtime->dma_addr, | 459 | chip->chip_idx, (void*)subs->runtime->dma_addr, |
460 | subs->runtime->dma_bytes, subs->number); | 460 | subs->runtime->dma_bytes, subs->number); |
@@ -744,13 +744,14 @@ static int pcxhr_prepare(struct snd_pcm_substream *subs) | |||
744 | /* only the first stream can choose the sample rate */ | 744 | /* only the first stream can choose the sample rate */ |
745 | /* the further opened streams will be limited to its frequency (see open) */ | 745 | /* the further opened streams will be limited to its frequency (see open) */ |
746 | /* set the clock only once (first stream) */ | 746 | /* set the clock only once (first stream) */ |
747 | if (mgr->sample_rate == 0) { | 747 | if (mgr->sample_rate != subs->runtime->rate) { |
748 | err = pcxhr_set_clock(mgr, subs->runtime->rate); | 748 | err = pcxhr_set_clock(mgr, subs->runtime->rate); |
749 | if (err) | 749 | if (err) |
750 | break; | 750 | break; |
751 | if (mgr->sample_rate == 0) | ||
752 | /* start the DSP-timer */ | ||
753 | err = pcxhr_hardware_timer(mgr, 1); | ||
751 | mgr->sample_rate = subs->runtime->rate; | 754 | mgr->sample_rate = subs->runtime->rate; |
752 | |||
753 | err = pcxhr_hardware_timer(mgr, 1); /* start the DSP-timer */ | ||
754 | } | 755 | } |
755 | } while(0); /* do only once (so we can use break instead of goto) */ | 756 | } while(0); /* do only once (so we can use break instead of goto) */ |
756 | 757 | ||
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 3dec616bad6b..103b4d715ff4 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -3324,11 +3324,11 @@ static int __devinit snd_hdspm_preallocate_memory(struct hdspm * hdspm) | |||
3324 | snd_dma_pci_data(hdspm->pci), | 3324 | snd_dma_pci_data(hdspm->pci), |
3325 | wanted, | 3325 | wanted, |
3326 | wanted)) < 0) { | 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 | return err; | 3329 | return err; |
3330 | } else | 3330 | } else |
3331 | snd_printdd(" Preallocated %d Bytes\n", wanted); | 3331 | snd_printdd(" Preallocated %zd Bytes\n", wanted); |
3332 | 3332 | ||
3333 | return 0; | 3333 | return 0; |
3334 | } | 3334 | } |
@@ -3510,7 +3510,7 @@ static int __devinit snd_hdspm_create(struct snd_card *card, struct hdspm * hdsp | |||
3510 | 3510 | ||
3511 | hdspm->monitor_outs = enable_monitor; | 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 | sizeof(struct hdspm_mixer)); | 3514 | sizeof(struct hdspm_mixer)); |
3515 | if ((hdspm->mixer = kmalloc(sizeof(struct hdspm_mixer), GFP_KERNEL)) | 3515 | if ((hdspm->mixer = kmalloc(sizeof(struct hdspm_mixer), GFP_KERNEL)) |
3516 | == NULL) { | 3516 | == NULL) { |
diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c index 2b21df16ad6a..b4538045049f 100644 --- a/sound/pci/trident/trident.c +++ b/sound/pci/trident/trident.c | |||
@@ -64,9 +64,11 @@ module_param_array(wavetable_size, int, NULL, 0444); | |||
64 | MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); | 64 | MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); |
65 | 65 | ||
66 | static struct pci_device_id snd_trident_ids[] = { | 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 */ | 67 | {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), |
68 | { 0x1023, 0x2001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Trident 4DWave NX PCI Audio */ | 68 | PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, |
69 | { 0x1039, 0x7018, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* SiS SI7018 PCI Audio */ | 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 | { 0, } | 72 | { 0, } |
71 | }; | 73 | }; |
72 | 74 | ||
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index ed26a155c344..423741371191 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -2340,6 +2340,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci) | |||
2340 | { .subvendor = 0x1043, .subdevice = 0x80b0, .action = VIA_DXS_NO_VRA }, /* ASUS A7V600 & K8V*/ | 2340 | { .subvendor = 0x1043, .subdevice = 0x80b0, .action = VIA_DXS_NO_VRA }, /* ASUS A7V600 & K8V*/ |
2341 | { .subvendor = 0x1043, .subdevice = 0x810d, .action = VIA_DXS_SRC }, /* ASUS */ | 2341 | { .subvendor = 0x1043, .subdevice = 0x810d, .action = VIA_DXS_SRC }, /* ASUS */ |
2342 | { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC }, /* ASUS A8V Deluxe */ | 2342 | { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC }, /* ASUS A8V Deluxe */ |
2343 | { .subvendor = 0x1043, .subdevice = 0x8174, .action = VIA_DXS_SRC }, /* ASUS */ | ||
2343 | { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */ | 2344 | { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */ |
2344 | { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */ | 2345 | { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */ |
2345 | { .subvendor = 0x10cf, .subdevice = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */ | 2346 | { .subvendor = 0x10cf, .subdevice = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */ |
@@ -2358,6 +2359,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci) | |||
2358 | { .subvendor = 0x1462, .subdevice = 0x7023, .action = VIA_DXS_NO_VRA }, /* MSI K8T Neo2-FI */ | 2359 | { .subvendor = 0x1462, .subdevice = 0x7023, .action = VIA_DXS_NO_VRA }, /* MSI K8T Neo2-FI */ |
2359 | { .subvendor = 0x1462, .subdevice = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */ | 2360 | { .subvendor = 0x1462, .subdevice = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */ |
2360 | { .subvendor = 0x1462, .subdevice = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */ | 2361 | { .subvendor = 0x1462, .subdevice = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */ |
2362 | { .subvendor = 0x1462, .subdevice = 0xb012, .action = VIA_DXS_SRC }, /* P4M800/VIA8237R */ | ||
2361 | { .subvendor = 0x147b, .subdevice = 0x1401, .action = VIA_DXS_ENABLE }, /* ABIT KD7(-RAID) */ | 2363 | { .subvendor = 0x147b, .subdevice = 0x1401, .action = VIA_DXS_ENABLE }, /* ABIT KD7(-RAID) */ |
2362 | { .subvendor = 0x147b, .subdevice = 0x1411, .action = VIA_DXS_ENABLE }, /* ABIT VA-20 */ | 2364 | { .subvendor = 0x147b, .subdevice = 0x1411, .action = VIA_DXS_ENABLE }, /* ABIT VA-20 */ |
2363 | { .subvendor = 0x147b, .subdevice = 0x1413, .action = VIA_DXS_ENABLE }, /* ABIT KV8 Pro */ | 2365 | { .subvendor = 0x147b, .subdevice = 0x1413, .action = VIA_DXS_ENABLE }, /* ABIT KV8 Pro */ |
@@ -2371,6 +2373,9 @@ static int __devinit check_dxs_list(struct pci_dev *pci) | |||
2371 | { .subvendor = 0x161f, .subdevice = 0x2032, .action = VIA_DXS_48K }, /* m680x machines */ | 2373 | { .subvendor = 0x161f, .subdevice = 0x2032, .action = VIA_DXS_48K }, /* m680x machines */ |
2372 | { .subvendor = 0x1631, .subdevice = 0xe004, .action = VIA_DXS_ENABLE }, /* Easy Note 3174, Packard Bell */ | 2374 | { .subvendor = 0x1631, .subdevice = 0xe004, .action = VIA_DXS_ENABLE }, /* Easy Note 3174, Packard Bell */ |
2373 | { .subvendor = 0x1695, .subdevice = 0x3005, .action = VIA_DXS_ENABLE }, /* EPoX EP-8K9A */ | 2375 | { .subvendor = 0x1695, .subdevice = 0x3005, .action = VIA_DXS_ENABLE }, /* EPoX EP-8K9A */ |
2376 | { .subvendor = 0x1695, .subdevice = 0x300e, .action = VIA_DXS_SRC }, /* EPoX 9HEAI */ | ||
2377 | { .subvendor = 0x16f3, .subdevice = 0x6405, .action = VIA_DXS_SRC }, /* Jetway K8M8MS */ | ||
2378 | { .subvendor = 0x1734, .subdevice = 0x1093, .action = VIA_DXS_SRC }, /* FSC */ | ||
2374 | { .subvendor = 0x1849, .subdevice = 0x3059, .action = VIA_DXS_NO_VRA }, /* ASRock K7VM2 */ | 2379 | { .subvendor = 0x1849, .subdevice = 0x3059, .action = VIA_DXS_NO_VRA }, /* ASRock K7VM2 */ |
2375 | { .subvendor = 0x1849, .subdevice = 0x9761, .action = VIA_DXS_SRC }, /* ASRock mobo(?) */ | 2380 | { .subvendor = 0x1849, .subdevice = 0x9761, .action = VIA_DXS_SRC }, /* ASRock mobo(?) */ |
2376 | { .subvendor = 0x1919, .subdevice = 0x200a, .action = VIA_DXS_NO_VRA }, /* Soltek SL-K8Tpro-939 */ | 2381 | { .subvendor = 0x1919, .subdevice = 0x200a, .action = VIA_DXS_NO_VRA }, /* Soltek SL-K8Tpro-939 */ |
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index 1dfc7233c6a8..a1aa74b79b3d 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c | |||
@@ -1229,6 +1229,7 @@ static int snd_ymfpci_spdif_default_get(struct snd_kcontrol *kcontrol, | |||
1229 | spin_lock_irq(&chip->reg_lock); | 1229 | spin_lock_irq(&chip->reg_lock); |
1230 | ucontrol->value.iec958.status[0] = (chip->spdif_bits >> 0) & 0xff; | 1230 | ucontrol->value.iec958.status[0] = (chip->spdif_bits >> 0) & 0xff; |
1231 | ucontrol->value.iec958.status[1] = (chip->spdif_bits >> 8) & 0xff; | 1231 | ucontrol->value.iec958.status[1] = (chip->spdif_bits >> 8) & 0xff; |
1232 | ucontrol->value.iec958.status[3] = IEC958_AES3_CON_FS_48000; | ||
1232 | spin_unlock_irq(&chip->reg_lock); | 1233 | spin_unlock_irq(&chip->reg_lock); |
1233 | return 0; | 1234 | return 0; |
1234 | } | 1235 | } |
@@ -1303,6 +1304,7 @@ static int snd_ymfpci_spdif_stream_get(struct snd_kcontrol *kcontrol, | |||
1303 | spin_lock_irq(&chip->reg_lock); | 1304 | spin_lock_irq(&chip->reg_lock); |
1304 | ucontrol->value.iec958.status[0] = (chip->spdif_pcm_bits >> 0) & 0xff; | 1305 | ucontrol->value.iec958.status[0] = (chip->spdif_pcm_bits >> 0) & 0xff; |
1305 | ucontrol->value.iec958.status[1] = (chip->spdif_pcm_bits >> 8) & 0xff; | 1306 | ucontrol->value.iec958.status[1] = (chip->spdif_pcm_bits >> 8) & 0xff; |
1307 | ucontrol->value.iec958.status[3] = IEC958_AES3_CON_FS_48000; | ||
1306 | spin_unlock_irq(&chip->reg_lock); | 1308 | spin_unlock_irq(&chip->reg_lock); |
1307 | return 0; | 1309 | return 0; |
1308 | } | 1310 | } |
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index a642e4cfcf45..4988f873a7ba 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c | |||
@@ -1216,7 +1216,7 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) | |||
1216 | goto __error; | 1216 | goto __error; |
1217 | } | 1217 | } |
1218 | for (i = 0; i < 3; i ++) { | 1218 | for (i = 0; i < 3; i ++) { |
1219 | if (of_address_to_resource(np->parent, i, | 1219 | if (of_address_to_resource(np, i, |
1220 | &chip->rsrc[i])) { | 1220 | &chip->rsrc[i])) { |
1221 | printk(KERN_ERR "snd: can't translate rsrc " | 1221 | printk(KERN_ERR "snd: can't translate rsrc " |
1222 | " %d (%s)\n", i, rnames[i]); | 1222 | " %d (%s)\n", i, rnames[i]); |
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index a1bd8040dea4..d5013383fad7 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -478,22 +478,38 @@ static int retire_playback_sync_urb_hs(struct snd_usb_substream *subs, | |||
478 | /* | 478 | /* |
479 | * Prepare urb for streaming before playback starts. | 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 | static int prepare_startup_playback_urb(struct snd_usb_substream *subs, | 483 | static int prepare_startup_playback_urb(struct snd_usb_substream *subs, |
484 | struct snd_pcm_runtime *runtime, | 484 | struct snd_pcm_runtime *runtime, |
485 | struct urb *urb) | 485 | struct urb *urb) |
486 | { | 486 | { |
487 | unsigned int i; | 487 | unsigned int i, offs, counts; |
488 | struct snd_urb_ctx *ctx = urb->context; | 488 | struct snd_urb_ctx *ctx = urb->context; |
489 | int stride = runtime->frame_bits >> 3; | ||
489 | 490 | ||
491 | offs = 0; | ||
490 | urb->dev = ctx->subs->dev; | 492 | urb->dev = ctx->subs->dev; |
491 | urb->number_of_packets = subs->packs_per_ms; | 493 | urb->number_of_packets = subs->packs_per_ms; |
492 | for (i = 0; i < subs->packs_per_ms; ++i) { | 494 | for (i = 0; i < subs->packs_per_ms; ++i) { |
493 | urb->iso_frame_desc[i].offset = 0; | 495 | /* calculate the size of a packet */ |
494 | urb->iso_frame_desc[i].length = 0; | 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 | return 0; | 513 | return 0; |
498 | } | 514 | } |
499 | 515 | ||
@@ -2477,12 +2493,13 @@ static int parse_audio_format(struct snd_usb_audio *chip, struct audioformat *fp | |||
2477 | if (err < 0) | 2493 | if (err < 0) |
2478 | return err; | 2494 | return err; |
2479 | #if 1 | 2495 | #if 1 |
2480 | /* FIXME: temporary hack for extigy/audigy 2 nx */ | 2496 | /* FIXME: temporary hack for extigy/audigy 2 nx/zs */ |
2481 | /* extigy apparently supports sample rates other than 48k | 2497 | /* extigy apparently supports sample rates other than 48k |
2482 | * but not in ordinary way. so we enable only 48k atm. | 2498 | * but not in ordinary way. so we enable only 48k atm. |
2483 | */ | 2499 | */ |
2484 | if (chip->usb_id == USB_ID(0x041e, 0x3000) || | 2500 | if (chip->usb_id == USB_ID(0x041e, 0x3000) || |
2485 | chip->usb_id == USB_ID(0x041e, 0x3020)) { | 2501 | chip->usb_id == USB_ID(0x041e, 0x3020) || |
2502 | chip->usb_id == USB_ID(0x041e, 0x3061)) { | ||
2486 | if (fmt[3] == USB_FORMAT_TYPE_I && | 2503 | if (fmt[3] == USB_FORMAT_TYPE_I && |
2487 | fp->rates != SNDRV_PCM_RATE_48000 && | 2504 | fp->rates != SNDRV_PCM_RATE_48000 && |
2488 | fp->rates != SNDRV_PCM_RATE_96000) | 2505 | fp->rates != SNDRV_PCM_RATE_96000) |