diff options
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 6 | ||||
-rw-r--r-- | sound/pci/ad1889.c | 2 | ||||
-rw-r--r-- | sound/pci/atiixp.c | 2 | ||||
-rw-r--r-- | sound/pci/atiixp_modem.c | 2 | ||||
-rw-r--r-- | sound/pci/au88x0/au88x0.c | 3 | ||||
-rw-r--r-- | sound/pci/bt87x.c | 3 | ||||
-rw-r--r-- | sound/pci/ca0106/ca0106_main.c | 1 | ||||
-rw-r--r-- | sound/pci/cs4281.c | 4 | ||||
-rw-r--r-- | sound/pci/cs5530.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 31 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_nvhdmi.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 189 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 58 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1712.c | 6 | ||||
-rw-r--r-- | sound/pci/intel8x0.c | 1 | ||||
-rw-r--r-- | sound/pci/mixart/mixart.c | 3 |
18 files changed, 250 insertions, 68 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 6704acbca8c0..bd510eceff1f 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -1927,9 +1927,9 @@ static int snd_ac97_dev_register(struct snd_device *device) | |||
1927 | ac97->dev.bus = &ac97_bus_type; | 1927 | ac97->dev.bus = &ac97_bus_type; |
1928 | ac97->dev.parent = ac97->bus->card->dev; | 1928 | ac97->dev.parent = ac97->bus->card->dev; |
1929 | ac97->dev.release = ac97_device_release; | 1929 | ac97->dev.release = ac97_device_release; |
1930 | snprintf(ac97->dev.bus_id, BUS_ID_SIZE, "%d-%d:%s", | 1930 | dev_set_name(&ac97->dev, "%d-%d:%s", |
1931 | ac97->bus->card->number, ac97->num, | 1931 | ac97->bus->card->number, ac97->num, |
1932 | snd_ac97_get_short_name(ac97)); | 1932 | snd_ac97_get_short_name(ac97)); |
1933 | if ((err = device_register(&ac97->dev)) < 0) { | 1933 | if ((err = device_register(&ac97->dev)) < 0) { |
1934 | snd_printk(KERN_ERR "Can't register ac97 bus\n"); | 1934 | snd_printk(KERN_ERR "Can't register ac97 bus\n"); |
1935 | ac97->dev.bus = NULL; | 1935 | ac97->dev.bus = NULL; |
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index 92f3a976ef2e..a7f38e63303f 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c | |||
@@ -932,7 +932,7 @@ snd_ad1889_create(struct snd_card *card, | |||
932 | goto free_and_ret; | 932 | goto free_and_ret; |
933 | 933 | ||
934 | chip->bar = pci_resource_start(pci, 0); | 934 | chip->bar = pci_resource_start(pci, 0); |
935 | chip->iobase = ioremap_nocache(chip->bar, pci_resource_len(pci, 0)); | 935 | chip->iobase = pci_ioremap_bar(pci, 0); |
936 | if (chip->iobase == NULL) { | 936 | if (chip->iobase == NULL) { |
937 | printk(KERN_ERR PFX "unable to reserve region.\n"); | 937 | printk(KERN_ERR PFX "unable to reserve region.\n"); |
938 | err = -EBUSY; | 938 | err = -EBUSY; |
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 085a52b8c807..226fe8237d31 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -1609,7 +1609,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card, | |||
1609 | return err; | 1609 | return err; |
1610 | } | 1610 | } |
1611 | chip->addr = pci_resource_start(pci, 0); | 1611 | chip->addr = pci_resource_start(pci, 0); |
1612 | chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0)); | 1612 | chip->remap_addr = pci_ioremap_bar(pci, 0); |
1613 | if (chip->remap_addr == NULL) { | 1613 | if (chip->remap_addr == NULL) { |
1614 | snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); | 1614 | snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); |
1615 | snd_atiixp_free(chip); | 1615 | snd_atiixp_free(chip); |
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 2f106306c7fe..0e6e5cc1c501 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -1252,7 +1252,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card, | |||
1252 | return err; | 1252 | return err; |
1253 | } | 1253 | } |
1254 | chip->addr = pci_resource_start(pci, 0); | 1254 | chip->addr = pci_resource_start(pci, 0); |
1255 | chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0)); | 1255 | chip->remap_addr = pci_ioremap_bar(pci, 0); |
1256 | if (chip->remap_addr == NULL) { | 1256 | if (chip->remap_addr == NULL) { |
1257 | snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); | 1257 | snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); |
1258 | snd_atiixp_free(chip); | 1258 | snd_atiixp_free(chip); |
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index 68368e490074..a36d4d1fd419 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c | |||
@@ -180,8 +180,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) | |||
180 | if ((err = pci_request_regions(pci, CARD_NAME_SHORT)) != 0) | 180 | if ((err = pci_request_regions(pci, CARD_NAME_SHORT)) != 0) |
181 | goto regions_out; | 181 | goto regions_out; |
182 | 182 | ||
183 | chip->mmio = ioremap_nocache(pci_resource_start(pci, 0), | 183 | chip->mmio = pci_ioremap_bar(pci, 0); |
184 | pci_resource_len(pci, 0)); | ||
185 | if (!chip->mmio) { | 184 | if (!chip->mmio) { |
186 | printk(KERN_ERR "MMIO area remap failed.\n"); | 185 | printk(KERN_ERR "MMIO area remap failed.\n"); |
187 | err = -ENOMEM; | 186 | err = -ENOMEM; |
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 3aa8d973540a..1aa1c0402540 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -749,8 +749,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card, | |||
749 | pci_disable_device(pci); | 749 | pci_disable_device(pci); |
750 | return err; | 750 | return err; |
751 | } | 751 | } |
752 | chip->mmio = ioremap_nocache(pci_resource_start(pci, 0), | 752 | chip->mmio = pci_ioremap_bar(pci, 0); |
753 | pci_resource_len(pci, 0)); | ||
754 | if (!chip->mmio) { | 753 | if (!chip->mmio) { |
755 | snd_printk(KERN_ERR "cannot remap io memory\n"); | 754 | snd_printk(KERN_ERR "cannot remap io memory\n"); |
756 | err = -ENOMEM; | 755 | err = -ENOMEM; |
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index a7d89662acf6..88fbf285d2b7 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -759,7 +759,6 @@ static int snd_ca0106_pcm_prepare_playback(struct snd_pcm_substream *substream) | |||
759 | SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | | 759 | SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | |
760 | SPCS_GENERATIONSTATUS | 0x00001200 | | 760 | SPCS_GENERATIONSTATUS | 0x00001200 | |
761 | 0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT ); | 761 | 0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT ); |
762 | } | ||
763 | #endif | 762 | #endif |
764 | 763 | ||
765 | return 0; | 764 | return 0; |
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index ef9308f7c45b..192e7842e181 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c | |||
@@ -1382,8 +1382,8 @@ static int __devinit snd_cs4281_create(struct snd_card *card, | |||
1382 | chip->ba0_addr = pci_resource_start(pci, 0); | 1382 | chip->ba0_addr = pci_resource_start(pci, 0); |
1383 | chip->ba1_addr = pci_resource_start(pci, 1); | 1383 | chip->ba1_addr = pci_resource_start(pci, 1); |
1384 | 1384 | ||
1385 | chip->ba0 = ioremap_nocache(chip->ba0_addr, pci_resource_len(pci, 0)); | 1385 | chip->ba0 = pci_ioremap_bar(pci, 0); |
1386 | chip->ba1 = ioremap_nocache(chip->ba1_addr, pci_resource_len(pci, 1)); | 1386 | chip->ba1 = pci_ioremap_bar(pci, 1); |
1387 | if (!chip->ba0 || !chip->ba1) { | 1387 | if (!chip->ba0 || !chip->ba1) { |
1388 | snd_cs4281_free(chip); | 1388 | snd_cs4281_free(chip); |
1389 | return -ENOMEM; | 1389 | return -ENOMEM; |
diff --git a/sound/pci/cs5530.c b/sound/pci/cs5530.c index 7ff8b68e997e..6dea5b5cc774 100644 --- a/sound/pci/cs5530.c +++ b/sound/pci/cs5530.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * cs5530.c - Initialisation code for Cyrix/NatSemi VSA1 softaudio | 2 | * cs5530.c - Initialisation code for Cyrix/NatSemi VSA1 softaudio |
3 | * | 3 | * |
4 | * (C) Copyright 2007 Ash Willis <ashwillis@programmer.net> | 4 | * (C) Copyright 2007 Ash Willis <ashwillis@programmer.net> |
5 | * (C) Copyright 2003 Red Hat Inc <alan@redhat.com> | 5 | * (C) Copyright 2003 Red Hat Inc <alan@lxorguk.ukuu.org.uk> |
6 | * | 6 | * |
7 | * This driver was ported (shamelessly ripped ;) from oss/kahlua.c but I did | 7 | * This driver was ported (shamelessly ripped ;) from oss/kahlua.c but I did |
8 | * mess with it a bit. The chip seems to have to have trouble with full duplex | 8 | * mess with it a bit. The chip seems to have to have trouble with full duplex |
@@ -132,7 +132,7 @@ static int __devinit snd_cs5530_create(struct snd_card *card, | |||
132 | } | 132 | } |
133 | chip->pci_base = pci_resource_start(pci, 0); | 133 | chip->pci_base = pci_resource_start(pci, 0); |
134 | 134 | ||
135 | mem = ioremap_nocache(chip->pci_base, pci_resource_len(pci, 0)); | 135 | mem = pci_ioremap_bar(pci, 0); |
136 | if (mem == NULL) { | 136 | if (mem == NULL) { |
137 | kfree(chip); | 137 | kfree(chip); |
138 | pci_disable_device(pci); | 138 | pci_disable_device(pci); |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 6447754ae56e..ba1ab737b55f 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -64,6 +64,7 @@ static struct hda_vendor_id hda_vendor_ids[] = { | |||
64 | { 0x14f1, "Conexant" }, | 64 | { 0x14f1, "Conexant" }, |
65 | { 0x17e8, "Chrontel" }, | 65 | { 0x17e8, "Chrontel" }, |
66 | { 0x1854, "LG" }, | 66 | { 0x1854, "LG" }, |
67 | { 0x1aec, "Wolfson Microelectronics" }, | ||
67 | { 0x434d, "C-Media" }, | 68 | { 0x434d, "C-Media" }, |
68 | { 0x8384, "SigmaTel" }, | 69 | { 0x8384, "SigmaTel" }, |
69 | {} /* terminator */ | 70 | {} /* terminator */ |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 9f316c1b2790..35722ec920cb 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/slab.h> | 45 | #include <linux/slab.h> |
46 | #include <linux/pci.h> | 46 | #include <linux/pci.h> |
47 | #include <linux/mutex.h> | 47 | #include <linux/mutex.h> |
48 | #include <linux/reboot.h> | ||
48 | #include <sound/core.h> | 49 | #include <sound/core.h> |
49 | #include <sound/initval.h> | 50 | #include <sound/initval.h> |
50 | #include "hda_codec.h" | 51 | #include "hda_codec.h" |
@@ -397,6 +398,9 @@ struct azx { | |||
397 | 398 | ||
398 | /* for pending irqs */ | 399 | /* for pending irqs */ |
399 | struct work_struct irq_pending_work; | 400 | struct work_struct irq_pending_work; |
401 | |||
402 | /* reboot notifier (for mysterious hangup problem at power-down) */ | ||
403 | struct notifier_block reboot_notifier; | ||
400 | }; | 404 | }; |
401 | 405 | ||
402 | /* driver types */ | 406 | /* driver types */ |
@@ -1979,12 +1983,36 @@ static int azx_resume(struct pci_dev *pci) | |||
1979 | 1983 | ||
1980 | 1984 | ||
1981 | /* | 1985 | /* |
1986 | * reboot notifier for hang-up problem at power-down | ||
1987 | */ | ||
1988 | static int azx_halt(struct notifier_block *nb, unsigned long event, void *buf) | ||
1989 | { | ||
1990 | struct azx *chip = container_of(nb, struct azx, reboot_notifier); | ||
1991 | azx_stop_chip(chip); | ||
1992 | return NOTIFY_OK; | ||
1993 | } | ||
1994 | |||
1995 | static void azx_notifier_register(struct azx *chip) | ||
1996 | { | ||
1997 | chip->reboot_notifier.notifier_call = azx_halt; | ||
1998 | register_reboot_notifier(&chip->reboot_notifier); | ||
1999 | } | ||
2000 | |||
2001 | static void azx_notifier_unregister(struct azx *chip) | ||
2002 | { | ||
2003 | if (chip->reboot_notifier.notifier_call) | ||
2004 | unregister_reboot_notifier(&chip->reboot_notifier); | ||
2005 | } | ||
2006 | |||
2007 | /* | ||
1982 | * destructor | 2008 | * destructor |
1983 | */ | 2009 | */ |
1984 | static int azx_free(struct azx *chip) | 2010 | static int azx_free(struct azx *chip) |
1985 | { | 2011 | { |
1986 | int i; | 2012 | int i; |
1987 | 2013 | ||
2014 | azx_notifier_unregister(chip); | ||
2015 | |||
1988 | if (chip->initialized) { | 2016 | if (chip->initialized) { |
1989 | azx_clear_irq_pending(chip); | 2017 | azx_clear_irq_pending(chip); |
1990 | for (i = 0; i < chip->num_streams; i++) | 2018 | for (i = 0; i < chip->num_streams; i++) |
@@ -2158,7 +2186,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
2158 | } | 2186 | } |
2159 | 2187 | ||
2160 | chip->addr = pci_resource_start(pci, 0); | 2188 | chip->addr = pci_resource_start(pci, 0); |
2161 | chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci,0)); | 2189 | chip->remap_addr = pci_ioremap_bar(pci, 0); |
2162 | if (chip->remap_addr == NULL) { | 2190 | if (chip->remap_addr == NULL) { |
2163 | snd_printk(KERN_ERR SFX "ioremap error\n"); | 2191 | snd_printk(KERN_ERR SFX "ioremap error\n"); |
2164 | err = -ENXIO; | 2192 | err = -ENXIO; |
@@ -2348,6 +2376,7 @@ static int __devinit azx_probe(struct pci_dev *pci, | |||
2348 | pci_set_drvdata(pci, card); | 2376 | pci_set_drvdata(pci, card); |
2349 | chip->running = 1; | 2377 | chip->running = 1; |
2350 | power_down_all_codecs(chip); | 2378 | power_down_all_codecs(chip); |
2379 | azx_notifier_register(chip); | ||
2351 | 2380 | ||
2352 | dev++; | 2381 | dev++; |
2353 | return err; | 2382 | return err; |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 2b00c4afdf97..d3fd432cb3ea 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -3860,6 +3860,7 @@ static const char *ad1884a_models[AD1884A_MODELS] = { | |||
3860 | 3860 | ||
3861 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { | 3861 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { |
3862 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), | 3862 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), |
3863 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), | ||
3863 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), | 3864 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), |
3864 | {} | 3865 | {} |
3865 | }; | 3866 | }; |
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 1a65775d28e1..2eed2c8b98da 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -116,6 +116,7 @@ static int nvhdmi_build_pcms(struct hda_codec *codec) | |||
116 | codec->pcm_info = info; | 116 | codec->pcm_info = info; |
117 | 117 | ||
118 | info->name = "NVIDIA HDMI"; | 118 | info->name = "NVIDIA HDMI"; |
119 | info->pcm_type = HDA_PCM_TYPE_HDMI; | ||
119 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = nvhdmi_pcm_digital_playback; | 120 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = nvhdmi_pcm_digital_playback; |
120 | 121 | ||
121 | return 0; | 122 | return 0; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0b6e682c46d0..4eceab9bd109 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -307,6 +307,13 @@ struct alc_spec { | |||
307 | /* for PLL fix */ | 307 | /* for PLL fix */ |
308 | hda_nid_t pll_nid; | 308 | hda_nid_t pll_nid; |
309 | unsigned int pll_coef_idx, pll_coef_bit; | 309 | unsigned int pll_coef_idx, pll_coef_bit; |
310 | |||
311 | #ifdef SND_HDA_NEEDS_RESUME | ||
312 | #define ALC_MAX_PINS 16 | ||
313 | unsigned int num_pins; | ||
314 | hda_nid_t pin_nids[ALC_MAX_PINS]; | ||
315 | unsigned int pin_cfgs[ALC_MAX_PINS]; | ||
316 | #endif | ||
310 | }; | 317 | }; |
311 | 318 | ||
312 | /* | 319 | /* |
@@ -822,6 +829,27 @@ static void alc_sku_automute(struct hda_codec *codec) | |||
822 | spec->jack_present ? 0 : PIN_OUT); | 829 | spec->jack_present ? 0 : PIN_OUT); |
823 | } | 830 | } |
824 | 831 | ||
832 | static void alc_mic_automute(struct hda_codec *codec) | ||
833 | { | ||
834 | struct alc_spec *spec = codec->spec; | ||
835 | unsigned int present; | ||
836 | unsigned int mic_nid = spec->autocfg.input_pins[AUTO_PIN_MIC]; | ||
837 | unsigned int fmic_nid = spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC]; | ||
838 | unsigned int mix_nid = spec->capsrc_nids[0]; | ||
839 | unsigned int capsrc_idx_mic, capsrc_idx_fmic; | ||
840 | |||
841 | capsrc_idx_mic = mic_nid - 0x18; | ||
842 | capsrc_idx_fmic = fmic_nid - 0x18; | ||
843 | present = snd_hda_codec_read(codec, mic_nid, 0, | ||
844 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
845 | snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, | ||
846 | 0x7000 | (capsrc_idx_mic << 8) | (present ? 0 : 0x80)); | ||
847 | snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, | ||
848 | 0x7000 | (capsrc_idx_fmic << 8) | (present ? 0x80 : 0)); | ||
849 | snd_hda_codec_amp_stereo(codec, 0x0b, HDA_INPUT, capsrc_idx_fmic, | ||
850 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); | ||
851 | } | ||
852 | |||
825 | /* unsolicited event for HP jack sensing */ | 853 | /* unsolicited event for HP jack sensing */ |
826 | static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) | 854 | static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) |
827 | { | 855 | { |
@@ -829,10 +857,17 @@ static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) | |||
829 | res >>= 28; | 857 | res >>= 28; |
830 | else | 858 | else |
831 | res >>= 26; | 859 | res >>= 26; |
832 | if (res != ALC880_HP_EVENT) | 860 | if (res == ALC880_HP_EVENT) |
833 | return; | 861 | alc_sku_automute(codec); |
834 | 862 | ||
863 | if (res == ALC880_MIC_EVENT) | ||
864 | alc_mic_automute(codec); | ||
865 | } | ||
866 | |||
867 | static void alc_inithook(struct hda_codec *codec) | ||
868 | { | ||
835 | alc_sku_automute(codec); | 869 | alc_sku_automute(codec); |
870 | alc_mic_automute(codec); | ||
836 | } | 871 | } |
837 | 872 | ||
838 | /* additional initialization for ALC888 variants */ | 873 | /* additional initialization for ALC888 variants */ |
@@ -1018,10 +1053,17 @@ do_sku: | |||
1018 | else | 1053 | else |
1019 | return; | 1054 | return; |
1020 | } | 1055 | } |
1021 | 1056 | if (spec->autocfg.hp_pins[0]) | |
1022 | snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0, | 1057 | snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0, |
1023 | AC_VERB_SET_UNSOLICITED_ENABLE, | 1058 | AC_VERB_SET_UNSOLICITED_ENABLE, |
1024 | AC_USRSP_EN | ALC880_HP_EVENT); | 1059 | AC_USRSP_EN | ALC880_HP_EVENT); |
1060 | |||
1061 | if (spec->autocfg.input_pins[AUTO_PIN_MIC] && | ||
1062 | spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC]) | ||
1063 | snd_hda_codec_write(codec, | ||
1064 | spec->autocfg.input_pins[AUTO_PIN_MIC], 0, | ||
1065 | AC_VERB_SET_UNSOLICITED_ENABLE, | ||
1066 | AC_USRSP_EN | ALC880_MIC_EVENT); | ||
1025 | 1067 | ||
1026 | spec->unsol_event = alc_sku_unsol_event; | 1068 | spec->unsol_event = alc_sku_unsol_event; |
1027 | } | 1069 | } |
@@ -2743,6 +2785,64 @@ static void alc_free(struct hda_codec *codec) | |||
2743 | codec->spec = NULL; /* to be sure */ | 2785 | codec->spec = NULL; /* to be sure */ |
2744 | } | 2786 | } |
2745 | 2787 | ||
2788 | #ifdef SND_HDA_NEEDS_RESUME | ||
2789 | static void store_pin_configs(struct hda_codec *codec) | ||
2790 | { | ||
2791 | struct alc_spec *spec = codec->spec; | ||
2792 | hda_nid_t nid, end_nid; | ||
2793 | |||
2794 | end_nid = codec->start_nid + codec->num_nodes; | ||
2795 | for (nid = codec->start_nid; nid < end_nid; nid++) { | ||
2796 | unsigned int wid_caps = get_wcaps(codec, nid); | ||
2797 | unsigned int wid_type = | ||
2798 | (wid_caps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; | ||
2799 | if (wid_type != AC_WID_PIN) | ||
2800 | continue; | ||
2801 | if (spec->num_pins >= ARRAY_SIZE(spec->pin_nids)) | ||
2802 | break; | ||
2803 | spec->pin_nids[spec->num_pins] = nid; | ||
2804 | spec->pin_cfgs[spec->num_pins] = | ||
2805 | snd_hda_codec_read(codec, nid, 0, | ||
2806 | AC_VERB_GET_CONFIG_DEFAULT, 0); | ||
2807 | spec->num_pins++; | ||
2808 | } | ||
2809 | } | ||
2810 | |||
2811 | static void resume_pin_configs(struct hda_codec *codec) | ||
2812 | { | ||
2813 | struct alc_spec *spec = codec->spec; | ||
2814 | int i; | ||
2815 | |||
2816 | for (i = 0; i < spec->num_pins; i++) { | ||
2817 | hda_nid_t pin_nid = spec->pin_nids[i]; | ||
2818 | unsigned int pin_config = spec->pin_cfgs[i]; | ||
2819 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2820 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_0, | ||
2821 | pin_config & 0x000000ff); | ||
2822 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2823 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_1, | ||
2824 | (pin_config & 0x0000ff00) >> 8); | ||
2825 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2826 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_2, | ||
2827 | (pin_config & 0x00ff0000) >> 16); | ||
2828 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2829 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, | ||
2830 | pin_config >> 24); | ||
2831 | } | ||
2832 | } | ||
2833 | |||
2834 | static int alc_resume(struct hda_codec *codec) | ||
2835 | { | ||
2836 | resume_pin_configs(codec); | ||
2837 | codec->patch_ops.init(codec); | ||
2838 | snd_hda_codec_resume_amp(codec); | ||
2839 | snd_hda_codec_resume_cache(codec); | ||
2840 | return 0; | ||
2841 | } | ||
2842 | #else | ||
2843 | #define store_pin_configs(codec) | ||
2844 | #endif | ||
2845 | |||
2746 | /* | 2846 | /* |
2747 | */ | 2847 | */ |
2748 | static struct hda_codec_ops alc_patch_ops = { | 2848 | static struct hda_codec_ops alc_patch_ops = { |
@@ -2751,6 +2851,9 @@ static struct hda_codec_ops alc_patch_ops = { | |||
2751 | .init = alc_init, | 2851 | .init = alc_init, |
2752 | .free = alc_free, | 2852 | .free = alc_free, |
2753 | .unsol_event = alc_unsol_event, | 2853 | .unsol_event = alc_unsol_event, |
2854 | #ifdef SND_HDA_NEEDS_RESUME | ||
2855 | .resume = alc_resume, | ||
2856 | #endif | ||
2754 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 2857 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
2755 | .check_power_status = alc_check_power_status, | 2858 | .check_power_status = alc_check_power_status, |
2756 | #endif | 2859 | #endif |
@@ -3797,6 +3900,7 @@ static int alc880_parse_auto_config(struct hda_codec *codec) | |||
3797 | spec->num_mux_defs = 1; | 3900 | spec->num_mux_defs = 1; |
3798 | spec->input_mux = &spec->private_imux; | 3901 | spec->input_mux = &spec->private_imux; |
3799 | 3902 | ||
3903 | store_pin_configs(codec); | ||
3800 | return 1; | 3904 | return 1; |
3801 | } | 3905 | } |
3802 | 3906 | ||
@@ -3808,7 +3912,7 @@ static void alc880_auto_init(struct hda_codec *codec) | |||
3808 | alc880_auto_init_extra_out(codec); | 3912 | alc880_auto_init_extra_out(codec); |
3809 | alc880_auto_init_analog_input(codec); | 3913 | alc880_auto_init_analog_input(codec); |
3810 | if (spec->unsol_event) | 3914 | if (spec->unsol_event) |
3811 | alc_sku_automute(codec); | 3915 | alc_inithook(codec); |
3812 | } | 3916 | } |
3813 | 3917 | ||
3814 | /* | 3918 | /* |
@@ -4961,7 +5065,7 @@ static struct hda_verb alc260_test_init_verbs[] = { | |||
4961 | */ | 5065 | */ |
4962 | 5066 | ||
4963 | static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, | 5067 | static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, |
4964 | const char *pfx) | 5068 | const char *pfx, int *vol_bits) |
4965 | { | 5069 | { |
4966 | hda_nid_t nid_vol; | 5070 | hda_nid_t nid_vol; |
4967 | unsigned long vol_val, sw_val; | 5071 | unsigned long vol_val, sw_val; |
@@ -4983,10 +5087,14 @@ static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, | |||
4983 | } else | 5087 | } else |
4984 | return 0; /* N/A */ | 5088 | return 0; /* N/A */ |
4985 | 5089 | ||
4986 | snprintf(name, sizeof(name), "%s Playback Volume", pfx); | 5090 | if (!(*vol_bits & (1 << nid_vol))) { |
4987 | err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val); | 5091 | /* first control for the volume widget */ |
4988 | if (err < 0) | 5092 | snprintf(name, sizeof(name), "%s Playback Volume", pfx); |
4989 | return err; | 5093 | err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val); |
5094 | if (err < 0) | ||
5095 | return err; | ||
5096 | *vol_bits |= (1 << nid_vol); | ||
5097 | } | ||
4990 | snprintf(name, sizeof(name), "%s Playback Switch", pfx); | 5098 | snprintf(name, sizeof(name), "%s Playback Switch", pfx); |
4991 | err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val); | 5099 | err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val); |
4992 | if (err < 0) | 5100 | if (err < 0) |
@@ -5000,6 +5108,7 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5000 | { | 5108 | { |
5001 | hda_nid_t nid; | 5109 | hda_nid_t nid; |
5002 | int err; | 5110 | int err; |
5111 | int vols = 0; | ||
5003 | 5112 | ||
5004 | spec->multiout.num_dacs = 1; | 5113 | spec->multiout.num_dacs = 1; |
5005 | spec->multiout.dac_nids = spec->private_dac_nids; | 5114 | spec->multiout.dac_nids = spec->private_dac_nids; |
@@ -5007,21 +5116,22 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5007 | 5116 | ||
5008 | nid = cfg->line_out_pins[0]; | 5117 | nid = cfg->line_out_pins[0]; |
5009 | if (nid) { | 5118 | if (nid) { |
5010 | err = alc260_add_playback_controls(spec, nid, "Front"); | 5119 | err = alc260_add_playback_controls(spec, nid, "Front", &vols); |
5011 | if (err < 0) | 5120 | if (err < 0) |
5012 | return err; | 5121 | return err; |
5013 | } | 5122 | } |
5014 | 5123 | ||
5015 | nid = cfg->speaker_pins[0]; | 5124 | nid = cfg->speaker_pins[0]; |
5016 | if (nid) { | 5125 | if (nid) { |
5017 | err = alc260_add_playback_controls(spec, nid, "Speaker"); | 5126 | err = alc260_add_playback_controls(spec, nid, "Speaker", &vols); |
5018 | if (err < 0) | 5127 | if (err < 0) |
5019 | return err; | 5128 | return err; |
5020 | } | 5129 | } |
5021 | 5130 | ||
5022 | nid = cfg->hp_pins[0]; | 5131 | nid = cfg->hp_pins[0]; |
5023 | if (nid) { | 5132 | if (nid) { |
5024 | err = alc260_add_playback_controls(spec, nid, "Headphone"); | 5133 | err = alc260_add_playback_controls(spec, nid, "Headphone", |
5134 | &vols); | ||
5025 | if (err < 0) | 5135 | if (err < 0) |
5026 | return err; | 5136 | return err; |
5027 | } | 5137 | } |
@@ -5209,6 +5319,7 @@ static int alc260_parse_auto_config(struct hda_codec *codec) | |||
5209 | } | 5319 | } |
5210 | spec->num_mixers++; | 5320 | spec->num_mixers++; |
5211 | 5321 | ||
5322 | store_pin_configs(codec); | ||
5212 | return 1; | 5323 | return 1; |
5213 | } | 5324 | } |
5214 | 5325 | ||
@@ -5219,7 +5330,7 @@ static void alc260_auto_init(struct hda_codec *codec) | |||
5219 | alc260_auto_init_multi_out(codec); | 5330 | alc260_auto_init_multi_out(codec); |
5220 | alc260_auto_init_analog_input(codec); | 5331 | alc260_auto_init_analog_input(codec); |
5221 | if (spec->unsol_event) | 5332 | if (spec->unsol_event) |
5222 | alc_sku_automute(codec); | 5333 | alc_inithook(codec); |
5223 | } | 5334 | } |
5224 | 5335 | ||
5225 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 5336 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
@@ -6629,7 +6740,7 @@ static void alc882_auto_init(struct hda_codec *codec) | |||
6629 | alc882_auto_init_analog_input(codec); | 6740 | alc882_auto_init_analog_input(codec); |
6630 | alc882_auto_init_input_src(codec); | 6741 | alc882_auto_init_input_src(codec); |
6631 | if (spec->unsol_event) | 6742 | if (spec->unsol_event) |
6632 | alc_sku_automute(codec); | 6743 | alc_inithook(codec); |
6633 | } | 6744 | } |
6634 | 6745 | ||
6635 | static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */ | 6746 | static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */ |
@@ -8306,8 +8417,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8306 | SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), | 8417 | SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), |
8307 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), | 8418 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), |
8308 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), | 8419 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), |
8420 | SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V), | ||
8309 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), | 8421 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), |
8310 | SND_PCI_QUIRK(0x1043, 0x8317, "Asus M90V", ALC888_ASUS_M90V), | ||
8311 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), | 8422 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), |
8312 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), | 8423 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), |
8313 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), | 8424 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), |
@@ -8758,7 +8869,7 @@ static void alc883_auto_init(struct hda_codec *codec) | |||
8758 | alc883_auto_init_analog_input(codec); | 8869 | alc883_auto_init_analog_input(codec); |
8759 | alc883_auto_init_input_src(codec); | 8870 | alc883_auto_init_input_src(codec); |
8760 | if (spec->unsol_event) | 8871 | if (spec->unsol_event) |
8761 | alc_sku_automute(codec); | 8872 | alc_inithook(codec); |
8762 | } | 8873 | } |
8763 | 8874 | ||
8764 | static int patch_alc883(struct hda_codec *codec) | 8875 | static int patch_alc883(struct hda_codec *codec) |
@@ -8802,8 +8913,13 @@ static int patch_alc883(struct hda_codec *codec) | |||
8802 | 8913 | ||
8803 | switch (codec->vendor_id) { | 8914 | switch (codec->vendor_id) { |
8804 | case 0x10ec0888: | 8915 | case 0x10ec0888: |
8805 | spec->stream_name_analog = "ALC888 Analog"; | 8916 | if (codec->revision_id == 0x100101) { |
8806 | spec->stream_name_digital = "ALC888 Digital"; | 8917 | spec->stream_name_analog = "ALC1200 Analog"; |
8918 | spec->stream_name_digital = "ALC1200 Digital"; | ||
8919 | } else { | ||
8920 | spec->stream_name_analog = "ALC888 Analog"; | ||
8921 | spec->stream_name_digital = "ALC888 Digital"; | ||
8922 | } | ||
8807 | break; | 8923 | break; |
8808 | case 0x10ec0889: | 8924 | case 0x10ec0889: |
8809 | spec->stream_name_analog = "ALC889 Analog"; | 8925 | spec->stream_name_analog = "ALC889 Analog"; |
@@ -10267,6 +10383,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec) | |||
10267 | if (err < 0) | 10383 | if (err < 0) |
10268 | return err; | 10384 | return err; |
10269 | 10385 | ||
10386 | store_pin_configs(codec); | ||
10270 | return 1; | 10387 | return 1; |
10271 | } | 10388 | } |
10272 | 10389 | ||
@@ -10285,7 +10402,7 @@ static void alc262_auto_init(struct hda_codec *codec) | |||
10285 | alc262_auto_init_analog_input(codec); | 10402 | alc262_auto_init_analog_input(codec); |
10286 | alc262_auto_init_input_src(codec); | 10403 | alc262_auto_init_input_src(codec); |
10287 | if (spec->unsol_event) | 10404 | if (spec->unsol_event) |
10288 | alc_sku_automute(codec); | 10405 | alc_inithook(codec); |
10289 | } | 10406 | } |
10290 | 10407 | ||
10291 | /* | 10408 | /* |
@@ -10343,7 +10460,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { | |||
10343 | SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD), | 10460 | SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD), |
10344 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", | 10461 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", |
10345 | ALC262_TOSHIBA_RX1), | 10462 | ALC262_TOSHIBA_RX1), |
10346 | SND_PCI_QUIRK(0x1179, 0x0268, "Toshiba S06", ALC262_TOSHIBA_S06), | 10463 | SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06), |
10347 | SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), | 10464 | SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), |
10348 | SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), | 10465 | SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), |
10349 | SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), | 10466 | SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), |
@@ -11401,6 +11518,7 @@ static int alc268_parse_auto_config(struct hda_codec *codec) | |||
11401 | if (err < 0) | 11518 | if (err < 0) |
11402 | return err; | 11519 | return err; |
11403 | 11520 | ||
11521 | store_pin_configs(codec); | ||
11404 | return 1; | 11522 | return 1; |
11405 | } | 11523 | } |
11406 | 11524 | ||
@@ -11417,7 +11535,7 @@ static void alc268_auto_init(struct hda_codec *codec) | |||
11417 | alc268_auto_init_mono_speaker_out(codec); | 11535 | alc268_auto_init_mono_speaker_out(codec); |
11418 | alc268_auto_init_analog_input(codec); | 11536 | alc268_auto_init_analog_input(codec); |
11419 | if (spec->unsol_event) | 11537 | if (spec->unsol_event) |
11420 | alc_sku_automute(codec); | 11538 | alc_inithook(codec); |
11421 | } | 11539 | } |
11422 | 11540 | ||
11423 | /* | 11541 | /* |
@@ -12184,6 +12302,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
12184 | spec->mixers[spec->num_mixers] = alc269_capture_mixer; | 12302 | spec->mixers[spec->num_mixers] = alc269_capture_mixer; |
12185 | spec->num_mixers++; | 12303 | spec->num_mixers++; |
12186 | 12304 | ||
12305 | store_pin_configs(codec); | ||
12187 | return 1; | 12306 | return 1; |
12188 | } | 12307 | } |
12189 | 12308 | ||
@@ -12200,7 +12319,7 @@ static void alc269_auto_init(struct hda_codec *codec) | |||
12200 | alc269_auto_init_hp_out(codec); | 12319 | alc269_auto_init_hp_out(codec); |
12201 | alc269_auto_init_analog_input(codec); | 12320 | alc269_auto_init_analog_input(codec); |
12202 | if (spec->unsol_event) | 12321 | if (spec->unsol_event) |
12203 | alc_sku_automute(codec); | 12322 | alc_inithook(codec); |
12204 | } | 12323 | } |
12205 | 12324 | ||
12206 | /* | 12325 | /* |
@@ -13270,6 +13389,7 @@ static int alc861_parse_auto_config(struct hda_codec *codec) | |||
13270 | spec->mixers[spec->num_mixers] = alc861_capture_mixer; | 13389 | spec->mixers[spec->num_mixers] = alc861_capture_mixer; |
13271 | spec->num_mixers++; | 13390 | spec->num_mixers++; |
13272 | 13391 | ||
13392 | store_pin_configs(codec); | ||
13273 | return 1; | 13393 | return 1; |
13274 | } | 13394 | } |
13275 | 13395 | ||
@@ -13281,7 +13401,7 @@ static void alc861_auto_init(struct hda_codec *codec) | |||
13281 | alc861_auto_init_hp_out(codec); | 13401 | alc861_auto_init_hp_out(codec); |
13282 | alc861_auto_init_analog_input(codec); | 13402 | alc861_auto_init_analog_input(codec); |
13283 | if (spec->unsol_event) | 13403 | if (spec->unsol_event) |
13284 | alc_sku_automute(codec); | 13404 | alc_inithook(codec); |
13285 | } | 13405 | } |
13286 | 13406 | ||
13287 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 13407 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
@@ -14381,6 +14501,7 @@ static int alc861vd_parse_auto_config(struct hda_codec *codec) | |||
14381 | if (err < 0) | 14501 | if (err < 0) |
14382 | return err; | 14502 | return err; |
14383 | 14503 | ||
14504 | store_pin_configs(codec); | ||
14384 | return 1; | 14505 | return 1; |
14385 | } | 14506 | } |
14386 | 14507 | ||
@@ -14393,7 +14514,7 @@ static void alc861vd_auto_init(struct hda_codec *codec) | |||
14393 | alc861vd_auto_init_analog_input(codec); | 14514 | alc861vd_auto_init_analog_input(codec); |
14394 | alc861vd_auto_init_input_src(codec); | 14515 | alc861vd_auto_init_input_src(codec); |
14395 | if (spec->unsol_event) | 14516 | if (spec->unsol_event) |
14396 | alc_sku_automute(codec); | 14517 | alc_inithook(codec); |
14397 | } | 14518 | } |
14398 | 14519 | ||
14399 | static int patch_alc861vd(struct hda_codec *codec) | 14520 | static int patch_alc861vd(struct hda_codec *codec) |
@@ -15667,7 +15788,7 @@ static const char *alc662_models[ALC662_MODEL_LAST] = { | |||
15667 | 15788 | ||
15668 | static struct snd_pci_quirk alc662_cfg_tbl[] = { | 15789 | static struct snd_pci_quirk alc662_cfg_tbl[] = { |
15669 | SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA), | 15790 | SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA), |
15670 | SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS M51VA", ALC663_ASUS_G50V), | 15791 | SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS G50V", ALC663_ASUS_G50V), |
15671 | SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG), | 15792 | SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG), |
15672 | SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701), | 15793 | SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701), |
15673 | SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20), | 15794 | SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20), |
@@ -15680,6 +15801,7 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = { | |||
15680 | SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1), | 15801 | SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1), |
15681 | SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1), | 15802 | SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1), |
15682 | SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC663_ASUS_MODE1), | 15803 | SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC663_ASUS_MODE1), |
15804 | SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC663_ASUS_MODE1), | ||
15683 | SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_ASUS_MODE2), | 15805 | SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_ASUS_MODE2), |
15684 | SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2), | 15806 | SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2), |
15685 | SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_ASUS_MODE2), | 15807 | SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_ASUS_MODE2), |
@@ -16211,6 +16333,8 @@ static int alc662_parse_auto_config(struct hda_codec *codec) | |||
16211 | 16333 | ||
16212 | spec->mixers[spec->num_mixers] = alc662_capture_mixer; | 16334 | spec->mixers[spec->num_mixers] = alc662_capture_mixer; |
16213 | spec->num_mixers++; | 16335 | spec->num_mixers++; |
16336 | |||
16337 | store_pin_configs(codec); | ||
16214 | return 1; | 16338 | return 1; |
16215 | } | 16339 | } |
16216 | 16340 | ||
@@ -16223,7 +16347,7 @@ static void alc662_auto_init(struct hda_codec *codec) | |||
16223 | alc662_auto_init_analog_input(codec); | 16347 | alc662_auto_init_analog_input(codec); |
16224 | alc662_auto_init_input_src(codec); | 16348 | alc662_auto_init_input_src(codec); |
16225 | if (spec->unsol_event) | 16349 | if (spec->unsol_event) |
16226 | alc_sku_automute(codec); | 16350 | alc_inithook(codec); |
16227 | } | 16351 | } |
16228 | 16352 | ||
16229 | static int patch_alc662(struct hda_codec *codec) | 16353 | static int patch_alc662(struct hda_codec *codec) |
@@ -16268,6 +16392,9 @@ static int patch_alc662(struct hda_codec *codec) | |||
16268 | if (codec->vendor_id == 0x10ec0663) { | 16392 | if (codec->vendor_id == 0x10ec0663) { |
16269 | spec->stream_name_analog = "ALC663 Analog"; | 16393 | spec->stream_name_analog = "ALC663 Analog"; |
16270 | spec->stream_name_digital = "ALC663 Digital"; | 16394 | spec->stream_name_digital = "ALC663 Digital"; |
16395 | } else if (codec->vendor_id == 0x10ec0272) { | ||
16396 | spec->stream_name_analog = "ALC272 Analog"; | ||
16397 | spec->stream_name_digital = "ALC272 Digital"; | ||
16271 | } else { | 16398 | } else { |
16272 | spec->stream_name_analog = "ALC662 Analog"; | 16399 | spec->stream_name_analog = "ALC662 Analog"; |
16273 | spec->stream_name_digital = "ALC662 Digital"; | 16400 | spec->stream_name_digital = "ALC662 Digital"; |
@@ -16305,6 +16432,7 @@ struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
16305 | { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, | 16432 | { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, |
16306 | { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 }, | 16433 | { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 }, |
16307 | { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 }, | 16434 | { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 }, |
16435 | { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 }, | ||
16308 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", | 16436 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", |
16309 | .patch = patch_alc861 }, | 16437 | .patch = patch_alc861 }, |
16310 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, | 16438 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, |
@@ -16323,7 +16451,10 @@ struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
16323 | { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", | 16451 | { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", |
16324 | .patch = patch_alc882 }, /* should be patch_alc883() in future */ | 16452 | .patch = patch_alc882 }, /* should be patch_alc883() in future */ |
16325 | { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, | 16453 | { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, |
16454 | { .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc883 }, | ||
16326 | { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 }, | 16455 | { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 }, |
16456 | { .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200", | ||
16457 | .patch = patch_alc883 }, | ||
16327 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, | 16458 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, |
16328 | {} /* terminator */ | 16459 | {} /* terminator */ |
16329 | }; | 16460 | }; |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index c461baa83c2a..df9b0bc7f878 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -322,8 +322,8 @@ static hda_nid_t stac92hd71bxx_mux_nids[2] = { | |||
322 | 0x1a, 0x1b | 322 | 0x1a, 0x1b |
323 | }; | 323 | }; |
324 | 324 | ||
325 | static hda_nid_t stac92hd71bxx_dmux_nids[1] = { | 325 | static hda_nid_t stac92hd71bxx_dmux_nids[2] = { |
326 | 0x1c, | 326 | 0x1c, 0x1d, |
327 | }; | 327 | }; |
328 | 328 | ||
329 | static hda_nid_t stac92hd71bxx_smux_nids[2] = { | 329 | static hda_nid_t stac92hd71bxx_smux_nids[2] = { |
@@ -566,10 +566,8 @@ static int stac92xx_smux_enum_put(struct snd_kcontrol *kcontrol, | |||
566 | nid = codec->slave_dig_outs[smux_idx - 1]; | 566 | nid = codec->slave_dig_outs[smux_idx - 1]; |
567 | if (spec->cur_smux[smux_idx] == smux->num_items - 1) | 567 | if (spec->cur_smux[smux_idx] == smux->num_items - 1) |
568 | val = AMP_OUT_MUTE; | 568 | val = AMP_OUT_MUTE; |
569 | if (smux_idx == 0) | ||
570 | nid = spec->multiout.dig_out_nid; | ||
571 | else | 569 | else |
572 | nid = codec->slave_dig_outs[smux_idx - 1]; | 570 | val = AMP_OUT_UNMUTE; |
573 | /* un/mute SPDIF out */ | 571 | /* un/mute SPDIF out */ |
574 | snd_hda_codec_write_cache(codec, nid, 0, | 572 | snd_hda_codec_write_cache(codec, nid, 0, |
575 | AC_VERB_SET_AMP_GAIN_MUTE, val); | 573 | AC_VERB_SET_AMP_GAIN_MUTE, val); |
@@ -861,20 +859,18 @@ static struct hda_verb stac92hd71bxx_core_init[] = { | |||
861 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | 859 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, |
862 | /* connect headphone jack to dac1 */ | 860 | /* connect headphone jack to dac1 */ |
863 | { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, | 861 | { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, |
864 | { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Speaker */ | ||
865 | /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */ | 862 | /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */ |
866 | { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 863 | { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
867 | { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 864 | { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
868 | { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 865 | { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
869 | }; | 866 | }; |
870 | 867 | ||
871 | #define HD_DISABLE_PORTF 3 | 868 | #define HD_DISABLE_PORTF 2 |
872 | static struct hda_verb stac92hd71bxx_analog_core_init[] = { | 869 | static struct hda_verb stac92hd71bxx_analog_core_init[] = { |
873 | /* start of config #1 */ | 870 | /* start of config #1 */ |
874 | 871 | ||
875 | /* connect port 0f to audio mixer */ | 872 | /* connect port 0f to audio mixer */ |
876 | { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2}, | 873 | { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2}, |
877 | { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Speaker */ | ||
878 | /* unmute right and left channels for node 0x0f */ | 874 | /* unmute right and left channels for node 0x0f */ |
879 | { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 875 | { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
880 | /* start of config #2 */ | 876 | /* start of config #2 */ |
@@ -883,10 +879,6 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = { | |||
883 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | 879 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, |
884 | /* connect headphone jack to dac1 */ | 880 | /* connect headphone jack to dac1 */ |
885 | { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, | 881 | { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, |
886 | /* connect port 0d to audio mixer */ | ||
887 | { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x2}, | ||
888 | /* unmute dac0 input in audio mixer */ | ||
889 | { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0x701f}, | ||
890 | /* unmute right and left channels for nodes 0x0a, 0xd */ | 882 | /* unmute right and left channels for nodes 0x0a, 0xd */ |
891 | { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 883 | { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
892 | { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 884 | { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
@@ -1107,6 +1099,7 @@ static struct snd_kcontrol_new stac92hd83xxx_mixer[] = { | |||
1107 | 1099 | ||
1108 | static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = { | 1100 | static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = { |
1109 | STAC_INPUT_SOURCE(2), | 1101 | STAC_INPUT_SOURCE(2), |
1102 | STAC_ANALOG_LOOPBACK(0xFA0, 0x7A0, 2), | ||
1110 | 1103 | ||
1111 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1c, 0x0, HDA_OUTPUT), | 1104 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1c, 0x0, HDA_OUTPUT), |
1112 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1c, 0x0, HDA_OUTPUT), | 1105 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1c, 0x0, HDA_OUTPUT), |
@@ -1119,8 +1112,17 @@ static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = { | |||
1119 | HDA_CODEC_MUTE("PC Beep Switch", 0x17, 0x2, HDA_INPUT), | 1112 | HDA_CODEC_MUTE("PC Beep Switch", 0x17, 0x2, HDA_INPUT), |
1120 | */ | 1113 | */ |
1121 | 1114 | ||
1122 | HDA_CODEC_MUTE("Analog Loopback 1", 0x17, 0x3, HDA_INPUT), | 1115 | HDA_CODEC_MUTE("Import0 Mux Capture Switch", 0x17, 0x0, HDA_INPUT), |
1123 | HDA_CODEC_MUTE("Analog Loopback 2", 0x17, 0x4, HDA_INPUT), | 1116 | HDA_CODEC_VOLUME("Import0 Mux Capture Volume", 0x17, 0x0, HDA_INPUT), |
1117 | |||
1118 | HDA_CODEC_MUTE("Import1 Mux Capture Switch", 0x17, 0x1, HDA_INPUT), | ||
1119 | HDA_CODEC_VOLUME("Import1 Mux Capture Volume", 0x17, 0x1, HDA_INPUT), | ||
1120 | |||
1121 | HDA_CODEC_MUTE("DAC0 Capture Switch", 0x17, 0x3, HDA_INPUT), | ||
1122 | HDA_CODEC_VOLUME("DAC0 Capture Volume", 0x17, 0x3, HDA_INPUT), | ||
1123 | |||
1124 | HDA_CODEC_MUTE("DAC1 Capture Switch", 0x17, 0x4, HDA_INPUT), | ||
1125 | HDA_CODEC_VOLUME("DAC1 Capture Volume", 0x17, 0x4, HDA_INPUT), | ||
1124 | { } /* end */ | 1126 | { } /* end */ |
1125 | }; | 1127 | }; |
1126 | 1128 | ||
@@ -1278,7 +1280,7 @@ static int stac92xx_build_controls(struct hda_codec *codec) | |||
1278 | return err; | 1280 | return err; |
1279 | spec->multiout.share_spdif = 1; | 1281 | spec->multiout.share_spdif = 1; |
1280 | } | 1282 | } |
1281 | if (spec->dig_in_nid && (!spec->gpio_dir & 0x01)) { | 1283 | if (spec->dig_in_nid && !(spec->gpio_dir & 0x01)) { |
1282 | err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); | 1284 | err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); |
1283 | if (err < 0) | 1285 | if (err < 0) |
1284 | return err; | 1286 | return err; |
@@ -1649,7 +1651,7 @@ static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { | |||
1649 | 1651 | ||
1650 | static unsigned int ref92hd71bxx_pin_configs[11] = { | 1652 | static unsigned int ref92hd71bxx_pin_configs[11] = { |
1651 | 0x02214030, 0x02a19040, 0x01a19020, 0x01014010, | 1653 | 0x02214030, 0x02a19040, 0x01a19020, 0x01014010, |
1652 | 0x0181302e, 0x01114010, 0x01019020, 0x90a000f0, | 1654 | 0x0181302e, 0x01014010, 0x01019020, 0x90a000f0, |
1653 | 0x90a000f0, 0x01452050, 0x01452050, | 1655 | 0x90a000f0, 0x01452050, 0x01452050, |
1654 | }; | 1656 | }; |
1655 | 1657 | ||
@@ -2812,7 +2814,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
2812 | static const char *chname[4] = { | 2814 | static const char *chname[4] = { |
2813 | "Front", "Surround", NULL /*CLFE*/, "Side" | 2815 | "Front", "Surround", NULL /*CLFE*/, "Side" |
2814 | }; | 2816 | }; |
2815 | hda_nid_t nid; | 2817 | hda_nid_t nid = 0; |
2816 | int i, err; | 2818 | int i, err; |
2817 | 2819 | ||
2818 | struct sigmatel_spec *spec = codec->spec; | 2820 | struct sigmatel_spec *spec = codec->spec; |
@@ -3000,7 +3002,7 @@ static int stac92xx_auto_create_mono_output_ctls(struct hda_codec *codec) | |||
3000 | 3002 | ||
3001 | /* labels for amp mux outputs */ | 3003 | /* labels for amp mux outputs */ |
3002 | static const char *stac92xx_amp_labels[3] = { | 3004 | static const char *stac92xx_amp_labels[3] = { |
3003 | "Front Microphone", "Microphone", "Line In" | 3005 | "Front Microphone", "Microphone", "Line In", |
3004 | }; | 3006 | }; |
3005 | 3007 | ||
3006 | /* create amp out controls mux on capable codecs */ | 3008 | /* create amp out controls mux on capable codecs */ |
@@ -4327,6 +4329,16 @@ static struct hda_codec_ops stac92hd71bxx_patch_ops = { | |||
4327 | #endif | 4329 | #endif |
4328 | }; | 4330 | }; |
4329 | 4331 | ||
4332 | static struct hda_input_mux stac92hd71bxx_dmux = { | ||
4333 | .num_items = 4, | ||
4334 | .items = { | ||
4335 | { "Analog Inputs", 0x00 }, | ||
4336 | { "Mixer", 0x01 }, | ||
4337 | { "Digital Mic 1", 0x02 }, | ||
4338 | { "Digital Mic 2", 0x03 }, | ||
4339 | } | ||
4340 | }; | ||
4341 | |||
4330 | static int patch_stac92hd71bxx(struct hda_codec *codec) | 4342 | static int patch_stac92hd71bxx(struct hda_codec *codec) |
4331 | { | 4343 | { |
4332 | struct sigmatel_spec *spec; | 4344 | struct sigmatel_spec *spec; |
@@ -4341,6 +4353,8 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) | |||
4341 | spec->num_pins = ARRAY_SIZE(stac92hd71bxx_pin_nids); | 4353 | spec->num_pins = ARRAY_SIZE(stac92hd71bxx_pin_nids); |
4342 | spec->num_pwrs = ARRAY_SIZE(stac92hd71bxx_pwr_nids); | 4354 | spec->num_pwrs = ARRAY_SIZE(stac92hd71bxx_pwr_nids); |
4343 | spec->pin_nids = stac92hd71bxx_pin_nids; | 4355 | spec->pin_nids = stac92hd71bxx_pin_nids; |
4356 | memcpy(&spec->private_dimux, &stac92hd71bxx_dmux, | ||
4357 | sizeof(stac92hd71bxx_dmux)); | ||
4344 | spec->board_config = snd_hda_check_board_config(codec, | 4358 | spec->board_config = snd_hda_check_board_config(codec, |
4345 | STAC_92HD71BXX_MODELS, | 4359 | STAC_92HD71BXX_MODELS, |
4346 | stac92hd71bxx_models, | 4360 | stac92hd71bxx_models, |
@@ -4392,6 +4406,7 @@ again: | |||
4392 | /* no output amps */ | 4406 | /* no output amps */ |
4393 | spec->num_pwrs = 0; | 4407 | spec->num_pwrs = 0; |
4394 | spec->mixer = stac92hd71bxx_analog_mixer; | 4408 | spec->mixer = stac92hd71bxx_analog_mixer; |
4409 | spec->dinput_mux = &spec->private_dimux; | ||
4395 | 4410 | ||
4396 | /* disable VSW */ | 4411 | /* disable VSW */ |
4397 | spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF]; | 4412 | spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF]; |
@@ -4409,12 +4424,13 @@ again: | |||
4409 | spec->num_pwrs = 0; | 4424 | spec->num_pwrs = 0; |
4410 | /* fallthru */ | 4425 | /* fallthru */ |
4411 | default: | 4426 | default: |
4427 | spec->dinput_mux = &spec->private_dimux; | ||
4412 | spec->mixer = stac92hd71bxx_analog_mixer; | 4428 | spec->mixer = stac92hd71bxx_analog_mixer; |
4413 | spec->init = stac92hd71bxx_analog_core_init; | 4429 | spec->init = stac92hd71bxx_analog_core_init; |
4414 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; | 4430 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; |
4415 | } | 4431 | } |
4416 | 4432 | ||
4417 | spec->aloopback_mask = 0x20; | 4433 | spec->aloopback_mask = 0x50; |
4418 | spec->aloopback_shift = 0; | 4434 | spec->aloopback_shift = 0; |
4419 | 4435 | ||
4420 | if (spec->board_config > STAC_92HD71BXX_REF) { | 4436 | if (spec->board_config > STAC_92HD71BXX_REF) { |
@@ -4456,6 +4472,10 @@ again: | |||
4456 | spec->multiout.num_dacs = 1; | 4472 | spec->multiout.num_dacs = 1; |
4457 | spec->multiout.hp_nid = 0x11; | 4473 | spec->multiout.hp_nid = 0x11; |
4458 | spec->multiout.dac_nids = stac92hd71bxx_dac_nids; | 4474 | spec->multiout.dac_nids = stac92hd71bxx_dac_nids; |
4475 | if (spec->dinput_mux) | ||
4476 | spec->private_dimux.num_items += | ||
4477 | spec->num_dmics - | ||
4478 | (ARRAY_SIZE(stac92hd71bxx_dmic_nids) - 1); | ||
4459 | 4479 | ||
4460 | err = stac92xx_parse_auto_config(codec, 0x21, 0x23); | 4480 | err = stac92xx_parse_auto_config(codec, 0x21, 0x23); |
4461 | if (!err) { | 4481 | if (!err) { |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 5b442383fcda..58d7cda03de5 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -2688,12 +2688,13 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, | |||
2688 | return err; | 2688 | return err; |
2689 | } | 2689 | } |
2690 | 2690 | ||
2691 | if (ice_has_con_ac97(ice)) | 2691 | if (ice_has_con_ac97(ice)) { |
2692 | err = snd_ice1712_pcm(ice, pcm_dev++, NULL); | 2692 | err = snd_ice1712_pcm(ice, pcm_dev++, NULL); |
2693 | if (err < 0) { | 2693 | if (err < 0) { |
2694 | snd_card_free(card); | 2694 | snd_card_free(card); |
2695 | return err; | 2695 | return err; |
2696 | } | 2696 | } |
2697 | } | ||
2697 | 2698 | ||
2698 | err = snd_ice1712_ac97_mixer(ice); | 2699 | err = snd_ice1712_ac97_mixer(ice); |
2699 | if (err < 0) { | 2700 | if (err < 0) { |
@@ -2715,12 +2716,13 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, | |||
2715 | } | 2716 | } |
2716 | } | 2717 | } |
2717 | 2718 | ||
2718 | if (ice_has_con_ac97(ice)) | 2719 | if (ice_has_con_ac97(ice)) { |
2719 | err = snd_ice1712_pcm_ds(ice, pcm_dev++, NULL); | 2720 | err = snd_ice1712_pcm_ds(ice, pcm_dev++, NULL); |
2720 | if (err < 0) { | 2721 | if (err < 0) { |
2721 | snd_card_free(card); | 2722 | snd_card_free(card); |
2722 | return err; | 2723 | return err; |
2723 | } | 2724 | } |
2725 | } | ||
2724 | 2726 | ||
2725 | if (!c->no_mpu401) { | 2727 | if (!c->no_mpu401) { |
2726 | err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, | 2728 | err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index c88d1eace1c4..19d3391e229f 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -2702,6 +2702,7 @@ static struct snd_pci_quirk intel8x0_clock_list[] __devinitdata = { | |||
2702 | SND_PCI_QUIRK(0x0e11, 0x008a, "AD1885", 41000), | 2702 | SND_PCI_QUIRK(0x0e11, 0x008a, "AD1885", 41000), |
2703 | SND_PCI_QUIRK(0x1028, 0x00be, "AD1885", 44100), | 2703 | SND_PCI_QUIRK(0x1028, 0x00be, "AD1885", 44100), |
2704 | SND_PCI_QUIRK(0x1028, 0x0177, "AD1980", 48000), | 2704 | SND_PCI_QUIRK(0x1028, 0x0177, "AD1980", 48000), |
2705 | SND_PCI_QUIRK(0x1028, 0x01ad, "AD1981B", 48000), | ||
2705 | SND_PCI_QUIRK(0x1043, 0x80f3, "AD1985", 48000), | 2706 | SND_PCI_QUIRK(0x1043, 0x80f3, "AD1985", 48000), |
2706 | { } /* terminator */ | 2707 | { } /* terminator */ |
2707 | }; | 2708 | }; |
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 2d0dce649a64..ae7601f353a7 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -1314,8 +1314,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci, | |||
1314 | } | 1314 | } |
1315 | for (i = 0; i < 2; i++) { | 1315 | for (i = 0; i < 2; i++) { |
1316 | mgr->mem[i].phys = pci_resource_start(pci, i); | 1316 | mgr->mem[i].phys = pci_resource_start(pci, i); |
1317 | mgr->mem[i].virt = ioremap_nocache(mgr->mem[i].phys, | 1317 | mgr->mem[i].virt = pci_ioremap_bar(pci, i); |
1318 | pci_resource_len(pci, i)); | ||
1319 | if (!mgr->mem[i].virt) { | 1318 | if (!mgr->mem[i].virt) { |
1320 | printk(KERN_ERR "unable to remap resource 0x%lx\n", | 1319 | printk(KERN_ERR "unable to remap resource 0x%lx\n", |
1321 | mgr->mem[i].phys); | 1320 | mgr->mem[i].phys); |