aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-05-08 10:38:02 -0400
committerTakashi Iwai <tiwai@suse.de>2012-05-08 10:38:02 -0400
commitffd344444f9f8f4843d24084ef3da0d09140edb8 (patch)
treea4e8f1144e0023bad4009c26c094747063611857 /sound/pci
parent6942c103fb4b0ce91be910a716044ac181a9c2dd (diff)
parent619a341b78f17fb86d92e89c04612676cd05e26f (diff)
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/echoaudio/echoaudio_dsp.c2
-rw-r--r--sound/pci/hda/hda_codec.c4
-rw-r--r--sound/pci/hda/hda_intel.c14
-rw-r--r--sound/pci/hda/patch_realtek.c17
-rw-r--r--sound/pci/rme9652/hdsp.c1
5 files changed, 26 insertions, 12 deletions
diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c
index 64417a733220..d8c670c9d62c 100644
--- a/sound/pci/echoaudio/echoaudio_dsp.c
+++ b/sound/pci/echoaudio/echoaudio_dsp.c
@@ -475,7 +475,7 @@ static int load_firmware(struct echoaudio *chip)
475 const struct firmware *fw; 475 const struct firmware *fw;
476 int box_type, err; 476 int box_type, err;
477 477
478 if (snd_BUG_ON(!chip->dsp_code_to_load || !chip->comm_page)) 478 if (snd_BUG_ON(!chip->comm_page))
479 return -EPERM; 479 return -EPERM;
480 480
481 /* See if the ASIC is present and working - only if the DSP is already loaded */ 481 /* See if the ASIC is present and working - only if the DSP is already loaded */
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 408613c13f43..393a3043a46e 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -5497,10 +5497,6 @@ int snd_hda_suspend(struct hda_bus *bus)
5497 list_for_each_entry(codec, &bus->codec_list, list) { 5497 list_for_each_entry(codec, &bus->codec_list, list) {
5498 if (hda_codec_is_power_on(codec)) 5498 if (hda_codec_is_power_on(codec))
5499 hda_call_codec_suspend(codec); 5499 hda_call_codec_suspend(codec);
5500 else /* forcibly change the power to D3 even if not used */
5501 hda_set_power_state(codec,
5502 codec->afg ? codec->afg : codec->mfg,
5503 AC_PWRST_D3);
5504 if (codec->patch_ops.post_suspend) 5500 if (codec->patch_ops.post_suspend)
5505 codec->patch_ops.post_suspend(codec); 5501 codec->patch_ops.post_suspend(codec);
5506 } 5502 }
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index c19e71a94e1b..6e958bf94191 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2351,6 +2351,17 @@ static void azx_power_notify(struct hda_bus *bus)
2351 * power management 2351 * power management
2352 */ 2352 */
2353 2353
2354static int snd_hda_codecs_inuse(struct hda_bus *bus)
2355{
2356 struct hda_codec *codec;
2357
2358 list_for_each_entry(codec, &bus->codec_list, list) {
2359 if (snd_hda_codec_needs_resume(codec))
2360 return 1;
2361 }
2362 return 0;
2363}
2364
2354static int azx_suspend(struct pci_dev *pci, pm_message_t state) 2365static int azx_suspend(struct pci_dev *pci, pm_message_t state)
2355{ 2366{
2356 struct snd_card *card = pci_get_drvdata(pci); 2367 struct snd_card *card = pci_get_drvdata(pci);
@@ -2397,7 +2408,8 @@ static int azx_resume(struct pci_dev *pci)
2397 return -EIO; 2408 return -EIO;
2398 azx_init_pci(chip); 2409 azx_init_pci(chip);
2399 2410
2400 azx_init_chip(chip, 1); 2411 if (snd_hda_codecs_inuse(chip->bus))
2412 azx_init_chip(chip, 1);
2401 2413
2402 snd_hda_resume(chip->bus); 2414 snd_hda_resume(chip->bus);
2403 snd_power_change_state(card, SNDRV_CTL_POWER_D0); 2415 snd_power_change_state(card, SNDRV_CTL_POWER_D0);
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 951a090cef4a..6dd1b74e9f68 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5381,6 +5381,8 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
5381 SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G", 5381 SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G",
5382 ALC882_FIXUP_ACER_ASPIRE_4930G), 5382 ALC882_FIXUP_ACER_ASPIRE_4930G),
5383 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210), 5383 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
5384 SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G",
5385 ALC882_FIXUP_ACER_ASPIRE_4930G),
5384 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE), 5386 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE),
5385 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G), 5387 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G),
5386 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), 5388 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736),
@@ -5414,6 +5416,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
5414 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF), 5416 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF),
5415 5417
5416 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), 5418 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
5419 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
5417 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), 5420 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
5418 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3", ALC889_FIXUP_CD), 5421 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3", ALC889_FIXUP_CD),
5419 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), 5422 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
@@ -5614,13 +5617,13 @@ static int patch_alc262(struct hda_codec *codec)
5614 snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PROC_COEF, tmp | 0x80); 5617 snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PROC_COEF, tmp | 0x80);
5615 } 5618 }
5616#endif 5619#endif
5617 alc_auto_parse_customize_define(codec);
5618
5619 alc_fix_pll_init(codec, 0x20, 0x0a, 10); 5620 alc_fix_pll_init(codec, 0x20, 0x0a, 10);
5620 5621
5621 alc_pick_fixup(codec, NULL, alc262_fixup_tbl, alc262_fixups); 5622 alc_pick_fixup(codec, NULL, alc262_fixup_tbl, alc262_fixups);
5622 alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); 5623 alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
5623 5624
5625 alc_auto_parse_customize_define(codec);
5626
5624 /* automatic parse from the BIOS config */ 5627 /* automatic parse from the BIOS config */
5625 err = alc262_parse_auto_config(codec); 5628 err = alc262_parse_auto_config(codec);
5626 if (err < 0) 5629 if (err < 0)
@@ -6083,6 +6086,7 @@ static const struct alc_fixup alc269_fixups[] = {
6083 6086
6084static const struct snd_pci_quirk alc269_fixup_tbl[] = { 6087static const struct snd_pci_quirk alc269_fixup_tbl[] = {
6085 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_MIC2_MUTE_LED), 6088 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_MIC2_MUTE_LED),
6089 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC),
6086 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), 6090 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
6087 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), 6091 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
6088 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), 6092 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
@@ -6222,8 +6226,6 @@ static int patch_alc269(struct hda_codec *codec)
6222 6226
6223 spec->mixer_nid = 0x0b; 6227 spec->mixer_nid = 0x0b;
6224 6228
6225 alc_auto_parse_customize_define(codec);
6226
6227 err = alc_codec_rename_from_preset(codec); 6229 err = alc_codec_rename_from_preset(codec);
6228 if (err < 0) 6230 if (err < 0)
6229 goto error; 6231 goto error;
@@ -6256,6 +6258,8 @@ static int patch_alc269(struct hda_codec *codec)
6256 alc269_fixup_tbl, alc269_fixups); 6258 alc269_fixup_tbl, alc269_fixups);
6257 alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); 6259 alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
6258 6260
6261 alc_auto_parse_customize_define(codec);
6262
6259 /* automatic parse from the BIOS config */ 6263 /* automatic parse from the BIOS config */
6260 err = alc269_parse_auto_config(codec); 6264 err = alc269_parse_auto_config(codec);
6261 if (err < 0) 6265 if (err < 0)
@@ -6831,8 +6835,6 @@ static int patch_alc662(struct hda_codec *codec)
6831 /* handle multiple HPs as is */ 6835 /* handle multiple HPs as is */
6832 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 6836 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
6833 6837
6834 alc_auto_parse_customize_define(codec);
6835
6836 alc_fix_pll_init(codec, 0x20, 0x04, 15); 6838 alc_fix_pll_init(codec, 0x20, 0x04, 15);
6837 6839
6838 err = alc_codec_rename_from_preset(codec); 6840 err = alc_codec_rename_from_preset(codec);
@@ -6849,6 +6851,9 @@ static int patch_alc662(struct hda_codec *codec)
6849 alc_pick_fixup(codec, alc662_fixup_models, 6851 alc_pick_fixup(codec, alc662_fixup_models,
6850 alc662_fixup_tbl, alc662_fixups); 6852 alc662_fixup_tbl, alc662_fixups);
6851 alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); 6853 alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
6854
6855 alc_auto_parse_customize_define(codec);
6856
6852 /* automatic parse from the BIOS config */ 6857 /* automatic parse from the BIOS config */
6853 err = alc662_parse_auto_config(codec); 6858 err = alc662_parse_auto_config(codec);
6854 if (err < 0) 6859 if (err < 0)
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index b68cdec03b9e..0b2aea2ce172 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -5170,6 +5170,7 @@ static int snd_hdsp_create_hwdep(struct snd_card *card, struct hdsp *hdsp)
5170 strcpy(hw->name, "HDSP hwdep interface"); 5170 strcpy(hw->name, "HDSP hwdep interface");
5171 5171
5172 hw->ops.ioctl = snd_hdsp_hwdep_ioctl; 5172 hw->ops.ioctl = snd_hdsp_hwdep_ioctl;
5173 hw->ops.ioctl_compat = snd_hdsp_hwdep_ioctl;
5173 5174
5174 return 0; 5175 return 0;
5175} 5176}