aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-07-01 17:39:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-07-01 17:39:32 -0400
commitf822dcc63f966fc79b11a8254fa0942b1aa8c71e (patch)
treed0fa79b6d6c483ca2f5c2f1dde4d0c3beab94882
parentae6f2462e59d47d396996e330b6f4183e6c9fa98 (diff)
parent0755e74b8f04d17cea09fa342a788025b2b50e2e (diff)
Merge tag 'sound-fix-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Here are a bunch of small fixes, mostly for HD-audio quirks, in addition to a few regression fixes and trivial cleanups" * tag 'sound-fix-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: Fix uninintialized error return ALSA: hda: Delete an unnecessary check before the function call "snd_info_free_entry" ALSA: hda - Add a fixup for Dell E7450 ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780 ALSA: hda - Add headset support to Acer Aspire V5 ALSA: hda - restore the MIC FIXUP for some Dell machines ALSA: jack: Fix endless loop at unique index detection ALSA: hda - set proper caps for newer AMD hda audio in KB/KV ALSA: hda - Disable widget power-save for VIA codecs ALSA: hda - Fix Dock Headphone on Thinkpad X250 seen as a Line Out
-rw-r--r--sound/core/ctljack.c5
-rw-r--r--sound/core/init.c3
-rw-r--r--sound/pci/hda/hda_intel.c4
-rw-r--r--sound/pci/hda/patch_hdmi.c2
-rw-r--r--sound/pci/hda/patch_realtek.c44
-rw-r--r--sound/pci/hda/patch_via.c8
6 files changed, 58 insertions, 8 deletions
diff --git a/sound/core/ctljack.c b/sound/core/ctljack.c
index 9149a4aefa95..84a3cd683068 100644
--- a/sound/core/ctljack.c
+++ b/sound/core/ctljack.c
@@ -41,8 +41,11 @@ static int get_available_index(struct snd_card *card, const char *name)
41 sid.iface = SNDRV_CTL_ELEM_IFACE_CARD; 41 sid.iface = SNDRV_CTL_ELEM_IFACE_CARD;
42 strlcpy(sid.name, name, sizeof(sid.name)); 42 strlcpy(sid.name, name, sizeof(sid.name));
43 43
44 while (snd_ctl_find_id(card, &sid)) 44 while (snd_ctl_find_id(card, &sid)) {
45 sid.index++; 45 sid.index++;
46 /* reset numid; otherwise snd_ctl_find_id() hits this again */
47 sid.numid = 0;
48 }
46 49
47 return sid.index; 50 return sid.index;
48} 51}
diff --git a/sound/core/init.c b/sound/core/init.c
index 3e0cebacefe1..20f37fb3800e 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -109,13 +109,12 @@ static void snd_card_id_read(struct snd_info_entry *entry,
109 109
110static int init_info_for_card(struct snd_card *card) 110static int init_info_for_card(struct snd_card *card)
111{ 111{
112 int err;
113 struct snd_info_entry *entry; 112 struct snd_info_entry *entry;
114 113
115 entry = snd_info_create_card_entry(card, "id", card->proc_root); 114 entry = snd_info_create_card_entry(card, "id", card->proc_root);
116 if (!entry) { 115 if (!entry) {
117 dev_dbg(card->dev, "unable to create card entry\n"); 116 dev_dbg(card->dev, "unable to create card entry\n");
118 return err; 117 return -ENOMEM;
119 } 118 }
120 entry->c.text.read = snd_card_id_read; 119 entry->c.text.read = snd_card_id_read;
121 card->proc_id = entry; 120 card->proc_id = entry;
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 9913e24d6699..745535d1840a 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2180,6 +2180,8 @@ static const struct pci_device_id azx_ids[] = {
2180 { PCI_DEVICE(0x1022, 0x780d), 2180 { PCI_DEVICE(0x1022, 0x780d),
2181 .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB }, 2181 .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB },
2182 /* ATI HDMI */ 2182 /* ATI HDMI */
2183 { PCI_DEVICE(0x1002, 0x1308),
2184 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
2183 { PCI_DEVICE(0x1002, 0x793b), 2185 { PCI_DEVICE(0x1002, 0x793b),
2184 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2186 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
2185 { PCI_DEVICE(0x1002, 0x7919), 2187 { PCI_DEVICE(0x1002, 0x7919),
@@ -2188,6 +2190,8 @@ static const struct pci_device_id azx_ids[] = {
2188 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2190 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
2189 { PCI_DEVICE(0x1002, 0x970f), 2191 { PCI_DEVICE(0x1002, 0x970f),
2190 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2192 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
2193 { PCI_DEVICE(0x1002, 0x9840),
2194 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
2191 { PCI_DEVICE(0x1002, 0xaa00), 2195 { PCI_DEVICE(0x1002, 0xaa00),
2192 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2196 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
2193 { PCI_DEVICE(0x1002, 0xaa08), 2197 { PCI_DEVICE(0x1002, 0xaa08),
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index f8527342a150..2f2433845d04 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -591,7 +591,7 @@ static int eld_proc_new(struct hdmi_spec_per_pin *per_pin, int index)
591 591
592static void eld_proc_free(struct hdmi_spec_per_pin *per_pin) 592static void eld_proc_free(struct hdmi_spec_per_pin *per_pin)
593{ 593{
594 if (!per_pin->codec->bus->shutdown && per_pin->proc_entry) { 594 if (!per_pin->codec->bus->shutdown) {
595 snd_info_free_entry(per_pin->proc_entry); 595 snd_info_free_entry(per_pin->proc_entry);
596 per_pin->proc_entry = NULL; 596 per_pin->proc_entry = NULL;
597 } 597 }
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 431a20b17df4..b3b44681d3cf 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4464,6 +4464,7 @@ enum {
4464 ALC269_FIXUP_LIFEBOOK, 4464 ALC269_FIXUP_LIFEBOOK,
4465 ALC269_FIXUP_LIFEBOOK_EXTMIC, 4465 ALC269_FIXUP_LIFEBOOK_EXTMIC,
4466 ALC269_FIXUP_LIFEBOOK_HP_PIN, 4466 ALC269_FIXUP_LIFEBOOK_HP_PIN,
4467 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT,
4467 ALC269_FIXUP_AMIC, 4468 ALC269_FIXUP_AMIC,
4468 ALC269_FIXUP_DMIC, 4469 ALC269_FIXUP_DMIC,
4469 ALC269VB_FIXUP_AMIC, 4470 ALC269VB_FIXUP_AMIC,
@@ -4484,6 +4485,7 @@ enum {
4484 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, 4485 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
4485 ALC269_FIXUP_HEADSET_MODE, 4486 ALC269_FIXUP_HEADSET_MODE,
4486 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, 4487 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
4488 ALC269_FIXUP_ASPIRE_HEADSET_MIC,
4487 ALC269_FIXUP_ASUS_X101_FUNC, 4489 ALC269_FIXUP_ASUS_X101_FUNC,
4488 ALC269_FIXUP_ASUS_X101_VERB, 4490 ALC269_FIXUP_ASUS_X101_VERB,
4489 ALC269_FIXUP_ASUS_X101, 4491 ALC269_FIXUP_ASUS_X101,
@@ -4511,6 +4513,7 @@ enum {
4511 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC, 4513 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
4512 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, 4514 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
4513 ALC292_FIXUP_TPT440_DOCK, 4515 ALC292_FIXUP_TPT440_DOCK,
4516 ALC292_FIXUP_TPT440_DOCK2,
4514 ALC283_FIXUP_BXBT2807_MIC, 4517 ALC283_FIXUP_BXBT2807_MIC,
4515 ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, 4518 ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED,
4516 ALC282_FIXUP_ASPIRE_V5_PINS, 4519 ALC282_FIXUP_ASPIRE_V5_PINS,
@@ -4521,6 +4524,8 @@ enum {
4521 ALC288_FIXUP_DELL_HEADSET_MODE, 4524 ALC288_FIXUP_DELL_HEADSET_MODE,
4522 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, 4525 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
4523 ALC288_FIXUP_DELL_XPS_13_GPIO6, 4526 ALC288_FIXUP_DELL_XPS_13_GPIO6,
4527 ALC288_FIXUP_DELL_XPS_13,
4528 ALC288_FIXUP_DISABLE_AAMIX,
4524 ALC292_FIXUP_DELL_E7X, 4529 ALC292_FIXUP_DELL_E7X,
4525 ALC292_FIXUP_DISABLE_AAMIX, 4530 ALC292_FIXUP_DISABLE_AAMIX,
4526 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 4531 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
@@ -4630,6 +4635,10 @@ static const struct hda_fixup alc269_fixups[] = {
4630 { } 4635 { }
4631 }, 4636 },
4632 }, 4637 },
4638 [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT] = {
4639 .type = HDA_FIXUP_FUNC,
4640 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
4641 },
4633 [ALC269_FIXUP_AMIC] = { 4642 [ALC269_FIXUP_AMIC] = {
4634 .type = HDA_FIXUP_PINS, 4643 .type = HDA_FIXUP_PINS,
4635 .v.pins = (const struct hda_pintbl[]) { 4644 .v.pins = (const struct hda_pintbl[]) {
@@ -4758,6 +4767,15 @@ static const struct hda_fixup alc269_fixups[] = {
4758 .type = HDA_FIXUP_FUNC, 4767 .type = HDA_FIXUP_FUNC,
4759 .v.func = alc_fixup_headset_mode_no_hp_mic, 4768 .v.func = alc_fixup_headset_mode_no_hp_mic,
4760 }, 4769 },
4770 [ALC269_FIXUP_ASPIRE_HEADSET_MIC] = {
4771 .type = HDA_FIXUP_PINS,
4772 .v.pins = (const struct hda_pintbl[]) {
4773 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
4774 { }
4775 },
4776 .chained = true,
4777 .chain_id = ALC269_FIXUP_HEADSET_MODE,
4778 },
4761 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = { 4779 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = {
4762 .type = HDA_FIXUP_PINS, 4780 .type = HDA_FIXUP_PINS,
4763 .v.pins = (const struct hda_pintbl[]) { 4781 .v.pins = (const struct hda_pintbl[]) {
@@ -4960,6 +4978,12 @@ static const struct hda_fixup alc269_fixups[] = {
4960 .chain_id = ALC269_FIXUP_HEADSET_MODE 4978 .chain_id = ALC269_FIXUP_HEADSET_MODE
4961 }, 4979 },
4962 [ALC292_FIXUP_TPT440_DOCK] = { 4980 [ALC292_FIXUP_TPT440_DOCK] = {
4981 .type = HDA_FIXUP_FUNC,
4982 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
4983 .chained = true,
4984 .chain_id = ALC292_FIXUP_TPT440_DOCK2
4985 },
4986 [ALC292_FIXUP_TPT440_DOCK2] = {
4963 .type = HDA_FIXUP_PINS, 4987 .type = HDA_FIXUP_PINS,
4964 .v.pins = (const struct hda_pintbl[]) { 4988 .v.pins = (const struct hda_pintbl[]) {
4965 { 0x16, 0x21211010 }, /* dock headphone */ 4989 { 0x16, 0x21211010 }, /* dock headphone */
@@ -5046,9 +5070,23 @@ static const struct hda_fixup alc269_fixups[] = {
5046 .chained = true, 5070 .chained = true,
5047 .chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE 5071 .chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
5048 }, 5072 },
5073 [ALC288_FIXUP_DISABLE_AAMIX] = {
5074 .type = HDA_FIXUP_FUNC,
5075 .v.func = alc_fixup_disable_aamix,
5076 .chained = true,
5077 .chain_id = ALC288_FIXUP_DELL_XPS_13_GPIO6
5078 },
5079 [ALC288_FIXUP_DELL_XPS_13] = {
5080 .type = HDA_FIXUP_FUNC,
5081 .v.func = alc_fixup_dell_xps13,
5082 .chained = true,
5083 .chain_id = ALC288_FIXUP_DISABLE_AAMIX
5084 },
5049 [ALC292_FIXUP_DISABLE_AAMIX] = { 5085 [ALC292_FIXUP_DISABLE_AAMIX] = {
5050 .type = HDA_FIXUP_FUNC, 5086 .type = HDA_FIXUP_FUNC,
5051 .v.func = alc_fixup_disable_aamix, 5087 .v.func = alc_fixup_disable_aamix,
5088 .chained = true,
5089 .chain_id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
5052 }, 5090 },
5053 [ALC292_FIXUP_DELL_E7X] = { 5091 [ALC292_FIXUP_DELL_E7X] = {
5054 .type = HDA_FIXUP_FUNC, 5092 .type = HDA_FIXUP_FUNC,
@@ -5073,6 +5111,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
5073 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC), 5111 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
5074 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC), 5112 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
5075 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700), 5113 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700),
5114 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
5115 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
5076 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), 5116 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK),
5077 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), 5117 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
5078 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), 5118 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
@@ -5086,10 +5126,11 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
5086 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 5126 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
5087 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 5127 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
5088 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 5128 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
5129 SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X),
5089 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK), 5130 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK),
5090 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5131 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
5091 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5132 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
5092 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC292_FIXUP_DELL_E7X), 5133 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13),
5093 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 5134 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
5094 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5135 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
5095 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5136 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
@@ -5173,6 +5214,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
5173 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), 5214 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
5174 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX), 5215 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX),
5175 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK), 5216 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
5217 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
5176 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN), 5218 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
5177 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), 5219 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
5178 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), 5220 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 0521be8d46a8..da5366405eda 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -241,7 +241,9 @@ static int via_pin_power_ctl_get(struct snd_kcontrol *kcontrol,
241 struct snd_ctl_elem_value *ucontrol) 241 struct snd_ctl_elem_value *ucontrol)
242{ 242{
243 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 243 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
244 ucontrol->value.enumerated.item[0] = codec->power_save_node; 244 struct via_spec *spec = codec->spec;
245
246 ucontrol->value.enumerated.item[0] = spec->gen.power_down_unused;
245 return 0; 247 return 0;
246} 248}
247 249
@@ -252,9 +254,9 @@ static int via_pin_power_ctl_put(struct snd_kcontrol *kcontrol,
252 struct via_spec *spec = codec->spec; 254 struct via_spec *spec = codec->spec;
253 bool val = !!ucontrol->value.enumerated.item[0]; 255 bool val = !!ucontrol->value.enumerated.item[0];
254 256
255 if (val == codec->power_save_node) 257 if (val == spec->gen.power_down_unused)
256 return 0; 258 return 0;
257 codec->power_save_node = val; 259 /* codec->power_save_node = val; */ /* widget PM seems yet broken */
258 spec->gen.power_down_unused = val; 260 spec->gen.power_down_unused = val;
259 analog_low_current_mode(codec); 261 analog_low_current_mode(codec);
260 return 1; 262 return 1;