aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-11-17 04:16:43 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-17 04:17:47 -0500
commita7b63425a41cd6a8d50f76fef0660c5110f97e91 (patch)
treebe17ee121f1c8814d8d39c9f3e0205d9397fab54 /sound/pci
parent35039eb6b199749943547c8572be6604edf00229 (diff)
parent3726cc75e581c157202da93bb2333cce25c15c98 (diff)
Merge branch 'perf/core' into perf/probes
Resolved merge conflict in tools/perf/Makefile Merge reason: we want to queue up a dependent patch. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/Kconfig1
-rw-r--r--sound/pci/ali5451/ali5451.c2
-rw-r--r--sound/pci/hda/hda_intel.c13
-rw-r--r--sound/pci/hda/patch_conexant.c16
-rw-r--r--sound/pci/hda/patch_realtek.c18
-rw-r--r--sound/pci/hda/patch_sigmatel.c68
-rw-r--r--sound/pci/intel8x0.c6
-rw-r--r--sound/pci/via82xx.c59
8 files changed, 160 insertions, 23 deletions
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
index fb5ee3cc3968..75c602b5b132 100644
--- a/sound/pci/Kconfig
+++ b/sound/pci/Kconfig
@@ -259,7 +259,6 @@ config SND_CS5530
259 259
260config SND_CS5535AUDIO 260config SND_CS5535AUDIO
261 tristate "CS5535/CS5536 Audio" 261 tristate "CS5535/CS5536 Audio"
262 depends on X86 && !X86_64
263 select SND_PCM 262 select SND_PCM
264 select SND_AC97_CODEC 263 select SND_AC97_CODEC
265 help 264 help
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index b458d208720b..aaf4da68969c 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -973,7 +973,7 @@ static void snd_ali_free_voice(struct snd_ali * codec,
973 void *private_data; 973 void *private_data;
974 974
975 snd_ali_printk("free_voice: channel=%d\n",pvoice->number); 975 snd_ali_printk("free_voice: channel=%d\n",pvoice->number);
976 if (pvoice == NULL || !pvoice->use) 976 if (!pvoice->use)
977 return; 977 return;
978 snd_ali_clear_voices(codec, pvoice->number, pvoice->number); 978 snd_ali_clear_voices(codec, pvoice->number, pvoice->number);
979 spin_lock_irq(&codec->voice_alloc); 979 spin_lock_irq(&codec->voice_alloc);
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index c9ad182e1b4b..6517f589d01d 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -722,9 +722,10 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
722 chip->last_cmd[addr]); 722 chip->last_cmd[addr]);
723 chip->single_cmd = 1; 723 chip->single_cmd = 1;
724 bus->response_reset = 0; 724 bus->response_reset = 0;
725 /* re-initialize CORB/RIRB */ 725 /* release CORB/RIRB */
726 azx_free_cmd_io(chip); 726 azx_free_cmd_io(chip);
727 azx_init_cmd_io(chip); 727 /* disable unsolicited responses */
728 azx_writel(chip, GCTL, azx_readl(chip, GCTL) & ~ICH6_GCTL_UNSOL);
728 return -1; 729 return -1;
729} 730}
730 731
@@ -865,7 +866,9 @@ static int azx_reset(struct azx *chip)
865 } 866 }
866 867
867 /* Accept unsolicited responses */ 868 /* Accept unsolicited responses */
868 azx_writel(chip, GCTL, azx_readl(chip, GCTL) | ICH6_GCTL_UNSOL); 869 if (!chip->single_cmd)
870 azx_writel(chip, GCTL, azx_readl(chip, GCTL) |
871 ICH6_GCTL_UNSOL);
869 872
870 /* detect codecs */ 873 /* detect codecs */
871 if (!chip->codec_mask) { 874 if (!chip->codec_mask) {
@@ -980,7 +983,8 @@ static void azx_init_chip(struct azx *chip)
980 azx_int_enable(chip); 983 azx_int_enable(chip);
981 984
982 /* initialize the codec command I/O */ 985 /* initialize the codec command I/O */
983 azx_init_cmd_io(chip); 986 if (!chip->single_cmd)
987 azx_init_cmd_io(chip);
984 988
985 /* program the position buffer */ 989 /* program the position buffer */
986 azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr); 990 azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr);
@@ -2674,6 +2678,7 @@ static struct pci_device_id azx_ids[] = {
2674 { PCI_DEVICE(0x10de, 0x044b), .driver_data = AZX_DRIVER_NVIDIA }, 2678 { PCI_DEVICE(0x10de, 0x044b), .driver_data = AZX_DRIVER_NVIDIA },
2675 { PCI_DEVICE(0x10de, 0x055c), .driver_data = AZX_DRIVER_NVIDIA }, 2679 { PCI_DEVICE(0x10de, 0x055c), .driver_data = AZX_DRIVER_NVIDIA },
2676 { PCI_DEVICE(0x10de, 0x055d), .driver_data = AZX_DRIVER_NVIDIA }, 2680 { PCI_DEVICE(0x10de, 0x055d), .driver_data = AZX_DRIVER_NVIDIA },
2681 { PCI_DEVICE(0x10de, 0x0590), .driver_data = AZX_DRIVER_NVIDIA },
2677 { PCI_DEVICE(0x10de, 0x0774), .driver_data = AZX_DRIVER_NVIDIA }, 2682 { PCI_DEVICE(0x10de, 0x0774), .driver_data = AZX_DRIVER_NVIDIA },
2678 { PCI_DEVICE(0x10de, 0x0775), .driver_data = AZX_DRIVER_NVIDIA }, 2683 { PCI_DEVICE(0x10de, 0x0775), .driver_data = AZX_DRIVER_NVIDIA },
2679 { PCI_DEVICE(0x10de, 0x0776), .driver_data = AZX_DRIVER_NVIDIA }, 2684 { PCI_DEVICE(0x10de, 0x0776), .driver_data = AZX_DRIVER_NVIDIA },
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 3fbbc8c01e70..905859d4f4df 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -110,6 +110,7 @@ struct conexant_spec {
110 110
111 unsigned int dell_automute; 111 unsigned int dell_automute;
112 unsigned int port_d_mode; 112 unsigned int port_d_mode;
113 unsigned char ext_mic_bias;
113}; 114};
114 115
115static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo, 116static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo,
@@ -1927,6 +1928,11 @@ static hda_nid_t cxt5066_adc_nids[3] = { 0x14, 0x15, 0x16 };
1927static hda_nid_t cxt5066_capsrc_nids[1] = { 0x17 }; 1928static hda_nid_t cxt5066_capsrc_nids[1] = { 0x17 };
1928#define CXT5066_SPDIF_OUT 0x21 1929#define CXT5066_SPDIF_OUT 0x21
1929 1930
1931/* OLPC's microphone port is DC coupled for use with external sensors,
1932 * therefore we use a 50% mic bias in order to center the input signal with
1933 * the DC input range of the codec. */
1934#define CXT5066_OLPC_EXT_MIC_BIAS PIN_VREF50
1935
1930static struct hda_channel_mode cxt5066_modes[1] = { 1936static struct hda_channel_mode cxt5066_modes[1] = {
1931 { 2, NULL }, 1937 { 2, NULL },
1932}; 1938};
@@ -1980,9 +1986,10 @@ static int cxt5066_hp_master_sw_put(struct snd_kcontrol *kcontrol,
1980/* toggle input of built-in and mic jack appropriately */ 1986/* toggle input of built-in and mic jack appropriately */
1981static void cxt5066_automic(struct hda_codec *codec) 1987static void cxt5066_automic(struct hda_codec *codec)
1982{ 1988{
1983 static struct hda_verb ext_mic_present[] = { 1989 struct conexant_spec *spec = codec->spec;
1990 struct hda_verb ext_mic_present[] = {
1984 /* enable external mic, port B */ 1991 /* enable external mic, port B */
1985 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, 1992 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, spec->ext_mic_bias},
1986 1993
1987 /* switch to external mic input */ 1994 /* switch to external mic input */
1988 {0x17, AC_VERB_SET_CONNECT_SEL, 0}, 1995 {0x17, AC_VERB_SET_CONNECT_SEL, 0},
@@ -2235,7 +2242,7 @@ static struct hda_verb cxt5066_init_verbs_olpc[] = {
2235 {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, /* DAC1 */ 2242 {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, /* DAC1 */
2236 2243
2237 /* Port B: external microphone */ 2244 /* Port B: external microphone */
2238 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, 2245 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, CXT5066_OLPC_EXT_MIC_BIAS},
2239 2246
2240 /* Port C: internal microphone */ 2247 /* Port C: internal microphone */
2241 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, 2248 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
@@ -2325,6 +2332,7 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = {
2325 CXT5066_LAPTOP), 2332 CXT5066_LAPTOP),
2326 SND_PCI_QUIRK(0x1028, 0x02f5, "Dell", 2333 SND_PCI_QUIRK(0x1028, 0x02f5, "Dell",
2327 CXT5066_DELL_LAPTOP), 2334 CXT5066_DELL_LAPTOP),
2335 SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5),
2328 {} 2336 {}
2329}; 2337};
2330 2338
@@ -2352,6 +2360,7 @@ static int patch_cxt5066(struct hda_codec *codec)
2352 spec->input_mux = &cxt5066_capture_source; 2360 spec->input_mux = &cxt5066_capture_source;
2353 2361
2354 spec->port_d_mode = PIN_HP; 2362 spec->port_d_mode = PIN_HP;
2363 spec->ext_mic_bias = PIN_VREF80;
2355 2364
2356 spec->num_init_verbs = 1; 2365 spec->num_init_verbs = 1;
2357 spec->init_verbs[0] = cxt5066_init_verbs; 2366 spec->init_verbs[0] = cxt5066_init_verbs;
@@ -2383,6 +2392,7 @@ static int patch_cxt5066(struct hda_codec *codec)
2383 spec->mixers[spec->num_mixers++] = cxt5066_mixer_master_olpc; 2392 spec->mixers[spec->num_mixers++] = cxt5066_mixer_master_olpc;
2384 spec->mixers[spec->num_mixers++] = cxt5066_mixers; 2393 spec->mixers[spec->num_mixers++] = cxt5066_mixers;
2385 spec->port_d_mode = 0; 2394 spec->port_d_mode = 0;
2395 spec->ext_mic_bias = CXT5066_OLPC_EXT_MIC_BIAS;
2386 2396
2387 /* no S/PDIF out */ 2397 /* no S/PDIF out */
2388 spec->multiout.dig_out_nid = 0; 2398 spec->multiout.dig_out_nid = 0;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index c08ca660daba..daf6975b0c2e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -965,6 +965,8 @@ static void alc_automute_pin(struct hda_codec *codec)
965 unsigned int nid = spec->autocfg.hp_pins[0]; 965 unsigned int nid = spec->autocfg.hp_pins[0];
966 int i; 966 int i;
967 967
968 if (!nid)
969 return;
968 pincap = snd_hda_query_pin_caps(codec, nid); 970 pincap = snd_hda_query_pin_caps(codec, nid);
969 if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */ 971 if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */
970 snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0); 972 snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0);
@@ -4682,9 +4684,9 @@ static int alc880_parse_auto_config(struct hda_codec *codec)
4682 spec->multiout.dig_out_nid = dig_nid; 4684 spec->multiout.dig_out_nid = dig_nid;
4683 else { 4685 else {
4684 spec->multiout.slave_dig_outs = spec->slave_dig_outs; 4686 spec->multiout.slave_dig_outs = spec->slave_dig_outs;
4685 spec->slave_dig_outs[i - 1] = dig_nid; 4687 if (i >= ARRAY_SIZE(spec->slave_dig_outs) - 1)
4686 if (i == ARRAY_SIZE(spec->slave_dig_outs) - 1)
4687 break; 4688 break;
4689 spec->slave_dig_outs[i - 1] = dig_nid;
4688 } 4690 }
4689 } 4691 }
4690 if (spec->autocfg.dig_in_pin) 4692 if (spec->autocfg.dig_in_pin)
@@ -6247,7 +6249,7 @@ static struct snd_pci_quirk alc260_cfg_tbl[] = {
6247 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), 6249 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER),
6248 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100), 6250 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100),
6249 SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013), 6251 SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013),
6250 SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_HP_3013), 6252 SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_AUTO), /* no quirk */
6251 SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013), 6253 SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013),
6252 SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP_3013), 6254 SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP_3013),
6253 SND_PCI_QUIRK(0x103c, 0x3012, "HP", ALC260_HP_DC7600), 6255 SND_PCI_QUIRK(0x103c, 0x3012, "HP", ALC260_HP_DC7600),
@@ -9811,9 +9813,9 @@ static int alc882_parse_auto_config(struct hda_codec *codec)
9811 spec->multiout.dig_out_nid = dig_nid; 9813 spec->multiout.dig_out_nid = dig_nid;
9812 else { 9814 else {
9813 spec->multiout.slave_dig_outs = spec->slave_dig_outs; 9815 spec->multiout.slave_dig_outs = spec->slave_dig_outs;
9814 spec->slave_dig_outs[i - 1] = dig_nid; 9816 if (i >= ARRAY_SIZE(spec->slave_dig_outs) - 1)
9815 if (i == ARRAY_SIZE(spec->slave_dig_outs) - 1)
9816 break; 9817 break;
9818 spec->slave_dig_outs[i - 1] = dig_nid;
9817 } 9819 }
9818 } 9820 }
9819 if (spec->autocfg.dig_in_pin) 9821 if (spec->autocfg.dig_in_pin)
@@ -11458,6 +11460,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = {
11458 SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD), 11460 SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD),
11459 SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */ 11461 SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */
11460 SND_PCI_QUIRK(0x104d, 0x9025, "Sony VAIO Z21MN", ALC262_TOSHIBA_S06), 11462 SND_PCI_QUIRK(0x104d, 0x9025, "Sony VAIO Z21MN", ALC262_TOSHIBA_S06),
11463 SND_PCI_QUIRK(0x104d, 0x9035, "Sony VAIO VGN-FW170J", ALC262_AUTO),
11461 SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO", 11464 SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO",
11462 ALC262_SONY_ASSAMD), 11465 ALC262_SONY_ASSAMD),
11463 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", 11466 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
@@ -12602,7 +12605,8 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = {
12602 SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One", 12605 SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One",
12603 ALC268_ACER_ASPIRE_ONE), 12606 ALC268_ACER_ASPIRE_ONE),
12604 SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL), 12607 SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL),
12605 SND_PCI_QUIRK(0x1028, 0x02b0, "Dell Inspiron Mini9", ALC268_DELL), 12608 SND_PCI_QUIRK_MASK(0x1028, 0xfff0, 0x02b0,
12609 "Dell Inspiron Mini9/Vostro A90", ALC268_DELL),
12606 /* almost compatible with toshiba but with optional digital outs; 12610 /* almost compatible with toshiba but with optional digital outs;
12607 * auto-probing seems working fine 12611 * auto-probing seems working fine
12608 */ 12612 */
@@ -17374,7 +17378,7 @@ static int alc662_auto_create_extra_out(struct hda_codec *codec, hda_nid_t pin,
17374 17378
17375/* create playback/capture controls for input pins */ 17379/* create playback/capture controls for input pins */
17376#define alc662_auto_create_input_ctls \ 17380#define alc662_auto_create_input_ctls \
17377 alc880_auto_create_input_ctls 17381 alc882_auto_create_input_ctls
17378 17382
17379static void alc662_auto_set_output_and_unmute(struct hda_codec *codec, 17383static void alc662_auto_set_output_and_unmute(struct hda_codec *codec,
17380 hda_nid_t nid, int pin_type, 17384 hda_nid_t nid, int pin_type,
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 66c0876bf734..8eb6508cd991 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -28,6 +28,7 @@
28#include <linux/delay.h> 28#include <linux/delay.h>
29#include <linux/slab.h> 29#include <linux/slab.h>
30#include <linux/pci.h> 30#include <linux/pci.h>
31#include <linux/dmi.h>
31#include <sound/core.h> 32#include <sound/core.h>
32#include <sound/asoundef.h> 33#include <sound/asoundef.h>
33#include <sound/jack.h> 34#include <sound/jack.h>
@@ -1693,6 +1694,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
1693 "DFI LanParty", STAC_92HD71BXX_REF), 1694 "DFI LanParty", STAC_92HD71BXX_REF),
1694 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fb, 1695 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fb,
1695 "HP dv4-1222nr", STAC_HP_DV4_1222NR), 1696 "HP dv4-1222nr", STAC_HP_DV4_1222NR),
1697 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x1720,
1698 "HP", STAC_HP_DV5),
1696 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3080, 1699 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3080,
1697 "HP", STAC_HP_DV5), 1700 "HP", STAC_HP_DV5),
1698 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x30f0, 1701 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x30f0,
@@ -4665,6 +4668,26 @@ static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res)
4665 } 4668 }
4666} 4669}
4667 4670
4671static int hp_bseries_system(u32 subsystem_id)
4672{
4673 switch (subsystem_id) {
4674 case 0x103c307e:
4675 case 0x103c307f:
4676 case 0x103c3080:
4677 case 0x103c3081:
4678 case 0x103c1722:
4679 case 0x103c1723:
4680 case 0x103c1724:
4681 case 0x103c1725:
4682 case 0x103c1726:
4683 case 0x103c1727:
4684 case 0x103c1728:
4685 case 0x103c1729:
4686 return 1;
4687 }
4688 return 0;
4689}
4690
4668#ifdef CONFIG_PROC_FS 4691#ifdef CONFIG_PROC_FS
4669static void stac92hd_proc_hook(struct snd_info_buffer *buffer, 4692static void stac92hd_proc_hook(struct snd_info_buffer *buffer,
4670 struct hda_codec *codec, hda_nid_t nid) 4693 struct hda_codec *codec, hda_nid_t nid)
@@ -4754,6 +4777,11 @@ static int stac92xx_hp_check_power_status(struct hda_codec *codec,
4754 else 4777 else
4755 spec->gpio_data |= spec->gpio_led; /* white */ 4778 spec->gpio_data |= spec->gpio_led; /* white */
4756 4779
4780 if (hp_bseries_system(codec->subsystem_id)) {
4781 /* LED state is inverted on these systems */
4782 spec->gpio_data ^= spec->gpio_led;
4783 }
4784
4757 stac_gpio_set(codec, spec->gpio_mask, 4785 stac_gpio_set(codec, spec->gpio_mask,
4758 spec->gpio_dir, 4786 spec->gpio_dir,
4759 spec->gpio_data); 4787 spec->gpio_data);
@@ -5243,6 +5271,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
5243{ 5271{
5244 struct sigmatel_spec *spec; 5272 struct sigmatel_spec *spec;
5245 struct hda_verb *unmute_init = stac92hd71bxx_unmute_core_init; 5273 struct hda_verb *unmute_init = stac92hd71bxx_unmute_core_init;
5274 unsigned int pin_cfg;
5246 int err = 0; 5275 int err = 0;
5247 5276
5248 spec = kzalloc(sizeof(*spec), GFP_KERNEL); 5277 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
@@ -5426,6 +5455,45 @@ again:
5426 break; 5455 break;
5427 } 5456 }
5428 5457
5458 if (hp_bseries_system(codec->subsystem_id)) {
5459 pin_cfg = snd_hda_codec_get_pincfg(codec, 0x0f);
5460 if (get_defcfg_device(pin_cfg) == AC_JACK_LINE_OUT ||
5461 get_defcfg_device(pin_cfg) == AC_JACK_SPEAKER ||
5462 get_defcfg_device(pin_cfg) == AC_JACK_HP_OUT) {
5463 /* It was changed in the BIOS to just satisfy MS DTM.
5464 * Lets turn it back into slaved HP
5465 */
5466 pin_cfg = (pin_cfg & (~AC_DEFCFG_DEVICE))
5467 | (AC_JACK_HP_OUT <<
5468 AC_DEFCFG_DEVICE_SHIFT);
5469 pin_cfg = (pin_cfg & (~(AC_DEFCFG_DEF_ASSOC
5470 | AC_DEFCFG_SEQUENCE)))
5471 | 0x1f;
5472 snd_hda_codec_set_pincfg(codec, 0x0f, pin_cfg);
5473 }
5474 }
5475
5476 if ((codec->subsystem_id >> 16) == PCI_VENDOR_ID_HP) {
5477 const struct dmi_device *dev = NULL;
5478 while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING,
5479 NULL, dev))) {
5480 if (strcmp(dev->name, "HP_Mute_LED_1")) {
5481 switch (codec->vendor_id) {
5482 case 0x111d7608:
5483 spec->gpio_led = 0x01;
5484 break;
5485 case 0x111d7600:
5486 case 0x111d7601:
5487 case 0x111d7602:
5488 case 0x111d7603:
5489 spec->gpio_led = 0x08;
5490 break;
5491 }
5492 break;
5493 }
5494 }
5495 }
5496
5429#ifdef CONFIG_SND_HDA_POWER_SAVE 5497#ifdef CONFIG_SND_HDA_POWER_SAVE
5430 if (spec->gpio_led) { 5498 if (spec->gpio_led) {
5431 spec->gpio_mask |= spec->gpio_led; 5499 spec->gpio_mask |= spec->gpio_led;
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 754867ed4785..aac20fb4aad2 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -1950,6 +1950,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
1950 }, 1950 },
1951 { 1951 {
1952 .subvendor = 0x104d, 1952 .subvendor = 0x104d,
1953 .subdevice = 0x8144,
1954 .name = "Sony",
1955 .type = AC97_TUNE_INV_EAPD
1956 },
1957 {
1958 .subvendor = 0x104d,
1953 .subdevice = 0x8197, 1959 .subdevice = 0x8197,
1954 .name = "Sony S1XP", 1960 .name = "Sony S1XP",
1955 .type = AC97_TUNE_INV_EAPD 1961 .type = AC97_TUNE_INV_EAPD
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 91683a349035..8a332d2f615c 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -386,6 +386,7 @@ struct via82xx {
386 386
387 struct snd_pcm *pcms[2]; 387 struct snd_pcm *pcms[2];
388 struct snd_rawmidi *rmidi; 388 struct snd_rawmidi *rmidi;
389 struct snd_kcontrol *dxs_controls[4];
389 390
390 struct snd_ac97_bus *ac97_bus; 391 struct snd_ac97_bus *ac97_bus;
391 struct snd_ac97 *ac97; 392 struct snd_ac97 *ac97;
@@ -1216,9 +1217,9 @@ static int snd_via82xx_pcm_open(struct via82xx *chip, struct viadev *viadev,
1216 1217
1217 1218
1218/* 1219/*
1219 * open callback for playback on via686 and via823x DSX 1220 * open callback for playback on via686
1220 */ 1221 */
1221static int snd_via82xx_playback_open(struct snd_pcm_substream *substream) 1222static int snd_via686_playback_open(struct snd_pcm_substream *substream)
1222{ 1223{
1223 struct via82xx *chip = snd_pcm_substream_chip(substream); 1224 struct via82xx *chip = snd_pcm_substream_chip(substream);
1224 struct viadev *viadev = &chip->devs[chip->playback_devno + substream->number]; 1225 struct viadev *viadev = &chip->devs[chip->playback_devno + substream->number];
@@ -1230,6 +1231,32 @@ static int snd_via82xx_playback_open(struct snd_pcm_substream *substream)
1230} 1231}
1231 1232
1232/* 1233/*
1234 * open callback for playback on via823x DXS
1235 */
1236static int snd_via8233_playback_open(struct snd_pcm_substream *substream)
1237{
1238 struct via82xx *chip = snd_pcm_substream_chip(substream);
1239 struct viadev *viadev;
1240 unsigned int stream;
1241 int err;
1242
1243 viadev = &chip->devs[chip->playback_devno + substream->number];
1244 if ((err = snd_via82xx_pcm_open(chip, viadev, substream)) < 0)
1245 return err;
1246 stream = viadev->reg_offset / 0x10;
1247 if (chip->dxs_controls[stream]) {
1248 chip->playback_volume[stream][0] = 0;
1249 chip->playback_volume[stream][1] = 0;
1250 chip->dxs_controls[stream]->vd[0].access &=
1251 ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
1252 snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE |
1253 SNDRV_CTL_EVENT_MASK_INFO,
1254 &chip->dxs_controls[stream]->id);
1255 }
1256 return 0;
1257}
1258
1259/*
1233 * open callback for playback on via823x multi-channel 1260 * open callback for playback on via823x multi-channel
1234 */ 1261 */
1235static int snd_via8233_multi_open(struct snd_pcm_substream *substream) 1262static int snd_via8233_multi_open(struct snd_pcm_substream *substream)
@@ -1302,10 +1329,26 @@ static int snd_via82xx_pcm_close(struct snd_pcm_substream *substream)
1302 return 0; 1329 return 0;
1303} 1330}
1304 1331
1332static int snd_via8233_playback_close(struct snd_pcm_substream *substream)
1333{
1334 struct via82xx *chip = snd_pcm_substream_chip(substream);
1335 struct viadev *viadev = substream->runtime->private_data;
1336 unsigned int stream;
1337
1338 stream = viadev->reg_offset / 0x10;
1339 if (chip->dxs_controls[stream]) {
1340 chip->dxs_controls[stream]->vd[0].access |=
1341 SNDRV_CTL_ELEM_ACCESS_INACTIVE;
1342 snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_INFO,
1343 &chip->dxs_controls[stream]->id);
1344 }
1345 return snd_via82xx_pcm_close(substream);
1346}
1347
1305 1348
1306/* via686 playback callbacks */ 1349/* via686 playback callbacks */
1307static struct snd_pcm_ops snd_via686_playback_ops = { 1350static struct snd_pcm_ops snd_via686_playback_ops = {
1308 .open = snd_via82xx_playback_open, 1351 .open = snd_via686_playback_open,
1309 .close = snd_via82xx_pcm_close, 1352 .close = snd_via82xx_pcm_close,
1310 .ioctl = snd_pcm_lib_ioctl, 1353 .ioctl = snd_pcm_lib_ioctl,
1311 .hw_params = snd_via82xx_hw_params, 1354 .hw_params = snd_via82xx_hw_params,
@@ -1331,8 +1374,8 @@ static struct snd_pcm_ops snd_via686_capture_ops = {
1331 1374
1332/* via823x DSX playback callbacks */ 1375/* via823x DSX playback callbacks */
1333static struct snd_pcm_ops snd_via8233_playback_ops = { 1376static struct snd_pcm_ops snd_via8233_playback_ops = {
1334 .open = snd_via82xx_playback_open, 1377 .open = snd_via8233_playback_open,
1335 .close = snd_via82xx_pcm_close, 1378 .close = snd_via8233_playback_close,
1336 .ioctl = snd_pcm_lib_ioctl, 1379 .ioctl = snd_pcm_lib_ioctl,
1337 .hw_params = snd_via82xx_hw_params, 1380 .hw_params = snd_via82xx_hw_params,
1338 .hw_free = snd_via82xx_hw_free, 1381 .hw_free = snd_via82xx_hw_free,
@@ -1709,8 +1752,9 @@ static struct snd_kcontrol_new snd_via8233_dxs_volume_control __devinitdata = {
1709 .device = 0, 1752 .device = 0,
1710 /* .subdevice set later */ 1753 /* .subdevice set later */
1711 .name = "PCM Playback Volume", 1754 .name = "PCM Playback Volume",
1712 .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | 1755 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
1713 SNDRV_CTL_ELEM_ACCESS_TLV_READ), 1756 SNDRV_CTL_ELEM_ACCESS_TLV_READ |
1757 SNDRV_CTL_ELEM_ACCESS_INACTIVE,
1714 .info = snd_via8233_dxs_volume_info, 1758 .info = snd_via8233_dxs_volume_info,
1715 .get = snd_via8233_dxs_volume_get, 1759 .get = snd_via8233_dxs_volume_get,
1716 .put = snd_via8233_dxs_volume_put, 1760 .put = snd_via8233_dxs_volume_put,
@@ -1948,6 +1992,7 @@ static int __devinit snd_via8233_init_misc(struct via82xx *chip)
1948 err = snd_ctl_add(chip->card, kctl); 1992 err = snd_ctl_add(chip->card, kctl);
1949 if (err < 0) 1993 if (err < 0)
1950 return err; 1994 return err;
1995 chip->dxs_controls[i] = kctl;
1951 } 1996 }
1952 } 1997 }
1953 } 1998 }