diff options
author | Mark Brown <broonie@kernel.org> | 2014-10-20 12:55:07 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-20 13:27:32 -0400 |
commit | b7a40242c82cd73cfcea305f23e67d068dd8401a (patch) | |
tree | 251b49d19cd7c371847ae1f951e1b537ca0e1c15 /sound/pci/hda | |
parent | d26833bfce5e56017bea9f1f50838f20e18e7b7e (diff) | |
parent | 9c6de47d53a3ce8df1642ae67823688eb98a190a (diff) |
Merge branch 'fix/dw' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-dw
Conflicts:
drivers/spi/spi-dw-mid.c
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/ca0132_regs.h | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 10 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 12 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 46 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 17 |
5 files changed, 70 insertions, 17 deletions
diff --git a/sound/pci/hda/ca0132_regs.h b/sound/pci/hda/ca0132_regs.h index 07e760937d3c..8371274aa811 100644 --- a/sound/pci/hda/ca0132_regs.h +++ b/sound/pci/hda/ca0132_regs.h | |||
@@ -20,7 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifndef __CA0132_REGS_H | 22 | #ifndef __CA0132_REGS_H |
23 | #define __CA0312_REGS_H | 23 | #define __CA0132_REGS_H |
24 | 24 | ||
25 | #define DSP_CHIP_OFFSET 0x100000 | 25 | #define DSP_CHIP_OFFSET 0x100000 |
26 | #define DSP_DBGCNTL_MODULE_OFFSET 0xE30 | 26 | #define DSP_DBGCNTL_MODULE_OFFSET 0xE30 |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 6f2fa838b635..47ccb8f44adb 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -217,6 +217,7 @@ enum { | |||
217 | CXT_FIXUP_HEADPHONE_MIC_PIN, | 217 | CXT_FIXUP_HEADPHONE_MIC_PIN, |
218 | CXT_FIXUP_HEADPHONE_MIC, | 218 | CXT_FIXUP_HEADPHONE_MIC, |
219 | CXT_FIXUP_GPIO1, | 219 | CXT_FIXUP_GPIO1, |
220 | CXT_FIXUP_ASPIRE_DMIC, | ||
220 | CXT_FIXUP_THINKPAD_ACPI, | 221 | CXT_FIXUP_THINKPAD_ACPI, |
221 | CXT_FIXUP_OLPC_XO, | 222 | CXT_FIXUP_OLPC_XO, |
222 | CXT_FIXUP_CAP_MIX_AMP, | 223 | CXT_FIXUP_CAP_MIX_AMP, |
@@ -664,6 +665,12 @@ static const struct hda_fixup cxt_fixups[] = { | |||
664 | { } | 665 | { } |
665 | }, | 666 | }, |
666 | }, | 667 | }, |
668 | [CXT_FIXUP_ASPIRE_DMIC] = { | ||
669 | .type = HDA_FIXUP_FUNC, | ||
670 | .v.func = cxt_fixup_stereo_dmic, | ||
671 | .chained = true, | ||
672 | .chain_id = CXT_FIXUP_GPIO1, | ||
673 | }, | ||
667 | [CXT_FIXUP_THINKPAD_ACPI] = { | 674 | [CXT_FIXUP_THINKPAD_ACPI] = { |
668 | .type = HDA_FIXUP_FUNC, | 675 | .type = HDA_FIXUP_FUNC, |
669 | .v.func = hda_fixup_thinkpad_acpi, | 676 | .v.func = hda_fixup_thinkpad_acpi, |
@@ -744,7 +751,7 @@ static const struct hda_model_fixup cxt5051_fixup_models[] = { | |||
744 | 751 | ||
745 | static const struct snd_pci_quirk cxt5066_fixups[] = { | 752 | static const struct snd_pci_quirk cxt5066_fixups[] = { |
746 | SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC), | 753 | SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC), |
747 | SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_GPIO1), | 754 | SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_ASPIRE_DMIC), |
748 | SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN), | 755 | SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN), |
749 | SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO), | 756 | SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO), |
750 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), | 757 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), |
@@ -770,6 +777,7 @@ static const struct hda_model_fixup cxt5066_fixup_models[] = { | |||
770 | { .id = CXT_PINCFG_LENOVO_TP410, .name = "tp410" }, | 777 | { .id = CXT_PINCFG_LENOVO_TP410, .name = "tp410" }, |
771 | { .id = CXT_FIXUP_THINKPAD_ACPI, .name = "thinkpad" }, | 778 | { .id = CXT_FIXUP_THINKPAD_ACPI, .name = "thinkpad" }, |
772 | { .id = CXT_PINCFG_LEMOTE_A1004, .name = "lemote-a1004" }, | 779 | { .id = CXT_PINCFG_LEMOTE_A1004, .name = "lemote-a1004" }, |
780 | { .id = CXT_PINCFG_LEMOTE_A1205, .name = "lemote-a1205" }, | ||
773 | { .id = CXT_FIXUP_OLPC_XO, .name = "olpc-xo" }, | 781 | { .id = CXT_FIXUP_OLPC_XO, .name = "olpc-xo" }, |
774 | {} | 782 | {} |
775 | }; | 783 | }; |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 36badba2dcec..99d7d7fecaad 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -50,6 +50,8 @@ MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info"); | |||
50 | #define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec)) | 50 | #define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec)) |
51 | 51 | ||
52 | #define is_valleyview(codec) ((codec)->vendor_id == 0x80862882) | 52 | #define is_valleyview(codec) ((codec)->vendor_id == 0x80862882) |
53 | #define is_cherryview(codec) ((codec)->vendor_id == 0x80862883) | ||
54 | #define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec)) | ||
53 | 55 | ||
54 | struct hdmi_spec_per_cvt { | 56 | struct hdmi_spec_per_cvt { |
55 | hda_nid_t cvt_nid; | 57 | hda_nid_t cvt_nid; |
@@ -1459,7 +1461,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, | |||
1459 | mux_idx); | 1461 | mux_idx); |
1460 | 1462 | ||
1461 | /* configure unused pins to choose other converters */ | 1463 | /* configure unused pins to choose other converters */ |
1462 | if (is_haswell_plus(codec) || is_valleyview(codec)) | 1464 | if (is_haswell_plus(codec) || is_valleyview_plus(codec)) |
1463 | intel_not_share_assigned_cvt(codec, per_pin->pin_nid, mux_idx); | 1465 | intel_not_share_assigned_cvt(codec, per_pin->pin_nid, mux_idx); |
1464 | 1466 | ||
1465 | snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid); | 1467 | snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid); |
@@ -1598,7 +1600,8 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) | |||
1598 | * and this can make HW reset converter selection on a pin. | 1600 | * and this can make HW reset converter selection on a pin. |
1599 | */ | 1601 | */ |
1600 | if (eld->eld_valid && !old_eld_valid && per_pin->setup) { | 1602 | if (eld->eld_valid && !old_eld_valid && per_pin->setup) { |
1601 | if (is_haswell_plus(codec) || is_valleyview(codec)) { | 1603 | if (is_haswell_plus(codec) || |
1604 | is_valleyview_plus(codec)) { | ||
1602 | intel_verify_pin_cvt_connect(codec, per_pin); | 1605 | intel_verify_pin_cvt_connect(codec, per_pin); |
1603 | intel_not_share_assigned_cvt(codec, pin_nid, | 1606 | intel_not_share_assigned_cvt(codec, pin_nid, |
1604 | per_pin->mux_idx); | 1607 | per_pin->mux_idx); |
@@ -1779,7 +1782,7 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
1779 | bool non_pcm; | 1782 | bool non_pcm; |
1780 | int pinctl; | 1783 | int pinctl; |
1781 | 1784 | ||
1782 | if (is_haswell_plus(codec) || is_valleyview(codec)) { | 1785 | if (is_haswell_plus(codec) || is_valleyview_plus(codec)) { |
1783 | /* Verify pin:cvt selections to avoid silent audio after S3. | 1786 | /* Verify pin:cvt selections to avoid silent audio after S3. |
1784 | * After S3, the audio driver restores pin:cvt selections | 1787 | * After S3, the audio driver restores pin:cvt selections |
1785 | * but this can happen before gfx is ready and such selection | 1788 | * but this can happen before gfx is ready and such selection |
@@ -2330,9 +2333,8 @@ static int patch_generic_hdmi(struct hda_codec *codec) | |||
2330 | intel_haswell_fixup_enable_dp12(codec); | 2333 | intel_haswell_fixup_enable_dp12(codec); |
2331 | } | 2334 | } |
2332 | 2335 | ||
2333 | if (is_haswell(codec) || is_valleyview(codec)) { | 2336 | if (is_haswell_plus(codec) || is_valleyview_plus(codec)) |
2334 | codec->depop_delay = 0; | 2337 | codec->depop_delay = 0; |
2335 | } | ||
2336 | 2338 | ||
2337 | if (hdmi_parse_codec(codec) < 0) { | 2339 | if (hdmi_parse_codec(codec) < 0) { |
2338 | codec->spec = NULL; | 2340 | codec->spec = NULL; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6b38ec3c6e57..1ba22fb527c2 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -181,6 +181,8 @@ static void alc_fix_pll(struct hda_codec *codec) | |||
181 | spec->pll_coef_idx); | 181 | spec->pll_coef_idx); |
182 | val = snd_hda_codec_read(codec, spec->pll_nid, 0, | 182 | val = snd_hda_codec_read(codec, spec->pll_nid, 0, |
183 | AC_VERB_GET_PROC_COEF, 0); | 183 | AC_VERB_GET_PROC_COEF, 0); |
184 | if (val == -1) | ||
185 | return; | ||
184 | snd_hda_codec_write(codec, spec->pll_nid, 0, AC_VERB_SET_COEF_INDEX, | 186 | snd_hda_codec_write(codec, spec->pll_nid, 0, AC_VERB_SET_COEF_INDEX, |
185 | spec->pll_coef_idx); | 187 | spec->pll_coef_idx); |
186 | snd_hda_codec_write(codec, spec->pll_nid, 0, AC_VERB_SET_PROC_COEF, | 188 | snd_hda_codec_write(codec, spec->pll_nid, 0, AC_VERB_SET_PROC_COEF, |
@@ -326,6 +328,7 @@ static void alc_auto_init_amp(struct hda_codec *codec, int type) | |||
326 | case 0x10ec0885: | 328 | case 0x10ec0885: |
327 | case 0x10ec0887: | 329 | case 0x10ec0887: |
328 | /*case 0x10ec0889:*/ /* this causes an SPDIF problem */ | 330 | /*case 0x10ec0889:*/ /* this causes an SPDIF problem */ |
331 | case 0x10ec0900: | ||
329 | alc889_coef_init(codec); | 332 | alc889_coef_init(codec); |
330 | break; | 333 | break; |
331 | case 0x10ec0888: | 334 | case 0x10ec0888: |
@@ -2348,6 +2351,7 @@ static int patch_alc882(struct hda_codec *codec) | |||
2348 | switch (codec->vendor_id) { | 2351 | switch (codec->vendor_id) { |
2349 | case 0x10ec0882: | 2352 | case 0x10ec0882: |
2350 | case 0x10ec0885: | 2353 | case 0x10ec0885: |
2354 | case 0x10ec0900: | ||
2351 | break; | 2355 | break; |
2352 | default: | 2356 | default: |
2353 | /* ALC883 and variants */ | 2357 | /* ALC883 and variants */ |
@@ -2806,6 +2810,8 @@ static void alc286_shutup(struct hda_codec *codec) | |||
2806 | static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) | 2810 | static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) |
2807 | { | 2811 | { |
2808 | int val = alc_read_coef_idx(codec, 0x04); | 2812 | int val = alc_read_coef_idx(codec, 0x04); |
2813 | if (val == -1) | ||
2814 | return; | ||
2809 | if (power_up) | 2815 | if (power_up) |
2810 | val |= 1 << 11; | 2816 | val |= 1 << 11; |
2811 | else | 2817 | else |
@@ -3264,6 +3270,15 @@ static int alc269_resume(struct hda_codec *codec) | |||
3264 | snd_hda_codec_resume_cache(codec); | 3270 | snd_hda_codec_resume_cache(codec); |
3265 | alc_inv_dmic_sync(codec, true); | 3271 | alc_inv_dmic_sync(codec, true); |
3266 | hda_call_check_power_status(codec, 0x01); | 3272 | hda_call_check_power_status(codec, 0x01); |
3273 | |||
3274 | /* on some machine, the BIOS will clear the codec gpio data when enter | ||
3275 | * suspend, and won't restore the data after resume, so we restore it | ||
3276 | * in the driver. | ||
3277 | */ | ||
3278 | if (spec->gpio_led) | ||
3279 | snd_hda_codec_write(codec, codec->afg, 0, AC_VERB_SET_GPIO_DATA, | ||
3280 | spec->gpio_led); | ||
3281 | |||
3267 | if (spec->has_alc5505_dsp) | 3282 | if (spec->has_alc5505_dsp) |
3268 | alc5505_dsp_resume(codec); | 3283 | alc5505_dsp_resume(codec); |
3269 | 3284 | ||
@@ -4395,6 +4410,7 @@ enum { | |||
4395 | ALC292_FIXUP_TPT440_DOCK, | 4410 | ALC292_FIXUP_TPT440_DOCK, |
4396 | ALC283_FIXUP_BXBT2807_MIC, | 4411 | ALC283_FIXUP_BXBT2807_MIC, |
4397 | ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, | 4412 | ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, |
4413 | ALC282_FIXUP_ASPIRE_V5_PINS, | ||
4398 | }; | 4414 | }; |
4399 | 4415 | ||
4400 | static const struct hda_fixup alc269_fixups[] = { | 4416 | static const struct hda_fixup alc269_fixups[] = { |
@@ -4842,6 +4858,22 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4842 | .chained_before = true, | 4858 | .chained_before = true, |
4843 | .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE | 4859 | .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE |
4844 | }, | 4860 | }, |
4861 | [ALC282_FIXUP_ASPIRE_V5_PINS] = { | ||
4862 | .type = HDA_FIXUP_PINS, | ||
4863 | .v.pins = (const struct hda_pintbl[]) { | ||
4864 | { 0x12, 0x90a60130 }, | ||
4865 | { 0x14, 0x90170110 }, | ||
4866 | { 0x17, 0x40000008 }, | ||
4867 | { 0x18, 0x411111f0 }, | ||
4868 | { 0x19, 0x411111f0 }, | ||
4869 | { 0x1a, 0x411111f0 }, | ||
4870 | { 0x1b, 0x411111f0 }, | ||
4871 | { 0x1d, 0x40f89b2d }, | ||
4872 | { 0x1e, 0x411111f0 }, | ||
4873 | { 0x21, 0x0321101f }, | ||
4874 | { }, | ||
4875 | }, | ||
4876 | }, | ||
4845 | 4877 | ||
4846 | }; | 4878 | }; |
4847 | 4879 | ||
@@ -4853,6 +4885,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4853 | SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), | 4885 | SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), |
4854 | SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), | 4886 | SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), |
4855 | SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), | 4887 | SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), |
4888 | SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS), | ||
4856 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), | 4889 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), |
4857 | SND_PCI_QUIRK(0x1028, 0x05bd, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4890 | SND_PCI_QUIRK(0x1028, 0x05bd, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4858 | SND_PCI_QUIRK(0x1028, 0x05be, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4891 | SND_PCI_QUIRK(0x1028, 0x05be, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
@@ -5311,27 +5344,30 @@ static void alc269_fill_coef(struct hda_codec *codec) | |||
5311 | if ((alc_get_coef0(codec) & 0x00ff) == 0x017) { | 5344 | if ((alc_get_coef0(codec) & 0x00ff) == 0x017) { |
5312 | val = alc_read_coef_idx(codec, 0x04); | 5345 | val = alc_read_coef_idx(codec, 0x04); |
5313 | /* Power up output pin */ | 5346 | /* Power up output pin */ |
5314 | alc_write_coef_idx(codec, 0x04, val | (1<<11)); | 5347 | if (val != -1) |
5348 | alc_write_coef_idx(codec, 0x04, val | (1<<11)); | ||
5315 | } | 5349 | } |
5316 | 5350 | ||
5317 | if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { | 5351 | if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { |
5318 | val = alc_read_coef_idx(codec, 0xd); | 5352 | val = alc_read_coef_idx(codec, 0xd); |
5319 | if ((val & 0x0c00) >> 10 != 0x1) { | 5353 | if (val != -1 && (val & 0x0c00) >> 10 != 0x1) { |
5320 | /* Capless ramp up clock control */ | 5354 | /* Capless ramp up clock control */ |
5321 | alc_write_coef_idx(codec, 0xd, val | (1<<10)); | 5355 | alc_write_coef_idx(codec, 0xd, val | (1<<10)); |
5322 | } | 5356 | } |
5323 | val = alc_read_coef_idx(codec, 0x17); | 5357 | val = alc_read_coef_idx(codec, 0x17); |
5324 | if ((val & 0x01c0) >> 6 != 0x4) { | 5358 | if (val != -1 && (val & 0x01c0) >> 6 != 0x4) { |
5325 | /* Class D power on reset */ | 5359 | /* Class D power on reset */ |
5326 | alc_write_coef_idx(codec, 0x17, val | (1<<7)); | 5360 | alc_write_coef_idx(codec, 0x17, val | (1<<7)); |
5327 | } | 5361 | } |
5328 | } | 5362 | } |
5329 | 5363 | ||
5330 | val = alc_read_coef_idx(codec, 0xd); /* Class D */ | 5364 | val = alc_read_coef_idx(codec, 0xd); /* Class D */ |
5331 | alc_write_coef_idx(codec, 0xd, val | (1<<14)); | 5365 | if (val != -1) |
5366 | alc_write_coef_idx(codec, 0xd, val | (1<<14)); | ||
5332 | 5367 | ||
5333 | val = alc_read_coef_idx(codec, 0x4); /* HP */ | 5368 | val = alc_read_coef_idx(codec, 0x4); /* HP */ |
5334 | alc_write_coef_idx(codec, 0x4, val | (1<<11)); | 5369 | if (val != -1) |
5370 | alc_write_coef_idx(codec, 0x4, val | (1<<11)); | ||
5335 | } | 5371 | } |
5336 | 5372 | ||
5337 | /* | 5373 | /* |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index ea823e1100da..98cd1908c039 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -566,8 +566,8 @@ static void stac_init_power_map(struct hda_codec *codec) | |||
566 | if (snd_hda_jack_tbl_get(codec, nid)) | 566 | if (snd_hda_jack_tbl_get(codec, nid)) |
567 | continue; | 567 | continue; |
568 | if (def_conf == AC_JACK_PORT_COMPLEX && | 568 | if (def_conf == AC_JACK_PORT_COMPLEX && |
569 | !(spec->vref_mute_led_nid == nid || | 569 | spec->vref_mute_led_nid != nid && |
570 | is_jack_detectable(codec, nid))) { | 570 | is_jack_detectable(codec, nid)) { |
571 | snd_hda_jack_detect_enable_callback(codec, nid, | 571 | snd_hda_jack_detect_enable_callback(codec, nid, |
572 | STAC_PWR_EVENT, | 572 | STAC_PWR_EVENT, |
573 | jack_update_power); | 573 | jack_update_power); |
@@ -4276,11 +4276,18 @@ static int stac_parse_auto_config(struct hda_codec *codec) | |||
4276 | return err; | 4276 | return err; |
4277 | } | 4277 | } |
4278 | 4278 | ||
4279 | stac_init_power_map(codec); | ||
4280 | |||
4281 | return 0; | 4279 | return 0; |
4282 | } | 4280 | } |
4283 | 4281 | ||
4282 | static int stac_build_controls(struct hda_codec *codec) | ||
4283 | { | ||
4284 | int err = snd_hda_gen_build_controls(codec); | ||
4285 | |||
4286 | if (err < 0) | ||
4287 | return err; | ||
4288 | stac_init_power_map(codec); | ||
4289 | return 0; | ||
4290 | } | ||
4284 | 4291 | ||
4285 | static int stac_init(struct hda_codec *codec) | 4292 | static int stac_init(struct hda_codec *codec) |
4286 | { | 4293 | { |
@@ -4392,7 +4399,7 @@ static int stac_suspend(struct hda_codec *codec) | |||
4392 | #endif /* CONFIG_PM */ | 4399 | #endif /* CONFIG_PM */ |
4393 | 4400 | ||
4394 | static const struct hda_codec_ops stac_patch_ops = { | 4401 | static const struct hda_codec_ops stac_patch_ops = { |
4395 | .build_controls = snd_hda_gen_build_controls, | 4402 | .build_controls = stac_build_controls, |
4396 | .build_pcms = snd_hda_gen_build_pcms, | 4403 | .build_pcms = snd_hda_gen_build_pcms, |
4397 | .init = stac_init, | 4404 | .init = stac_init, |
4398 | .free = stac_free, | 4405 | .free = stac_free, |