aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/ac97/ac97_patch.c53
-rw-r--r--sound/pci/ali5451/ali5451.c2
-rw-r--r--sound/pci/au88x0/au88x0_eq.c2
-rw-r--r--sound/pci/bt87x.c4
-rw-r--r--sound/pci/ca0106/ca0106_main.c12
-rw-r--r--sound/pci/cs46xx/dsp_spos_scb_lib.c2
-rw-r--r--sound/pci/cs5535audio/cs5535audio.c6
-rw-r--r--sound/pci/emu10k1/emumixer.c10
-rw-r--r--sound/pci/hda/hda_intel.c2
-rw-r--r--sound/pci/hda/patch_realtek.c11
-rw-r--r--sound/pci/hda/patch_si3054.c1
-rw-r--r--sound/pci/hda/patch_sigmatel.c176
-rw-r--r--sound/pci/intel8x0.c15
-rw-r--r--sound/pci/pcxhr/pcxhr.c9
-rw-r--r--sound/pci/rme9652/hdspm.c6
-rw-r--r--sound/pci/trident/trident.c8
-rw-r--r--sound/pci/via82xx.c5
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c2
18 files changed, 264 insertions, 62 deletions
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 4aa5fdc5688e..a444a78c7c94 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -1621,8 +1621,27 @@ static const struct snd_kcontrol_new snd_ac97_ad1981x_jack_sense[] = {
1621 AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0), 1621 AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0),
1622}; 1622};
1623 1623
1624/* black list to avoid HP/Line jack-sense controls
1625 * (SS vendor << 16 | device)
1626 */
1627static unsigned int ad1981_jacks_blacklist[] = {
1628 0x10140554, /* Thinkpad T42p/R50p */
1629 0 /* end */
1630};
1631
1632static int check_list(struct snd_ac97 *ac97, const unsigned int *list)
1633{
1634 u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device;
1635 for (; *list; list++)
1636 if (*list == subid)
1637 return 1;
1638 return 0;
1639}
1640
1624static int patch_ad1981a_specific(struct snd_ac97 * ac97) 1641static int patch_ad1981a_specific(struct snd_ac97 * ac97)
1625{ 1642{
1643 if (check_list(ac97, ad1981_jacks_blacklist))
1644 return 0;
1626 return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense, 1645 return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
1627 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); 1646 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
1628} 1647}
@@ -1635,22 +1654,26 @@ static struct snd_ac97_build_ops patch_ad1981a_build_ops = {
1635#endif 1654#endif
1636}; 1655};
1637 1656
1657/* white list to enable HP jack-sense bits
1658 * (SS vendor << 16 | device)
1659 */
1660static unsigned int ad1981_jacks_whitelist[] = {
1661 0x0e11005a, /* HP nc4000/4010 */
1662 0x103c0890, /* HP nc6000 */
1663 0x103c0938, /* HP nc4220 */
1664 0x103c099c, /* HP nx6110 */
1665 0x103c0944, /* HP nc6220 */
1666 0x103c0934, /* HP nc8220 */
1667 0x103c006d, /* HP nx9105 */
1668 0x17340088, /* FSC Scenic-W */
1669 0 /* end */
1670};
1671
1638static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97) 1672static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97)
1639{ 1673{
1640 u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device; 1674 if (check_list(ac97, ad1981_jacks_whitelist))
1641 switch (subid) {
1642 case 0x0e11005a: /* HP nc4000/4010 */
1643 case 0x103c0890: /* HP nc6000 */
1644 case 0x103c0938: /* HP nc4220 */
1645 case 0x103c099c: /* HP nx6110 */
1646 case 0x103c0944: /* HP nc6220 */
1647 case 0x103c0934: /* HP nc8220 */
1648 case 0x103c006d: /* HP nx9105 */
1649 case 0x17340088: /* FSC Scenic-W */
1650 /* enable headphone jack sense */ 1675 /* enable headphone jack sense */
1651 snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11); 1676 snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11);
1652 break;
1653 }
1654} 1677}
1655 1678
1656int patch_ad1981a(struct snd_ac97 *ac97) 1679int patch_ad1981a(struct snd_ac97 *ac97)
@@ -1672,6 +1695,8 @@ static int patch_ad1981b_specific(struct snd_ac97 *ac97)
1672 1695
1673 if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0) 1696 if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0)
1674 return err; 1697 return err;
1698 if (check_list(ac97, ad1981_jacks_blacklist))
1699 return 0;
1675 return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense, 1700 return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
1676 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); 1701 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
1677} 1702}
@@ -2210,9 +2235,9 @@ static void alc850_update_jacks(struct snd_ac97 *ac97)
2210 /* Vref disable (bit12), 1kOhm (bit13) */ 2235 /* Vref disable (bit12), 1kOhm (bit13) */
2211 snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13), 2236 snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13),
2212 shared ? (1<<12) : (1<<13)); 2237 shared ? (1<<12) : (1<<13));
2213 /* MIC-IN = 1, CENTER-LFE = 2 */ 2238 /* MIC-IN = 1, CENTER-LFE = 5 */
2214 snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 4, 2239 snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 4,
2215 shared ? (2<<4) : (1<<4)); 2240 shared ? (5<<4) : (1<<4));
2216} 2241}
2217 2242
2218static const struct snd_kcontrol_new snd_ac97_controls_alc850[] = { 2243static const struct snd_kcontrol_new snd_ac97_controls_alc850[] = {
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index bc4d1ef08efa..e264136e8fb4 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -279,7 +279,7 @@ struct snd_ali {
279}; 279};
280 280
281static struct pci_device_id snd_ali_ids[] = { 281static struct pci_device_id snd_ali_ids[] = {
282 {0x10b9, 0x5451, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, 282 {PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0},
283 {0, } 283 {0, }
284}; 284};
285MODULE_DEVICE_TABLE(pci, snd_ali_ids); 285MODULE_DEVICE_TABLE(pci, snd_ali_ids);
diff --git a/sound/pci/au88x0/au88x0_eq.c b/sound/pci/au88x0/au88x0_eq.c
index 13bc8ed301c5..c8280f82eb5a 100644
--- a/sound/pci/au88x0/au88x0_eq.c
+++ b/sound/pci/au88x0/au88x0_eq.c
@@ -849,7 +849,7 @@ static int
849snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 849snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
850{ 850{
851 vortex_t *vortex = snd_kcontrol_chip(kcontrol); 851 vortex_t *vortex = snd_kcontrol_chip(kcontrol);
852 int i, count; 852 int i, count = 0;
853 u16 peaks[20]; 853 u16 peaks[20];
854 854
855 vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count); 855 vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count);
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index dc9cd3079b14..c840a4c08e98 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -781,6 +781,8 @@ static struct pci_device_id snd_bt87x_ids[] = {
781 BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, 0x0070, 0x13eb, 32000), 781 BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, 0x0070, 0x13eb, 32000),
782 /* Viewcast Osprey 200 */ 782 /* Viewcast Osprey 200 */
783 BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0xff01, 44100), 783 BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0xff01, 44100),
784 /* AVerMedia Studio No. 103, 203, ...? */
785 BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x1461, 0x0003, 48000),
784 { } 786 { }
785}; 787};
786MODULE_DEVICE_TABLE(pci, snd_bt87x_ids); 788MODULE_DEVICE_TABLE(pci, snd_bt87x_ids);
@@ -808,7 +810,7 @@ static int __devinit snd_bt87x_detect_card(struct pci_dev *pci)
808 const struct pci_device_id *supported; 810 const struct pci_device_id *supported;
809 811
810 supported = pci_match_device(&driver, pci); 812 supported = pci_match_device(&driver, pci);
811 if (supported) 813 if (supported && supported->driver_data > 0)
812 return supported->driver_data; 814 return supported->driver_data;
813 815
814 for (i = 0; i < ARRAY_SIZE(blacklist); ++i) 816 for (i = 0; i < ARRAY_SIZE(blacklist); ++i)
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 6ed7c0bfa091..9477838a9c88 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -199,7 +199,8 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
199 .name = "MSI K8N Diamond MB [SB0438]", 199 .name = "MSI K8N Diamond MB [SB0438]",
200 .gpio_type = 1, 200 .gpio_type = 1,
201 .i2c_adc = 1 } , 201 .i2c_adc = 1 } ,
202 /* Shuttle XPC SD31P which has an onboard Creative Labs Sound Blaster Live! 24-bit EAX 202 /* Shuttle XPC SD31P which has an onboard Creative Labs
203 * Sound Blaster Live! 24-bit EAX
203 * high-definition 7.1 audio processor". 204 * high-definition 7.1 audio processor".
204 * Added using info from andrewvegan in alsa bug #1298 205 * Added using info from andrewvegan in alsa bug #1298
205 */ 206 */
@@ -207,6 +208,15 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
207 .name = "Shuttle XPC SD31P [SD31P]", 208 .name = "Shuttle XPC SD31P [SD31P]",
208 .gpio_type = 1, 209 .gpio_type = 1,
209 .i2c_adc = 1 } , 210 .i2c_adc = 1 } ,
211 /* Shuttle XPC SD11G5 which has an onboard Creative Labs
212 * Sound Blaster Live! 24-bit EAX
213 * high-definition 7.1 audio processor".
214 * Fixes ALSA bug#1600
215 */
216 { .serial = 0x30411297,
217 .name = "Shuttle XPC SD11G5 [SD11G5]",
218 .gpio_type = 1,
219 .i2c_adc = 1 } ,
210 { .serial = 0, 220 { .serial = 0,
211 .name = "AudigyLS [Unknown]" } 221 .name = "AudigyLS [Unknown]" }
212}; 222};
diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c
index 509aa2b63331..d4e0fb39bd06 100644
--- a/sound/pci/cs46xx/dsp_spos_scb_lib.c
+++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c
@@ -675,7 +675,7 @@ cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name,
675 if (pass_through) { 675 if (pass_through) {
676 /* wont work with any other rate than 676 /* wont work with any other rate than
677 the native DSP rate */ 677 the native DSP rate */
678 snd_assert (rate = 48000); 678 snd_assert (rate == 48000);
679 679
680 scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&src_task_scb, 680 scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&src_task_scb,
681 dest,"DMAREADER",parent_scb, 681 dest,"DMAREADER",parent_scb,
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c
index f36ede827479..02e3721030b7 100644
--- a/sound/pci/cs5535audio/cs5535audio.c
+++ b/sound/pci/cs5535audio/cs5535audio.c
@@ -46,8 +46,10 @@ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
46static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; 46static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
47 47
48static struct pci_device_id snd_cs5535audio_ids[] = { 48static struct pci_device_id snd_cs5535audio_ids[] = {
49 { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO, PCI_ANY_ID, 49 { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO,
50 PCI_ANY_ID, 0, 0, 0, }, 50 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
51 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO,
52 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
51 {} 53 {}
52}; 54};
53 55
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c
index 2e86a901a0a4..2a9d12d10680 100644
--- a/sound/pci/emu10k1/emumixer.c
+++ b/sound/pci/emu10k1/emumixer.c
@@ -759,6 +759,8 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
759 "Master Mono Playback Volume", 759 "Master Mono Playback Volume",
760 "PCM Out Path & Mute", 760 "PCM Out Path & Mute",
761 "Mono Output Select", 761 "Mono Output Select",
762 "Front Playback Switch",
763 "Front Playback Volume",
762 "Surround Playback Switch", 764 "Surround Playback Switch",
763 "Surround Playback Volume", 765 "Surround Playback Volume",
764 "Center Playback Switch", 766 "Center Playback Switch",
@@ -829,9 +831,9 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
829 } 831 }
830 if (emu->audigy) { 832 if (emu->audigy) {
831 /* set master volume to 0 dB */ 833 /* set master volume to 0 dB */
832 snd_ac97_write(emu->ac97, AC97_MASTER, 0x0000); 834 snd_ac97_write_cache(emu->ac97, AC97_MASTER, 0x0000);
833 /* set capture source to mic */ 835 /* set capture source to mic */
834 snd_ac97_write(emu->ac97, AC97_REC_SEL, 0x0000); 836 snd_ac97_write_cache(emu->ac97, AC97_REC_SEL, 0x0000);
835 c = audigy_remove_ctls; 837 c = audigy_remove_ctls;
836 } else { 838 } else {
837 /* 839 /*
@@ -844,8 +846,8 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
844 snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT); 846 snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT);
845 } 847 }
846 /* remove unused AC97 controls */ 848 /* remove unused AC97 controls */
847 snd_ac97_write(emu->ac97, AC97_SURROUND_MASTER, 0x0202); 849 snd_ac97_write_cache(emu->ac97, AC97_SURROUND_MASTER, 0x0202);
848 snd_ac97_write(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202); 850 snd_ac97_write_cache(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202);
849 c = emu10k1_remove_ctls; 851 c = emu10k1_remove_ctls;
850 } 852 }
851 for (; *c; c++) 853 for (; *c; c++)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index a983deba4025..fd12b6991fe4 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -75,6 +75,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6},"
75 "{Intel, ICH6M}," 75 "{Intel, ICH6M},"
76 "{Intel, ICH7}," 76 "{Intel, ICH7},"
77 "{Intel, ESB2}," 77 "{Intel, ESB2},"
78 "{Intel, ICH8},"
78 "{ATI, SB450}," 79 "{ATI, SB450},"
79 "{VIA, VT8251}," 80 "{VIA, VT8251},"
80 "{VIA, VT8237A}," 81 "{VIA, VT8237A},"
@@ -1586,6 +1587,7 @@ static struct pci_device_id azx_ids[] = {
1586 { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */ 1587 { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */
1587 { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */ 1588 { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */
1588 { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */ 1589 { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */
1590 { 0x8086, 0x284b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH8 */
1589 { 0x1002, 0x437b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATI }, /* ATI SB450 */ 1591 { 0x1002, 0x437b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATI }, /* ATI SB450 */
1590 { 0x1106, 0x3288, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_VIA }, /* VIA VT8251/VT8237A */ 1592 { 0x1106, 0x3288, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_VIA }, /* VIA VT8251/VT8237A */
1591 { 0x1039, 0x7502, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_SIS }, /* SIS966 */ 1593 { 0x1039, 0x7502, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_SIS }, /* SIS966 */
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ad9e501a9818..b76755264730 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1668,6 +1668,7 @@ static struct hda_board_config alc880_cfg_tbl[] = {
1668 { .pci_subvendor = 0x1043, .pci_subdevice = 0x8196, .config = ALC880_6ST }, /* ASUS P5GD1-HVM */ 1668 { .pci_subvendor = 0x1043, .pci_subdevice = 0x8196, .config = ALC880_6ST }, /* ASUS P5GD1-HVM */
1669 { .pci_subvendor = 0x1043, .pci_subdevice = 0x81b4, .config = ALC880_6ST }, 1669 { .pci_subvendor = 0x1043, .pci_subdevice = 0x81b4, .config = ALC880_6ST },
1670 { .pci_subvendor = 0x1019, .pci_subdevice = 0xa884, .config = ALC880_6ST }, /* Acer APFV */ 1670 { .pci_subvendor = 0x1019, .pci_subdevice = 0xa884, .config = ALC880_6ST }, /* Acer APFV */
1671 { .pci_subvendor = 0x1458, .pci_subdevice = 0xa102, .config = ALC880_6ST }, /* Gigabyte K8N51 */
1671 1672
1672 { .modelname = "6stack-digout", .config = ALC880_6ST_DIG }, 1673 { .modelname = "6stack-digout", .config = ALC880_6ST_DIG },
1673 { .pci_subvendor = 0x2668, .pci_subdevice = 0x8086, .config = ALC880_6ST_DIG }, 1674 { .pci_subvendor = 0x2668, .pci_subdevice = 0x8086, .config = ALC880_6ST_DIG },
@@ -2475,7 +2476,7 @@ static struct hda_verb alc260_init_verbs[] = {
2475 /* LINE-2 is used for line-out in rear */ 2476 /* LINE-2 is used for line-out in rear */
2476 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 2477 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
2477 /* select line-out */ 2478 /* select line-out */
2478 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, 2479 {0x0e, AC_VERB_SET_CONNECT_SEL, 0x00},
2479 /* LINE-OUT pin */ 2480 /* LINE-OUT pin */
2480 {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 2481 {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
2481 /* enable HP */ 2482 /* enable HP */
@@ -2945,6 +2946,8 @@ static int alc260_auto_init(struct hda_codec *codec)
2945 */ 2946 */
2946static struct hda_board_config alc260_cfg_tbl[] = { 2947static struct hda_board_config alc260_cfg_tbl[] = {
2947 { .modelname = "basic", .config = ALC260_BASIC }, 2948 { .modelname = "basic", .config = ALC260_BASIC },
2949 { .pci_subvendor = 0x104d, .pci_subdevice = 0x81bb,
2950 .config = ALC260_BASIC }, /* Sony VAIO */
2948 { .modelname = "hp", .config = ALC260_HP }, 2951 { .modelname = "hp", .config = ALC260_HP },
2949 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3010, .config = ALC260_HP }, 2952 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3010, .config = ALC260_HP },
2950 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3011, .config = ALC260_HP }, 2953 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3011, .config = ALC260_HP },
@@ -3414,12 +3417,12 @@ static struct snd_kcontrol_new alc882_capture_mixer[] = {
3414 * configuration and preset 3417 * configuration and preset
3415 */ 3418 */
3416static struct hda_board_config alc882_cfg_tbl[] = { 3419static struct hda_board_config alc882_cfg_tbl[] = {
3417 { .modelname = "3stack-dig", .config = ALC861_3ST_DIG }, 3420 { .modelname = "3stack-dig", .config = ALC882_3ST_DIG },
3418 { .modelname = "6stack-dig", .config = ALC861_6ST_DIG }, 3421 { .modelname = "6stack-dig", .config = ALC882_6ST_DIG },
3419 { .pci_subvendor = 0x1462, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* MSI */ 3422 { .pci_subvendor = 0x1462, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* MSI */
3420 { .pci_subvendor = 0x105b, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* Foxconn */ 3423 { .pci_subvendor = 0x105b, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* Foxconn */
3421 { .pci_subvendor = 0x1019, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* ECS */ 3424 { .pci_subvendor = 0x1019, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* ECS */
3422 { .modelname = "auto", .config = ALC861_AUTO }, 3425 { .modelname = "auto", .config = ALC882_AUTO },
3423 {} 3426 {}
3424}; 3427};
3425 3428
diff --git a/sound/pci/hda/patch_si3054.c b/sound/pci/hda/patch_si3054.c
index 8f8840e6002b..250242cd6c70 100644
--- a/sound/pci/hda/patch_si3054.c
+++ b/sound/pci/hda/patch_si3054.c
@@ -297,6 +297,7 @@ static int patch_si3054(struct hda_codec *codec)
297struct hda_codec_preset snd_hda_preset_si3054[] = { 297struct hda_codec_preset snd_hda_preset_si3054[] = {
298 { .id = 0x163c3055, .name = "Si3054", .patch = patch_si3054 }, 298 { .id = 0x163c3055, .name = "Si3054", .patch = patch_si3054 },
299 { .id = 0x163c3155, .name = "Si3054", .patch = patch_si3054 }, 299 { .id = 0x163c3155, .name = "Si3054", .patch = patch_si3054 },
300 { .id = 0x11c13026, .name = "Si3054", .patch = patch_si3054 },
300 {} 301 {}
301}; 302};
302 303
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 61903848cd43..35c2823a0a2b 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -50,10 +50,11 @@ struct sigmatel_spec {
50 unsigned int surr_switch: 1; 50 unsigned int surr_switch: 1;
51 unsigned int line_switch: 1; 51 unsigned int line_switch: 1;
52 unsigned int mic_switch: 1; 52 unsigned int mic_switch: 1;
53 unsigned int alt_switch: 1;
53 54
54 /* playback */ 55 /* playback */
55 struct hda_multi_out multiout; 56 struct hda_multi_out multiout;
56 hda_nid_t dac_nids[4]; 57 hda_nid_t dac_nids[5];
57 58
58 /* capture */ 59 /* capture */
59 hda_nid_t *adc_nids; 60 hda_nid_t *adc_nids;
@@ -73,7 +74,7 @@ struct sigmatel_spec {
73 74
74 /* capture source */ 75 /* capture source */
75 struct hda_input_mux *input_mux; 76 struct hda_input_mux *input_mux;
76 unsigned int cur_mux[2]; 77 unsigned int cur_mux[3];
77 78
78 /* i/o switches */ 79 /* i/o switches */
79 unsigned int io_switch[2]; 80 unsigned int io_switch[2];
@@ -107,6 +108,14 @@ static hda_nid_t stac922x_mux_nids[2] = {
107 0x12, 0x13, 108 0x12, 0x13,
108}; 109};
109 110
111static hda_nid_t stac927x_adc_nids[3] = {
112 0x07, 0x08, 0x09
113};
114
115static hda_nid_t stac927x_mux_nids[3] = {
116 0x15, 0x16, 0x17
117};
118
110static hda_nid_t stac9200_pin_nids[8] = { 119static hda_nid_t stac9200_pin_nids[8] = {
111 0x08, 0x09, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 120 0x08, 0x09, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12,
112}; 121};
@@ -116,6 +125,12 @@ static hda_nid_t stac922x_pin_nids[10] = {
116 0x0f, 0x10, 0x11, 0x15, 0x1b, 125 0x0f, 0x10, 0x11, 0x15, 0x1b,
117}; 126};
118 127
128static hda_nid_t stac927x_pin_nids[14] = {
129 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
130 0x0f, 0x10, 0x11, 0x12, 0x13,
131 0x14, 0x21, 0x22, 0x23,
132};
133
119static int stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 134static int stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
120{ 135{
121 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 136 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
@@ -155,6 +170,12 @@ static struct hda_verb stac922x_core_init[] = {
155 {} 170 {}
156}; 171};
157 172
173static struct hda_verb stac927x_core_init[] = {
174 /* set master volume and direct control */
175 { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
176 {}
177};
178
158static struct snd_kcontrol_new stac9200_mixer[] = { 179static struct snd_kcontrol_new stac9200_mixer[] = {
159 HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT), 180 HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT),
160 HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT), 181 HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT),
@@ -183,10 +204,26 @@ static struct snd_kcontrol_new stac922x_mixer[] = {
183 .put = stac92xx_mux_enum_put, 204 .put = stac92xx_mux_enum_put,
184 }, 205 },
185 HDA_CODEC_VOLUME("Capture Volume", 0x17, 0x0, HDA_INPUT), 206 HDA_CODEC_VOLUME("Capture Volume", 0x17, 0x0, HDA_INPUT),
207 HDA_CODEC_MUTE("Capture Switch", 0x17, 0x0, HDA_INPUT),
186 HDA_CODEC_VOLUME("Mux Capture Volume", 0x12, 0x0, HDA_OUTPUT), 208 HDA_CODEC_VOLUME("Mux Capture Volume", 0x12, 0x0, HDA_OUTPUT),
187 { } /* end */ 209 { } /* end */
188}; 210};
189 211
212static snd_kcontrol_new_t stac927x_mixer[] = {
213 {
214 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
215 .name = "Input Source",
216 .count = 1,
217 .info = stac92xx_mux_enum_info,
218 .get = stac92xx_mux_enum_get,
219 .put = stac92xx_mux_enum_put,
220 },
221 HDA_CODEC_VOLUME("InMux Capture Volume", 0x15, 0x0, HDA_OUTPUT),
222 HDA_CODEC_VOLUME("InVol Capture Volume", 0x18, 0x0, HDA_INPUT),
223 HDA_CODEC_MUTE("ADCMux Capture Switch", 0x1b, 0x0, HDA_OUTPUT),
224 { } /* end */
225};
226
190static int stac92xx_build_controls(struct hda_codec *codec) 227static int stac92xx_build_controls(struct hda_codec *codec)
191{ 228{
192 struct sigmatel_spec *spec = codec->spec; 229 struct sigmatel_spec *spec = codec->spec;
@@ -240,14 +277,14 @@ static unsigned int ref922x_pin_configs[10] = {
240}; 277};
241 278
242static unsigned int d945gtp3_pin_configs[10] = { 279static unsigned int d945gtp3_pin_configs[10] = {
243 0x0221401f, 0x01a19022, 0x01813021, 0x01114010, 280 0x0221401f, 0x01a19022, 0x01813021, 0x01014010,
244 0x40000100, 0x40000100, 0x40000100, 0x40000100, 281 0x40000100, 0x40000100, 0x40000100, 0x40000100,
245 0x02a19120, 0x40000100, 282 0x02a19120, 0x40000100,
246}; 283};
247 284
248static unsigned int d945gtp5_pin_configs[10] = { 285static unsigned int d945gtp5_pin_configs[10] = {
249 0x0221401f, 0x01111012, 0x01813024, 0x01114010, 286 0x0221401f, 0x01011012, 0x01813024, 0x01014010,
250 0x01a19021, 0x01116011, 0x01452130, 0x40000100, 287 0x01a19021, 0x01016011, 0x01452130, 0x40000100,
251 0x02a19320, 0x40000100, 288 0x02a19320, 0x40000100,
252}; 289};
253 290
@@ -274,6 +311,28 @@ static struct hda_board_config stac922x_cfg_tbl[] = {
274 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 311 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
275 .pci_subdevice = 0x0013, 312 .pci_subdevice = 0x0013,
276 .config = STAC_D945GTP5 }, /* Intel D955XBK - 5 Stack */ 313 .config = STAC_D945GTP5 }, /* Intel D955XBK - 5 Stack */
314 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
315 .pci_subdevice = 0x0417,
316 .config = STAC_D945GTP5 }, /* Intel D975XBK - 5 Stack */
317 {} /* terminator */
318};
319
320static unsigned int ref927x_pin_configs[14] = {
321 0x01813122, 0x01a19021, 0x01014010, 0x01016011,
322 0x01012012, 0x01011014, 0x40000100, 0x40000100,
323 0x40000100, 0x40000100, 0x40000100, 0x01441030,
324 0x01c41030, 0x40000100,
325};
326
327static unsigned int *stac927x_brd_tbl[] = {
328 ref927x_pin_configs,
329};
330
331static struct hda_board_config stac927x_cfg_tbl[] = {
332 { .modelname = "ref",
333 .pci_subvendor = PCI_VENDOR_ID_INTEL,
334 .pci_subdevice = 0x2668, /* DFI LanParty */
335 .config = STAC_REF }, /* SigmaTel reference board */
277 {} /* terminator */ 336 {} /* terminator */
278}; 337};
279 338
@@ -408,11 +467,23 @@ static struct hda_pcm_stream stac92xx_pcm_analog_playback = {
408 }, 467 },
409}; 468};
410 469
470static struct hda_pcm_stream stac92xx_pcm_analog_alt_playback = {
471 .substreams = 1,
472 .channels_min = 2,
473 .channels_max = 2,
474 .nid = 0x06, /* NID to query formats and rates */
475 .ops = {
476 .open = stac92xx_playback_pcm_open,
477 .prepare = stac92xx_playback_pcm_prepare,
478 .cleanup = stac92xx_playback_pcm_cleanup
479 },
480};
481
411static struct hda_pcm_stream stac92xx_pcm_analog_capture = { 482static struct hda_pcm_stream stac92xx_pcm_analog_capture = {
412 .substreams = 2, 483 .substreams = 2,
413 .channels_min = 2, 484 .channels_min = 2,
414 .channels_max = 2, 485 .channels_max = 2,
415 .nid = 0x06, /* NID to query formats and rates */ 486 /* NID is set in stac92xx_build_pcms */
416 .ops = { 487 .ops = {
417 .prepare = stac92xx_capture_pcm_prepare, 488 .prepare = stac92xx_capture_pcm_prepare,
418 .cleanup = stac92xx_capture_pcm_cleanup 489 .cleanup = stac92xx_capture_pcm_cleanup
@@ -430,6 +501,14 @@ static int stac92xx_build_pcms(struct hda_codec *codec)
430 info->name = "STAC92xx Analog"; 501 info->name = "STAC92xx Analog";
431 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback; 502 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback;
432 info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; 503 info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture;
504 info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0];
505
506 if (spec->alt_switch) {
507 codec->num_pcms++;
508 info++;
509 info->name = "STAC92xx Analog Alt";
510 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_alt_playback;
511 }
433 512
434 if (spec->multiout.dig_out_nid || spec->dig_in_nid) { 513 if (spec->multiout.dig_out_nid || spec->dig_in_nid) {
435 codec->num_pcms++; 514 codec->num_pcms++;
@@ -588,6 +667,16 @@ static int stac92xx_add_dyn_out_pins(struct hda_codec *codec, struct auto_pin_cf
588 return 0; 667 return 0;
589} 668}
590 669
670/*
671 * XXX The line_out pin widget connection list may not be set to the
672 * desired DAC nid. This is the case on 927x where ports A and B can
673 * be routed to several DACs.
674 *
675 * This requires an analysis of the line-out/hp pin configuration
676 * to provide a best fit for pin/DAC configurations that are routable.
677 * For now, 927x DAC4 is not supported and 927x DAC1 output to ports
678 * A and B is not supported.
679 */
591/* fill in the dac_nids table from the parsed pin configuration */ 680/* fill in the dac_nids table from the parsed pin configuration */
592static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, const struct auto_pin_cfg *cfg) 681static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, const struct auto_pin_cfg *cfg)
593{ 682{
@@ -602,7 +691,13 @@ static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, const struct aut
602 AC_VERB_GET_CONNECT_LIST, 0) & 0xff; 691 AC_VERB_GET_CONNECT_LIST, 0) & 0xff;
603 } 692 }
604 693
605 spec->multiout.num_dacs = cfg->line_outs; 694 if (cfg->line_outs)
695 spec->multiout.num_dacs = cfg->line_outs;
696 else if (cfg->hp_pin) {
697 spec->multiout.dac_nids[0] = snd_hda_codec_read(codec, cfg->hp_pin, 0,
698 AC_VERB_GET_CONNECT_LIST, 0) & 0xff;
699 spec->multiout.num_dacs = 1;
700 }
606 701
607 return 0; 702 return 0;
608} 703}
@@ -753,19 +848,21 @@ static void stac92xx_auto_init_hp_out(struct hda_codec *codec)
753 stac92xx_auto_set_pinctl(codec, pin, AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN); 848 stac92xx_auto_set_pinctl(codec, pin, AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN);
754} 849}
755 850
756static int stac922x_parse_auto_config(struct hda_codec *codec) 851static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out, hda_nid_t dig_in)
757{ 852{
758 struct sigmatel_spec *spec = codec->spec; 853 struct sigmatel_spec *spec = codec->spec;
759 int err; 854 int err;
760 855
761 if ((err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, NULL)) < 0) 856 if ((err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, NULL)) < 0)
762 return err; 857 return err;
858 if (! spec->autocfg.line_outs && ! spec->autocfg.hp_pin)
859 return 0; /* can't find valid pin config */
860 stac92xx_auto_init_multi_out(codec);
861 stac92xx_auto_init_hp_out(codec);
763 if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0) 862 if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0)
764 return err; 863 return err;
765 if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0) 864 if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0)
766 return err; 865 return err;
767 if (! spec->autocfg.line_outs && ! spec->autocfg.hp_pin)
768 return 0; /* can't find valid pin config */
769 866
770 if ((err = stac92xx_auto_create_multi_out_ctls(spec, &spec->autocfg)) < 0 || 867 if ((err = stac92xx_auto_create_multi_out_ctls(spec, &spec->autocfg)) < 0 ||
771 (err = stac92xx_auto_create_hp_ctls(codec, &spec->autocfg)) < 0 || 868 (err = stac92xx_auto_create_hp_ctls(codec, &spec->autocfg)) < 0 ||
@@ -777,11 +874,11 @@ static int stac922x_parse_auto_config(struct hda_codec *codec)
777 spec->surr_switch = 1; 874 spec->surr_switch = 1;
778 875
779 if (spec->autocfg.dig_out_pin) { 876 if (spec->autocfg.dig_out_pin) {
780 spec->multiout.dig_out_nid = 0x08; 877 spec->multiout.dig_out_nid = dig_out;
781 stac92xx_auto_set_pinctl(codec, spec->autocfg.dig_out_pin, AC_PINCTL_OUT_EN); 878 stac92xx_auto_set_pinctl(codec, spec->autocfg.dig_out_pin, AC_PINCTL_OUT_EN);
782 } 879 }
783 if (spec->autocfg.dig_in_pin) { 880 if (spec->autocfg.dig_in_pin) {
784 spec->dig_in_nid = 0x09; 881 spec->dig_in_nid = dig_in;
785 stac92xx_auto_set_pinctl(codec, spec->autocfg.dig_in_pin, AC_PINCTL_IN_EN); 882 stac92xx_auto_set_pinctl(codec, spec->autocfg.dig_in_pin, AC_PINCTL_IN_EN);
786 } 883 }
787 884
@@ -827,9 +924,6 @@ static int stac92xx_init(struct hda_codec *codec)
827 924
828 snd_hda_sequence_write(codec, spec->init); 925 snd_hda_sequence_write(codec, spec->init);
829 926
830 stac92xx_auto_init_multi_out(codec);
831 stac92xx_auto_init_hp_out(codec);
832
833 return 0; 927 return 0;
834} 928}
835 929
@@ -996,7 +1090,47 @@ static int patch_stac922x(struct hda_codec *codec)
996 1090
997 spec->multiout.dac_nids = spec->dac_nids; 1091 spec->multiout.dac_nids = spec->dac_nids;
998 1092
999 err = stac922x_parse_auto_config(codec); 1093 err = stac92xx_parse_auto_config(codec, 0x08, 0x09);
1094 if (err < 0) {
1095 stac92xx_free(codec);
1096 return err;
1097 }
1098
1099 codec->patch_ops = stac92xx_patch_ops;
1100
1101 return 0;
1102}
1103
1104static int patch_stac927x(struct hda_codec *codec)
1105{
1106 struct sigmatel_spec *spec;
1107 int err;
1108
1109 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
1110 if (spec == NULL)
1111 return -ENOMEM;
1112
1113 codec->spec = spec;
1114 spec->board_config = snd_hda_check_board_config(codec, stac927x_cfg_tbl);
1115 if (spec->board_config < 0)
1116 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC927x, using BIOS defaults\n");
1117 else {
1118 spec->num_pins = 14;
1119 spec->pin_nids = stac927x_pin_nids;
1120 spec->pin_configs = stac927x_brd_tbl[spec->board_config];
1121 stac92xx_set_config_regs(codec);
1122 }
1123
1124 spec->adc_nids = stac927x_adc_nids;
1125 spec->mux_nids = stac927x_mux_nids;
1126 spec->num_muxes = 3;
1127
1128 spec->init = stac927x_core_init;
1129 spec->mixer = stac927x_mixer;
1130
1131 spec->multiout.dac_nids = spec->dac_nids;
1132
1133 err = stac92xx_parse_auto_config(codec, 0x1e, 0x20);
1000 if (err < 0) { 1134 if (err < 0) {
1001 stac92xx_free(codec); 1135 stac92xx_free(codec);
1002 return err; 1136 return err;
@@ -1018,5 +1152,15 @@ struct hda_codec_preset snd_hda_preset_sigmatel[] = {
1018 { .id = 0x83847681, .name = "STAC9220D/9223D A2", .patch = patch_stac922x }, 1152 { .id = 0x83847681, .name = "STAC9220D/9223D A2", .patch = patch_stac922x },
1019 { .id = 0x83847682, .name = "STAC9221 A2", .patch = patch_stac922x }, 1153 { .id = 0x83847682, .name = "STAC9221 A2", .patch = patch_stac922x },
1020 { .id = 0x83847683, .name = "STAC9221D A2", .patch = patch_stac922x }, 1154 { .id = 0x83847683, .name = "STAC9221D A2", .patch = patch_stac922x },
1155 { .id = 0x83847620, .name = "STAC9274", .patch = patch_stac927x },
1156 { .id = 0x83847621, .name = "STAC9274D", .patch = patch_stac927x },
1157 { .id = 0x83847622, .name = "STAC9273X", .patch = patch_stac927x },
1158 { .id = 0x83847623, .name = "STAC9273D", .patch = patch_stac927x },
1159 { .id = 0x83847624, .name = "STAC9272X", .patch = patch_stac927x },
1160 { .id = 0x83847625, .name = "STAC9272D", .patch = patch_stac927x },
1161 { .id = 0x83847626, .name = "STAC9271X", .patch = patch_stac927x },
1162 { .id = 0x83847627, .name = "STAC9271D", .patch = patch_stac927x },
1163 { .id = 0x83847628, .name = "STAC9274X5NH", .patch = patch_stac927x },
1164 { .id = 0x83847629, .name = "STAC9274D5NH", .patch = patch_stac927x },
1021 {} /* terminator */ 1165 {} /* terminator */
1022}; 1166};
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 5466b1fa0cd5..174237f4a22c 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -427,6 +427,7 @@ static struct pci_device_id snd_intel8x0_ids[] = {
427 { 0x10de, 0x008a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8 */ 427 { 0x10de, 0x008a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8 */
428 { 0x10de, 0x00da, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE3 */ 428 { 0x10de, 0x00da, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE3 */
429 { 0x10de, 0x00ea, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8S */ 429 { 0x10de, 0x00ea, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8S */
430 { 0x10de, 0x026b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* MCP51 */
430 { 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */ 431 { 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */
431 { 0x1022, 0x7445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD768 */ 432 { 0x1022, 0x7445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD768 */
432 { 0x10b9, 0x5455, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALI }, /* Ali5455 */ 433 { 0x10b9, 0x5455, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALI }, /* Ali5455 */
@@ -1805,6 +1806,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
1805 }, 1806 },
1806 { 1807 {
1807 .subvendor = 0x1028, 1808 .subvendor = 0x1028,
1809 .subdevice = 0x0151,
1810 .name = "Dell Optiplex GX270", /* AD1981B */
1811 .type = AC97_TUNE_HP_ONLY
1812 },
1813 {
1814 .subvendor = 0x1028,
1808 .subdevice = 0x0163, 1815 .subdevice = 0x0163,
1809 .name = "Dell Unknown", /* STAC9750/51 */ 1816 .name = "Dell Unknown", /* STAC9750/51 */
1810 .type = AC97_TUNE_HP_ONLY 1817 .type = AC97_TUNE_HP_ONLY
@@ -1847,12 +1854,6 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
1847 }, 1854 },
1848 { 1855 {
1849 .subvendor = 0x103c, 1856 .subvendor = 0x103c,
1850 .subdevice = 0x099c,
1851 .name = "HP nx6110", /* AD1981B */
1852 .type = AC97_TUNE_HP_ONLY
1853 },
1854 {
1855 .subvendor = 0x103c,
1856 .subdevice = 0x129d, 1857 .subdevice = 0x129d,
1857 .name = "HP xw8000", 1858 .name = "HP xw8000",
1858 .type = AC97_TUNE_HP_ONLY 1859 .type = AC97_TUNE_HP_ONLY
@@ -1866,7 +1867,7 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
1866 { 1867 {
1867 .subvendor = 0x103c, 1868 .subvendor = 0x103c,
1868 .subdevice = 0x099c, 1869 .subdevice = 0x099c,
1869 .name = "HP nc6120", 1870 .name = "HP nx6110/nc6120",
1870 .type = AC97_TUNE_HP_MUTE_LED 1871 .type = AC97_TUNE_HP_MUTE_LED
1871 }, 1872 },
1872 { 1873 {
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
index b8c0853a8278..b2cba75b6b16 100644
--- a/sound/pci/pcxhr/pcxhr.c
+++ b/sound/pci/pcxhr/pcxhr.c
@@ -454,7 +454,7 @@ static int pcxhr_update_r_buffer(struct pcxhr_stream *stream)
454 is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE); 454 is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE);
455 stream_num = is_capture ? 0 : subs->number; 455 stream_num = is_capture ? 0 : subs->number;
456 456
457 snd_printdd("pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%x) subs(%d)\n", 457 snd_printdd("pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%zx) subs(%d)\n",
458 is_capture ? 'c' : 'p', 458 is_capture ? 'c' : 'p',
459 chip->chip_idx, (void*)subs->runtime->dma_addr, 459 chip->chip_idx, (void*)subs->runtime->dma_addr,
460 subs->runtime->dma_bytes, subs->number); 460 subs->runtime->dma_bytes, subs->number);
@@ -744,13 +744,14 @@ static int pcxhr_prepare(struct snd_pcm_substream *subs)
744 /* only the first stream can choose the sample rate */ 744 /* only the first stream can choose the sample rate */
745 /* the further opened streams will be limited to its frequency (see open) */ 745 /* the further opened streams will be limited to its frequency (see open) */
746 /* set the clock only once (first stream) */ 746 /* set the clock only once (first stream) */
747 if (mgr->sample_rate == 0) { 747 if (mgr->sample_rate != subs->runtime->rate) {
748 err = pcxhr_set_clock(mgr, subs->runtime->rate); 748 err = pcxhr_set_clock(mgr, subs->runtime->rate);
749 if (err) 749 if (err)
750 break; 750 break;
751 if (mgr->sample_rate == 0)
752 /* start the DSP-timer */
753 err = pcxhr_hardware_timer(mgr, 1);
751 mgr->sample_rate = subs->runtime->rate; 754 mgr->sample_rate = subs->runtime->rate;
752
753 err = pcxhr_hardware_timer(mgr, 1); /* start the DSP-timer */
754 } 755 }
755 } while(0); /* do only once (so we can use break instead of goto) */ 756 } while(0); /* do only once (so we can use break instead of goto) */
756 757
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 3dec616bad6b..103b4d715ff4 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -3324,11 +3324,11 @@ static int __devinit snd_hdspm_preallocate_memory(struct hdspm * hdspm)
3324 snd_dma_pci_data(hdspm->pci), 3324 snd_dma_pci_data(hdspm->pci),
3325 wanted, 3325 wanted,
3326 wanted)) < 0) { 3326 wanted)) < 0) {
3327 snd_printdd("Could not preallocate %d Bytes\n", wanted); 3327 snd_printdd("Could not preallocate %zd Bytes\n", wanted);
3328 3328
3329 return err; 3329 return err;
3330 } else 3330 } else
3331 snd_printdd(" Preallocated %d Bytes\n", wanted); 3331 snd_printdd(" Preallocated %zd Bytes\n", wanted);
3332 3332
3333 return 0; 3333 return 0;
3334} 3334}
@@ -3510,7 +3510,7 @@ static int __devinit snd_hdspm_create(struct snd_card *card, struct hdspm * hdsp
3510 3510
3511 hdspm->monitor_outs = enable_monitor; 3511 hdspm->monitor_outs = enable_monitor;
3512 3512
3513 snd_printdd("kmalloc Mixer memory of %d Bytes\n", 3513 snd_printdd("kmalloc Mixer memory of %zd Bytes\n",
3514 sizeof(struct hdspm_mixer)); 3514 sizeof(struct hdspm_mixer));
3515 if ((hdspm->mixer = kmalloc(sizeof(struct hdspm_mixer), GFP_KERNEL)) 3515 if ((hdspm->mixer = kmalloc(sizeof(struct hdspm_mixer), GFP_KERNEL))
3516 == NULL) { 3516 == NULL) {
diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c
index 2b21df16ad6a..b4538045049f 100644
--- a/sound/pci/trident/trident.c
+++ b/sound/pci/trident/trident.c
@@ -64,9 +64,11 @@ module_param_array(wavetable_size, int, NULL, 0444);
64MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); 64MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth.");
65 65
66static struct pci_device_id snd_trident_ids[] = { 66static struct pci_device_id snd_trident_ids[] = {
67 { 0x1023, 0x2000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Trident 4DWave DX PCI Audio */ 67 {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX),
68 { 0x1023, 0x2001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Trident 4DWave NX PCI Audio */ 68 PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0},
69 { 0x1039, 0x7018, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* SiS SI7018 PCI Audio */ 69 {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX),
70 0, 0, 0},
71 {PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7018), 0, 0, 0},
70 { 0, } 72 { 0, }
71}; 73};
72 74
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index ed26a155c344..423741371191 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -2340,6 +2340,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci)
2340 { .subvendor = 0x1043, .subdevice = 0x80b0, .action = VIA_DXS_NO_VRA }, /* ASUS A7V600 & K8V*/ 2340 { .subvendor = 0x1043, .subdevice = 0x80b0, .action = VIA_DXS_NO_VRA }, /* ASUS A7V600 & K8V*/
2341 { .subvendor = 0x1043, .subdevice = 0x810d, .action = VIA_DXS_SRC }, /* ASUS */ 2341 { .subvendor = 0x1043, .subdevice = 0x810d, .action = VIA_DXS_SRC }, /* ASUS */
2342 { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC }, /* ASUS A8V Deluxe */ 2342 { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC }, /* ASUS A8V Deluxe */
2343 { .subvendor = 0x1043, .subdevice = 0x8174, .action = VIA_DXS_SRC }, /* ASUS */
2343 { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */ 2344 { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */
2344 { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */ 2345 { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */
2345 { .subvendor = 0x10cf, .subdevice = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */ 2346 { .subvendor = 0x10cf, .subdevice = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */
@@ -2358,6 +2359,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci)
2358 { .subvendor = 0x1462, .subdevice = 0x7023, .action = VIA_DXS_NO_VRA }, /* MSI K8T Neo2-FI */ 2359 { .subvendor = 0x1462, .subdevice = 0x7023, .action = VIA_DXS_NO_VRA }, /* MSI K8T Neo2-FI */
2359 { .subvendor = 0x1462, .subdevice = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */ 2360 { .subvendor = 0x1462, .subdevice = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */
2360 { .subvendor = 0x1462, .subdevice = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */ 2361 { .subvendor = 0x1462, .subdevice = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */
2362 { .subvendor = 0x1462, .subdevice = 0xb012, .action = VIA_DXS_SRC }, /* P4M800/VIA8237R */
2361 { .subvendor = 0x147b, .subdevice = 0x1401, .action = VIA_DXS_ENABLE }, /* ABIT KD7(-RAID) */ 2363 { .subvendor = 0x147b, .subdevice = 0x1401, .action = VIA_DXS_ENABLE }, /* ABIT KD7(-RAID) */
2362 { .subvendor = 0x147b, .subdevice = 0x1411, .action = VIA_DXS_ENABLE }, /* ABIT VA-20 */ 2364 { .subvendor = 0x147b, .subdevice = 0x1411, .action = VIA_DXS_ENABLE }, /* ABIT VA-20 */
2363 { .subvendor = 0x147b, .subdevice = 0x1413, .action = VIA_DXS_ENABLE }, /* ABIT KV8 Pro */ 2365 { .subvendor = 0x147b, .subdevice = 0x1413, .action = VIA_DXS_ENABLE }, /* ABIT KV8 Pro */
@@ -2371,6 +2373,9 @@ static int __devinit check_dxs_list(struct pci_dev *pci)
2371 { .subvendor = 0x161f, .subdevice = 0x2032, .action = VIA_DXS_48K }, /* m680x machines */ 2373 { .subvendor = 0x161f, .subdevice = 0x2032, .action = VIA_DXS_48K }, /* m680x machines */
2372 { .subvendor = 0x1631, .subdevice = 0xe004, .action = VIA_DXS_ENABLE }, /* Easy Note 3174, Packard Bell */ 2374 { .subvendor = 0x1631, .subdevice = 0xe004, .action = VIA_DXS_ENABLE }, /* Easy Note 3174, Packard Bell */
2373 { .subvendor = 0x1695, .subdevice = 0x3005, .action = VIA_DXS_ENABLE }, /* EPoX EP-8K9A */ 2375 { .subvendor = 0x1695, .subdevice = 0x3005, .action = VIA_DXS_ENABLE }, /* EPoX EP-8K9A */
2376 { .subvendor = 0x1695, .subdevice = 0x300e, .action = VIA_DXS_SRC }, /* EPoX 9HEAI */
2377 { .subvendor = 0x16f3, .subdevice = 0x6405, .action = VIA_DXS_SRC }, /* Jetway K8M8MS */
2378 { .subvendor = 0x1734, .subdevice = 0x1093, .action = VIA_DXS_SRC }, /* FSC */
2374 { .subvendor = 0x1849, .subdevice = 0x3059, .action = VIA_DXS_NO_VRA }, /* ASRock K7VM2 */ 2379 { .subvendor = 0x1849, .subdevice = 0x3059, .action = VIA_DXS_NO_VRA }, /* ASRock K7VM2 */
2375 { .subvendor = 0x1849, .subdevice = 0x9761, .action = VIA_DXS_SRC }, /* ASRock mobo(?) */ 2380 { .subvendor = 0x1849, .subdevice = 0x9761, .action = VIA_DXS_SRC }, /* ASRock mobo(?) */
2376 { .subvendor = 0x1919, .subdevice = 0x200a, .action = VIA_DXS_NO_VRA }, /* Soltek SL-K8Tpro-939 */ 2381 { .subvendor = 0x1919, .subdevice = 0x200a, .action = VIA_DXS_NO_VRA }, /* Soltek SL-K8Tpro-939 */
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 1dfc7233c6a8..a1aa74b79b3d 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -1229,6 +1229,7 @@ static int snd_ymfpci_spdif_default_get(struct snd_kcontrol *kcontrol,
1229 spin_lock_irq(&chip->reg_lock); 1229 spin_lock_irq(&chip->reg_lock);
1230 ucontrol->value.iec958.status[0] = (chip->spdif_bits >> 0) & 0xff; 1230 ucontrol->value.iec958.status[0] = (chip->spdif_bits >> 0) & 0xff;
1231 ucontrol->value.iec958.status[1] = (chip->spdif_bits >> 8) & 0xff; 1231 ucontrol->value.iec958.status[1] = (chip->spdif_bits >> 8) & 0xff;
1232 ucontrol->value.iec958.status[3] = IEC958_AES3_CON_FS_48000;
1232 spin_unlock_irq(&chip->reg_lock); 1233 spin_unlock_irq(&chip->reg_lock);
1233 return 0; 1234 return 0;
1234} 1235}
@@ -1303,6 +1304,7 @@ static int snd_ymfpci_spdif_stream_get(struct snd_kcontrol *kcontrol,
1303 spin_lock_irq(&chip->reg_lock); 1304 spin_lock_irq(&chip->reg_lock);
1304 ucontrol->value.iec958.status[0] = (chip->spdif_pcm_bits >> 0) & 0xff; 1305 ucontrol->value.iec958.status[0] = (chip->spdif_pcm_bits >> 0) & 0xff;
1305 ucontrol->value.iec958.status[1] = (chip->spdif_pcm_bits >> 8) & 0xff; 1306 ucontrol->value.iec958.status[1] = (chip->spdif_pcm_bits >> 8) & 0xff;
1307 ucontrol->value.iec958.status[3] = IEC958_AES3_CON_FS_48000;
1306 spin_unlock_irq(&chip->reg_lock); 1308 spin_unlock_irq(&chip->reg_lock);
1307 return 0; 1309 return 0;
1308} 1310}