aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/emu10k1.h2
-rw-r--r--include/sound/version.h2
-rw-r--r--sound/arm/pxa2xx-ac97.c6
-rw-r--r--sound/drivers/dummy.c11
-rw-r--r--sound/drivers/mtpav.c12
-rw-r--r--sound/drivers/mts64.c6
-rw-r--r--sound/drivers/portman2x4.c6
-rw-r--r--sound/drivers/serial-u16550.c14
-rw-r--r--sound/drivers/virmidi.c6
-rw-r--r--sound/isa/ad1848/ad1848.c2
-rw-r--r--sound/isa/cmi8330.c4
-rw-r--r--sound/isa/es1688/es1688.c6
-rw-r--r--sound/isa/gus/gusclassic.c10
-rw-r--r--sound/isa/gus/gusextreme.c12
-rw-r--r--sound/isa/gus/gusmax.c13
-rw-r--r--sound/isa/opl3sa2.c4
-rw-r--r--sound/isa/sb/sb8.c6
-rw-r--r--sound/pci/ac97/ac97_codec.c1
-rw-r--r--sound/pci/ac97/ac97_patch.c6
-rw-r--r--sound/pci/ac97/ac97_patch.h1
-rw-r--r--sound/pci/hda/patch_conexant.c343
-rw-r--r--sound/pci/hda/patch_sigmatel.c44
-rw-r--r--sound/soc/at91/at91-i2s.c43
-rw-r--r--sound/soc/at91/at91-pcm.c20
-rw-r--r--sound/soc/codecs/Kconfig8
-rw-r--r--sound/usb/usbaudio.c10
-rw-r--r--sound/usb/usbquirks.h23
27 files changed, 394 insertions, 227 deletions
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index eb7ce96ddf3a..23e45a4cf0e4 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -628,7 +628,7 @@
628#define FXWC_SPDIFLEFT (1<<22) /* 0x00400000 */ 628#define FXWC_SPDIFLEFT (1<<22) /* 0x00400000 */
629#define FXWC_SPDIFRIGHT (1<<23) /* 0x00800000 */ 629#define FXWC_SPDIFRIGHT (1<<23) /* 0x00800000 */
630 630
631#define A_TBLSZ ` 0x43 /* Effects Tank Internal Table Size. Only low byte or register used */ 631#define A_TBLSZ 0x43 /* Effects Tank Internal Table Size. Only low byte or register used */
632 632
633#define TCBS 0x44 /* Tank cache buffer size register */ 633#define TCBS 0x44 /* Tank cache buffer size register */
634#define TCBS_MASK 0x00000007 /* Tank cache buffer size field */ 634#define TCBS_MASK 0x00000007 /* Tank cache buffer size field */
diff --git a/include/sound/version.h b/include/sound/version.h
index c39b3802cf18..a9ba7ee69939 100644
--- a/include/sound/version.h
+++ b/include/sound/version.h
@@ -1,3 +1,3 @@
1/* include/version.h. Generated by alsa/ksync script. */ 1/* include/version.h. Generated by alsa/ksync script. */
2#define CONFIG_SND_VERSION "1.0.14rc2" 2#define CONFIG_SND_VERSION "1.0.14rc2"
3#define CONFIG_SND_DATE " (Fri Feb 09 13:50:10 2007 UTC)" 3#define CONFIG_SND_DATE " (Wed Feb 14 07:42:13 2007 UTC)"
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index dede954b2c65..28db4be7a16f 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -305,7 +305,7 @@ static int pxa2xx_ac97_resume(struct platform_device *dev)
305#define pxa2xx_ac97_resume NULL 305#define pxa2xx_ac97_resume NULL
306#endif 306#endif
307 307
308static int pxa2xx_ac97_probe(struct platform_device *dev) 308static int __devinit pxa2xx_ac97_probe(struct platform_device *dev)
309{ 309{
310 struct snd_card *card; 310 struct snd_card *card;
311 struct snd_ac97_bus *ac97_bus; 311 struct snd_ac97_bus *ac97_bus;
@@ -369,7 +369,7 @@ static int pxa2xx_ac97_probe(struct platform_device *dev)
369 return ret; 369 return ret;
370} 370}
371 371
372static int pxa2xx_ac97_remove(struct platform_device *dev) 372static int __devexit pxa2xx_ac97_remove(struct platform_device *dev)
373{ 373{
374 struct snd_card *card = platform_get_drvdata(dev); 374 struct snd_card *card = platform_get_drvdata(dev);
375 375
@@ -386,7 +386,7 @@ static int pxa2xx_ac97_remove(struct platform_device *dev)
386 386
387static struct platform_driver pxa2xx_ac97_driver = { 387static struct platform_driver pxa2xx_ac97_driver = {
388 .probe = pxa2xx_ac97_probe, 388 .probe = pxa2xx_ac97_probe,
389 .remove = pxa2xx_ac97_remove, 389 .remove = __devexit_p(pxa2xx_ac97_remove),
390 .suspend = pxa2xx_ac97_suspend, 390 .suspend = pxa2xx_ac97_suspend,
391 .resume = pxa2xx_ac97_resume, 391 .resume = pxa2xx_ac97_resume,
392 .driver = { 392 .driver = {
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index 8339bad969ba..a0f28f51fc7e 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -423,7 +423,8 @@ static struct snd_pcm_ops snd_card_dummy_capture_ops = {
423 .pointer = snd_card_dummy_pcm_pointer, 423 .pointer = snd_card_dummy_pcm_pointer,
424}; 424};
425 425
426static int __init snd_card_dummy_pcm(struct snd_dummy *dummy, int device, int substreams) 426static int __devinit snd_card_dummy_pcm(struct snd_dummy *dummy, int device,
427 int substreams)
427{ 428{
428 struct snd_pcm *pcm; 429 struct snd_pcm *pcm;
429 int err; 430 int err;
@@ -562,7 +563,7 @@ DUMMY_VOLUME("CD Volume", 0, MIXER_ADDR_CD),
562DUMMY_CAPSRC("CD Capture Switch", 0, MIXER_ADDR_CD) 563DUMMY_CAPSRC("CD Capture Switch", 0, MIXER_ADDR_CD)
563}; 564};
564 565
565static int __init snd_card_dummy_new_mixer(struct snd_dummy *dummy) 566static int __devinit snd_card_dummy_new_mixer(struct snd_dummy *dummy)
566{ 567{
567 struct snd_card *card = dummy->card; 568 struct snd_card *card = dummy->card;
568 unsigned int idx; 569 unsigned int idx;
@@ -579,7 +580,7 @@ static int __init snd_card_dummy_new_mixer(struct snd_dummy *dummy)
579 return 0; 580 return 0;
580} 581}
581 582
582static int __init snd_dummy_probe(struct platform_device *devptr) 583static int __devinit snd_dummy_probe(struct platform_device *devptr)
583{ 584{
584 struct snd_card *card; 585 struct snd_card *card;
585 struct snd_dummy *dummy; 586 struct snd_dummy *dummy;
@@ -617,7 +618,7 @@ static int __init snd_dummy_probe(struct platform_device *devptr)
617 return err; 618 return err;
618} 619}
619 620
620static int snd_dummy_remove(struct platform_device *devptr) 621static int __devexit snd_dummy_remove(struct platform_device *devptr)
621{ 622{
622 snd_card_free(platform_get_drvdata(devptr)); 623 snd_card_free(platform_get_drvdata(devptr));
623 platform_set_drvdata(devptr, NULL); 624 platform_set_drvdata(devptr, NULL);
@@ -648,7 +649,7 @@ static int snd_dummy_resume(struct platform_device *pdev)
648 649
649static struct platform_driver snd_dummy_driver = { 650static struct platform_driver snd_dummy_driver = {
650 .probe = snd_dummy_probe, 651 .probe = snd_dummy_probe,
651 .remove = snd_dummy_remove, 652 .remove = __devexit_p(snd_dummy_remove),
652#ifdef CONFIG_PM 653#ifdef CONFIG_PM
653 .suspend = snd_dummy_suspend, 654 .suspend = snd_dummy_suspend,
654 .resume = snd_dummy_resume, 655 .resume = snd_dummy_resume,
diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c
index a9ff391258e7..40eb026c86ed 100644
--- a/sound/drivers/mtpav.c
+++ b/sound/drivers/mtpav.c
@@ -583,7 +583,7 @@ static irqreturn_t snd_mtpav_irqh(int irq, void *dev_id)
583/* 583/*
584 * get ISA resources 584 * get ISA resources
585 */ 585 */
586static int __init snd_mtpav_get_ISA(struct mtpav * mcard) 586static int __devinit snd_mtpav_get_ISA(struct mtpav * mcard)
587{ 587{
588 if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) { 588 if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) {
589 snd_printk("MTVAP port 0x%lx is busy\n", port); 589 snd_printk("MTVAP port 0x%lx is busy\n", port);
@@ -619,7 +619,7 @@ static struct snd_rawmidi_ops snd_mtpav_input = {
619 * get RAWMIDI resources 619 * get RAWMIDI resources
620 */ 620 */
621 621
622static void __init snd_mtpav_set_name(struct mtpav *chip, 622static void __devinit snd_mtpav_set_name(struct mtpav *chip,
623 struct snd_rawmidi_substream *substream) 623 struct snd_rawmidi_substream *substream)
624{ 624{
625 if (substream->number >= 0 && substream->number < chip->num_ports) 625 if (substream->number >= 0 && substream->number < chip->num_ports)
@@ -634,7 +634,7 @@ static void __init snd_mtpav_set_name(struct mtpav *chip,
634 strcpy(substream->name, "MTP broadcast"); 634 strcpy(substream->name, "MTP broadcast");
635} 635}
636 636
637static int __init snd_mtpav_get_RAWMIDI(struct mtpav *mcard) 637static int __devinit snd_mtpav_get_RAWMIDI(struct mtpav *mcard)
638{ 638{
639 int rval; 639 int rval;
640 struct snd_rawmidi *rawmidi; 640 struct snd_rawmidi *rawmidi;
@@ -691,7 +691,7 @@ static void snd_mtpav_free(struct snd_card *card)
691 691
692/* 692/*
693 */ 693 */
694static int __init snd_mtpav_probe(struct platform_device *dev) 694static int __devinit snd_mtpav_probe(struct platform_device *dev)
695{ 695{
696 struct snd_card *card; 696 struct snd_card *card;
697 int err; 697 int err;
@@ -745,7 +745,7 @@ static int __init snd_mtpav_probe(struct platform_device *dev)
745 return err; 745 return err;
746} 746}
747 747
748static int snd_mtpav_remove(struct platform_device *devptr) 748static int __devexit snd_mtpav_remove(struct platform_device *devptr)
749{ 749{
750 snd_card_free(platform_get_drvdata(devptr)); 750 snd_card_free(platform_get_drvdata(devptr));
751 platform_set_drvdata(devptr, NULL); 751 platform_set_drvdata(devptr, NULL);
@@ -756,7 +756,7 @@ static int snd_mtpav_remove(struct platform_device *devptr)
756 756
757static struct platform_driver snd_mtpav_driver = { 757static struct platform_driver snd_mtpav_driver = {
758 .probe = snd_mtpav_probe, 758 .probe = snd_mtpav_probe,
759 .remove = snd_mtpav_remove, 759 .remove = __devexit_p(snd_mtpav_remove),
760 .driver = { 760 .driver = {
761 .name = SND_MTPAV_DRIVER 761 .name = SND_MTPAV_DRIVER
762 }, 762 },
diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c
index 5327c6f841f4..6c9f4c9bfeb6 100644
--- a/sound/drivers/mts64.c
+++ b/sound/drivers/mts64.c
@@ -1026,7 +1026,7 @@ __err:
1026 return err; 1026 return err;
1027} 1027}
1028 1028
1029static int snd_mts64_remove(struct platform_device *pdev) 1029static int __devexit snd_mts64_remove(struct platform_device *pdev)
1030{ 1030{
1031 struct snd_card *card = platform_get_drvdata(pdev); 1031 struct snd_card *card = platform_get_drvdata(pdev);
1032 1032
@@ -1039,7 +1039,7 @@ static int snd_mts64_remove(struct platform_device *pdev)
1039 1039
1040static struct platform_driver snd_mts64_driver = { 1040static struct platform_driver snd_mts64_driver = {
1041 .probe = snd_mts64_probe, 1041 .probe = snd_mts64_probe,
1042 .remove = snd_mts64_remove, 1042 .remove = __devexit_p(snd_mts64_remove),
1043 .driver = { 1043 .driver = {
1044 .name = PLATFORM_DRIVER 1044 .name = PLATFORM_DRIVER
1045 } 1045 }
@@ -1048,7 +1048,7 @@ static struct platform_driver snd_mts64_driver = {
1048/********************************************************************* 1048/*********************************************************************
1049 * module init stuff 1049 * module init stuff
1050 *********************************************************************/ 1050 *********************************************************************/
1051static void snd_mts64_unregister_all(void) 1051static void __init_or_module snd_mts64_unregister_all(void)
1052{ 1052{
1053 int i; 1053 int i;
1054 1054
diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c
index 6c48772aaefd..b2d0ba4bd184 100644
--- a/sound/drivers/portman2x4.c
+++ b/sound/drivers/portman2x4.c
@@ -811,7 +811,7 @@ __err:
811 return err; 811 return err;
812} 812}
813 813
814static int snd_portman_remove(struct platform_device *pdev) 814static int __devexit snd_portman_remove(struct platform_device *pdev)
815{ 815{
816 struct snd_card *card = platform_get_drvdata(pdev); 816 struct snd_card *card = platform_get_drvdata(pdev);
817 817
@@ -824,7 +824,7 @@ static int snd_portman_remove(struct platform_device *pdev)
824 824
825static struct platform_driver snd_portman_driver = { 825static struct platform_driver snd_portman_driver = {
826 .probe = snd_portman_probe, 826 .probe = snd_portman_probe,
827 .remove = snd_portman_remove, 827 .remove = __devexit_p(snd_portman_remove),
828 .driver = { 828 .driver = {
829 .name = PLATFORM_DRIVER 829 .name = PLATFORM_DRIVER
830 } 830 }
@@ -833,7 +833,7 @@ static struct platform_driver snd_portman_driver = {
833/********************************************************************* 833/*********************************************************************
834 * module init stuff 834 * module init stuff
835 *********************************************************************/ 835 *********************************************************************/
836static void snd_portman_unregister_all(void) 836static void __init_or_module snd_portman_unregister_all(void)
837{ 837{
838 int i; 838 int i;
839 839
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index 3a86a5820726..838a4277929d 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -327,7 +327,7 @@ static void snd_uart16550_buffer_timer(unsigned long data)
327 * return 0 if found 327 * return 0 if found
328 * return negative error if not found 328 * return negative error if not found
329 */ 329 */
330static int __init snd_uart16550_detect(struct snd_uart16550 *uart) 330static int __devinit snd_uart16550_detect(struct snd_uart16550 *uart)
331{ 331{
332 unsigned long io_base = uart->base; 332 unsigned long io_base = uart->base;
333 int ok; 333 int ok;
@@ -781,7 +781,7 @@ static int snd_uart16550_dev_free(struct snd_device *device)
781 return snd_uart16550_free(uart); 781 return snd_uart16550_free(uart);
782} 782}
783 783
784static int __init snd_uart16550_create(struct snd_card *card, 784static int __devinit snd_uart16550_create(struct snd_card *card,
785 unsigned long iobase, 785 unsigned long iobase,
786 int irq, 786 int irq,
787 unsigned int speed, 787 unsigned int speed,
@@ -860,7 +860,7 @@ static int __init snd_uart16550_create(struct snd_card *card,
860 return 0; 860 return 0;
861} 861}
862 862
863static void __init snd_uart16550_substreams(struct snd_rawmidi_str *stream) 863static void __devinit snd_uart16550_substreams(struct snd_rawmidi_str *stream)
864{ 864{
865 struct snd_rawmidi_substream *substream; 865 struct snd_rawmidi_substream *substream;
866 866
@@ -869,7 +869,7 @@ static void __init snd_uart16550_substreams(struct snd_rawmidi_str *stream)
869 } 869 }
870} 870}
871 871
872static int __init snd_uart16550_rmidi(struct snd_uart16550 *uart, int device, 872static int __devinit snd_uart16550_rmidi(struct snd_uart16550 *uart, int device,
873 int outs, int ins, 873 int outs, int ins,
874 struct snd_rawmidi **rmidi) 874 struct snd_rawmidi **rmidi)
875{ 875{
@@ -896,7 +896,7 @@ static int __init snd_uart16550_rmidi(struct snd_uart16550 *uart, int device,
896 return 0; 896 return 0;
897} 897}
898 898
899static int __init snd_serial_probe(struct platform_device *devptr) 899static int __devinit snd_serial_probe(struct platform_device *devptr)
900{ 900{
901 struct snd_card *card; 901 struct snd_card *card;
902 struct snd_uart16550 *uart; 902 struct snd_uart16550 *uart;
@@ -981,7 +981,7 @@ static int __init snd_serial_probe(struct platform_device *devptr)
981 return err; 981 return err;
982} 982}
983 983
984static int snd_serial_remove(struct platform_device *devptr) 984static int __devexit snd_serial_remove(struct platform_device *devptr)
985{ 985{
986 snd_card_free(platform_get_drvdata(devptr)); 986 snd_card_free(platform_get_drvdata(devptr));
987 platform_set_drvdata(devptr, NULL); 987 platform_set_drvdata(devptr, NULL);
@@ -992,7 +992,7 @@ static int snd_serial_remove(struct platform_device *devptr)
992 992
993static struct platform_driver snd_serial_driver = { 993static struct platform_driver snd_serial_driver = {
994 .probe = snd_serial_probe, 994 .probe = snd_serial_probe,
995 .remove = snd_serial_remove, 995 .remove = __devexit_p( snd_serial_remove),
996 .driver = { 996 .driver = {
997 .name = SND_SERIAL_DRIVER 997 .name = SND_SERIAL_DRIVER
998 }, 998 },
diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c
index 429af143f5d3..46f3d3486067 100644
--- a/sound/drivers/virmidi.c
+++ b/sound/drivers/virmidi.c
@@ -84,7 +84,7 @@ struct snd_card_virmidi {
84static struct platform_device *devices[SNDRV_CARDS]; 84static struct platform_device *devices[SNDRV_CARDS];
85 85
86 86
87static int __init snd_virmidi_probe(struct platform_device *devptr) 87static int __devinit snd_virmidi_probe(struct platform_device *devptr)
88{ 88{
89 struct snd_card *card; 89 struct snd_card *card;
90 struct snd_card_virmidi *vmidi; 90 struct snd_card_virmidi *vmidi;
@@ -128,7 +128,7 @@ static int __init snd_virmidi_probe(struct platform_device *devptr)
128 return err; 128 return err;
129} 129}
130 130
131static int snd_virmidi_remove(struct platform_device *devptr) 131static int __devexit snd_virmidi_remove(struct platform_device *devptr)
132{ 132{
133 snd_card_free(platform_get_drvdata(devptr)); 133 snd_card_free(platform_get_drvdata(devptr));
134 platform_set_drvdata(devptr, NULL); 134 platform_set_drvdata(devptr, NULL);
@@ -139,7 +139,7 @@ static int snd_virmidi_remove(struct platform_device *devptr)
139 139
140static struct platform_driver snd_virmidi_driver = { 140static struct platform_driver snd_virmidi_driver = {
141 .probe = snd_virmidi_probe, 141 .probe = snd_virmidi_probe,
142 .remove = snd_virmidi_remove, 142 .remove = __devexit_p(snd_virmidi_remove),
143 .driver = { 143 .driver = {
144 .name = SND_VIRMIDI_DRIVER 144 .name = SND_VIRMIDI_DRIVER
145 }, 145 },
diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c
index 99908e44124d..74e501dea8b1 100644
--- a/sound/isa/ad1848/ad1848.c
+++ b/sound/isa/ad1848/ad1848.c
@@ -65,7 +65,7 @@ MODULE_PARM_DESC(thinkpad, "Enable only for the onboard CS4248 of IBM Thinkpad 3
65static struct platform_device *devices[SNDRV_CARDS]; 65static struct platform_device *devices[SNDRV_CARDS];
66 66
67 67
68static int __init snd_ad1848_probe(struct platform_device *pdev) 68static int __devinit snd_ad1848_probe(struct platform_device *pdev)
69{ 69{
70 int dev = pdev->id; 70 int dev = pdev->id;
71 struct snd_card *card; 71 struct snd_card *card;
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index d1f6dfcec46e..c09a8009d2fa 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -574,7 +574,7 @@ static int __devinit snd_cmi8330_nonpnp_probe(struct platform_device *pdev)
574 return 0; 574 return 0;
575} 575}
576 576
577static int snd_cmi8330_nonpnp_remove(struct platform_device *devptr) 577static int __devexit snd_cmi8330_nonpnp_remove(struct platform_device *devptr)
578{ 578{
579 snd_card_free(platform_get_drvdata(devptr)); 579 snd_card_free(platform_get_drvdata(devptr));
580 platform_set_drvdata(devptr, NULL); 580 platform_set_drvdata(devptr, NULL);
@@ -597,7 +597,7 @@ static int snd_cmi8330_nonpnp_resume(struct platform_device *dev)
597 597
598static struct platform_driver snd_cmi8330_driver = { 598static struct platform_driver snd_cmi8330_driver = {
599 .probe = snd_cmi8330_nonpnp_probe, 599 .probe = snd_cmi8330_nonpnp_probe,
600 .remove = snd_cmi8330_nonpnp_remove, 600 .remove = __devexit_p(snd_cmi8330_nonpnp_remove),
601#ifdef CONFIG_PM 601#ifdef CONFIG_PM
602 .suspend = snd_cmi8330_nonpnp_suspend, 602 .suspend = snd_cmi8330_nonpnp_suspend,
603 .resume = snd_cmi8330_nonpnp_resume, 603 .resume = snd_cmi8330_nonpnp_resume,
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index 7f29f56e405b..65f97ff4eef1 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -73,7 +73,7 @@ static struct platform_device *devices[SNDRV_CARDS];
73 73
74#define PFX "es1688: " 74#define PFX "es1688: "
75 75
76static int __init snd_es1688_probe(struct platform_device *pdev) 76static int __devinit snd_es1688_probe(struct platform_device *pdev)
77{ 77{
78 int dev = pdev->id; 78 int dev = pdev->id;
79 static int possible_irqs[] = {5, 9, 10, 7, -1}; 79 static int possible_irqs[] = {5, 9, 10, 7, -1};
@@ -171,7 +171,7 @@ static int __init snd_es1688_probe(struct platform_device *pdev)
171 return err; 171 return err;
172} 172}
173 173
174static int snd_es1688_remove(struct platform_device *devptr) 174static int __devexit snd_es1688_remove(struct platform_device *devptr)
175{ 175{
176 snd_card_free(platform_get_drvdata(devptr)); 176 snd_card_free(platform_get_drvdata(devptr));
177 platform_set_drvdata(devptr, NULL); 177 platform_set_drvdata(devptr, NULL);
@@ -182,7 +182,7 @@ static int snd_es1688_remove(struct platform_device *devptr)
182 182
183static struct platform_driver snd_es1688_driver = { 183static struct platform_driver snd_es1688_driver = {
184 .probe = snd_es1688_probe, 184 .probe = snd_es1688_probe,
185 .remove = snd_es1688_remove, 185 .remove = __devexit_p(snd_es1688_remove),
186 /* FIXME: suspend/resume */ 186 /* FIXME: suspend/resume */
187 .driver = { 187 .driver = {
188 .name = ES1688_DRIVER 188 .name = ES1688_DRIVER
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c
index 37057a37dc30..0395e2e0dd03 100644
--- a/sound/isa/gus/gusclassic.c
+++ b/sound/isa/gus/gusclassic.c
@@ -76,7 +76,7 @@ static struct platform_device *devices[SNDRV_CARDS];
76 76
77#define PFX "gusclassic: " 77#define PFX "gusclassic: "
78 78
79static int __init snd_gusclassic_detect(struct snd_gus_card * gus) 79static int __devinit snd_gusclassic_detect(struct snd_gus_card * gus)
80{ 80{
81 unsigned char d; 81 unsigned char d;
82 82
@@ -95,7 +95,7 @@ static int __init snd_gusclassic_detect(struct snd_gus_card * gus)
95 return 0; 95 return 0;
96} 96}
97 97
98static void __init snd_gusclassic_init(int dev, struct snd_gus_card * gus) 98static void __devinit snd_gusclassic_init(int dev, struct snd_gus_card * gus)
99{ 99{
100 gus->equal_irq = 0; 100 gus->equal_irq = 0;
101 gus->codec_flag = 0; 101 gus->codec_flag = 0;
@@ -103,7 +103,7 @@ static void __init snd_gusclassic_init(int dev, struct snd_gus_card * gus)
103 gus->joystick_dac = joystick_dac[dev]; 103 gus->joystick_dac = joystick_dac[dev];
104} 104}
105 105
106static int __init snd_gusclassic_probe(struct platform_device *pdev) 106static int __devinit snd_gusclassic_probe(struct platform_device *pdev)
107{ 107{
108 int dev = pdev->id; 108 int dev = pdev->id;
109 static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, 4, -1}; 109 static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, 4, -1};
@@ -211,7 +211,7 @@ static int __init snd_gusclassic_probe(struct platform_device *pdev)
211 return err; 211 return err;
212} 212}
213 213
214static int snd_gusclassic_remove(struct platform_device *devptr) 214static int __devexit snd_gusclassic_remove(struct platform_device *devptr)
215{ 215{
216 snd_card_free(platform_get_drvdata(devptr)); 216 snd_card_free(platform_get_drvdata(devptr));
217 platform_set_drvdata(devptr, NULL); 217 platform_set_drvdata(devptr, NULL);
@@ -222,7 +222,7 @@ static int snd_gusclassic_remove(struct platform_device *devptr)
222 222
223static struct platform_driver snd_gusclassic_driver = { 223static struct platform_driver snd_gusclassic_driver = {
224 .probe = snd_gusclassic_probe, 224 .probe = snd_gusclassic_probe,
225 .remove = snd_gusclassic_remove, 225 .remove = __devexit_p(snd_gusclassic_remove),
226 /* FIXME: suspend/resume */ 226 /* FIXME: suspend/resume */
227 .driver = { 227 .driver = {
228 .name = GUSCLASSIC_DRIVER 228 .name = GUSCLASSIC_DRIVER
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c
index 532c56e35ca4..4f55fc3e66c1 100644
--- a/sound/isa/gus/gusextreme.c
+++ b/sound/isa/gus/gusextreme.c
@@ -92,7 +92,7 @@ static struct platform_device *devices[SNDRV_CARDS];
92 92
93#define PFX "gusextreme: " 93#define PFX "gusextreme: "
94 94
95static int __init snd_gusextreme_detect(int dev, 95static int __devinit snd_gusextreme_detect(int dev,
96 struct snd_card *card, 96 struct snd_card *card,
97 struct snd_gus_card * gus, 97 struct snd_gus_card * gus,
98 struct snd_es1688 *es1688) 98 struct snd_es1688 *es1688)
@@ -142,12 +142,12 @@ static int __init snd_gusextreme_detect(int dev,
142 return 0; 142 return 0;
143} 143}
144 144
145static void __init snd_gusextreme_init(int dev, struct snd_gus_card * gus) 145static void __devinit snd_gusextreme_init(int dev, struct snd_gus_card * gus)
146{ 146{
147 gus->joystick_dac = joystick_dac[dev]; 147 gus->joystick_dac = joystick_dac[dev];
148} 148}
149 149
150static int __init snd_gusextreme_mixer(struct snd_es1688 *chip) 150static int __devinit snd_gusextreme_mixer(struct snd_es1688 *chip)
151{ 151{
152 struct snd_card *card = chip->card; 152 struct snd_card *card = chip->card;
153 struct snd_ctl_elem_id id1, id2; 153 struct snd_ctl_elem_id id1, id2;
@@ -169,7 +169,7 @@ static int __init snd_gusextreme_mixer(struct snd_es1688 *chip)
169 return 0; 169 return 0;
170} 170}
171 171
172static int __init snd_gusextreme_probe(struct platform_device *pdev) 172static int __devinit snd_gusextreme_probe(struct platform_device *pdev)
173{ 173{
174 int dev = pdev->id; 174 int dev = pdev->id;
175 static int possible_ess_irqs[] = {5, 9, 10, 7, -1}; 175 static int possible_ess_irqs[] = {5, 9, 10, 7, -1};
@@ -321,7 +321,7 @@ static int __init snd_gusextreme_probe(struct platform_device *pdev)
321 return err; 321 return err;
322} 322}
323 323
324static int snd_gusextreme_remove(struct platform_device *devptr) 324static int __devexit snd_gusextreme_remove(struct platform_device *devptr)
325{ 325{
326 snd_card_free(platform_get_drvdata(devptr)); 326 snd_card_free(platform_get_drvdata(devptr));
327 platform_set_drvdata(devptr, NULL); 327 platform_set_drvdata(devptr, NULL);
@@ -332,7 +332,7 @@ static int snd_gusextreme_remove(struct platform_device *devptr)
332 332
333static struct platform_driver snd_gusextreme_driver = { 333static struct platform_driver snd_gusextreme_driver = {
334 .probe = snd_gusextreme_probe, 334 .probe = snd_gusextreme_probe,
335 .remove = snd_gusextreme_remove, 335 .remove = __devexit_p(snd_gusextreme_remove),
336 /* FIXME: suspend/resume */ 336 /* FIXME: suspend/resume */
337 .driver = { 337 .driver = {
338 .name = GUSEXTREME_DRIVER 338 .name = GUSEXTREME_DRIVER
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
index c1c69e3cbfd0..d1ad90ca035d 100644
--- a/sound/isa/gus/gusmax.c
+++ b/sound/isa/gus/gusmax.c
@@ -85,7 +85,7 @@ struct snd_gusmax {
85 85
86#define PFX "gusmax: " 86#define PFX "gusmax: "
87 87
88static int __init snd_gusmax_detect(struct snd_gus_card * gus) 88static int __devinit snd_gusmax_detect(struct snd_gus_card * gus)
89{ 89{
90 unsigned char d; 90 unsigned char d;
91 91
@@ -127,7 +127,8 @@ static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id)
127 return IRQ_RETVAL(handled); 127 return IRQ_RETVAL(handled);
128} 128}
129 129
130static void __init snd_gusmax_init(int dev, struct snd_card *card, struct snd_gus_card * gus) 130static void __devinit snd_gusmax_init(int dev, struct snd_card *card,
131 struct snd_gus_card * gus)
131{ 132{
132 gus->equal_irq = 1; 133 gus->equal_irq = 1;
133 gus->codec_flag = 1; 134 gus->codec_flag = 1;
@@ -145,7 +146,7 @@ static void __init snd_gusmax_init(int dev, struct snd_card *card, struct snd_gu
145#define CS4231_PRIVATE( left, right, shift, mute ) \ 146#define CS4231_PRIVATE( left, right, shift, mute ) \
146 ((left << 24)|(right << 16)|(shift<<8)|mute) 147 ((left << 24)|(right << 16)|(shift<<8)|mute)
147 148
148static int __init snd_gusmax_mixer(struct snd_cs4231 *chip) 149static int __devinit snd_gusmax_mixer(struct snd_cs4231 *chip)
149{ 150{
150 struct snd_card *card = chip->card; 151 struct snd_card *card = chip->card;
151 struct snd_ctl_elem_id id1, id2; 152 struct snd_ctl_elem_id id1, id2;
@@ -204,7 +205,7 @@ static void snd_gusmax_free(struct snd_card *card)
204 free_irq(maxcard->irq, (void *)maxcard); 205 free_irq(maxcard->irq, (void *)maxcard);
205} 206}
206 207
207static int __init snd_gusmax_probe(struct platform_device *pdev) 208static int __devinit snd_gusmax_probe(struct platform_device *pdev)
208{ 209{
209 int dev = pdev->id; 210 int dev = pdev->id;
210 static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1}; 211 static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
@@ -348,7 +349,7 @@ static int __init snd_gusmax_probe(struct platform_device *pdev)
348 return err; 349 return err;
349} 350}
350 351
351static int snd_gusmax_remove(struct platform_device *devptr) 352static int __devexit snd_gusmax_remove(struct platform_device *devptr)
352{ 353{
353 snd_card_free(platform_get_drvdata(devptr)); 354 snd_card_free(platform_get_drvdata(devptr));
354 platform_set_drvdata(devptr, NULL); 355 platform_set_drvdata(devptr, NULL);
@@ -359,7 +360,7 @@ static int snd_gusmax_remove(struct platform_device *devptr)
359 360
360static struct platform_driver snd_gusmax_driver = { 361static struct platform_driver snd_gusmax_driver = {
361 .probe = snd_gusmax_probe, 362 .probe = snd_gusmax_probe,
362 .remove = snd_gusmax_remove, 363 .remove = __devexit_p(snd_gusmax_remove),
363 /* FIXME: suspend/resume */ 364 /* FIXME: suspend/resume */
364 .driver = { 365 .driver = {
365 .name = GUSMAX_DRIVER 366 .name = GUSMAX_DRIVER
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index 1e30713d2cad..f3db686b1c0c 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -919,7 +919,7 @@ static int __devinit snd_opl3sa2_nonpnp_probe(struct platform_device *pdev)
919 return 0; 919 return 0;
920} 920}
921 921
922static int snd_opl3sa2_nonpnp_remove(struct platform_device *devptr) 922static int __devexit snd_opl3sa2_nonpnp_remove(struct platform_device *devptr)
923{ 923{
924 snd_card_free(platform_get_drvdata(devptr)); 924 snd_card_free(platform_get_drvdata(devptr));
925 platform_set_drvdata(devptr, NULL); 925 platform_set_drvdata(devptr, NULL);
@@ -942,7 +942,7 @@ static int snd_opl3sa2_nonpnp_resume(struct platform_device *dev)
942 942
943static struct platform_driver snd_opl3sa2_nonpnp_driver = { 943static struct platform_driver snd_opl3sa2_nonpnp_driver = {
944 .probe = snd_opl3sa2_nonpnp_probe, 944 .probe = snd_opl3sa2_nonpnp_probe,
945 .remove = snd_opl3sa2_nonpnp_remove, 945 .remove = __devexit( snd_opl3sa2_nonpnp_remove),
946#ifdef CONFIG_PM 946#ifdef CONFIG_PM
947 .suspend = snd_opl3sa2_nonpnp_suspend, 947 .suspend = snd_opl3sa2_nonpnp_suspend,
948 .resume = snd_opl3sa2_nonpnp_resume, 948 .resume = snd_opl3sa2_nonpnp_resume,
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index 268ebd34703e..be1e83e6dea3 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -83,7 +83,7 @@ static void snd_sb8_free(struct snd_card *card)
83 release_and_free_resource(acard->fm_res); 83 release_and_free_resource(acard->fm_res);
84} 84}
85 85
86static int __init snd_sb8_probe(struct platform_device *pdev) 86static int __devinit snd_sb8_probe(struct platform_device *pdev)
87{ 87{
88 int dev = pdev->id; 88 int dev = pdev->id;
89 struct snd_sb *chip; 89 struct snd_sb *chip;
@@ -193,7 +193,7 @@ static int __init snd_sb8_probe(struct platform_device *pdev)
193 return err; 193 return err;
194} 194}
195 195
196static int snd_sb8_remove(struct platform_device *pdev) 196static int __devexit snd_sb8_remove(struct platform_device *pdev)
197{ 197{
198 snd_card_free(platform_get_drvdata(pdev)); 198 snd_card_free(platform_get_drvdata(pdev));
199 platform_set_drvdata(pdev, NULL); 199 platform_set_drvdata(pdev, NULL);
@@ -230,7 +230,7 @@ static int snd_sb8_resume(struct platform_device *dev)
230 230
231static struct platform_driver snd_sb8_driver = { 231static struct platform_driver snd_sb8_driver = {
232 .probe = snd_sb8_probe, 232 .probe = snd_sb8_probe,
233 .remove = snd_sb8_remove, 233 .remove = __devexit_p(snd_sb8_remove),
234#ifdef CONFIG_PM 234#ifdef CONFIG_PM
235 .suspend = snd_sb8_suspend, 235 .suspend = snd_sb8_suspend,
236 .resume = snd_sb8_resume, 236 .resume = snd_sb8_resume,
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 74ed81081478..a9eec2a2357d 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -143,6 +143,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
143{ 0x43525970, 0xfffffff8, "CS4202", NULL, NULL }, 143{ 0x43525970, 0xfffffff8, "CS4202", NULL, NULL },
144{ 0x43585421, 0xffffffff, "HSD11246", NULL, NULL }, // SmartMC II 144{ 0x43585421, 0xffffffff, "HSD11246", NULL, NULL }, // SmartMC II
145{ 0x43585428, 0xfffffff8, "Cx20468", patch_conexant, NULL }, // SmartAMC fixme: the mask might be different 145{ 0x43585428, 0xfffffff8, "Cx20468", patch_conexant, NULL }, // SmartAMC fixme: the mask might be different
146{ 0x43585431, 0xffffffff, "Cx20551", patch_cx20551, NULL },
146{ 0x44543031, 0xfffffff0, "DT0398", NULL, NULL }, 147{ 0x44543031, 0xfffffff0, "DT0398", NULL, NULL },
147{ 0x454d4328, 0xffffffff, "EM28028", NULL, NULL }, // same as TR28028? 148{ 0x454d4328, 0xffffffff, "EM28028", NULL, NULL }, // same as TR28028?
148{ 0x45838308, 0xffffffff, "ESS1988", NULL, NULL }, 149{ 0x45838308, 0xffffffff, "ESS1988", NULL, NULL },
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 641d0c8d659e..bfc2fed16da3 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -1338,6 +1338,12 @@ int patch_conexant(struct snd_ac97 * ac97)
1338 return 0; 1338 return 0;
1339} 1339}
1340 1340
1341int patch_cx20551(struct snd_ac97 *ac97)
1342{
1343 snd_ac97_update_bits(ac97, 0x5c, 0x01, 0x01);
1344 return 0;
1345}
1346
1341/* 1347/*
1342 * Analog Device AD18xx, AD19xx codecs 1348 * Analog Device AD18xx, AD19xx codecs
1343 */ 1349 */
diff --git a/sound/pci/ac97/ac97_patch.h b/sound/pci/ac97/ac97_patch.h
index 94340daaaf1f..555d1c9a98fd 100644
--- a/sound/pci/ac97/ac97_patch.h
+++ b/sound/pci/ac97/ac97_patch.h
@@ -39,6 +39,7 @@ int patch_sigmatel_stac9758(struct snd_ac97 * ac97);
39int patch_cirrus_cs4299(struct snd_ac97 * ac97); 39int patch_cirrus_cs4299(struct snd_ac97 * ac97);
40int patch_cirrus_spdif(struct snd_ac97 * ac97); 40int patch_cirrus_spdif(struct snd_ac97 * ac97);
41int patch_conexant(struct snd_ac97 * ac97); 41int patch_conexant(struct snd_ac97 * ac97);
42int patch_cx20551(struct snd_ac97 * ac97);
42int patch_ad1819(struct snd_ac97 * ac97); 43int patch_ad1819(struct snd_ac97 * ac97);
43int patch_ad1881(struct snd_ac97 * ac97); 44int patch_ad1881(struct snd_ac97 * ac97);
44int patch_ad1885(struct snd_ac97 * ac97); 45int patch_ad1885(struct snd_ac97 * ac97);
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 73f4668238c6..23a1c75085b5 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -57,6 +57,7 @@ struct conexant_spec {
57 * dig_out_nid and hp_nid are optional 57 * dig_out_nid and hp_nid are optional
58 */ 58 */
59 unsigned int cur_eapd; 59 unsigned int cur_eapd;
60 unsigned int hp_present;
60 unsigned int need_dac_fix; 61 unsigned int need_dac_fix;
61 62
62 /* capture */ 63 /* capture */
@@ -354,7 +355,7 @@ static struct hda_codec_ops conexant_patch_ops = {
354 * the private value = nid | (invert << 8) 355 * the private value = nid | (invert << 8)
355 */ 356 */
356 357
357static int conexant_eapd_info(struct snd_kcontrol *kcontrol, 358static int cxt_eapd_info(struct snd_kcontrol *kcontrol,
358 struct snd_ctl_elem_info *uinfo) 359 struct snd_ctl_elem_info *uinfo)
359{ 360{
360 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 361 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
@@ -364,7 +365,7 @@ static int conexant_eapd_info(struct snd_kcontrol *kcontrol,
364 return 0; 365 return 0;
365} 366}
366 367
367static int conexant_eapd_get(struct snd_kcontrol *kcontrol, 368static int cxt_eapd_get(struct snd_kcontrol *kcontrol,
368 struct snd_ctl_elem_value *ucontrol) 369 struct snd_ctl_elem_value *ucontrol)
369{ 370{
370 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 371 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
@@ -375,9 +376,10 @@ static int conexant_eapd_get(struct snd_kcontrol *kcontrol,
375 else 376 else
376 ucontrol->value.integer.value[0] = spec->cur_eapd; 377 ucontrol->value.integer.value[0] = spec->cur_eapd;
377 return 0; 378 return 0;
379
378} 380}
379 381
380static int conexant_eapd_put(struct snd_kcontrol *kcontrol, 382static int cxt_eapd_put(struct snd_kcontrol *kcontrol,
381 struct snd_ctl_elem_value *ucontrol) 383 struct snd_ctl_elem_value *ucontrol)
382{ 384{
383 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 385 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
@@ -385,11 +387,13 @@ static int conexant_eapd_put(struct snd_kcontrol *kcontrol,
385 int invert = (kcontrol->private_value >> 8) & 1; 387 int invert = (kcontrol->private_value >> 8) & 1;
386 hda_nid_t nid = kcontrol->private_value & 0xff; 388 hda_nid_t nid = kcontrol->private_value & 0xff;
387 unsigned int eapd; 389 unsigned int eapd;
390
388 eapd = ucontrol->value.integer.value[0]; 391 eapd = ucontrol->value.integer.value[0];
389 if (invert) 392 if (invert)
390 eapd = !eapd; 393 eapd = !eapd;
391 if (eapd == spec->cur_eapd && !codec->in_resume) 394 if (eapd == spec->cur_eapd && !codec->in_resume)
392 return 0; 395 return 0;
396
393 spec->cur_eapd = eapd; 397 spec->cur_eapd = eapd;
394 snd_hda_codec_write(codec, nid, 398 snd_hda_codec_write(codec, nid,
395 0, AC_VERB_SET_EAPD_BTLENABLE, 399 0, AC_VERB_SET_EAPD_BTLENABLE,
@@ -400,6 +404,15 @@ static int conexant_eapd_put(struct snd_kcontrol *kcontrol,
400/* controls for test mode */ 404/* controls for test mode */
401#ifdef CONFIG_SND_DEBUG 405#ifdef CONFIG_SND_DEBUG
402 406
407#define CXT_EAPD_SWITCH(xname, nid, mask) \
408 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = 0, \
409 .info = cxt_eapd_info, \
410 .get = cxt_eapd_get, \
411 .put = cxt_eapd_put, \
412 .private_value = nid | (mask<<16) }
413
414
415
403static int conexant_ch_mode_info(struct snd_kcontrol *kcontrol, 416static int conexant_ch_mode_info(struct snd_kcontrol *kcontrol,
404 struct snd_ctl_elem_info *uinfo) 417 struct snd_ctl_elem_info *uinfo)
405{ 418{
@@ -492,7 +505,7 @@ static int cxt_gpio_data_put(struct snd_kcontrol *kcontrol,
492 .get = cxt_gpio_data_get, \ 505 .get = cxt_gpio_data_get, \
493 .put = cxt_gpio_data_put, \ 506 .put = cxt_gpio_data_put, \
494 .private_value = nid | (mask<<16) } 507 .private_value = nid | (mask<<16) }
495 508#if 0
496static int cxt_spdif_ctrl_info(struct snd_kcontrol *kcontrol, 509static int cxt_spdif_ctrl_info(struct snd_kcontrol *kcontrol,
497 struct snd_ctl_elem_info *uinfo) 510 struct snd_ctl_elem_info *uinfo)
498{ 511{
@@ -547,7 +560,7 @@ static int cxt_spdif_ctrl_put(struct snd_kcontrol *kcontrol,
547 .get = cxt_spdif_ctrl_get, \ 560 .get = cxt_spdif_ctrl_get, \
548 .put = cxt_spdif_ctrl_put, \ 561 .put = cxt_spdif_ctrl_put, \
549 .private_value = nid | (mask<<16) } 562 .private_value = nid | (mask<<16) }
550 563#endif
551#endif /* CONFIG_SND_DEBUG */ 564#endif /* CONFIG_SND_DEBUG */
552 565
553/* Conexant 5045 specific */ 566/* Conexant 5045 specific */
@@ -564,7 +577,7 @@ static struct hda_channel_mode cxt5045_modes[1] = {
564static struct hda_input_mux cxt5045_capture_source = { 577static struct hda_input_mux cxt5045_capture_source = {
565 .num_items = 2, 578 .num_items = 2,
566 .items = { 579 .items = {
567 { "ExtMic", 0x1 }, 580 { "IntMic", 0x1 },
568 { "LineIn", 0x2 }, 581 { "LineIn", 0x2 },
569 } 582 }
570}; 583};
@@ -575,15 +588,20 @@ static int cxt5045_hp_master_sw_put(struct snd_kcontrol *kcontrol,
575{ 588{
576 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 589 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
577 struct conexant_spec *spec = codec->spec; 590 struct conexant_spec *spec = codec->spec;
591 unsigned int bits;
578 592
579 if (!conexant_eapd_put(kcontrol, ucontrol)) 593 if (!cxt_eapd_put(kcontrol, ucontrol))
580 return 0; 594 return 0;
581 595
582 /* toggle HP mute appropriately */ 596 /* toggle internal speakers mute depending of presence of
583 snd_hda_codec_amp_update(codec, 0x11, 0, HDA_OUTPUT, 0, 597 * the headphone jack
584 0x80, spec->cur_eapd ? 0 : 0x80); 598 */
585 snd_hda_codec_amp_update(codec, 0x11, 1, HDA_OUTPUT, 0, 599 bits = (!spec->hp_present && spec->cur_eapd) ? 0 : 0x80;
586 0x80, spec->cur_eapd ? 0 : 0x80); 600 snd_hda_codec_amp_update(codec, 0x10, 0, HDA_OUTPUT, 0, 0x80, bits);
601 snd_hda_codec_amp_update(codec, 0x10, 1, HDA_OUTPUT, 0, 0x80, bits);
602 bits = spec->cur_eapd ? 0 : 0x80;
603 snd_hda_codec_amp_update(codec, 0x11, 0, HDA_OUTPUT, 0, 0x80, bits);
604 snd_hda_codec_amp_update(codec, 0x11, 1, HDA_OUTPUT, 0, 0x80, bits);
587 return 1; 605 return 1;
588} 606}
589 607
@@ -610,14 +628,13 @@ static int cxt5045_hp_master_vol_put(struct snd_kcontrol *kcontrol,
610/* mute internal speaker if HP is plugged */ 628/* mute internal speaker if HP is plugged */
611static void cxt5045_hp_automute(struct hda_codec *codec) 629static void cxt5045_hp_automute(struct hda_codec *codec)
612{ 630{
613 unsigned int present; 631 struct conexant_spec *spec = codec->spec;
632 unsigned int bits = (spec->hp_present || !spec->cur_eapd) ? 0x80 : 0;
614 633
615 present = snd_hda_codec_read(codec, 0x11, 0, 634 spec->hp_present = snd_hda_codec_read(codec, 0x11, 0,
616 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; 635 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
617 snd_hda_codec_amp_update(codec, 0x10, 0, HDA_OUTPUT, 0, 636 snd_hda_codec_amp_update(codec, 0x10, 0, HDA_OUTPUT, 0, 0x80, bits);
618 0x80, present ? 0x80 : 0); 637 snd_hda_codec_amp_update(codec, 0x10, 1, HDA_OUTPUT, 0, 0x80, bits);
619 snd_hda_codec_amp_update(codec, 0x10, 1, HDA_OUTPUT, 0,
620 0x80, present ? 0x80 : 0);
621} 638}
622 639
623/* unsolicited event for HP jack sensing */ 640/* unsolicited event for HP jack sensing */
@@ -640,25 +657,27 @@ static struct snd_kcontrol_new cxt5045_mixers[] = {
640 .get = conexant_mux_enum_get, 657 .get = conexant_mux_enum_get,
641 .put = conexant_mux_enum_put 658 .put = conexant_mux_enum_put
642 }, 659 },
643 HDA_CODEC_VOLUME("Mic Bypass Capture Volume", 0x17, 0x02, HDA_INPUT), 660 HDA_CODEC_VOLUME("Int Mic Volume", 0x17, 0x01, HDA_INPUT),
644 HDA_CODEC_MUTE("Mic Bypass Capture Switch", 0x17, 0x02, HDA_INPUT), 661 HDA_CODEC_MUTE("Int Mic Switch", 0x17, 0x01, HDA_INPUT),
645 HDA_CODEC_VOLUME("Capture Volume", 0x1a, 0x02, HDA_INPUT), 662 HDA_CODEC_VOLUME("Ext Mic Volume", 0x17, 0x02, HDA_INPUT),
646 HDA_CODEC_MUTE("Capture Switch", 0x1a, 0x02, HDA_INPUT), 663 HDA_CODEC_MUTE("Ext Mic Switch", 0x17, 0x02, HDA_INPUT),
664 HDA_CODEC_VOLUME("Capture Volume", 0x1a, 0x0, HDA_INPUT),
665 HDA_CODEC_MUTE("Capture Switch", 0x1a, 0x0, HDA_INPUT),
647 { 666 {
648 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 667 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
649 .name = "Master Playback Volume", 668 .name = "Master Playback Volume",
650 .info = snd_hda_mixer_amp_volume_info, 669 .info = snd_hda_mixer_amp_volume_info,
651 .get = snd_hda_mixer_amp_volume_get, 670 .get = snd_hda_mixer_amp_volume_get,
652 .put = cxt5045_hp_master_vol_put, 671 .put = cxt5045_hp_master_vol_put,
653 .private_value = HDA_COMPOSE_AMP_VAL(0x11, 3, 0, HDA_OUTPUT), 672 .private_value = HDA_COMPOSE_AMP_VAL(0x10, 3, 0, HDA_OUTPUT),
654 }, 673 },
655 { 674 {
656 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 675 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
657 .name = "Master Playback Switch", 676 .name = "Master Playback Switch",
658 .info = conexant_eapd_info, 677 .info = cxt_eapd_info,
659 .get = conexant_eapd_get, 678 .get = cxt_eapd_get,
660 .put = cxt5045_hp_master_sw_put, 679 .put = cxt5045_hp_master_sw_put,
661 .private_value = 0x11, 680 .private_value = 0x10,
662 }, 681 },
663 682
664 {} 683 {}
@@ -669,22 +688,26 @@ static struct hda_verb cxt5045_init_verbs[] = {
669 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, 688 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
670 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 }, 689 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 },
671 /* HP, Amp */ 690 /* HP, Amp */
672 {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, 691 {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
673 {0x1A, AC_VERB_SET_CONNECT_SEL,0x01}, 692 {0x17, AC_VERB_SET_CONNECT_SEL,0x01},
674 {0x1A, AC_VERB_SET_AMP_GAIN_MUTE, 693 {0x17, AC_VERB_SET_AMP_GAIN_MUTE,
675 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x00}, 694 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x01},
676 {0x1A, AC_VERB_SET_AMP_GAIN_MUTE, 695 {0x17, AC_VERB_SET_AMP_GAIN_MUTE,
696 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x02},
697 {0x17, AC_VERB_SET_AMP_GAIN_MUTE,
677 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x03}, 698 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x03},
678 /* Record selector: Front mic */
679 {0x14, AC_VERB_SET_CONNECT_SEL,0x03},
680 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, 699 {0x17, AC_VERB_SET_AMP_GAIN_MUTE,
700 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x04},
701 /* Record selector: Int mic */
702 {0x1a, AC_VERB_SET_CONNECT_SEL,0x0},
703 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE,
681 AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17}, 704 AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17},
682 /* SPDIF route: PCM */ 705 /* SPDIF route: PCM */
683 { 0x13, AC_VERB_SET_CONNECT_SEL, 0x0 }, 706 { 0x13, AC_VERB_SET_CONNECT_SEL, 0x0 },
684 /* pin sensing on HP and Mic jacks */ 707 /* pin sensing on HP and Mic jacks */
685 {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT}, 708 {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT},
686 /* EAPD */ 709 /* EAPD */
687 {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x0 }, /* default on */ 710 {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2 }, /* default on */
688 { } /* end */ 711 { } /* end */
689}; 712};
690 713
@@ -706,8 +729,6 @@ static struct hda_input_mux cxt5045_test_capture_source = {
706static struct snd_kcontrol_new cxt5045_test_mixer[] = { 729static struct snd_kcontrol_new cxt5045_test_mixer[] = {
707 730
708 /* Output controls */ 731 /* Output controls */
709 HDA_CODEC_VOLUME("OutAmp-1 Volume", 0x19, 0x00, HDA_OUTPUT),
710 HDA_CODEC_MUTE("OutAmp-1 Switch", 0x19,0x00, HDA_OUTPUT),
711 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x10, 0x0, HDA_OUTPUT), 732 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x10, 0x0, HDA_OUTPUT),
712 HDA_CODEC_MUTE("Speaker Playback Switch", 0x10, 0x0, HDA_OUTPUT), 733 HDA_CODEC_MUTE("Speaker Playback Switch", 0x10, 0x0, HDA_OUTPUT),
713 734
@@ -715,6 +736,9 @@ static struct snd_kcontrol_new cxt5045_test_mixer[] = {
715 CXT_PIN_MODE("HP-OUT pin mode", 0x11, CXT_PIN_DIR_INOUT), 736 CXT_PIN_MODE("HP-OUT pin mode", 0x11, CXT_PIN_DIR_INOUT),
716 CXT_PIN_MODE("LINE1 pin mode", 0x12, CXT_PIN_DIR_INOUT), 737 CXT_PIN_MODE("LINE1 pin mode", 0x12, CXT_PIN_DIR_INOUT),
717 738
739 /* EAPD Switch Control */
740 CXT_EAPD_SWITCH("External Amplifier", 0x10, 0x0),
741
718 /* Loopback mixer controls */ 742 /* Loopback mixer controls */
719 HDA_CODEC_VOLUME("MIC1 Playback Volume", 0x17, 0x01, HDA_INPUT), 743 HDA_CODEC_VOLUME("MIC1 Playback Volume", 0x17, 0x01, HDA_INPUT),
720 HDA_CODEC_MUTE("MIC1 Playback Switch", 0x17, 0x01, HDA_INPUT), 744 HDA_CODEC_MUTE("MIC1 Playback Switch", 0x17, 0x01, HDA_INPUT),
@@ -725,17 +749,16 @@ static struct snd_kcontrol_new cxt5045_test_mixer[] = {
725 HDA_CODEC_VOLUME("CD Playback Volume", 0x17, 0x04, HDA_INPUT), 749 HDA_CODEC_VOLUME("CD Playback Volume", 0x17, 0x04, HDA_INPUT),
726 HDA_CODEC_MUTE("CD Playback Switch", 0x17, 0x04, HDA_INPUT), 750 HDA_CODEC_MUTE("CD Playback Switch", 0x17, 0x04, HDA_INPUT),
727 751
728 /* Controls for GPIO pins, assuming they exist and are configured as outputs */ 752 HDA_CODEC_VOLUME("Capture-1 Volume", 0x17, 0x0, HDA_INPUT),
729 CXT_GPIO_DATA_SWITCH("GPIO pin 0", 0x01, 0x01), 753 HDA_CODEC_MUTE("Capture-1 Switch", 0x17, 0x0, HDA_INPUT),
730#if 0 /* limit this to one GPIO pin for now */ 754 HDA_CODEC_VOLUME("Capture-2 Volume", 0x17, 0x1, HDA_INPUT),
731 CXT_GPIO_DATA_SWITCH("GPIO pin 1", 0x01, 0x02), 755 HDA_CODEC_MUTE("Capture-2 Switch", 0x17, 0x1, HDA_INPUT),
732 CXT_GPIO_DATA_SWITCH("GPIO pin 2", 0x01, 0x04), 756 HDA_CODEC_VOLUME("Capture-3 Volume", 0x17, 0x2, HDA_INPUT),
733 CXT_GPIO_DATA_SWITCH("GPIO pin 3", 0x01, 0x08), 757 HDA_CODEC_MUTE("Capture-3 Switch", 0x17, 0x2, HDA_INPUT),
734#endif 758 HDA_CODEC_VOLUME("Capture-4 Volume", 0x17, 0x3, HDA_INPUT),
735 CXT_SPDIF_CTRL_SWITCH("SPDIF Playback Switch", 0x13, 0x01), 759 HDA_CODEC_MUTE("Capture-4 Switch", 0x17, 0x3, HDA_INPUT),
736 760 HDA_CODEC_VOLUME("Capture-5 Volume", 0x17, 0x4, HDA_INPUT),
737 HDA_CODEC_VOLUME("Capture Volume", 0x17, 0x0, HDA_OUTPUT), 761 HDA_CODEC_MUTE("Capture-5 Switch", 0x17, 0x4, HDA_INPUT),
738 HDA_CODEC_MUTE("Capture Switch", 0x17, 0x0, HDA_OUTPUT),
739 { 762 {
740 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 763 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
741 .name = "Input Source", 764 .name = "Input Source",
@@ -748,14 +771,9 @@ static struct snd_kcontrol_new cxt5045_test_mixer[] = {
748}; 771};
749 772
750static struct hda_verb cxt5045_test_init_verbs[] = { 773static struct hda_verb cxt5045_test_init_verbs[] = {
751 /* Enable all GPIOs as outputs with an initial value of 0 */
752 {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x0f},
753 {0x01, AC_VERB_SET_GPIO_DATA, 0x00},
754 {0x01, AC_VERB_SET_GPIO_MASK, 0x0f},
755
756 /* Enable retasking pins as output, initially without power amp */ 774 /* Enable retasking pins as output, initially without power amp */
757 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 775 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
758 {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 776 {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
759 777
760 /* Disable digital (SPDIF) pins initially, but users can enable 778 /* Disable digital (SPDIF) pins initially, but users can enable
761 * them via a mixer switch. In the case of SPDIF-out, this initverb 779 * them via a mixer switch. In the case of SPDIF-out, this initverb
@@ -823,6 +841,8 @@ static const char *cxt5045_models[CXT5045_MODELS] = {
823 841
824static struct snd_pci_quirk cxt5045_cfg_tbl[] = { 842static struct snd_pci_quirk cxt5045_cfg_tbl[] = {
825 SND_PCI_QUIRK(0x103c, 0x30b7, "HP DV6000Z", CXT5045_LAPTOP), 843 SND_PCI_QUIRK(0x103c, 0x30b7, "HP DV6000Z", CXT5045_LAPTOP),
844 SND_PCI_QUIRK(0x103c, 0x30bb, "HP DV8000", CXT5045_LAPTOP),
845 SND_PCI_QUIRK(0x1734, 0x10ad, "Fujitsu Si1520", CXT5045_LAPTOP),
826 {} 846 {}
827}; 847};
828 848
@@ -880,11 +900,11 @@ static int patch_cxt5045(struct hda_codec *codec)
880 900
881 901
882/* Conexant 5047 specific */ 902/* Conexant 5047 specific */
903#define CXT5047_SPDIF_OUT 0x11
883 904
884static hda_nid_t cxt5047_dac_nids[1] = { 0x10 }; 905static hda_nid_t cxt5047_dac_nids[2] = { 0x10, 0x1c };
885static hda_nid_t cxt5047_adc_nids[1] = { 0x12 }; 906static hda_nid_t cxt5047_adc_nids[1] = { 0x12 };
886static hda_nid_t cxt5047_capsrc_nids[1] = { 0x1a }; 907static hda_nid_t cxt5047_capsrc_nids[1] = { 0x1a };
887#define CXT5047_SPDIF_OUT 0x11
888 908
889static struct hda_channel_mode cxt5047_modes[1] = { 909static struct hda_channel_mode cxt5047_modes[1] = {
890 { 2, NULL }, 910 { 2, NULL },
@@ -893,15 +913,23 @@ static struct hda_channel_mode cxt5047_modes[1] = {
893static struct hda_input_mux cxt5047_capture_source = { 913static struct hda_input_mux cxt5047_capture_source = {
894 .num_items = 2, 914 .num_items = 2,
895 .items = { 915 .items = {
896 { "ExtMic", 0x1 }, 916 { "ExtMic", 0x0 },
897 { "IntMic", 0x2 }, 917 { "IntMic", 0x1 },
898 } 918 }
899}; 919};
900 920
901static struct hda_input_mux cxt5047_hp_capture_source = { 921static struct hda_input_mux cxt5047_hp_capture_source = {
902 .num_items = 1, 922 .num_items = 1,
903 .items = { 923 .items = {
904 { "ExtMic", 0x1 }, 924 { "ExtMic", 0x2 },
925 }
926};
927
928static struct hda_input_mux cxt5047_toshiba_capture_source = {
929 .num_items = 2,
930 .items = {
931 { "ExtMic", 0x2 },
932 { "Line-In", 0x1 },
905 } 933 }
906}; 934};
907 935
@@ -911,20 +939,24 @@ static int cxt5047_hp_master_sw_put(struct snd_kcontrol *kcontrol,
911{ 939{
912 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 940 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
913 struct conexant_spec *spec = codec->spec; 941 struct conexant_spec *spec = codec->spec;
942 unsigned int bits;
914 943
915 if (!conexant_eapd_put(kcontrol, ucontrol)) 944 if (!cxt_eapd_put(kcontrol, ucontrol))
916 return 0; 945 return 0;
917 946
918 /* toggle HP mute appropriately */ 947 /* toggle internal speakers mute depending of presence of
919 snd_hda_codec_amp_update(codec, 0x13, 0, HDA_OUTPUT, 0, 948 * the headphone jack
920 0x80, spec->cur_eapd ? 0 : 0x80); 949 */
921 snd_hda_codec_amp_update(codec, 0x13, 1, HDA_OUTPUT, 0, 950 bits = (!spec->hp_present && spec->cur_eapd) ? 0 : 0x80;
922 0x80, spec->cur_eapd ? 0 : 0x80); 951 snd_hda_codec_amp_update(codec, 0x1d, 0, HDA_OUTPUT, 0, 0x80, bits);
952 snd_hda_codec_amp_update(codec, 0x1d, 1, HDA_OUTPUT, 0, 0x80, bits);
953 bits = spec->cur_eapd ? 0 : 0x80;
954 snd_hda_codec_amp_update(codec, 0x13, 0, HDA_OUTPUT, 0, 0x80, bits);
955 snd_hda_codec_amp_update(codec, 0x13, 1, HDA_OUTPUT, 0, 0x80, bits);
923 return 1; 956 return 1;
924} 957}
925 958
926#if 0 959/* bind volumes of both NID 0x13 (Headphones) and 0x1d (Speakers) */
927/* bind volumes of both NID 0x13 and 0x1d */
928static int cxt5047_hp_master_vol_put(struct snd_kcontrol *kcontrol, 960static int cxt5047_hp_master_vol_put(struct snd_kcontrol *kcontrol,
929 struct snd_ctl_elem_value *ucontrol) 961 struct snd_ctl_elem_value *ucontrol)
930{ 962{
@@ -932,9 +964,9 @@ static int cxt5047_hp_master_vol_put(struct snd_kcontrol *kcontrol,
932 long *valp = ucontrol->value.integer.value; 964 long *valp = ucontrol->value.integer.value;
933 int change; 965 int change;
934 966
935 change = snd_hda_codec_amp_update(codec, 0x1c, 0, HDA_OUTPUT, 0, 967 change = snd_hda_codec_amp_update(codec, 0x1d, 0, HDA_OUTPUT, 0,
936 0x7f, valp[0] & 0x7f); 968 0x7f, valp[0] & 0x7f);
937 change |= snd_hda_codec_amp_update(codec, 0x1c, 1, HDA_OUTPUT, 0, 969 change |= snd_hda_codec_amp_update(codec, 0x1d, 1, HDA_OUTPUT, 0,
938 0x7f, valp[1] & 0x7f); 970 0x7f, valp[1] & 0x7f);
939 snd_hda_codec_amp_update(codec, 0x13, 0, HDA_OUTPUT, 0, 971 snd_hda_codec_amp_update(codec, 0x13, 0, HDA_OUTPUT, 0,
940 0x7f, valp[0] & 0x7f); 972 0x7f, valp[0] & 0x7f);
@@ -942,19 +974,20 @@ static int cxt5047_hp_master_vol_put(struct snd_kcontrol *kcontrol,
942 0x7f, valp[1] & 0x7f); 974 0x7f, valp[1] & 0x7f);
943 return change; 975 return change;
944} 976}
945#endif
946 977
947/* mute internal speaker if HP is plugged */ 978/* mute internal speaker if HP is plugged */
948static void cxt5047_hp_automute(struct hda_codec *codec) 979static void cxt5047_hp_automute(struct hda_codec *codec)
949{ 980{
950 unsigned int present; 981 struct conexant_spec *spec = codec->spec;
982 unsigned int bits = spec->hp_present || !spec->cur_eapd ? 0x80 : 0;
951 983
952 present = snd_hda_codec_read(codec, 0x13, 0, 984 spec->hp_present = snd_hda_codec_read(codec, 0x13, 0,
953 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; 985 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
954 snd_hda_codec_amp_update(codec, 0x1c, 0, HDA_OUTPUT, 0, 986 snd_hda_codec_amp_update(codec, 0x1d, 0, HDA_OUTPUT, 0, 0x80, bits);
955 0x80, present ? 0x80 : 0); 987 snd_hda_codec_amp_update(codec, 0x1d, 1, HDA_OUTPUT, 0, 0x80, bits);
956 snd_hda_codec_amp_update(codec, 0x1c, 1, HDA_OUTPUT, 0, 988 /* Mute/Unmute PCM 2 for good measure - some systems need this */
957 0x80, present ? 0x80 : 0); 989 snd_hda_codec_amp_update(codec, 0x1c, 0, HDA_OUTPUT, 0, 0x80, bits);
990 snd_hda_codec_amp_update(codec, 0x1c, 1, HDA_OUTPUT, 0, 0x80, bits);
958} 991}
959 992
960/* toggle input of built-in and mic jack appropriately */ 993/* toggle input of built-in and mic jack appropriately */
@@ -1009,12 +1042,55 @@ static struct snd_kcontrol_new cxt5047_mixers[] = {
1009 HDA_CODEC_MUTE("Capture Switch", 0x12, 0x03, HDA_INPUT), 1042 HDA_CODEC_MUTE("Capture Switch", 0x12, 0x03, HDA_INPUT),
1010 HDA_CODEC_VOLUME("PCM Volume", 0x10, 0x00, HDA_OUTPUT), 1043 HDA_CODEC_VOLUME("PCM Volume", 0x10, 0x00, HDA_OUTPUT),
1011 HDA_CODEC_MUTE("PCM Switch", 0x10, 0x00, HDA_OUTPUT), 1044 HDA_CODEC_MUTE("PCM Switch", 0x10, 0x00, HDA_OUTPUT),
1012 HDA_CODEC_VOLUME("Master Playback Volume", 0x13, 0x00, HDA_OUTPUT), 1045 HDA_CODEC_VOLUME("PCM-2 Volume", 0x1c, 0x00, HDA_OUTPUT),
1046 HDA_CODEC_MUTE("PCM-2 Switch", 0x1c, 0x00, HDA_OUTPUT),
1047 {
1048 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1049 .name = "Master Playback Volume",
1050 .info = snd_hda_mixer_amp_volume_info,
1051 .get = snd_hda_mixer_amp_volume_get,
1052 .put = cxt5047_hp_master_vol_put,
1053 .private_value = HDA_COMPOSE_AMP_VAL(0x13, 3, 0, HDA_OUTPUT),
1054 },
1013 { 1055 {
1014 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1056 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1015 .name = "Master Playback Switch", 1057 .name = "Master Playback Switch",
1016 .info = conexant_eapd_info, 1058 .info = cxt_eapd_info,
1017 .get = conexant_eapd_get, 1059 .get = cxt_eapd_get,
1060 .put = cxt5047_hp_master_sw_put,
1061 .private_value = 0x13,
1062 },
1063
1064 {}
1065};
1066
1067static struct snd_kcontrol_new cxt5047_toshiba_mixers[] = {
1068 {
1069 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1070 .name = "Capture Source",
1071 .info = conexant_mux_enum_info,
1072 .get = conexant_mux_enum_get,
1073 .put = conexant_mux_enum_put
1074 },
1075 HDA_CODEC_VOLUME("Mic Bypass Capture Volume", 0x19, 0x02, HDA_INPUT),
1076 HDA_CODEC_MUTE("Mic Bypass Capture Switch", 0x19, 0x02, HDA_INPUT),
1077 HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x03, HDA_INPUT),
1078 HDA_CODEC_MUTE("Capture Switch", 0x12, 0x03, HDA_INPUT),
1079 HDA_CODEC_VOLUME("PCM Volume", 0x10, 0x00, HDA_OUTPUT),
1080 HDA_CODEC_MUTE("PCM Switch", 0x10, 0x00, HDA_OUTPUT),
1081 {
1082 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1083 .name = "Master Playback Volume",
1084 .info = snd_hda_mixer_amp_volume_info,
1085 .get = snd_hda_mixer_amp_volume_get,
1086 .put = cxt5047_hp_master_vol_put,
1087 .private_value = HDA_COMPOSE_AMP_VAL(0x13, 3, 0, HDA_OUTPUT),
1088 },
1089 {
1090 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1091 .name = "Master Playback Switch",
1092 .info = cxt_eapd_info,
1093 .get = cxt_eapd_get,
1018 .put = cxt5047_hp_master_sw_put, 1094 .put = cxt5047_hp_master_sw_put,
1019 .private_value = 0x13, 1095 .private_value = 0x13,
1020 }, 1096 },
@@ -1040,8 +1116,8 @@ static struct snd_kcontrol_new cxt5047_hp_mixers[] = {
1040 { 1116 {
1041 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1117 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1042 .name = "Master Playback Switch", 1118 .name = "Master Playback Switch",
1043 .info = conexant_eapd_info, 1119 .info = cxt_eapd_info,
1044 .get = conexant_eapd_get, 1120 .get = cxt_eapd_get,
1045 .put = cxt5047_hp_master_sw_put, 1121 .put = cxt5047_hp_master_sw_put,
1046 .private_value = 0x13, 1122 .private_value = 0x13,
1047 }, 1123 },
@@ -1053,19 +1129,23 @@ static struct hda_verb cxt5047_init_verbs[] = {
1053 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, 1129 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
1054 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 }, 1130 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 },
1055 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 }, 1131 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 },
1056 /* HP, Amp */ 1132 /* HP, Amp, Speaker */
1057 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, 1133 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
1058 {0x1A, AC_VERB_SET_CONNECT_SEL,0x03}, 1134 {0x1A, AC_VERB_SET_CONNECT_SEL,0x00},
1059 {0x1A, AC_VERB_SET_AMP_GAIN_MUTE, 1135 {0x1A, AC_VERB_SET_AMP_GAIN_MUTE,
1060 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x00}, 1136 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x00},
1061 {0x1A, AC_VERB_SET_AMP_GAIN_MUTE, 1137 {0x1A, AC_VERB_SET_AMP_GAIN_MUTE,
1062 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x03}, 1138 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x03},
1139 {0x1d, AC_VERB_SET_CONNECT_SEL,0x0},
1063 /* Record selector: Front mic */ 1140 /* Record selector: Front mic */
1064 {0x12, AC_VERB_SET_CONNECT_SEL,0x03}, 1141 {0x12, AC_VERB_SET_CONNECT_SEL,0x03},
1065 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, 1142 {0x19, AC_VERB_SET_AMP_GAIN_MUTE,
1066 AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17}, 1143 AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17},
1067 /* SPDIF route: PCM */ 1144 /* SPDIF route: PCM */
1068 { 0x18, AC_VERB_SET_CONNECT_SEL, 0x0 }, 1145 { 0x18, AC_VERB_SET_CONNECT_SEL, 0x0 },
1146 /* Enable unsolicited events */
1147 {0x13, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT},
1148 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_MIC_EVENT},
1069 { } /* end */ 1149 { } /* end */
1070}; 1150};
1071 1151
@@ -1075,14 +1155,24 @@ static struct hda_verb cxt5047_toshiba_init_verbs[] = {
1075 /* pin sensing on HP and Mic jacks */ 1155 /* pin sensing on HP and Mic jacks */
1076 {0x13, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT}, 1156 {0x13, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT},
1077 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_MIC_EVENT}, 1157 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_MIC_EVENT},
1158 /* Speaker routing */
1159 {0x1d, AC_VERB_SET_CONNECT_SEL,0x1},
1160 /* Change default to ExtMic for recording */
1161 {0x1a, AC_VERB_SET_CONNECT_SEL,0x2},
1078 {} 1162 {}
1079}; 1163};
1080 1164
1081/* configuration for HP Laptops */ 1165/* configuration for HP Laptops */
1082static struct hda_verb cxt5047_hp_init_verbs[] = { 1166static struct hda_verb cxt5047_hp_init_verbs[] = {
1083 /* pin sensing on HP and Mic jacks */ 1167 /* pin sensing on HP jack */
1084 {0x13, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT}, 1168 {0x13, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT},
1085 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_MIC_EVENT}, 1169 /* Record selector: Ext Mic */
1170 {0x12, AC_VERB_SET_CONNECT_SEL,0x03},
1171 {0x1a, AC_VERB_SET_CONNECT_SEL,0x02},
1172 {0x19, AC_VERB_SET_AMP_GAIN_MUTE,
1173 AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17},
1174 /* Speaker routing */
1175 {0x1d, AC_VERB_SET_CONNECT_SEL,0x1},
1086 {} 1176 {}
1087}; 1177};
1088 1178
@@ -1091,53 +1181,56 @@ static struct hda_verb cxt5047_hp_init_verbs[] = {
1091 */ 1181 */
1092#ifdef CONFIG_SND_DEBUG 1182#ifdef CONFIG_SND_DEBUG
1093static struct hda_input_mux cxt5047_test_capture_source = { 1183static struct hda_input_mux cxt5047_test_capture_source = {
1094 .num_items = 5, 1184 .num_items = 4,
1095 .items = { 1185 .items = {
1096 { "MIXER", 0x0 }, 1186 { "LINE1 pin", 0x0 },
1097 { "LINE1 pin", 0x1 }, 1187 { "MIC1 pin", 0x1 },
1098 { "MIC1 pin", 0x2 }, 1188 { "MIC2 pin", 0x2 },
1099 { "MIC2 pin", 0x3 }, 1189 { "CD pin", 0x3 },
1100 { "CD pin", 0x4 },
1101 }, 1190 },
1102}; 1191};
1103 1192
1104static struct snd_kcontrol_new cxt5047_test_mixer[] = { 1193static struct snd_kcontrol_new cxt5047_test_mixer[] = {
1105 1194
1106 /* Output only controls */ 1195 /* Output only controls */
1107 HDA_CODEC_VOLUME("OutAmp-1 Volume", 0x10, 0x00, HDA_OUTPUT), 1196 HDA_CODEC_VOLUME("OutAmp-1 Volume", 0x10, 0x0, HDA_OUTPUT),
1108 HDA_CODEC_MUTE("OutAmp-1 Switch", 0x10,0x00, HDA_OUTPUT), 1197 HDA_CODEC_MUTE("OutAmp-1 Switch", 0x10,0x0, HDA_OUTPUT),
1109 HDA_CODEC_VOLUME("OutAmp-2 Volume", 0x1c, 0x00, HDA_OUTPUT), 1198 HDA_CODEC_VOLUME("OutAmp-2 Volume", 0x1c, 0x0, HDA_OUTPUT),
1110 HDA_CODEC_MUTE("OutAmp-2 Switch", 0x1c, 0x00, HDA_OUTPUT), 1199 HDA_CODEC_MUTE("OutAmp-2 Switch", 0x1c, 0x0, HDA_OUTPUT),
1111 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x1d, 0x0, HDA_OUTPUT), 1200 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x1d, 0x0, HDA_OUTPUT),
1112 HDA_CODEC_MUTE("Speaker Playback Switch", 0x1d, 0x0, HDA_OUTPUT), 1201 HDA_CODEC_MUTE("Speaker Playback Switch", 0x1d, 0x0, HDA_OUTPUT),
1113 HDA_CODEC_VOLUME("HeadPhone Playback Volume", 0x13, 0x0, HDA_OUTPUT), 1202 HDA_CODEC_VOLUME("HeadPhone Playback Volume", 0x13, 0x0, HDA_OUTPUT),
1114 HDA_CODEC_MUTE("HeadPhone Playback Switch", 0x13, 0x0, HDA_OUTPUT), 1203 HDA_CODEC_MUTE("HeadPhone Playback Switch", 0x13, 0x0, HDA_OUTPUT),
1204 HDA_CODEC_VOLUME("Line1-Out Playback Volume", 0x14, 0x0, HDA_OUTPUT),
1205 HDA_CODEC_MUTE("Line1-Out Playback Switch", 0x14, 0x0, HDA_OUTPUT),
1206 HDA_CODEC_VOLUME("Line2-Out Playback Volume", 0x15, 0x0, HDA_OUTPUT),
1207 HDA_CODEC_MUTE("Line2-Out Playback Switch", 0x15, 0x0, HDA_OUTPUT),
1115 1208
1116 /* Modes for retasking pin widgets */ 1209 /* Modes for retasking pin widgets */
1117 CXT_PIN_MODE("LINE1 pin mode", 0x14, CXT_PIN_DIR_INOUT), 1210 CXT_PIN_MODE("LINE1 pin mode", 0x14, CXT_PIN_DIR_INOUT),
1118 CXT_PIN_MODE("MIC1 pin mode", 0x15, CXT_PIN_DIR_INOUT), 1211 CXT_PIN_MODE("MIC1 pin mode", 0x15, CXT_PIN_DIR_INOUT),
1119 1212
1120 /* Loopback mixer controls */ 1213 /* EAPD Switch Control */
1121 HDA_CODEC_VOLUME("MIC1 Playback Volume", 0x19, 0x02, HDA_INPUT), 1214 CXT_EAPD_SWITCH("External Amplifier", 0x13, 0x0),
1122 HDA_CODEC_MUTE("MIC1 Playback Switch", 0x19, 0x02, HDA_INPUT),
1123 HDA_CODEC_VOLUME("MIC2 Playback Volume", 0x19, 0x03, HDA_INPUT),
1124 HDA_CODEC_MUTE("MIC2 Playback Switch", 0x19, 0x03, HDA_INPUT),
1125 HDA_CODEC_VOLUME("LINE Playback Volume", 0x19, 0x01, HDA_INPUT),
1126 HDA_CODEC_MUTE("LINE Playback Switch", 0x19, 0x01, HDA_INPUT),
1127 HDA_CODEC_VOLUME("CD Playback Volume", 0x19, 0x04, HDA_INPUT),
1128 HDA_CODEC_MUTE("CD Playback Switch", 0x19, 0x04, HDA_INPUT),
1129
1130#if 0
1131 /* Controls for GPIO pins, assuming they exist and are configured as outputs */
1132 CXT_GPIO_DATA_SWITCH("GPIO pin 0", 0x01, 0x01),
1133 CXT_GPIO_DATA_SWITCH("GPIO pin 1", 0x01, 0x02),
1134 CXT_GPIO_DATA_SWITCH("GPIO pin 2", 0x01, 0x04),
1135 CXT_GPIO_DATA_SWITCH("GPIO pin 3", 0x01, 0x08),
1136#endif
1137 CXT_SPDIF_CTRL_SWITCH("SPDIF Playback Switch", 0x18, 0x01),
1138 1215
1139 HDA_CODEC_VOLUME("Capture Volume", 0x19, 0x0, HDA_OUTPUT), 1216 /* Loopback mixer controls */
1140 HDA_CODEC_MUTE("Capture Switch", 0x19, 0x0, HDA_OUTPUT), 1217 HDA_CODEC_VOLUME("MIC1 Playback Volume", 0x12, 0x01, HDA_INPUT),
1218 HDA_CODEC_MUTE("MIC1 Playback Switch", 0x12, 0x01, HDA_INPUT),
1219 HDA_CODEC_VOLUME("MIC2 Playback Volume", 0x12, 0x02, HDA_INPUT),
1220 HDA_CODEC_MUTE("MIC2 Playback Switch", 0x12, 0x02, HDA_INPUT),
1221 HDA_CODEC_VOLUME("LINE Playback Volume", 0x12, 0x0, HDA_INPUT),
1222 HDA_CODEC_MUTE("LINE Playback Switch", 0x12, 0x0, HDA_INPUT),
1223 HDA_CODEC_VOLUME("CD Playback Volume", 0x12, 0x04, HDA_INPUT),
1224 HDA_CODEC_MUTE("CD Playback Switch", 0x12, 0x04, HDA_INPUT),
1225
1226 HDA_CODEC_VOLUME("Capture-1 Volume", 0x19, 0x0, HDA_INPUT),
1227 HDA_CODEC_MUTE("Capture-1 Switch", 0x19, 0x0, HDA_INPUT),
1228 HDA_CODEC_VOLUME("Capture-2 Volume", 0x19, 0x1, HDA_INPUT),
1229 HDA_CODEC_MUTE("Capture-2 Switch", 0x19, 0x1, HDA_INPUT),
1230 HDA_CODEC_VOLUME("Capture-3 Volume", 0x19, 0x2, HDA_INPUT),
1231 HDA_CODEC_MUTE("Capture-3 Switch", 0x19, 0x2, HDA_INPUT),
1232 HDA_CODEC_VOLUME("Capture-4 Volume", 0x19, 0x3, HDA_INPUT),
1233 HDA_CODEC_MUTE("Capture-4 Switch", 0x19, 0x3, HDA_INPUT),
1141 { 1234 {
1142 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1235 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1143 .name = "Input Source", 1236 .name = "Input Source",
@@ -1145,16 +1238,18 @@ static struct snd_kcontrol_new cxt5047_test_mixer[] = {
1145 .get = conexant_mux_enum_get, 1238 .get = conexant_mux_enum_get,
1146 .put = conexant_mux_enum_put, 1239 .put = conexant_mux_enum_put,
1147 }, 1240 },
1241 /* Controls for GPIO pins, assuming they exist and are configured
1242 * as outputs
1243 */
1244 CXT_GPIO_DATA_SWITCH("GPIO pin 0", 0x01, 0x01),
1245 CXT_GPIO_DATA_SWITCH("GPIO pin 1", 0x01, 0x02),
1246 CXT_GPIO_DATA_SWITCH("GPIO pin 2", 0x01, 0x04),
1247 CXT_GPIO_DATA_SWITCH("GPIO pin 3", 0x01, 0x08),
1148 1248
1149 { } /* end */ 1249 { } /* end */
1150}; 1250};
1151 1251
1152static struct hda_verb cxt5047_test_init_verbs[] = { 1252static struct hda_verb cxt5047_test_init_verbs[] = {
1153 /* Enable all GPIOs as outputs with an initial value of 0 */
1154 {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x0f},
1155 {0x01, AC_VERB_SET_GPIO_DATA, 0x00},
1156 {0x01, AC_VERB_SET_GPIO_MASK, 0x0f},
1157
1158 /* Enable retasking pins as output, initially without power amp */ 1253 /* Enable retasking pins as output, initially without power amp */
1159 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 1254 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1160 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 1255 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
@@ -1215,7 +1310,6 @@ static int cxt5047_hp_init(struct hda_codec *codec)
1215{ 1310{
1216 conexant_init(codec); 1311 conexant_init(codec);
1217 cxt5047_hp_automute(codec); 1312 cxt5047_hp_automute(codec);
1218 cxt5047_hp_automic(codec);
1219 return 0; 1313 return 0;
1220} 1314}
1221 1315
@@ -1242,6 +1336,7 @@ static const char *cxt5047_models[CXT5047_MODELS] = {
1242static struct snd_pci_quirk cxt5047_cfg_tbl[] = { 1336static struct snd_pci_quirk cxt5047_cfg_tbl[] = {
1243 SND_PCI_QUIRK(0x103c, 0x30a0, "HP DV1000", CXT5047_LAPTOP), 1337 SND_PCI_QUIRK(0x103c, 0x30a0, "HP DV1000", CXT5047_LAPTOP),
1244 SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV2000T/DV3000T", CXT5047_LAPTOP), 1338 SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV2000T/DV3000T", CXT5047_LAPTOP),
1339 SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2000Z", CXT5047_LAPTOP),
1245 SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP), 1340 SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP),
1246 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P100", CXT5047_LAPTOP_EAPD), 1341 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P100", CXT5047_LAPTOP_EAPD),
1247 {} 1342 {}
@@ -1291,8 +1386,10 @@ static int patch_cxt5047(struct hda_codec *codec)
1291 codec->patch_ops.init = cxt5047_hp_init; 1386 codec->patch_ops.init = cxt5047_hp_init;
1292 break; 1387 break;
1293 case CXT5047_LAPTOP_EAPD: 1388 case CXT5047_LAPTOP_EAPD:
1389 spec->input_mux = &cxt5047_toshiba_capture_source;
1294 spec->num_init_verbs = 2; 1390 spec->num_init_verbs = 2;
1295 spec->init_verbs[1] = cxt5047_toshiba_init_verbs; 1391 spec->init_verbs[1] = cxt5047_toshiba_init_verbs;
1392 spec->mixers[0] = cxt5047_toshiba_mixers;
1296 break; 1393 break;
1297#ifdef CONFIG_SND_DEBUG 1394#ifdef CONFIG_SND_DEBUG
1298 case CXT5047_TEST: 1395 case CXT5047_TEST:
@@ -1305,7 +1402,9 @@ static int patch_cxt5047(struct hda_codec *codec)
1305} 1402}
1306 1403
1307struct hda_codec_preset snd_hda_preset_conexant[] = { 1404struct hda_codec_preset snd_hda_preset_conexant[] = {
1308 { .id = 0x14f15045, .name = "CXT5045", .patch = patch_cxt5045 }, 1405 { .id = 0x14f15045, .name = "CX20549 (Venice)",
1309 { .id = 0x14f15047, .name = "CXT5047", .patch = patch_cxt5047 }, 1406 .patch = patch_cxt5045 },
1407 { .id = 0x14f15047, .name = "CX20551 (Waikiki)",
1408 .patch = patch_cxt5047 },
1310 {} /* terminator */ 1409 {} /* terminator */
1311}; 1410};
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 6f4a39273b98..f7ef9c5afe87 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -457,6 +457,10 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = {
457 "Dell Latitude 120L", STAC_REF), 457 "Dell Latitude 120L", STAC_REF),
458 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cc, 458 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cc,
459 "Dell Latitude D820", STAC_REF), 459 "Dell Latitude D820", STAC_REF),
460 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cd,
461 "Dell Inspiron E1705/9400", STAC_REF),
462 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ce,
463 "Dell XPS M1710", STAC_REF),
460 {} /* terminator */ 464 {} /* terminator */
461}; 465};
462 466
@@ -1800,6 +1804,7 @@ static int patch_stac925x(struct hda_codec *codec)
1800 spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, 1804 spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS,
1801 stac925x_models, 1805 stac925x_models,
1802 stac925x_cfg_tbl); 1806 stac925x_cfg_tbl);
1807 again:
1803 if (spec->board_config < 0) { 1808 if (spec->board_config < 0) {
1804 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x, using BIOS defaults\n"); 1809 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x, using BIOS defaults\n");
1805 err = stac92xx_save_bios_config_regs(codec); 1810 err = stac92xx_save_bios_config_regs(codec);
@@ -1825,6 +1830,15 @@ static int patch_stac925x(struct hda_codec *codec)
1825 spec->mixer = stac925x_mixer; 1830 spec->mixer = stac925x_mixer;
1826 1831
1827 err = stac92xx_parse_auto_config(codec, 0x8, 0x7); 1832 err = stac92xx_parse_auto_config(codec, 0x8, 0x7);
1833 if (!err) {
1834 if (spec->board_config < 0) {
1835 printk(KERN_WARNING "hda_codec: No auto-config is "
1836 "available, default to model=ref\n");
1837 spec->board_config = STAC_925x_REF;
1838 goto again;
1839 }
1840 err = -EINVAL;
1841 }
1828 if (err < 0) { 1842 if (err < 0) {
1829 stac92xx_free(codec); 1843 stac92xx_free(codec);
1830 return err; 1844 return err;
@@ -1850,6 +1864,7 @@ static int patch_stac922x(struct hda_codec *codec)
1850 spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS, 1864 spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS,
1851 stac922x_models, 1865 stac922x_models,
1852 stac922x_cfg_tbl); 1866 stac922x_cfg_tbl);
1867 again:
1853 if (spec->board_config < 0) { 1868 if (spec->board_config < 0) {
1854 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC922x, " 1869 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC922x, "
1855 "using BIOS defaults\n"); 1870 "using BIOS defaults\n");
@@ -1875,6 +1890,15 @@ static int patch_stac922x(struct hda_codec *codec)
1875 spec->multiout.dac_nids = spec->dac_nids; 1890 spec->multiout.dac_nids = spec->dac_nids;
1876 1891
1877 err = stac92xx_parse_auto_config(codec, 0x08, 0x09); 1892 err = stac92xx_parse_auto_config(codec, 0x08, 0x09);
1893 if (!err) {
1894 if (spec->board_config < 0) {
1895 printk(KERN_WARNING "hda_codec: No auto-config is "
1896 "available, default to model=ref\n");
1897 spec->board_config = STAC_D945_REF;
1898 goto again;
1899 }
1900 err = -EINVAL;
1901 }
1878 if (err < 0) { 1902 if (err < 0) {
1879 stac92xx_free(codec); 1903 stac92xx_free(codec);
1880 return err; 1904 return err;
@@ -1903,6 +1927,7 @@ static int patch_stac927x(struct hda_codec *codec)
1903 spec->board_config = snd_hda_check_board_config(codec, STAC_927X_MODELS, 1927 spec->board_config = snd_hda_check_board_config(codec, STAC_927X_MODELS,
1904 stac927x_models, 1928 stac927x_models,
1905 stac927x_cfg_tbl); 1929 stac927x_cfg_tbl);
1930 again:
1906 if (spec->board_config < 0) { 1931 if (spec->board_config < 0) {
1907 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC927x, using BIOS defaults\n"); 1932 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC927x, using BIOS defaults\n");
1908 err = stac92xx_save_bios_config_regs(codec); 1933 err = stac92xx_save_bios_config_regs(codec);
@@ -1945,6 +1970,15 @@ static int patch_stac927x(struct hda_codec *codec)
1945 spec->multiout.dac_nids = spec->dac_nids; 1970 spec->multiout.dac_nids = spec->dac_nids;
1946 1971
1947 err = stac92xx_parse_auto_config(codec, 0x1e, 0x20); 1972 err = stac92xx_parse_auto_config(codec, 0x1e, 0x20);
1973 if (!err) {
1974 if (spec->board_config < 0) {
1975 printk(KERN_WARNING "hda_codec: No auto-config is "
1976 "available, default to model=ref\n");
1977 spec->board_config = STAC_D965_REF;
1978 goto again;
1979 }
1980 err = -EINVAL;
1981 }
1948 if (err < 0) { 1982 if (err < 0) {
1949 stac92xx_free(codec); 1983 stac92xx_free(codec);
1950 return err; 1984 return err;
@@ -1970,6 +2004,7 @@ static int patch_stac9205(struct hda_codec *codec)
1970 spec->board_config = snd_hda_check_board_config(codec, STAC_9205_MODELS, 2004 spec->board_config = snd_hda_check_board_config(codec, STAC_9205_MODELS,
1971 stac9205_models, 2005 stac9205_models,
1972 stac9205_cfg_tbl); 2006 stac9205_cfg_tbl);
2007 again:
1973 if (spec->board_config < 0) { 2008 if (spec->board_config < 0) {
1974 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC9205, using BIOS defaults\n"); 2009 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC9205, using BIOS defaults\n");
1975 err = stac92xx_save_bios_config_regs(codec); 2010 err = stac92xx_save_bios_config_regs(codec);
@@ -2008,6 +2043,15 @@ static int patch_stac9205(struct hda_codec *codec)
2008 AC_VERB_SET_GPIO_MASK, 0x00000001); 2043 AC_VERB_SET_GPIO_MASK, 0x00000001);
2009 2044
2010 err = stac92xx_parse_auto_config(codec, 0x1f, 0x20); 2045 err = stac92xx_parse_auto_config(codec, 0x1f, 0x20);
2046 if (!err) {
2047 if (spec->board_config < 0) {
2048 printk(KERN_WARNING "hda_codec: No auto-config is "
2049 "available, default to model=ref\n");
2050 spec->board_config = STAC_9205_REF;
2051 goto again;
2052 }
2053 err = -EINVAL;
2054 }
2011 if (err < 0) { 2055 if (err < 0) {
2012 stac92xx_free(codec); 2056 stac92xx_free(codec);
2013 return err; 2057 return err;
diff --git a/sound/soc/at91/at91-i2s.c b/sound/soc/at91/at91-i2s.c
index fcc544a96ba3..9fc0c0388881 100644
--- a/sound/soc/at91/at91-i2s.c
+++ b/sound/soc/at91/at91-i2s.c
@@ -20,6 +20,8 @@
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/atmel_pdc.h>
24
23#include <sound/driver.h> 25#include <sound/driver.h>
24#include <sound/core.h> 26#include <sound/core.h>
25#include <sound/pcm.h> 27#include <sound/pcm.h>
@@ -29,7 +31,6 @@
29#include <asm/arch/hardware.h> 31#include <asm/arch/hardware.h>
30#include <asm/arch/at91_pmc.h> 32#include <asm/arch/at91_pmc.h>
31#include <asm/arch/at91_ssc.h> 33#include <asm/arch/at91_ssc.h>
32#include <asm/arch/at91_pdc.h>
33 34
34#include "at91-pcm.h" 35#include "at91-pcm.h"
35#include "at91-i2s.h" 36#include "at91-i2s.h"
@@ -51,17 +52,17 @@
51 * SSC PDC registers required by the PCM DMA engine. 52 * SSC PDC registers required by the PCM DMA engine.
52 */ 53 */
53static struct at91_pdc_regs pdc_tx_reg = { 54static struct at91_pdc_regs pdc_tx_reg = {
54 .xpr = AT91_PDC_TPR, 55 .xpr = ATMEL_PDC_TPR,
55 .xcr = AT91_PDC_TCR, 56 .xcr = ATMEL_PDC_TCR,
56 .xnpr = AT91_PDC_TNPR, 57 .xnpr = ATMEL_PDC_TNPR,
57 .xncr = AT91_PDC_TNCR, 58 .xncr = ATMEL_PDC_TNCR,
58}; 59};
59 60
60static struct at91_pdc_regs pdc_rx_reg = { 61static struct at91_pdc_regs pdc_rx_reg = {
61 .xpr = AT91_PDC_RPR, 62 .xpr = ATMEL_PDC_RPR,
62 .xcr = AT91_PDC_RCR, 63 .xcr = ATMEL_PDC_RCR,
63 .xnpr = AT91_PDC_RNPR, 64 .xnpr = ATMEL_PDC_RNPR,
64 .xncr = AT91_PDC_RNCR, 65 .xncr = ATMEL_PDC_RNCR,
65}; 66};
66 67
67/* 68/*
@@ -72,8 +73,8 @@ static struct at91_ssc_mask ssc_tx_mask = {
72 .ssc_disable = AT91_SSC_TXDIS, 73 .ssc_disable = AT91_SSC_TXDIS,
73 .ssc_endx = AT91_SSC_ENDTX, 74 .ssc_endx = AT91_SSC_ENDTX,
74 .ssc_endbuf = AT91_SSC_TXBUFE, 75 .ssc_endbuf = AT91_SSC_TXBUFE,
75 .pdc_enable = AT91_PDC_TXTEN, 76 .pdc_enable = ATMEL_PDC_TXTEN,
76 .pdc_disable = AT91_PDC_TXTDIS, 77 .pdc_disable = ATMEL_PDC_TXTDIS,
77}; 78};
78 79
79static struct at91_ssc_mask ssc_rx_mask = { 80static struct at91_ssc_mask ssc_rx_mask = {
@@ -81,8 +82,8 @@ static struct at91_ssc_mask ssc_rx_mask = {
81 .ssc_disable = AT91_SSC_RXDIS, 82 .ssc_disable = AT91_SSC_RXDIS,
82 .ssc_endx = AT91_SSC_ENDRX, 83 .ssc_endx = AT91_SSC_ENDRX,
83 .ssc_endbuf = AT91_SSC_RXBUFF, 84 .ssc_endbuf = AT91_SSC_RXBUFF,
84 .pdc_enable = AT91_PDC_RXTEN, 85 .pdc_enable = ATMEL_PDC_RXTEN,
85 .pdc_disable = AT91_PDC_RXTDIS, 86 .pdc_disable = ATMEL_PDC_RXTDIS,
86}; 87};
87 88
88 89
@@ -508,14 +509,14 @@ static int at91_i2s_hw_params(struct snd_pcm_substream *substream,
508 /* Reset the SSC and its PDC registers */ 509 /* Reset the SSC and its PDC registers */
509 at91_ssc_write(ssc_p->ssc.base + AT91_SSC_CR, AT91_SSC_SWRST); 510 at91_ssc_write(ssc_p->ssc.base + AT91_SSC_CR, AT91_SSC_SWRST);
510 511
511 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_RPR, 0); 512 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_RPR, 0);
512 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_RCR, 0); 513 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_RCR, 0);
513 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_RNPR, 0); 514 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_RNPR, 0);
514 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_RNCR, 0); 515 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_RNCR, 0);
515 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_TPR, 0); 516 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_TPR, 0);
516 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_TCR, 0); 517 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_TCR, 0);
517 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_TNPR, 0); 518 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_TNPR, 0);
518 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_TNCR, 0); 519 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_TNCR, 0);
519 520
520 if ((ret = request_irq(ssc_p->ssc.pid, at91_i2s_interrupt, 521 if ((ret = request_irq(ssc_p->ssc.pid, at91_i2s_interrupt,
521 0, ssc_p->name, ssc_p)) < 0) { 522 0, ssc_p->name, ssc_p)) < 0) {
diff --git a/sound/soc/at91/at91-pcm.c b/sound/soc/at91/at91-pcm.c
index e88b12e7cc40..b39b95a47040 100644
--- a/sound/soc/at91/at91-pcm.c
+++ b/sound/soc/at91/at91-pcm.c
@@ -21,6 +21,7 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/dma-mapping.h> 23#include <linux/dma-mapping.h>
24#include <linux/atmel_pdc.h>
24 25
25#include <sound/driver.h> 26#include <sound/driver.h>
26#include <sound/core.h> 27#include <sound/core.h>
@@ -30,7 +31,6 @@
30 31
31#include <asm/arch/hardware.h> 32#include <asm/arch/hardware.h>
32#include <asm/arch/at91_ssc.h> 33#include <asm/arch/at91_ssc.h>
33#include <asm/arch/at91_pdc.h>
34 34
35#include "at91-pcm.h" 35#include "at91-pcm.h"
36 36
@@ -83,7 +83,7 @@ static void at91_pcm_dma_irq(u32 ssc_sr,
83 params->name, ssc_sr, count); 83 params->name, ssc_sr, count);
84 84
85 /* re-start the PDC */ 85 /* re-start the PDC */
86 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_disable); 86 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_disable);
87 87
88 prtd->period_ptr += prtd->period_size; 88 prtd->period_ptr += prtd->period_size;
89 if (prtd->period_ptr >= prtd->dma_buffer_end) { 89 if (prtd->period_ptr >= prtd->dma_buffer_end) {
@@ -94,7 +94,7 @@ static void at91_pcm_dma_irq(u32 ssc_sr,
94 at91_ssc_write(params->ssc_base + params->pdc->xcr, 94 at91_ssc_write(params->ssc_base + params->pdc->xcr,
95 prtd->period_size / params->pdc_xfer_size); 95 prtd->period_size / params->pdc_xfer_size);
96 96
97 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_enable); 97 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_enable);
98 } 98 }
99 99
100 if (ssc_sr & params->mask->ssc_endx) { 100 if (ssc_sr & params->mask->ssc_endx) {
@@ -143,7 +143,7 @@ static int at91_pcm_hw_free(struct snd_pcm_substream *substream)
143 struct at91_pcm_dma_params *params = prtd->params; 143 struct at91_pcm_dma_params *params = prtd->params;
144 144
145 if (params != NULL) { 145 if (params != NULL) {
146 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_disable); 146 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_disable);
147 prtd->params->dma_intr_handler = NULL; 147 prtd->params->dma_intr_handler = NULL;
148 } 148 }
149 149
@@ -158,7 +158,7 @@ static int at91_pcm_prepare(struct snd_pcm_substream *substream)
158 at91_ssc_write(params->ssc_base + AT91_SSC_IDR, 158 at91_ssc_write(params->ssc_base + AT91_SSC_IDR,
159 params->mask->ssc_endx | params->mask->ssc_endbuf); 159 params->mask->ssc_endx | params->mask->ssc_endbuf);
160 160
161 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_disable); 161 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_disable);
162 return 0; 162 return 0;
163} 163}
164 164
@@ -192,7 +192,7 @@ static int at91_pcm_trigger(struct snd_pcm_substream *substream,
192 at91_ssc_write(params->ssc_base + AT91_SSC_IER, 192 at91_ssc_write(params->ssc_base + AT91_SSC_IER,
193 params->mask->ssc_endx | params->mask->ssc_endbuf); 193 params->mask->ssc_endx | params->mask->ssc_endbuf);
194 194
195 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_enable); 195 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_enable);
196 196
197 DBG("sr=%lx imr=%lx\n", at91_ssc_read(params->ssc_base + AT91_SSC_SR), 197 DBG("sr=%lx imr=%lx\n", at91_ssc_read(params->ssc_base + AT91_SSC_SR),
198 at91_ssc_read(params->ssc_base + AT91_SSC_IER)); 198 at91_ssc_read(params->ssc_base + AT91_SSC_IER));
@@ -201,12 +201,12 @@ static int at91_pcm_trigger(struct snd_pcm_substream *substream,
201 case SNDRV_PCM_TRIGGER_STOP: 201 case SNDRV_PCM_TRIGGER_STOP:
202 case SNDRV_PCM_TRIGGER_SUSPEND: 202 case SNDRV_PCM_TRIGGER_SUSPEND:
203 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 203 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
204 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_disable); 204 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_disable);
205 break; 205 break;
206 206
207 case SNDRV_PCM_TRIGGER_RESUME: 207 case SNDRV_PCM_TRIGGER_RESUME:
208 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 208 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
209 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_enable); 209 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_enable);
210 break; 210 break;
211 211
212 default: 212 default:
@@ -379,7 +379,7 @@ static int at91_pcm_suspend(struct platform_device *pdev,
379 379
380 /* disable the PDC and save the PDC registers */ 380 /* disable the PDC and save the PDC registers */
381 381
382 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_disable); 382 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_disable);
383 383
384 prtd->pdc_xpr_save = at91_ssc_read(params->ssc_base + params->pdc->xpr); 384 prtd->pdc_xpr_save = at91_ssc_read(params->ssc_base + params->pdc->xpr);
385 prtd->pdc_xcr_save = at91_ssc_read(params->ssc_base + params->pdc->xcr); 385 prtd->pdc_xcr_save = at91_ssc_read(params->ssc_base + params->pdc->xcr);
@@ -408,7 +408,7 @@ static int at91_pcm_resume(struct platform_device *pdev,
408 at91_ssc_write(params->ssc_base + params->pdc->xnpr, prtd->pdc_xnpr_save); 408 at91_ssc_write(params->ssc_base + params->pdc->xnpr, prtd->pdc_xnpr_save);
409 at91_ssc_write(params->ssc_base + params->pdc->xncr, prtd->pdc_xncr_save); 409 at91_ssc_write(params->ssc_base + params->pdc->xncr, prtd->pdc_xncr_save);
410 410
411 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_enable); 411 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_enable);
412 return 0; 412 return 0;
413} 413}
414#else 414#else
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 78ac2688e124..ec2a2787957a 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1,15 +1,15 @@
1config SND_SOC_AC97_CODEC 1config SND_SOC_AC97_CODEC
2 tristate 2 tristate
3 depends SND_SOC 3 depends on SND_SOC
4 4
5config SND_SOC_WM8731 5config SND_SOC_WM8731
6 tristate 6 tristate
7 depends SND_SOC 7 depends on SND_SOC
8 8
9config SND_SOC_WM8750 9config SND_SOC_WM8750
10 tristate 10 tristate
11 depends SND_SOC 11 depends on SND_SOC
12 12
13config SND_SOC_WM9712 13config SND_SOC_WM9712
14 tristate 14 tristate
15 depends SND_SOC 15 depends on SND_SOC
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 4dfb91d4398a..b6d886373bb0 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -325,16 +325,6 @@ static int prepare_capture_urb(struct snd_usb_substream *subs,
325 } 325 }
326 urb->transfer_buffer_length = offs; 326 urb->transfer_buffer_length = offs;
327 urb->number_of_packets = ctx->packets; 327 urb->number_of_packets = ctx->packets;
328#if 0 // for check
329 if (! urb->bandwidth) {
330 int bustime;
331 bustime = usb_check_bandwidth(urb->dev, urb);
332 if (bustime < 0)
333 return bustime;
334 printk("urb %d: bandwidth = %d (packets = %d)\n", ctx->index, bustime, urb->number_of_packets);
335 usb_claim_bandwidth(urb->dev, urb, bustime, 1);
336 }
337#endif // for check
338 return 0; 328 return 0;
339} 329}
340 330
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h
index 25b4ab4f61e7..858262068f4f 100644
--- a/sound/usb/usbquirks.h
+++ b/sound/usb/usbquirks.h
@@ -948,6 +948,29 @@ YAMAHA_DEVICE(0x7010, "UB99"),
948}, 948},
949 /* TODO: add Edirol M-100FX support */ 949 /* TODO: add Edirol M-100FX support */
950{ 950{
951 /* has ID 0x004e when not in "Advanced Driver" mode */
952 USB_DEVICE(0x0582, 0x004c),
953 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
954 .vendor_name = "EDIROL",
955 .product_name = "PCR-A",
956 .ifnum = QUIRK_ANY_INTERFACE,
957 .type = QUIRK_COMPOSITE,
958 .data = (const struct snd_usb_audio_quirk[]) {
959 {
960 .ifnum = 1,
961 .type = QUIRK_AUDIO_STANDARD_INTERFACE
962 },
963 {
964 .ifnum = 2,
965 .type = QUIRK_AUDIO_STANDARD_INTERFACE
966 },
967 {
968 .ifnum = -1
969 }
970 }
971 }
972},
973{
951 /* has ID 0x004f when not in "Advanced Driver" mode */ 974 /* has ID 0x004f when not in "Advanced Driver" mode */
952 USB_DEVICE(0x0582, 0x004d), 975 USB_DEVICE(0x0582, 0x004d),
953 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 976 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {