aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/Kconfig4
-rw-r--r--sound/core/rawmidi.c2
-rw-r--r--sound/isa/cs423x/cs4236.c2
-rw-r--r--sound/isa/opti9xx/miro.c2
-rw-r--r--sound/isa/opti9xx/opti92x-ad1848.c114
-rw-r--r--sound/oss/Kconfig2
-rw-r--r--sound/oss/dmasound/dmasound_paula.c2
-rw-r--r--sound/pci/ca0106/ca0106_proc.c2
-rw-r--r--sound/pci/cs46xx/imgs/cwcdma.asp9
-rw-r--r--sound/pci/emu10k1/emu10k1x.c2
-rw-r--r--sound/pci/hda/hda_intel.c5
-rw-r--r--sound/pci/hda/patch_analog.c17
-rw-r--r--sound/pci/hda/patch_cirrus.c2
-rw-r--r--sound/pci/hda/patch_cmedia.c2
-rw-r--r--sound/pci/hda/patch_realtek.c129
-rw-r--r--sound/pci/ice1712/aureon.c31
-rw-r--r--sound/pci/ice1712/juli.c2
-rw-r--r--sound/pci/rme9652/hdspm.c4
-rw-r--r--sound/soc/codecs/uda134x.c4
-rw-r--r--sound/soc/codecs/wm8903.c6
-rw-r--r--sound/soc/codecs/wm8993.c4
-rw-r--r--sound/soc/imx/mx1_mx2-pcm.c6
-rw-r--r--sound/soc/s3c24xx/s3c24xx_simtec.c2
-rw-r--r--sound/soc/s6000/s6000-pcm.c2
-rw-r--r--sound/sound_core.c2
-rw-r--r--sound/synth/emux/soundfont.c2
-rw-r--r--sound/usb/usx2y/us122l.c28
-rw-r--r--sound/usb/usx2y/us122l.h2
28 files changed, 270 insertions, 121 deletions
diff --git a/sound/Kconfig b/sound/Kconfig
index b3e53e616ec9..fcad760f5691 100644
--- a/sound/Kconfig
+++ b/sound/Kconfig
@@ -1,6 +1,3 @@
1# sound/Config.in
2#
3
4menuconfig SOUND 1menuconfig SOUND
5 tristate "Sound card support" 2 tristate "Sound card support"
6 depends on HAS_IOMEM 3 depends on HAS_IOMEM
@@ -136,4 +133,3 @@ config AC97_BUS
136 sound subsystem and other function drivers completely unrelated to 133 sound subsystem and other function drivers completely unrelated to
137 sound although they're sharing the AC97 bus. Concerned drivers 134 sound although they're sharing the AC97 bus. Concerned drivers
138 should "select" this. 135 should "select" this.
139
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 2f766123b158..0f5a194695d9 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -1257,7 +1257,7 @@ static ssize_t snd_rawmidi_write(struct file *file, const char __user *buf,
1257 break; 1257 break;
1258 count -= count1; 1258 count -= count1;
1259 } 1259 }
1260 if (file->f_flags & O_SYNC) { 1260 if (file->f_flags & O_DSYNC) {
1261 spin_lock_irq(&runtime->lock); 1261 spin_lock_irq(&runtime->lock);
1262 while (runtime->avail != runtime->buffer_size) { 1262 while (runtime->avail != runtime->buffer_size) {
1263 wait_queue_t wait; 1263 wait_queue_t wait;
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index 93fa6720d197..cc15d1d65a22 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -177,7 +177,7 @@ static struct pnp_card_device_id snd_cs423x_pnpids[] = {
177 { .id = "CSC0437", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, 177 { .id = "CSC0437", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
178 /* Digital PC 5000 Onboard - CS4236B */ 178 /* Digital PC 5000 Onboard - CS4236B */
179 { .id = "CSC0735", .devs = { { "CSC0000" }, { "CSC0010" } } }, 179 { .id = "CSC0735", .devs = { { "CSC0000" }, { "CSC0010" } } },
180 /* some uknown CS4236B */ 180 /* some unknown CS4236B */
181 { .id = "CSC0b35", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, 181 { .id = "CSC0b35", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
182 /* Intel PR440FX Onboard sound */ 182 /* Intel PR440FX Onboard sound */
183 { .id = "CSC0b36", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, 183 { .id = "CSC0b36", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index 6123c7531110..b865e45a8f9b 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -133,7 +133,7 @@ struct snd_miro {
133static struct snd_miro_aci aci_device; 133static struct snd_miro_aci aci_device;
134 134
135static char * snd_opti9xx_names[] = { 135static char * snd_opti9xx_names[] = {
136 "unkown", 136 "unknown",
137 "82C928", "82C929", 137 "82C928", "82C929",
138 "82C924", "82C925", 138 "82C924", "82C925",
139 "82C930", "82C931", "82C933" 139 "82C930", "82C931", "82C933"
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index d08c38906449..106be6e471f7 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -135,6 +135,8 @@ struct snd_opti9xx {
135 unsigned long mc_base_size; 135 unsigned long mc_base_size;
136#ifdef OPTi93X 136#ifdef OPTi93X
137 unsigned long mc_indir_index; 137 unsigned long mc_indir_index;
138 unsigned long mc_indir_size;
139 struct resource *res_mc_indir;
138 struct snd_wss *codec; 140 struct snd_wss *codec;
139#endif /* OPTi93X */ 141#endif /* OPTi93X */
140 unsigned long pwd_reg; 142 unsigned long pwd_reg;
@@ -177,7 +179,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_opti9xx_pnpids);
177#endif 179#endif
178 180
179static char * snd_opti9xx_names[] = { 181static char * snd_opti9xx_names[] = {
180 "unkown", 182 "unknown",
181 "82C928", "82C929", 183 "82C928", "82C929",
182 "82C924", "82C925", 184 "82C924", "82C925",
183 "82C930", "82C931", "82C933" 185 "82C930", "82C931", "82C933"
@@ -231,7 +233,10 @@ static int __devinit snd_opti9xx_init(struct snd_opti9xx *chip,
231 case OPTi9XX_HW_82C931: 233 case OPTi9XX_HW_82C931:
232 case OPTi9XX_HW_82C933: 234 case OPTi9XX_HW_82C933:
233 chip->mc_base = (hardware == OPTi9XX_HW_82C930) ? 0xf8f : 0xf8d; 235 chip->mc_base = (hardware == OPTi9XX_HW_82C930) ? 0xf8f : 0xf8d;
234 chip->mc_indir_index = 0xe0e; 236 if (!chip->mc_indir_index) {
237 chip->mc_indir_index = 0xe0e;
238 chip->mc_indir_size = 2;
239 }
235 chip->password = 0xe4; 240 chip->password = 0xe4;
236 chip->pwd_reg = 0; 241 chip->pwd_reg = 0;
237 break; 242 break;
@@ -560,57 +565,69 @@ static irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id)
560 565
561#endif /* OPTi93X */ 566#endif /* OPTi93X */
562 567
563static int __devinit snd_card_opti9xx_detect(struct snd_card *card, 568static int __devinit snd_opti9xx_read_check(struct snd_opti9xx *chip)
564 struct snd_opti9xx *chip)
565{ 569{
566 int i, err; 570 unsigned char value;
571#ifdef OPTi93X
572 unsigned long flags;
573#endif
567 574
575 chip->res_mc_base = request_region(chip->mc_base, chip->mc_base_size,
576 "OPTi9xx MC");
577 if (chip->res_mc_base == NULL)
578 return -EBUSY;
568#ifndef OPTi93X 579#ifndef OPTi93X
569 for (i = OPTi9XX_HW_82C928; i < OPTi9XX_HW_82C930; i++) { 580 value = snd_opti9xx_read(chip, OPTi9XX_MC_REG(1));
570 unsigned char value; 581 if (value != 0xff && value != inb(chip->mc_base + OPTi9XX_MC_REG(1)))
582 if (value == snd_opti9xx_read(chip, OPTi9XX_MC_REG(1)))
583 return 0;
584#else /* OPTi93X */
585 chip->res_mc_indir = request_region(chip->mc_indir_index,
586 chip->mc_indir_size,
587 "OPTi93x MC");
588 if (chip->res_mc_indir == NULL)
589 return -EBUSY;
571 590
572 if ((err = snd_opti9xx_init(chip, i)) < 0) 591 spin_lock_irqsave(&chip->lock, flags);
573 return err; 592 outb(chip->password, chip->mc_base + chip->pwd_reg);
593 outb(((chip->mc_indir_index & 0x1f0) >> 4), chip->mc_base);
594 spin_unlock_irqrestore(&chip->lock, flags);
574 595
575 if ((chip->res_mc_base = request_region(chip->mc_base, chip->mc_base_size, "OPTi9xx MC")) == NULL) 596 value = snd_opti9xx_read(chip, OPTi9XX_MC_REG(7));
576 continue; 597 snd_opti9xx_write(chip, OPTi9XX_MC_REG(7), 0xff - value);
598 if (snd_opti9xx_read(chip, OPTi9XX_MC_REG(7)) == 0xff - value)
599 return 0;
577 600
578 value = snd_opti9xx_read(chip, OPTi9XX_MC_REG(1)); 601 release_and_free_resource(chip->res_mc_indir);
579 if ((value != 0xff) && (value != inb(chip->mc_base + 1))) 602 chip->res_mc_indir = NULL;
580 if (value == snd_opti9xx_read(chip, OPTi9XX_MC_REG(1))) 603#endif /* OPTi93X */
581 return 1; 604 release_and_free_resource(chip->res_mc_base);
605 chip->res_mc_base = NULL;
582 606
583 release_and_free_resource(chip->res_mc_base); 607 return -ENODEV;
584 chip->res_mc_base = NULL; 608}
585 609
586 } 610static int __devinit snd_card_opti9xx_detect(struct snd_card *card,
587#else /* OPTi93X */ 611 struct snd_opti9xx *chip)
588 for (i = OPTi9XX_HW_82C931; i >= OPTi9XX_HW_82C930; i--) { 612{
589 unsigned long flags; 613 int i, err;
590 unsigned char value;
591 614
592 if ((err = snd_opti9xx_init(chip, i)) < 0) 615#ifndef OPTi93X
616 for (i = OPTi9XX_HW_82C928; i < OPTi9XX_HW_82C930; i++) {
617#else
618 for (i = OPTi9XX_HW_82C931; i >= OPTi9XX_HW_82C930; i--) {
619#endif
620 err = snd_opti9xx_init(chip, i);
621 if (err < 0)
593 return err; 622 return err;
594 623
595 if ((chip->res_mc_base = request_region(chip->mc_base, chip->mc_base_size, "OPTi9xx MC")) == NULL) 624 err = snd_opti9xx_read_check(chip);
596 continue; 625 if (err == 0)
597
598 spin_lock_irqsave(&chip->lock, flags);
599 outb(chip->password, chip->mc_base + chip->pwd_reg);
600 outb(((chip->mc_indir_index & (1 << 8)) >> 4) |
601 ((chip->mc_indir_index & 0xf0) >> 4), chip->mc_base);
602 spin_unlock_irqrestore(&chip->lock, flags);
603
604 value = snd_opti9xx_read(chip, OPTi9XX_MC_REG(7));
605 snd_opti9xx_write(chip, OPTi9XX_MC_REG(7), 0xff - value);
606 if (snd_opti9xx_read(chip, OPTi9XX_MC_REG(7)) == 0xff - value)
607 return 1; 626 return 1;
608 627#ifdef OPTi93X
609 release_and_free_resource(chip->res_mc_base); 628 chip->mc_indir_index = 0;
610 chip->res_mc_base = NULL; 629#endif
611 } 630 }
612#endif /* OPTi93X */
613
614 return -ENODEV; 631 return -ENODEV;
615} 632}
616 633
@@ -639,6 +656,8 @@ static int __devinit snd_card_opti9xx_pnp(struct snd_opti9xx *chip,
639#ifdef OPTi93X 656#ifdef OPTi93X
640 port = pnp_port_start(pdev, 0) - 4; 657 port = pnp_port_start(pdev, 0) - 4;
641 fm_port = pnp_port_start(pdev, 1) + 8; 658 fm_port = pnp_port_start(pdev, 1) + 8;
659 chip->mc_indir_index = pnp_port_start(pdev, 3) + 2;
660 chip->mc_indir_size = pnp_port_len(pdev, 3) - 2;
642#else 661#else
643 if (pid->driver_data != 0x0924) 662 if (pid->driver_data != 0x0924)
644 port = pnp_port_start(pdev, 1); 663 port = pnp_port_start(pdev, 1);
@@ -669,7 +688,7 @@ static int __devinit snd_card_opti9xx_pnp(struct snd_opti9xx *chip,
669static void snd_card_opti9xx_free(struct snd_card *card) 688static void snd_card_opti9xx_free(struct snd_card *card)
670{ 689{
671 struct snd_opti9xx *chip = card->private_data; 690 struct snd_opti9xx *chip = card->private_data;
672 691
673 if (chip) { 692 if (chip) {
674#ifdef OPTi93X 693#ifdef OPTi93X
675 struct snd_wss *codec = chip->codec; 694 struct snd_wss *codec = chip->codec;
@@ -677,6 +696,7 @@ static void snd_card_opti9xx_free(struct snd_card *card)
677 disable_irq(codec->irq); 696 disable_irq(codec->irq);
678 free_irq(codec->irq, codec); 697 free_irq(codec->irq, codec);
679 } 698 }
699 release_and_free_resource(chip->res_mc_indir);
680#endif 700#endif
681 release_and_free_resource(chip->res_mc_base); 701 release_and_free_resource(chip->res_mc_base);
682 } 702 }
@@ -696,11 +716,6 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
696 struct snd_rawmidi *rmidi; 716 struct snd_rawmidi *rmidi;
697 struct snd_hwdep *synth; 717 struct snd_hwdep *synth;
698 718
699 if (! chip->res_mc_base &&
700 (chip->res_mc_base = request_region(chip->mc_base, chip->mc_base_size,
701 "OPTi9xx MC")) == NULL)
702 return -ENOMEM;
703
704#if defined(CS4231) || defined(OPTi93X) 719#if defined(CS4231) || defined(OPTi93X)
705 xdma2 = dma2; 720 xdma2 = dma2;
706#else 721#else
@@ -954,6 +969,13 @@ static int __devinit snd_opti9xx_pnp_probe(struct pnp_card_link *pcard,
954 } 969 }
955 if (hw <= OPTi9XX_HW_82C930) 970 if (hw <= OPTi9XX_HW_82C930)
956 chip->mc_base -= 0x80; 971 chip->mc_base -= 0x80;
972
973 error = snd_opti9xx_read_check(chip);
974 if (error) {
975 snd_printk(KERN_ERR "OPTI chip not found\n");
976 snd_card_free(card);
977 return error;
978 }
957 snd_card_set_dev(card, &pcard->card->dev); 979 snd_card_set_dev(card, &pcard->card->dev);
958 if ((error = snd_opti9xx_probe(card)) < 0) { 980 if ((error = snd_opti9xx_probe(card)) < 0) {
959 snd_card_free(card); 981 snd_card_free(card);
diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig
index 135a2b77cc4a..a513651fa149 100644
--- a/sound/oss/Kconfig
+++ b/sound/oss/Kconfig
@@ -1,5 +1,3 @@
1# drivers/sound/Config.in
2#
3# 18 Apr 1998, Michael Elizabeth Chastain, <mailto:mec@shout.net> 1# 18 Apr 1998, Michael Elizabeth Chastain, <mailto:mec@shout.net>
4# More hacking for modularisation. 2# More hacking for modularisation.
5# 3#
diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c
index 06e9e88e4c05..bb14e4c67e89 100644
--- a/sound/oss/dmasound/dmasound_paula.c
+++ b/sound/oss/dmasound/dmasound_paula.c
@@ -657,7 +657,7 @@ static int AmiStateInfo(char *buffer, size_t space)
657 len += sprintf(buffer+len, "\tsound.volume_right = %d [0...64]\n", 657 len += sprintf(buffer+len, "\tsound.volume_right = %d [0...64]\n",
658 dmasound.volume_right); 658 dmasound.volume_right);
659 if (len >= space) { 659 if (len >= space) {
660 printk(KERN_ERR "dmasound_paula: overlowed state buffer alloc.\n") ; 660 printk(KERN_ERR "dmasound_paula: overflowed state buffer alloc.\n") ;
661 len = space ; 661 len = space ;
662 } 662 }
663 return len; 663 return len;
diff --git a/sound/pci/ca0106/ca0106_proc.c b/sound/pci/ca0106/ca0106_proc.c
index 15523e60351c..0470461cc03e 100644
--- a/sound/pci/ca0106/ca0106_proc.c
+++ b/sound/pci/ca0106/ca0106_proc.c
@@ -233,7 +233,7 @@ static void snd_ca0106_proc_dump_iec958( struct snd_info_buffer *buffer, u32 val
233 snd_iprintf(buffer, "user-defined\n"); 233 snd_iprintf(buffer, "user-defined\n");
234 break; 234 break;
235 default: 235 default:
236 snd_iprintf(buffer, "unkown\n"); 236 snd_iprintf(buffer, "unknown\n");
237 break; 237 break;
238 } 238 }
239 snd_iprintf(buffer, "Sample Bits: "); 239 snd_iprintf(buffer, "Sample Bits: ");
diff --git a/sound/pci/cs46xx/imgs/cwcdma.asp b/sound/pci/cs46xx/imgs/cwcdma.asp
index 09d24c76f034..a65e1193c89a 100644
--- a/sound/pci/cs46xx/imgs/cwcdma.asp
+++ b/sound/pci/cs46xx/imgs/cwcdma.asp
@@ -26,10 +26,11 @@
26// 26//
27// 27//
28// The purpose of this code is very simple: make it possible to tranfser 28// The purpose of this code is very simple: make it possible to tranfser
29// the samples 'as they are' with no alteration from a PCMreader SCB (DMA from host) 29// the samples 'as they are' with no alteration from a PCMreader
30// to any other SCB. This is useful for AC3 throug SPDIF. SRC (source rate converters) 30// SCB (DMA from host) to any other SCB. This is useful for AC3 through SPDIF.
31// task always alters the samples in some how, however it's from 48khz -> 48khz. The 31// SRC (source rate converters) task always alters the samples in somehow,
32// alterations are not audible, but AC3 wont work. 32// however it's from 48khz -> 48khz.
33// The alterations are not audible, but AC3 wont work.
33// 34//
34// ... 35// ...
35// | 36// |
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index 6b8ae7b5cd54..1d369ff73805 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -184,7 +184,7 @@ MODULE_PARM_DESC(enable, "Enable the EMU10K1X soundcard.");
184 * The hardware has 3 channels for playback and 1 for capture. 184 * The hardware has 3 channels for playback and 1 for capture.
185 * - channel 0 is the front channel 185 * - channel 0 is the front channel
186 * - channel 1 is the rear channel 186 * - channel 1 is the rear channel
187 * - channel 2 is the center/lfe chanel 187 * - channel 2 is the center/lfe channel
188 * Volume is controlled by the AC97 for the front and rear channels by 188 * Volume is controlled by the AC97 for the front and rear channels by
189 * the PCM Playback Volume, Sigmatel Surround Playback Volume and 189 * the PCM Playback Volume, Sigmatel Surround Playback Volume and
190 * Surround Playback Volume. The Sigmatel 4-Speaker Stereo switch affects 190 * Surround Playback Volume. The Sigmatel 4-Speaker Stereo switch affects
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index d822bfc6cad6..efcc4f7c57f2 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2450,6 +2450,11 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
2450 } 2450 }
2451 } 2451 }
2452 2452
2453 /* disable 64bit DMA address for Teradici */
2454 /* it does not work with device 6549:1200 subsys e4a2:040b */
2455 if (chip->driver_type == AZX_DRIVER_TERA)
2456 gcap &= ~ICH6_GCAP_64OK;
2457
2453 /* allow 64bit DMA address if supported by H/W */ 2458 /* allow 64bit DMA address if supported by H/W */
2454 if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) 2459 if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
2455 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64)); 2460 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64));
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 455a0494f907..447eda1f6770 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -72,7 +72,8 @@ struct ad198x_spec {
72 hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; 72 hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS];
73 73
74 unsigned int jack_present :1; 74 unsigned int jack_present :1;
75 unsigned int inv_jack_detect:1; 75 unsigned int inv_jack_detect:1; /* inverted jack-detection */
76 unsigned int inv_eapd:1; /* inverted EAPD implementation */
76 77
77#ifdef CONFIG_SND_HDA_POWER_SAVE 78#ifdef CONFIG_SND_HDA_POWER_SAVE
78 struct hda_loopback_check loopback; 79 struct hda_loopback_check loopback;
@@ -458,7 +459,7 @@ static struct hda_codec_ops ad198x_patch_ops = {
458 459
459/* 460/*
460 * EAPD control 461 * EAPD control
461 * the private value = nid | (invert << 8) 462 * the private value = nid
462 */ 463 */
463#define ad198x_eapd_info snd_ctl_boolean_mono_info 464#define ad198x_eapd_info snd_ctl_boolean_mono_info
464 465
@@ -467,8 +468,7 @@ static int ad198x_eapd_get(struct snd_kcontrol *kcontrol,
467{ 468{
468 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 469 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
469 struct ad198x_spec *spec = codec->spec; 470 struct ad198x_spec *spec = codec->spec;
470 int invert = (kcontrol->private_value >> 8) & 1; 471 if (spec->inv_eapd)
471 if (invert)
472 ucontrol->value.integer.value[0] = ! spec->cur_eapd; 472 ucontrol->value.integer.value[0] = ! spec->cur_eapd;
473 else 473 else
474 ucontrol->value.integer.value[0] = spec->cur_eapd; 474 ucontrol->value.integer.value[0] = spec->cur_eapd;
@@ -480,11 +480,10 @@ static int ad198x_eapd_put(struct snd_kcontrol *kcontrol,
480{ 480{
481 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 481 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
482 struct ad198x_spec *spec = codec->spec; 482 struct ad198x_spec *spec = codec->spec;
483 int invert = (kcontrol->private_value >> 8) & 1;
484 hda_nid_t nid = kcontrol->private_value & 0xff; 483 hda_nid_t nid = kcontrol->private_value & 0xff;
485 unsigned int eapd; 484 unsigned int eapd;
486 eapd = !!ucontrol->value.integer.value[0]; 485 eapd = !!ucontrol->value.integer.value[0];
487 if (invert) 486 if (spec->inv_eapd)
488 eapd = !eapd; 487 eapd = !eapd;
489 if (eapd == spec->cur_eapd) 488 if (eapd == spec->cur_eapd)
490 return 0; 489 return 0;
@@ -705,7 +704,7 @@ static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = {
705 .info = ad198x_eapd_info, 704 .info = ad198x_eapd_info,
706 .get = ad198x_eapd_get, 705 .get = ad198x_eapd_get,
707 .put = ad198x_eapd_put, 706 .put = ad198x_eapd_put,
708 .private_value = 0x1b | (1 << 8), /* port-D, inversed */ 707 .private_value = 0x1b, /* port-D */
709 }, 708 },
710 { } /* end */ 709 { } /* end */
711}; 710};
@@ -1074,6 +1073,7 @@ static int patch_ad1986a(struct hda_codec *codec)
1074 spec->loopback.amplist = ad1986a_loopbacks; 1073 spec->loopback.amplist = ad1986a_loopbacks;
1075#endif 1074#endif
1076 spec->vmaster_nid = 0x1b; 1075 spec->vmaster_nid = 0x1b;
1076 spec->inv_eapd = 1; /* AD1986A has the inverted EAPD implementation */
1077 1077
1078 codec->patch_ops = ad198x_patch_ops; 1078 codec->patch_ops = ad198x_patch_ops;
1079 1079
@@ -2124,7 +2124,7 @@ static struct snd_kcontrol_new ad1988_laptop_mixers[] = {
2124 .info = ad198x_eapd_info, 2124 .info = ad198x_eapd_info,
2125 .get = ad198x_eapd_get, 2125 .get = ad198x_eapd_get,
2126 .put = ad198x_eapd_put, 2126 .put = ad198x_eapd_put,
2127 .private_value = 0x12 | (1 << 8), /* port-D, inversed */ 2127 .private_value = 0x12, /* port-D */
2128 }, 2128 },
2129 2129
2130 { } /* end */ 2130 { } /* end */
@@ -3065,6 +3065,7 @@ static int patch_ad1988(struct hda_codec *codec)
3065 spec->input_mux = &ad1988_laptop_capture_source; 3065 spec->input_mux = &ad1988_laptop_capture_source;
3066 spec->num_mixers = 1; 3066 spec->num_mixers = 1;
3067 spec->mixers[0] = ad1988_laptop_mixers; 3067 spec->mixers[0] = ad1988_laptop_mixers;
3068 spec->inv_eapd = 1; /* inverted EAPD */
3068 spec->num_init_verbs = 1; 3069 spec->num_init_verbs = 1;
3069 spec->init_verbs[0] = ad1988_laptop_init_verbs; 3070 spec->init_verbs[0] = ad1988_laptop_init_verbs;
3070 if (board_config == AD1988_LAPTOP_DIG) 3071 if (board_config == AD1988_LAPTOP_DIG)
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 2439e84dcb21..4b200da1bd18 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -938,7 +938,7 @@ static void init_input(struct hda_codec *codec)
938 coef |= 0x0500; /* DMIC2 enable 2 channels, disable GPIO1 */ 938 coef |= 0x0500; /* DMIC2 enable 2 channels, disable GPIO1 */
939 if (is_active_pin(codec, CS_DMIC1_PIN_NID)) 939 if (is_active_pin(codec, CS_DMIC1_PIN_NID))
940 coef |= 0x1800; /* DMIC1 enable 2 channels, disable GPIO0 940 coef |= 0x1800; /* DMIC1 enable 2 channels, disable GPIO0
941 * No effect if SPDIF_OUT2 is slected in 941 * No effect if SPDIF_OUT2 is selected in
942 * IDX_SPDIF_CTL. 942 * IDX_SPDIF_CTL.
943 */ 943 */
944 cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); 944 cs_vendor_coef_set(codec, IDX_ADC_CFG, coef);
diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c
index 85c81feb10cf..a45c1169762b 100644
--- a/sound/pci/hda/patch_cmedia.c
+++ b/sound/pci/hda/patch_cmedia.c
@@ -66,7 +66,7 @@ struct cmi_spec {
66 66
67 struct hda_pcm pcm_rec[2]; /* PCM information */ 67 struct hda_pcm pcm_rec[2]; /* PCM information */
68 68
69 /* pin deafault configuration */ 69 /* pin default configuration */
70 hda_nid_t pin_nid[NUM_PINS]; 70 hda_nid_t pin_nid[NUM_PINS];
71 unsigned int def_conf[NUM_PINS]; 71 unsigned int def_conf[NUM_PINS];
72 unsigned int pin_def_confs; 72 unsigned int pin_def_confs;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index d967836f36bb..888b6313eeca 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -208,6 +208,7 @@ enum {
208 ALC885_MBP3, 208 ALC885_MBP3,
209 ALC885_MB5, 209 ALC885_MB5,
210 ALC885_IMAC24, 210 ALC885_IMAC24,
211 ALC885_IMAC91,
211 ALC883_3ST_2ch_DIG, 212 ALC883_3ST_2ch_DIG,
212 ALC883_3ST_6ch_DIG, 213 ALC883_3ST_6ch_DIG,
213 ALC883_3ST_6ch, 214 ALC883_3ST_6ch,
@@ -2400,6 +2401,8 @@ static const char *alc_slave_sws[] = {
2400 "Speaker Playback Switch", 2401 "Speaker Playback Switch",
2401 "Mono Playback Switch", 2402 "Mono Playback Switch",
2402 "IEC958 Playback Switch", 2403 "IEC958 Playback Switch",
2404 "Line-Out Playback Switch",
2405 "PCM Playback Switch",
2403 NULL, 2406 NULL,
2404}; 2407};
2405 2408
@@ -6618,7 +6621,7 @@ static struct hda_input_mux alc889A_mb31_capture_source = {
6618 /* Front Mic (0x01) unused */ 6621 /* Front Mic (0x01) unused */
6619 { "Line", 0x2 }, 6622 { "Line", 0x2 },
6620 /* Line 2 (0x03) unused */ 6623 /* Line 2 (0x03) unused */
6621 /* CD (0x04) unsused? */ 6624 /* CD (0x04) unused? */
6622 }, 6625 },
6623}; 6626};
6624 6627
@@ -7050,6 +7053,20 @@ static struct snd_kcontrol_new alc885_mb5_mixer[] = {
7050 { } /* end */ 7053 { } /* end */
7051}; 7054};
7052 7055
7056static struct snd_kcontrol_new alc885_imac91_mixer[] = {
7057 HDA_CODEC_VOLUME("Line-Out Playback Volume", 0x0c, 0x00, HDA_OUTPUT),
7058 HDA_BIND_MUTE ("Line-Out Playback Switch", 0x0c, 0x02, HDA_INPUT),
7059 HDA_CODEC_MUTE ("Speaker Playback Switch", 0x14, 0x00, HDA_OUTPUT),
7060 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x00, HDA_OUTPUT),
7061 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
7062 HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
7063 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x00, HDA_INPUT),
7064 HDA_CODEC_MUTE ("Mic Playback Switch", 0x0b, 0x00, HDA_INPUT),
7065 HDA_CODEC_VOLUME("Mic Boost", 0x18, 0x00, HDA_INPUT),
7066 { } /* end */
7067};
7068
7069
7053static struct snd_kcontrol_new alc882_w2jc_mixer[] = { 7070static struct snd_kcontrol_new alc882_w2jc_mixer[] = {
7054 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 7071 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
7055 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 7072 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
@@ -7505,6 +7522,66 @@ static struct hda_verb alc885_mbp3_init_verbs[] = {
7505 { } 7522 { }
7506}; 7523};
7507 7524
7525/* iMac 9,1 */
7526static struct hda_verb alc885_imac91_init_verbs[] = {
7527 /* Line-Out mixer: unmute input/output amp left and right (volume = 0) */
7528 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
7529 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
7530 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
7531 /* Rear mixer */
7532 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
7533 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
7534 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
7535 /* HP Pin: output 0 (0x0c) */
7536 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
7537 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
7538 {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
7539 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
7540 /* Internal Speakers: output 0 (0x0d) */
7541 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
7542 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
7543 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
7544 /* Mic (rear) pin: input vref at 80% */
7545 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
7546 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
7547 /* Front Mic pin: input vref at 80% */
7548 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
7549 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
7550 /* Line In pin: use output 1 when in LineOut mode */
7551 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
7552 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
7553 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01},
7554
7555 /* FIXME: use matrix-type input source selection */
7556 /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
7557 /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
7558 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
7559 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
7560 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
7561 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
7562 /* Input mixer2 */
7563 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
7564 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
7565 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
7566 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
7567 /* Input mixer3 */
7568 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
7569 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
7570 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
7571 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
7572 /* ADC1: mute amp left and right */
7573 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
7574 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
7575 /* ADC2: mute amp left and right */
7576 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
7577 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
7578 /* ADC3: mute amp left and right */
7579 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
7580 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
7581
7582 { }
7583};
7584
7508/* iMac 24 mixer. */ 7585/* iMac 24 mixer. */
7509static struct snd_kcontrol_new alc885_imac24_mixer[] = { 7586static struct snd_kcontrol_new alc885_imac24_mixer[] = {
7510 HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x00, HDA_OUTPUT), 7587 HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x00, HDA_OUTPUT),
@@ -7551,6 +7628,26 @@ static void alc885_mbp3_setup(struct hda_codec *codec)
7551 spec->autocfg.speaker_pins[0] = 0x14; 7628 spec->autocfg.speaker_pins[0] = 0x14;
7552} 7629}
7553 7630
7631static void alc885_imac91_automute(struct hda_codec *codec)
7632{
7633 unsigned int present;
7634
7635 present = snd_hda_codec_read(codec, 0x14, 0,
7636 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
7637 snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
7638 HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0);
7639 snd_hda_codec_amp_stereo(codec, 0x1a, HDA_OUTPUT, 0,
7640 HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0);
7641
7642}
7643
7644static void alc885_imac91_unsol_event(struct hda_codec *codec,
7645 unsigned int res)
7646{
7647 /* Headphone insertion or removal. */
7648 if ((res >> 26) == ALC880_HP_EVENT)
7649 alc885_imac91_automute(codec);
7650}
7554 7651
7555static struct hda_verb alc882_targa_verbs[] = { 7652static struct hda_verb alc882_targa_verbs[] = {
7556 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 7653 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
@@ -8718,6 +8815,7 @@ static const char *alc882_models[ALC882_MODEL_LAST] = {
8718 [ALC885_MB5] = "mb5", 8815 [ALC885_MB5] = "mb5",
8719 [ALC885_MBP3] = "mbp3", 8816 [ALC885_MBP3] = "mbp3",
8720 [ALC885_IMAC24] = "imac24", 8817 [ALC885_IMAC24] = "imac24",
8818 [ALC885_IMAC91] = "imac91",
8721 [ALC883_3ST_2ch_DIG] = "3stack-2ch-dig", 8819 [ALC883_3ST_2ch_DIG] = "3stack-2ch-dig",
8722 [ALC883_3ST_6ch_DIG] = "3stack-6ch-dig", 8820 [ALC883_3ST_6ch_DIG] = "3stack-6ch-dig",
8723 [ALC883_3ST_6ch] = "3stack-6ch", 8821 [ALC883_3ST_6ch] = "3stack-6ch",
@@ -8891,6 +8989,7 @@ static struct snd_pci_quirk alc882_ssid_cfg_tbl[] = {
8891 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889A_MB31), 8989 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889A_MB31),
8892 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), 8990 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3),
8893 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24), 8991 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24),
8992 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC885_IMAC91),
8894 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5), 8993 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5),
8895 /* FIXME: HP jack sense seems not working for MBP 5,1 or 5,2, 8994 /* FIXME: HP jack sense seems not working for MBP 5,1 or 5,2,
8896 * so apparently no perfect solution yet 8995 * so apparently no perfect solution yet
@@ -9002,6 +9101,20 @@ static struct alc_config_preset alc882_presets[] = {
9002 .setup = alc885_imac24_setup, 9101 .setup = alc885_imac24_setup,
9003 .init_hook = alc885_imac24_init_hook, 9102 .init_hook = alc885_imac24_init_hook,
9004 }, 9103 },
9104 [ALC885_IMAC91] = {
9105 .mixers = { alc885_imac91_mixer, alc882_chmode_mixer },
9106 .init_verbs = { alc885_imac91_init_verbs,
9107 alc880_gpio1_init_verbs },
9108 .num_dacs = ARRAY_SIZE(alc882_dac_nids),
9109 .dac_nids = alc882_dac_nids,
9110 .channel_mode = alc885_mbp_4ch_modes,
9111 .num_channel_mode = ARRAY_SIZE(alc885_mbp_4ch_modes),
9112 .input_mux = &alc882_capture_source,
9113 .dig_out_nid = ALC882_DIGOUT_NID,
9114 .dig_in_nid = ALC882_DIGIN_NID,
9115 .unsol_event = alc885_imac91_unsol_event,
9116 .init_hook = alc885_imac91_automute,
9117 },
9005 [ALC882_TARGA] = { 9118 [ALC882_TARGA] = {
9006 .mixers = { alc882_targa_mixer, alc882_chmode_mixer }, 9119 .mixers = { alc882_targa_mixer, alc882_chmode_mixer },
9007 .init_verbs = { alc882_base_init_verbs, alc882_adc1_init_verbs, 9120 .init_verbs = { alc882_base_init_verbs, alc882_adc1_init_verbs,
@@ -9908,10 +10021,12 @@ static int patch_alc882(struct hda_codec *codec)
9908 spec->init_amp = ALC_INIT_DEFAULT; /* always initialize */ 10021 spec->init_amp = ALC_INIT_DEFAULT; /* always initialize */
9909 10022
9910 if (!spec->adc_nids && spec->input_mux) { 10023 if (!spec->adc_nids && spec->input_mux) {
9911 int i; 10024 int i, j;
9912 spec->num_adc_nids = 0; 10025 spec->num_adc_nids = 0;
9913 for (i = 0; i < ARRAY_SIZE(alc882_adc_nids); i++) { 10026 for (i = 0; i < ARRAY_SIZE(alc882_adc_nids); i++) {
10027 const struct hda_input_mux *imux = spec->input_mux;
9914 hda_nid_t cap; 10028 hda_nid_t cap;
10029 hda_nid_t items[16];
9915 hda_nid_t nid = alc882_adc_nids[i]; 10030 hda_nid_t nid = alc882_adc_nids[i];
9916 unsigned int wcap = get_wcaps(codec, nid); 10031 unsigned int wcap = get_wcaps(codec, nid);
9917 /* get type */ 10032 /* get type */
@@ -9922,6 +10037,15 @@ static int patch_alc882(struct hda_codec *codec)
9922 err = snd_hda_get_connections(codec, nid, &cap, 1); 10037 err = snd_hda_get_connections(codec, nid, &cap, 1);
9923 if (err < 0) 10038 if (err < 0)
9924 continue; 10039 continue;
10040 err = snd_hda_get_connections(codec, cap, items,
10041 ARRAY_SIZE(items));
10042 if (err < 0)
10043 continue;
10044 for (j = 0; j < imux->num_items; j++)
10045 if (imux->items[j].index >= err)
10046 break;
10047 if (j < imux->num_items)
10048 continue;
9925 spec->private_capsrc_nids[spec->num_adc_nids] = cap; 10049 spec->private_capsrc_nids[spec->num_adc_nids] = cap;
9926 spec->num_adc_nids++; 10050 spec->num_adc_nids++;
9927 } 10051 }
@@ -16846,6 +16970,7 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = {
16846 ALC662_3ST_6ch_DIG), 16970 ALC662_3ST_6ch_DIG),
16847 SND_PCI_QUIRK_MASK(0x1854, 0xf000, 0x2000, "ASUS H13-200x", 16971 SND_PCI_QUIRK_MASK(0x1854, 0xf000, 0x2000, "ASUS H13-200x",
16848 ALC663_ASUS_H13), 16972 ALC663_ASUS_H13),
16973 SND_PCI_QUIRK(0x8086, 0xd604, "Intel mobo", ALC662_3ST_2ch_DIG),
16849 {} 16974 {}
16850}; 16975};
16851 16976
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c
index 110d16e52733..765d7bd4c3d4 100644
--- a/sound/pci/ice1712/aureon.c
+++ b/sound/pci/ice1712/aureon.c
@@ -689,32 +689,14 @@ static int aureon_ac97_mmute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
689 return change; 689 return change;
690} 690}
691 691
692static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1); 692static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -10000, 100, 1);
693static const DECLARE_TLV_DB_SCALE(db_scale_wm_pcm, -6400, 50, 1); 693static const DECLARE_TLV_DB_SCALE(db_scale_wm_pcm, -6400, 50, 1);
694static const DECLARE_TLV_DB_SCALE(db_scale_wm_adc, -1200, 100, 0); 694static const DECLARE_TLV_DB_SCALE(db_scale_wm_adc, -1200, 100, 0);
695static const DECLARE_TLV_DB_SCALE(db_scale_ac97_master, -4650, 150, 0); 695static const DECLARE_TLV_DB_SCALE(db_scale_ac97_master, -4650, 150, 0);
696static const DECLARE_TLV_DB_SCALE(db_scale_ac97_gain, -3450, 150, 0); 696static const DECLARE_TLV_DB_SCALE(db_scale_ac97_gain, -3450, 150, 0);
697 697
698/* 698#define WM_VOL_MAX 100
699 * Logarithmic volume values for WM8770 699#define WM_VOL_CNT 101 /* 0dB .. -100dB */
700 * Computed as 20 * Log10(255 / x)
701 */
702static const unsigned char wm_vol[256] = {
703 127, 48, 42, 39, 36, 34, 33, 31, 30, 29, 28, 27, 27, 26, 25, 25, 24, 24, 23,
704 23, 22, 22, 21, 21, 21, 20, 20, 20, 19, 19, 19, 18, 18, 18, 18, 17, 17, 17,
705 17, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 13,
706 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11,
707 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8,
708 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6,
709 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
710 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3,
711 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
712 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
713 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
714 0, 0
715};
716
717#define WM_VOL_MAX (sizeof(wm_vol) - 1)
718#define WM_VOL_MUTE 0x8000 700#define WM_VOL_MUTE 0x8000
719 701
720static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, unsigned short vol, unsigned short master) 702static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, unsigned short vol, unsigned short master)
@@ -724,7 +706,8 @@ static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, unsigned sho
724 if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) 706 if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE))
725 nvol = 0; 707 nvol = 0;
726 else 708 else
727 nvol = 127 - wm_vol[(((vol & ~WM_VOL_MUTE) * (master & ~WM_VOL_MUTE)) / 127) & WM_VOL_MAX]; 709 nvol = ((vol % WM_VOL_CNT) * (master % WM_VOL_CNT)) /
710 WM_VOL_MAX;
728 711
729 wm_put(ice, index, nvol); 712 wm_put(ice, index, nvol);
730 wm_put_nocache(ice, index, 0x180 | nvol); 713 wm_put_nocache(ice, index, 0x180 | nvol);
@@ -820,7 +803,7 @@ static int wm_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *
820 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 803 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
821 uinfo->count = voices; 804 uinfo->count = voices;
822 uinfo->value.integer.min = 0; /* mute (-101dB) */ 805 uinfo->value.integer.min = 0; /* mute (-101dB) */
823 uinfo->value.integer.max = 0x7F; /* 0dB */ 806 uinfo->value.integer.max = WM_VOL_MAX; /* 0dB */
824 return 0; 807 return 0;
825} 808}
826 809
@@ -850,7 +833,7 @@ static int wm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *
850 snd_ice1712_save_gpio_status(ice); 833 snd_ice1712_save_gpio_status(ice);
851 for (i = 0; i < voices; i++) { 834 for (i = 0; i < voices; i++) {
852 unsigned int vol = ucontrol->value.integer.value[i]; 835 unsigned int vol = ucontrol->value.integer.value[i];
853 if (vol > 0x7f) 836 if (vol > WM_VOL_MAX)
854 continue; 837 continue;
855 vol |= spec->vol[ofs+i]; 838 vol |= spec->vol[ofs+i];
856 if (vol != spec->vol[ofs+i]) { 839 if (vol != spec->vol[ofs+i]) {
diff --git a/sound/pci/ice1712/juli.c b/sound/pci/ice1712/juli.c
index 0c9413d5341b..98bc3b7681b5 100644
--- a/sound/pci/ice1712/juli.c
+++ b/sound/pci/ice1712/juli.c
@@ -380,7 +380,7 @@ static struct snd_kcontrol_new juli_mute_controls[] __devinitdata = {
380 * inputs) are fed from Xilinx. 380 * inputs) are fed from Xilinx.
381 * 381 *
382 * I even checked traces on board and coded a support in driver for 382 * I even checked traces on board and coded a support in driver for
383 * an alternative possiblity - the unused I2S ICE output channels 383 * an alternative possibility - the unused I2S ICE output channels
384 * switched to HW-IN/SPDIF-IN and providing the monitoring signal to 384 * switched to HW-IN/SPDIF-IN and providing the monitoring signal to
385 * the DAC - to no avail. The I2S outputs seem to be unconnected. 385 * the DAC - to no avail. The I2S outputs seem to be unconnected.
386 * 386 *
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 0dce331a2a3b..a1b10d1a384d 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -3017,7 +3017,7 @@ snd_hdspm_proc_read_madi(struct snd_info_entry * entry,
3017 insel = "Coaxial"; 3017 insel = "Coaxial";
3018 break; 3018 break;
3019 default: 3019 default:
3020 insel = "Unkown"; 3020 insel = "Unknown";
3021 } 3021 }
3022 3022
3023 switch (hdspm->control_register & HDSPM_SyncRefMask) { 3023 switch (hdspm->control_register & HDSPM_SyncRefMask) {
@@ -3028,7 +3028,7 @@ snd_hdspm_proc_read_madi(struct snd_info_entry * entry,
3028 syncref = "MADI"; 3028 syncref = "MADI";
3029 break; 3029 break;
3030 default: 3030 default:
3031 syncref = "Unkown"; 3031 syncref = "Unknown";
3032 } 3032 }
3033 snd_iprintf(buffer, "Inputsel = %s, SyncRef = %s\n", insel, 3033 snd_iprintf(buffer, "Inputsel = %s, SyncRef = %s\n", insel,
3034 syncref); 3034 syncref);
diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c
index aa40d985138f..3e99fe5131dd 100644
--- a/sound/soc/codecs/uda134x.c
+++ b/sound/soc/codecs/uda134x.c
@@ -101,7 +101,7 @@ static int uda134x_write(struct snd_soc_codec *codec, unsigned int reg,
101 pr_debug("%s reg: %02X, value:%02X\n", __func__, reg, value); 101 pr_debug("%s reg: %02X, value:%02X\n", __func__, reg, value);
102 102
103 if (reg >= UDA134X_REGS_NUM) { 103 if (reg >= UDA134X_REGS_NUM) {
104 printk(KERN_ERR "%s unkown register: reg: %u", 104 printk(KERN_ERR "%s unknown register: reg: %u",
105 __func__, reg); 105 __func__, reg);
106 return -EINVAL; 106 return -EINVAL;
107 } 107 }
@@ -552,7 +552,7 @@ static int uda134x_soc_probe(struct platform_device *pdev)
552 ARRAY_SIZE(uda1341_snd_controls)); 552 ARRAY_SIZE(uda1341_snd_controls));
553 break; 553 break;
554 default: 554 default:
555 printk(KERN_ERR "%s unkown codec type: %d", 555 printk(KERN_ERR "%s unknown codec type: %d",
556 __func__, pd->model); 556 __func__, pd->model);
557 return -EINVAL; 557 return -EINVAL;
558 } 558 }
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index b8cae1758642..ce5515e3f2b0 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -607,7 +607,7 @@ SOC_SINGLE("Right Input PGA Common Mode Switch", WM8903_ANALOGUE_RIGHT_INPUT_1,
607SOC_SINGLE("DRC Switch", WM8903_DRC_0, 15, 1, 0), 607SOC_SINGLE("DRC Switch", WM8903_DRC_0, 15, 1, 0),
608SOC_ENUM("DRC Compressor Slope R0", drc_slope_r0), 608SOC_ENUM("DRC Compressor Slope R0", drc_slope_r0),
609SOC_ENUM("DRC Compressor Slope R1", drc_slope_r1), 609SOC_ENUM("DRC Compressor Slope R1", drc_slope_r1),
610SOC_SINGLE_TLV("DRC Compressor Threashold Volume", WM8903_DRC_3, 5, 124, 1, 610SOC_SINGLE_TLV("DRC Compressor Threshold Volume", WM8903_DRC_3, 5, 124, 1,
611 drc_tlv_thresh), 611 drc_tlv_thresh),
612SOC_SINGLE_TLV("DRC Volume", WM8903_DRC_3, 0, 30, 1, drc_tlv_amp), 612SOC_SINGLE_TLV("DRC Volume", WM8903_DRC_3, 0, 30, 1, drc_tlv_amp),
613SOC_SINGLE_TLV("DRC Minimum Gain Volume", WM8903_DRC_1, 2, 3, 1, drc_tlv_min), 613SOC_SINGLE_TLV("DRC Minimum Gain Volume", WM8903_DRC_1, 2, 3, 1, drc_tlv_min),
@@ -617,11 +617,11 @@ SOC_ENUM("DRC Decay Rate", drc_decay),
617SOC_ENUM("DRC FF Delay", drc_ff_delay), 617SOC_ENUM("DRC FF Delay", drc_ff_delay),
618SOC_SINGLE("DRC Anticlip Switch", WM8903_DRC_0, 1, 1, 0), 618SOC_SINGLE("DRC Anticlip Switch", WM8903_DRC_0, 1, 1, 0),
619SOC_SINGLE("DRC QR Switch", WM8903_DRC_0, 2, 1, 0), 619SOC_SINGLE("DRC QR Switch", WM8903_DRC_0, 2, 1, 0),
620SOC_SINGLE_TLV("DRC QR Threashold Volume", WM8903_DRC_0, 6, 3, 0, drc_tlv_max), 620SOC_SINGLE_TLV("DRC QR Threshold Volume", WM8903_DRC_0, 6, 3, 0, drc_tlv_max),
621SOC_ENUM("DRC QR Decay Rate", drc_qr_decay), 621SOC_ENUM("DRC QR Decay Rate", drc_qr_decay),
622SOC_SINGLE("DRC Smoothing Switch", WM8903_DRC_0, 3, 1, 0), 622SOC_SINGLE("DRC Smoothing Switch", WM8903_DRC_0, 3, 1, 0),
623SOC_SINGLE("DRC Smoothing Hysteresis Switch", WM8903_DRC_0, 0, 1, 0), 623SOC_SINGLE("DRC Smoothing Hysteresis Switch", WM8903_DRC_0, 0, 1, 0),
624SOC_ENUM("DRC Smoothing Threashold", drc_smoothing), 624SOC_ENUM("DRC Smoothing Threshold", drc_smoothing),
625SOC_SINGLE_TLV("DRC Startup Volume", WM8903_DRC_0, 6, 18, 0, drc_tlv_startup), 625SOC_SINGLE_TLV("DRC Startup Volume", WM8903_DRC_0, 6, 18, 0, drc_tlv_startup),
626 626
627SOC_DOUBLE_R_TLV("Digital Capture Volume", WM8903_ADC_DIGITAL_VOLUME_LEFT, 627SOC_DOUBLE_R_TLV("Digital Capture Volume", WM8903_ADC_DIGITAL_VOLUME_LEFT,
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index 5e32f2ed5fc2..2981afae842c 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -689,7 +689,7 @@ SOC_DOUBLE_TLV("Digital Sidetone Volume", WM8993_DIGITAL_SIDE_TONE,
689 689
690SOC_SINGLE("DRC Switch", WM8993_DRC_CONTROL_1, 15, 1, 0), 690SOC_SINGLE("DRC Switch", WM8993_DRC_CONTROL_1, 15, 1, 0),
691SOC_ENUM("DRC Path", drc_path), 691SOC_ENUM("DRC Path", drc_path),
692SOC_SINGLE_TLV("DRC Compressor Threashold Volume", WM8993_DRC_CONTROL_2, 692SOC_SINGLE_TLV("DRC Compressor Threshold Volume", WM8993_DRC_CONTROL_2,
693 2, 60, 1, drc_comp_threash), 693 2, 60, 1, drc_comp_threash),
694SOC_SINGLE_TLV("DRC Compressor Amplitude Volume", WM8993_DRC_CONTROL_3, 694SOC_SINGLE_TLV("DRC Compressor Amplitude Volume", WM8993_DRC_CONTROL_3,
695 11, 30, 1, drc_comp_amp), 695 11, 30, 1, drc_comp_amp),
@@ -709,7 +709,7 @@ SOC_SINGLE_TLV("DRC Quick Release Volume", WM8993_DRC_CONTROL_3, 2, 3, 0,
709SOC_ENUM("DRC Quick Release Rate", drc_qr_rate), 709SOC_ENUM("DRC Quick Release Rate", drc_qr_rate),
710SOC_SINGLE("DRC Smoothing Switch", WM8993_DRC_CONTROL_1, 11, 1, 0), 710SOC_SINGLE("DRC Smoothing Switch", WM8993_DRC_CONTROL_1, 11, 1, 0),
711SOC_SINGLE("DRC Smoothing Hysteresis Switch", WM8993_DRC_CONTROL_1, 8, 1, 0), 711SOC_SINGLE("DRC Smoothing Hysteresis Switch", WM8993_DRC_CONTROL_1, 8, 1, 0),
712SOC_ENUM("DRC Smoothing Hysteresis Threashold", drc_smooth), 712SOC_ENUM("DRC Smoothing Hysteresis Threshold", drc_smooth),
713SOC_SINGLE_TLV("DRC Startup Volume", WM8993_DRC_CONTROL_4, 8, 18, 0, 713SOC_SINGLE_TLV("DRC Startup Volume", WM8993_DRC_CONTROL_4, 8, 18, 0,
714 drc_startup_tlv), 714 drc_startup_tlv),
715 715
diff --git a/sound/soc/imx/mx1_mx2-pcm.c b/sound/soc/imx/mx1_mx2-pcm.c
index b83866529397..bffffcd5ff34 100644
--- a/sound/soc/imx/mx1_mx2-pcm.c
+++ b/sound/soc/imx/mx1_mx2-pcm.c
@@ -322,12 +322,12 @@ static int mx1_mx2_pcm_open(struct snd_pcm_substream *substream)
322 322
323 pr_debug("%s: Requesting dma channel (%s)\n", __func__, 323 pr_debug("%s: Requesting dma channel (%s)\n", __func__,
324 prtd->dma_params->name); 324 prtd->dma_params->name);
325 prtd->dma_ch = imx_dma_request_by_prio(prtd->dma_params->name, 325 ret = imx_dma_request_by_prio(prtd->dma_params->name, DMA_PRIO_HIGH);
326 DMA_PRIO_HIGH); 326 if (ret < 0) {
327 if (prtd->dma_ch < 0) {
328 printk(KERN_ERR "Error %d requesting dma channel\n", ret); 327 printk(KERN_ERR "Error %d requesting dma channel\n", ret);
329 return ret; 328 return ret;
330 } 329 }
330 prtd->dma_ch = ret;
331 imx_dma_config_burstlen(prtd->dma_ch, 331 imx_dma_config_burstlen(prtd->dma_ch,
332 prtd->dma_params->watermark_level); 332 prtd->dma_params->watermark_level);
333 333
diff --git a/sound/soc/s3c24xx/s3c24xx_simtec.c b/sound/soc/s3c24xx/s3c24xx_simtec.c
index 507b2ed5d58b..d441c3b64631 100644
--- a/sound/soc/s3c24xx/s3c24xx_simtec.c
+++ b/sound/soc/s3c24xx/s3c24xx_simtec.c
@@ -270,7 +270,7 @@ static int attach_gpio_amp(struct device *dev,
270 gpio_direction_output(pd->amp_gain[1], 0); 270 gpio_direction_output(pd->amp_gain[1], 0);
271 } 271 }
272 272
273 /* note, curently we assume GPA0 isn't valid amp */ 273 /* note, currently we assume GPA0 isn't valid amp */
274 if (pdata->amp_gpio > 0) { 274 if (pdata->amp_gpio > 0) {
275 ret = gpio_request(pd->amp_gpio, "gpio-amp"); 275 ret = gpio_request(pd->amp_gpio, "gpio-amp");
276 if (ret) { 276 if (ret) {
diff --git a/sound/soc/s6000/s6000-pcm.c b/sound/soc/s6000/s6000-pcm.c
index 0eb1722f6581..1d61109e09fa 100644
--- a/sound/soc/s6000/s6000-pcm.c
+++ b/sound/soc/s6000/s6000-pcm.c
@@ -196,7 +196,7 @@ static int s6000_pcm_start(struct snd_pcm_substream *substream)
196 0 /* destination skip after chunk (impossible) */, 196 0 /* destination skip after chunk (impossible) */,
197 4 /* 16 byte burst size */, 197 4 /* 16 byte burst size */,
198 -1 /* don't conserve bandwidth */, 198 -1 /* don't conserve bandwidth */,
199 0 /* low watermark irq descriptor theshold */, 199 0 /* low watermark irq descriptor threshold */,
200 0 /* disable hardware timestamps */, 200 0 /* disable hardware timestamps */,
201 1 /* enable channel */); 201 1 /* enable channel */);
202 202
diff --git a/sound/sound_core.c b/sound/sound_core.c
index 49c998186592..dbca7c909a31 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -353,7 +353,7 @@ static struct sound_unit *chains[SOUND_STEP];
353 * @dev: device pointer 353 * @dev: device pointer
354 * 354 *
355 * Allocate a special sound device by minor number from the sound 355 * Allocate a special sound device by minor number from the sound
356 * subsystem. The allocated number is returned on succes. On failure 356 * subsystem. The allocated number is returned on success. On failure
357 * a negative error code is returned. 357 * a negative error code is returned.
358 */ 358 */
359 359
diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c
index 63c8f45c0c22..67c91230c197 100644
--- a/sound/synth/emux/soundfont.c
+++ b/sound/synth/emux/soundfont.c
@@ -374,7 +374,7 @@ sf_zone_new(struct snd_sf_list *sflist, struct snd_soundfont *sf)
374 374
375 375
376/* 376/*
377 * increment sample couter 377 * increment sample counter
378 */ 378 */
379static void 379static void
380set_sample_counter(struct snd_sf_list *sflist, struct snd_soundfont *sf, 380set_sample_counter(struct snd_sf_list *sflist, struct snd_soundfont *sf,
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c
index f71cd28eca6b..91bb29666d26 100644
--- a/sound/usb/usx2y/us122l.c
+++ b/sound/usb/usx2y/us122l.c
@@ -194,7 +194,8 @@ static int usb_stream_hwdep_open(struct snd_hwdep *hw, struct file *file)
194 if (!us122l->first) 194 if (!us122l->first)
195 us122l->first = file; 195 us122l->first = file;
196 196
197 if (us122l->dev->descriptor.idProduct == USB_ID_US144) { 197 if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
198 us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
198 iface = usb_ifnum_to_if(us122l->dev, 0); 199 iface = usb_ifnum_to_if(us122l->dev, 0);
199 usb_autopm_get_interface(iface); 200 usb_autopm_get_interface(iface);
200 } 201 }
@@ -209,7 +210,8 @@ static int usb_stream_hwdep_release(struct snd_hwdep *hw, struct file *file)
209 struct usb_interface *iface; 210 struct usb_interface *iface;
210 snd_printdd(KERN_DEBUG "%p %p\n", hw, file); 211 snd_printdd(KERN_DEBUG "%p %p\n", hw, file);
211 212
212 if (us122l->dev->descriptor.idProduct == USB_ID_US144) { 213 if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
214 us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
213 iface = usb_ifnum_to_if(us122l->dev, 0); 215 iface = usb_ifnum_to_if(us122l->dev, 0);
214 usb_autopm_put_interface(iface); 216 usb_autopm_put_interface(iface);
215 } 217 }
@@ -476,7 +478,8 @@ static bool us122l_create_card(struct snd_card *card)
476 int err; 478 int err;
477 struct us122l *us122l = US122L(card); 479 struct us122l *us122l = US122L(card);
478 480
479 if (us122l->dev->descriptor.idProduct == USB_ID_US144) { 481 if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
482 us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
480 err = usb_set_interface(us122l->dev, 0, 1); 483 err = usb_set_interface(us122l->dev, 0, 1);
481 if (err) { 484 if (err) {
482 snd_printk(KERN_ERR "usb_set_interface error \n"); 485 snd_printk(KERN_ERR "usb_set_interface error \n");
@@ -495,7 +498,8 @@ static bool us122l_create_card(struct snd_card *card)
495 if (!us122l_start(us122l, 44100, 256)) 498 if (!us122l_start(us122l, 44100, 256))
496 return false; 499 return false;
497 500
498 if (us122l->dev->descriptor.idProduct == USB_ID_US144) 501 if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
502 us122l->dev->descriptor.idProduct == USB_ID_US144MKII)
499 err = us144_create_usbmidi(card); 503 err = us144_create_usbmidi(card);
500 else 504 else
501 err = us122l_create_usbmidi(card); 505 err = us122l_create_usbmidi(card);
@@ -597,7 +601,8 @@ static int snd_us122l_probe(struct usb_interface *intf,
597 struct snd_card *card; 601 struct snd_card *card;
598 int err; 602 int err;
599 603
600 if (device->descriptor.idProduct == USB_ID_US144 604 if ((device->descriptor.idProduct == USB_ID_US144 ||
605 device->descriptor.idProduct == USB_ID_US144MKII)
601 && device->speed == USB_SPEED_HIGH) { 606 && device->speed == USB_SPEED_HIGH) {
602 snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n"); 607 snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n");
603 return -ENODEV; 608 return -ENODEV;
@@ -692,7 +697,8 @@ static int snd_us122l_resume(struct usb_interface *intf)
692 697
693 mutex_lock(&us122l->mutex); 698 mutex_lock(&us122l->mutex);
694 /* needed, doesn't restart without: */ 699 /* needed, doesn't restart without: */
695 if (us122l->dev->descriptor.idProduct == USB_ID_US144) { 700 if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
701 us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
696 err = usb_set_interface(us122l->dev, 0, 1); 702 err = usb_set_interface(us122l->dev, 0, 1);
697 if (err) { 703 if (err) {
698 snd_printk(KERN_ERR "usb_set_interface error \n"); 704 snd_printk(KERN_ERR "usb_set_interface error \n");
@@ -737,6 +743,16 @@ static struct usb_device_id snd_us122l_usb_id_table[] = {
737 .idVendor = 0x0644, 743 .idVendor = 0x0644,
738 .idProduct = USB_ID_US144 744 .idProduct = USB_ID_US144
739 }, 745 },
746 {
747 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
748 .idVendor = 0x0644,
749 .idProduct = USB_ID_US122MKII
750 },
751 {
752 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
753 .idVendor = 0x0644,
754 .idProduct = USB_ID_US144MKII
755 },
740 { /* terminator */ } 756 { /* terminator */ }
741}; 757};
742 758
diff --git a/sound/usb/usx2y/us122l.h b/sound/usb/usx2y/us122l.h
index 4daf1982e821..f263b3f96c86 100644
--- a/sound/usb/usx2y/us122l.h
+++ b/sound/usb/usx2y/us122l.h
@@ -25,5 +25,7 @@ struct us122l {
25 25
26#define USB_ID_US122L 0x800E 26#define USB_ID_US122L 0x800E
27#define USB_ID_US144 0x800F 27#define USB_ID_US144 0x800F
28#define USB_ID_US122MKII 0x8021
29#define USB_ID_US144MKII 0x8020
28 30
29#endif 31#endif