diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-06-20 08:43:20 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-06-20 08:43:20 -0400 |
commit | 1ade819181e9b4ab4de1ab0ac0b865d946fefc17 (patch) | |
tree | 9d724917503c0db204048ad68928f00be965e1c0 /sound/pci/hda/hda_intel.c | |
parent | ccfcf7d151c01969133b5555eed635537c41c944 (diff) | |
parent | b4a91cf05c33d4ab5b2b3738a257a3fe49b462bd (diff) |
Merge branch 'fix/hda' into topic/hda
The fix for power sequence needs to be merged back to topic branch.
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 1a07d2188dd7..86758dded981 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1767,7 +1767,7 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) | |||
1767 | buff_step); | 1767 | buff_step); |
1768 | snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, | 1768 | snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, |
1769 | buff_step); | 1769 | buff_step); |
1770 | snd_hda_power_up(apcm->codec); | 1770 | snd_hda_power_up_d3wait(apcm->codec); |
1771 | err = hinfo->ops.open(hinfo, apcm->codec, substream); | 1771 | err = hinfo->ops.open(hinfo, apcm->codec, substream); |
1772 | if (err < 0) { | 1772 | if (err < 0) { |
1773 | azx_release_device(azx_dev); | 1773 | azx_release_device(azx_dev); |
@@ -2485,9 +2485,9 @@ static void azx_notifier_unregister(struct azx *chip) | |||
2485 | static int DELAYED_INIT_MARK azx_first_init(struct azx *chip); | 2485 | static int DELAYED_INIT_MARK azx_first_init(struct azx *chip); |
2486 | static int DELAYED_INIT_MARK azx_probe_continue(struct azx *chip); | 2486 | static int DELAYED_INIT_MARK azx_probe_continue(struct azx *chip); |
2487 | 2487 | ||
2488 | #ifdef SUPPORT_VGA_SWITCHEROO | ||
2488 | static struct pci_dev __devinit *get_bound_vga(struct pci_dev *pci); | 2489 | static struct pci_dev __devinit *get_bound_vga(struct pci_dev *pci); |
2489 | 2490 | ||
2490 | #ifdef SUPPORT_VGA_SWITCHEROO | ||
2491 | static void azx_vs_set_state(struct pci_dev *pci, | 2491 | static void azx_vs_set_state(struct pci_dev *pci, |
2492 | enum vga_switcheroo_state state) | 2492 | enum vga_switcheroo_state state) |
2493 | { | 2493 | { |
@@ -2579,6 +2579,7 @@ static int __devinit register_vga_switcheroo(struct azx *chip) | |||
2579 | #else | 2579 | #else |
2580 | #define init_vga_switcheroo(chip) /* NOP */ | 2580 | #define init_vga_switcheroo(chip) /* NOP */ |
2581 | #define register_vga_switcheroo(chip) 0 | 2581 | #define register_vga_switcheroo(chip) 0 |
2582 | #define check_hdmi_disabled(pci) false | ||
2582 | #endif /* SUPPORT_VGA_SWITCHER */ | 2583 | #endif /* SUPPORT_VGA_SWITCHER */ |
2583 | 2584 | ||
2584 | /* | 2585 | /* |
@@ -2639,6 +2640,7 @@ static int azx_dev_free(struct snd_device *device) | |||
2639 | return azx_free(device->device_data); | 2640 | return azx_free(device->device_data); |
2640 | } | 2641 | } |
2641 | 2642 | ||
2643 | #ifdef SUPPORT_VGA_SWITCHEROO | ||
2642 | /* | 2644 | /* |
2643 | * Check of disabled HDMI controller by vga-switcheroo | 2645 | * Check of disabled HDMI controller by vga-switcheroo |
2644 | */ | 2646 | */ |
@@ -2671,12 +2673,13 @@ static bool __devinit check_hdmi_disabled(struct pci_dev *pci) | |||
2671 | struct pci_dev *p = get_bound_vga(pci); | 2673 | struct pci_dev *p = get_bound_vga(pci); |
2672 | 2674 | ||
2673 | if (p) { | 2675 | if (p) { |
2674 | if (vga_default_device() && p != vga_default_device()) | 2676 | if (vga_switcheroo_get_client_state(p) == VGA_SWITCHEROO_OFF) |
2675 | vga_inactive = true; | 2677 | vga_inactive = true; |
2676 | pci_dev_put(p); | 2678 | pci_dev_put(p); |
2677 | } | 2679 | } |
2678 | return vga_inactive; | 2680 | return vga_inactive; |
2679 | } | 2681 | } |
2682 | #endif /* SUPPORT_VGA_SWITCHEROO */ | ||
2680 | 2683 | ||
2681 | /* | 2684 | /* |
2682 | * white/black-listing for position_fix | 2685 | * white/black-listing for position_fix |
@@ -3360,6 +3363,11 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { | |||
3360 | { PCI_DEVICE(0x6549, 0x1200), | 3363 | { PCI_DEVICE(0x6549, 0x1200), |
3361 | .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, | 3364 | .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, |
3362 | /* Creative X-Fi (CA0110-IBG) */ | 3365 | /* Creative X-Fi (CA0110-IBG) */ |
3366 | /* CTHDA chips */ | ||
3367 | { PCI_DEVICE(0x1102, 0x0010), | ||
3368 | .driver_data = AZX_DRIVER_CTHDA | AZX_DCAPS_PRESET_CTHDA }, | ||
3369 | { PCI_DEVICE(0x1102, 0x0012), | ||
3370 | .driver_data = AZX_DRIVER_CTHDA | AZX_DCAPS_PRESET_CTHDA }, | ||
3363 | #if !defined(CONFIG_SND_CTXFI) && !defined(CONFIG_SND_CTXFI_MODULE) | 3371 | #if !defined(CONFIG_SND_CTXFI) && !defined(CONFIG_SND_CTXFI_MODULE) |
3364 | /* the following entry conflicts with snd-ctxfi driver, | 3372 | /* the following entry conflicts with snd-ctxfi driver, |
3365 | * as ctxfi driver mutates from HD-audio to native mode with | 3373 | * as ctxfi driver mutates from HD-audio to native mode with |
@@ -3376,11 +3384,6 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { | |||
3376 | .driver_data = AZX_DRIVER_CTX | AZX_DCAPS_CTX_WORKAROUND | | 3384 | .driver_data = AZX_DRIVER_CTX | AZX_DCAPS_CTX_WORKAROUND | |
3377 | AZX_DCAPS_RIRB_PRE_DELAY | AZX_DCAPS_POSFIX_LPIB }, | 3385 | AZX_DCAPS_RIRB_PRE_DELAY | AZX_DCAPS_POSFIX_LPIB }, |
3378 | #endif | 3386 | #endif |
3379 | /* CTHDA chips */ | ||
3380 | { PCI_DEVICE(0x1102, 0x0010), | ||
3381 | .driver_data = AZX_DRIVER_CTHDA | AZX_DCAPS_PRESET_CTHDA }, | ||
3382 | { PCI_DEVICE(0x1102, 0x0012), | ||
3383 | .driver_data = AZX_DRIVER_CTHDA | AZX_DCAPS_PRESET_CTHDA }, | ||
3384 | /* Vortex86MX */ | 3387 | /* Vortex86MX */ |
3385 | { PCI_DEVICE(0x17f3, 0x3010), .driver_data = AZX_DRIVER_GENERIC }, | 3388 | { PCI_DEVICE(0x17f3, 0x3010), .driver_data = AZX_DRIVER_GENERIC }, |
3386 | /* VMware HDAudio */ | 3389 | /* VMware HDAudio */ |