diff options
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 13 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.h | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 83 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 22 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 52 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_via.c | 36 |
8 files changed, 142 insertions, 68 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 70d4848b5cd..d010de12335 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -95,6 +95,7 @@ int snd_hda_delete_codec_preset(struct hda_codec_preset_list *preset) | |||
95 | EXPORT_SYMBOL_HDA(snd_hda_delete_codec_preset); | 95 | EXPORT_SYMBOL_HDA(snd_hda_delete_codec_preset); |
96 | 96 | ||
97 | #ifdef CONFIG_PM | 97 | #ifdef CONFIG_PM |
98 | #define codec_in_pm(codec) ((codec)->in_pm) | ||
98 | static void hda_power_work(struct work_struct *work); | 99 | static void hda_power_work(struct work_struct *work); |
99 | static void hda_keep_power_on(struct hda_codec *codec); | 100 | static void hda_keep_power_on(struct hda_codec *codec); |
100 | #define hda_codec_is_power_on(codec) ((codec)->power_on) | 101 | #define hda_codec_is_power_on(codec) ((codec)->power_on) |
@@ -104,6 +105,7 @@ static inline void hda_call_pm_notify(struct hda_bus *bus, bool power_up) | |||
104 | bus->ops.pm_notify(bus, power_up); | 105 | bus->ops.pm_notify(bus, power_up); |
105 | } | 106 | } |
106 | #else | 107 | #else |
108 | #define codec_in_pm(codec) 0 | ||
107 | static inline void hda_keep_power_on(struct hda_codec *codec) {} | 109 | static inline void hda_keep_power_on(struct hda_codec *codec) {} |
108 | #define hda_codec_is_power_on(codec) 1 | 110 | #define hda_codec_is_power_on(codec) 1 |
109 | #define hda_call_pm_notify(bus, state) {} | 111 | #define hda_call_pm_notify(bus, state) {} |
@@ -228,7 +230,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd, | |||
228 | } | 230 | } |
229 | mutex_unlock(&bus->cmd_mutex); | 231 | mutex_unlock(&bus->cmd_mutex); |
230 | snd_hda_power_down(codec); | 232 | snd_hda_power_down(codec); |
231 | if (res && *res == -1 && bus->rirb_error) { | 233 | if (!codec_in_pm(codec) && res && *res == -1 && bus->rirb_error) { |
232 | if (bus->response_reset) { | 234 | if (bus->response_reset) { |
233 | snd_printd("hda_codec: resetting BUS due to " | 235 | snd_printd("hda_codec: resetting BUS due to " |
234 | "fatal communication error\n"); | 236 | "fatal communication error\n"); |
@@ -238,7 +240,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd, | |||
238 | goto again; | 240 | goto again; |
239 | } | 241 | } |
240 | /* clear reset-flag when the communication gets recovered */ | 242 | /* clear reset-flag when the communication gets recovered */ |
241 | if (!err) | 243 | if (!err || codec_in_pm(codec)) |
242 | bus->response_reset = 0; | 244 | bus->response_reset = 0; |
243 | return err; | 245 | return err; |
244 | } | 246 | } |
@@ -3616,6 +3618,8 @@ static unsigned int hda_call_codec_suspend(struct hda_codec *codec, bool in_wq) | |||
3616 | { | 3618 | { |
3617 | unsigned int state; | 3619 | unsigned int state; |
3618 | 3620 | ||
3621 | codec->in_pm = 1; | ||
3622 | |||
3619 | if (codec->patch_ops.suspend) | 3623 | if (codec->patch_ops.suspend) |
3620 | codec->patch_ops.suspend(codec); | 3624 | codec->patch_ops.suspend(codec); |
3621 | hda_cleanup_all_streams(codec); | 3625 | hda_cleanup_all_streams(codec); |
@@ -3630,6 +3634,7 @@ static unsigned int hda_call_codec_suspend(struct hda_codec *codec, bool in_wq) | |||
3630 | codec->power_transition = 0; | 3634 | codec->power_transition = 0; |
3631 | codec->power_jiffies = jiffies; | 3635 | codec->power_jiffies = jiffies; |
3632 | spin_unlock(&codec->power_lock); | 3636 | spin_unlock(&codec->power_lock); |
3637 | codec->in_pm = 0; | ||
3633 | return state; | 3638 | return state; |
3634 | } | 3639 | } |
3635 | 3640 | ||
@@ -3638,6 +3643,8 @@ static unsigned int hda_call_codec_suspend(struct hda_codec *codec, bool in_wq) | |||
3638 | */ | 3643 | */ |
3639 | static void hda_call_codec_resume(struct hda_codec *codec) | 3644 | static void hda_call_codec_resume(struct hda_codec *codec) |
3640 | { | 3645 | { |
3646 | codec->in_pm = 1; | ||
3647 | |||
3641 | /* set as if powered on for avoiding re-entering the resume | 3648 | /* set as if powered on for avoiding re-entering the resume |
3642 | * in the resume / power-save sequence | 3649 | * in the resume / power-save sequence |
3643 | */ | 3650 | */ |
@@ -3656,6 +3663,8 @@ static void hda_call_codec_resume(struct hda_codec *codec) | |||
3656 | snd_hda_codec_resume_cache(codec); | 3663 | snd_hda_codec_resume_cache(codec); |
3657 | } | 3664 | } |
3658 | snd_hda_jack_report_sync(codec); | 3665 | snd_hda_jack_report_sync(codec); |
3666 | |||
3667 | codec->in_pm = 0; | ||
3659 | snd_hda_power_down(codec); /* flag down before returning */ | 3668 | snd_hda_power_down(codec); /* flag down before returning */ |
3660 | } | 3669 | } |
3661 | #endif /* CONFIG_PM */ | 3670 | #endif /* CONFIG_PM */ |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 507fe8a917b..4f4e545c0f4 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -869,6 +869,7 @@ struct hda_codec { | |||
869 | unsigned int power_on :1; /* current (global) power-state */ | 869 | unsigned int power_on :1; /* current (global) power-state */ |
870 | unsigned int d3_stop_clk:1; /* support D3 operation without BCLK */ | 870 | unsigned int d3_stop_clk:1; /* support D3 operation without BCLK */ |
871 | unsigned int pm_down_notified:1; /* PM notified to controller */ | 871 | unsigned int pm_down_notified:1; /* PM notified to controller */ |
872 | unsigned int in_pm:1; /* suspend/resume being performed */ | ||
872 | int power_transition; /* power-state in transition */ | 873 | int power_transition; /* power-state in transition */ |
873 | int power_count; /* current (global) power refcount */ | 874 | int power_count; /* current (global) power refcount */ |
874 | struct delayed_work power_work; /* delayed task for powerdown */ | 875 | struct delayed_work power_work; /* delayed task for powerdown */ |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 6833835a218..f9d870e554d 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -501,6 +501,7 @@ struct azx { | |||
501 | 501 | ||
502 | /* VGA-switcheroo setup */ | 502 | /* VGA-switcheroo setup */ |
503 | unsigned int use_vga_switcheroo:1; | 503 | unsigned int use_vga_switcheroo:1; |
504 | unsigned int vga_switcheroo_registered:1; | ||
504 | unsigned int init_failed:1; /* delayed init failed */ | 505 | unsigned int init_failed:1; /* delayed init failed */ |
505 | unsigned int disabled:1; /* disabled by VGA-switcher */ | 506 | unsigned int disabled:1; /* disabled by VGA-switcher */ |
506 | 507 | ||
@@ -555,6 +556,12 @@ enum { | |||
555 | #define AZX_DCAPS_ALIGN_BUFSIZE (1 << 22) /* buffer size alignment */ | 556 | #define AZX_DCAPS_ALIGN_BUFSIZE (1 << 22) /* buffer size alignment */ |
556 | #define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23) /* BDLE in 4k boundary */ | 557 | #define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23) /* BDLE in 4k boundary */ |
557 | #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ | 558 | #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ |
559 | #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ | ||
560 | |||
561 | /* quirks for Intel PCH */ | ||
562 | #define AZX_DCAPS_INTEL_PCH \ | ||
563 | (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \ | ||
564 | AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_PM_RUNTIME) | ||
558 | 565 | ||
559 | /* quirks for ATI SB / AMD Hudson */ | 566 | /* quirks for ATI SB / AMD Hudson */ |
560 | #define AZX_DCAPS_PRESET_ATI_SB \ | 567 | #define AZX_DCAPS_PRESET_ATI_SB \ |
@@ -2157,9 +2164,12 @@ static unsigned int azx_get_position(struct azx *chip, | |||
2157 | if (delay < 0) | 2164 | if (delay < 0) |
2158 | delay += azx_dev->bufsize; | 2165 | delay += azx_dev->bufsize; |
2159 | if (delay >= azx_dev->period_bytes) { | 2166 | if (delay >= azx_dev->period_bytes) { |
2160 | snd_printdd("delay %d > period_bytes %d\n", | 2167 | snd_printk(KERN_WARNING SFX |
2161 | delay, azx_dev->period_bytes); | 2168 | "Unstable LPIB (%d >= %d); " |
2162 | delay = 0; /* something is wrong */ | 2169 | "disabling LPIB delay counting\n", |
2170 | delay, azx_dev->period_bytes); | ||
2171 | delay = 0; | ||
2172 | chip->driver_caps &= ~AZX_DCAPS_COUNT_LPIB_DELAY; | ||
2163 | } | 2173 | } |
2164 | azx_dev->substream->runtime->delay = | 2174 | azx_dev->substream->runtime->delay = |
2165 | bytes_to_frames(azx_dev->substream->runtime, delay); | 2175 | bytes_to_frames(azx_dev->substream->runtime, delay); |
@@ -2429,6 +2439,9 @@ static void azx_power_notify(struct hda_bus *bus, bool power_up) | |||
2429 | { | 2439 | { |
2430 | struct azx *chip = bus->private_data; | 2440 | struct azx *chip = bus->private_data; |
2431 | 2441 | ||
2442 | if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) | ||
2443 | return; | ||
2444 | |||
2432 | if (power_up) | 2445 | if (power_up) |
2433 | pm_runtime_get_sync(&chip->pci->dev); | 2446 | pm_runtime_get_sync(&chip->pci->dev); |
2434 | else | 2447 | else |
@@ -2544,7 +2557,8 @@ static int azx_runtime_suspend(struct device *dev) | |||
2544 | struct snd_card *card = dev_get_drvdata(dev); | 2557 | struct snd_card *card = dev_get_drvdata(dev); |
2545 | struct azx *chip = card->private_data; | 2558 | struct azx *chip = card->private_data; |
2546 | 2559 | ||
2547 | if (!power_save_controller) | 2560 | if (!power_save_controller || |
2561 | !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) | ||
2548 | return -EAGAIN; | 2562 | return -EAGAIN; |
2549 | 2563 | ||
2550 | azx_stop_chip(chip); | 2564 | azx_stop_chip(chip); |
@@ -2640,7 +2654,9 @@ static void azx_vs_set_state(struct pci_dev *pci, | |||
2640 | if (disabled) { | 2654 | if (disabled) { |
2641 | azx_suspend(&pci->dev); | 2655 | azx_suspend(&pci->dev); |
2642 | chip->disabled = true; | 2656 | chip->disabled = true; |
2643 | snd_hda_lock_devices(chip->bus); | 2657 | if (snd_hda_lock_devices(chip->bus)) |
2658 | snd_printk(KERN_WARNING SFX | ||
2659 | "Cannot lock devices!\n"); | ||
2644 | } else { | 2660 | } else { |
2645 | snd_hda_unlock_devices(chip->bus); | 2661 | snd_hda_unlock_devices(chip->bus); |
2646 | chip->disabled = false; | 2662 | chip->disabled = false; |
@@ -2683,14 +2699,20 @@ static const struct vga_switcheroo_client_ops azx_vs_ops = { | |||
2683 | 2699 | ||
2684 | static int __devinit register_vga_switcheroo(struct azx *chip) | 2700 | static int __devinit register_vga_switcheroo(struct azx *chip) |
2685 | { | 2701 | { |
2702 | int err; | ||
2703 | |||
2686 | if (!chip->use_vga_switcheroo) | 2704 | if (!chip->use_vga_switcheroo) |
2687 | return 0; | 2705 | return 0; |
2688 | /* FIXME: currently only handling DIS controller | 2706 | /* FIXME: currently only handling DIS controller |
2689 | * is there any machine with two switchable HDMI audio controllers? | 2707 | * is there any machine with two switchable HDMI audio controllers? |
2690 | */ | 2708 | */ |
2691 | return vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops, | 2709 | err = vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops, |
2692 | VGA_SWITCHEROO_DIS, | 2710 | VGA_SWITCHEROO_DIS, |
2693 | chip->bus != NULL); | 2711 | chip->bus != NULL); |
2712 | if (err < 0) | ||
2713 | return err; | ||
2714 | chip->vga_switcheroo_registered = 1; | ||
2715 | return 0; | ||
2694 | } | 2716 | } |
2695 | #else | 2717 | #else |
2696 | #define init_vga_switcheroo(chip) /* NOP */ | 2718 | #define init_vga_switcheroo(chip) /* NOP */ |
@@ -2712,7 +2734,8 @@ static int azx_free(struct azx *chip) | |||
2712 | if (use_vga_switcheroo(chip)) { | 2734 | if (use_vga_switcheroo(chip)) { |
2713 | if (chip->disabled && chip->bus) | 2735 | if (chip->disabled && chip->bus) |
2714 | snd_hda_unlock_devices(chip->bus); | 2736 | snd_hda_unlock_devices(chip->bus); |
2715 | vga_switcheroo_unregister_client(chip->pci); | 2737 | if (chip->vga_switcheroo_registered) |
2738 | vga_switcheroo_unregister_client(chip->pci); | ||
2716 | } | 2739 | } |
2717 | 2740 | ||
2718 | if (chip->initialized) { | 2741 | if (chip->initialized) { |
@@ -2813,8 +2836,6 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = { | |||
2813 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), | 2836 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), |
2814 | SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), | 2837 | SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), |
2815 | SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB), | 2838 | SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB), |
2816 | SND_PCI_QUIRK(0x1043, 0x1ac3, "ASUS X53S", POS_FIX_POSBUF), | ||
2817 | SND_PCI_QUIRK(0x1043, 0x1b43, "ASUS K53E", POS_FIX_POSBUF), | ||
2818 | SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), | 2839 | SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), |
2819 | SND_PCI_QUIRK(0x10de, 0xcb89, "Macbook Pro 7,1", POS_FIX_LPIB), | 2840 | SND_PCI_QUIRK(0x10de, 0xcb89, "Macbook Pro 7,1", POS_FIX_LPIB), |
2820 | SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB), | 2841 | SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB), |
@@ -3062,14 +3083,6 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
3062 | } | 3083 | } |
3063 | 3084 | ||
3064 | ok: | 3085 | ok: |
3065 | err = register_vga_switcheroo(chip); | ||
3066 | if (err < 0) { | ||
3067 | snd_printk(KERN_ERR SFX | ||
3068 | "Error registering VGA-switcheroo client\n"); | ||
3069 | azx_free(chip); | ||
3070 | return err; | ||
3071 | } | ||
3072 | |||
3073 | err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); | 3086 | err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); |
3074 | if (err < 0) { | 3087 | if (err < 0) { |
3075 | snd_printk(KERN_ERR SFX "Error creating device [card]!\n"); | 3088 | snd_printk(KERN_ERR SFX "Error creating device [card]!\n"); |
@@ -3340,6 +3353,13 @@ static int __devinit azx_probe(struct pci_dev *pci, | |||
3340 | if (pci_dev_run_wake(pci)) | 3353 | if (pci_dev_run_wake(pci)) |
3341 | pm_runtime_put_noidle(&pci->dev); | 3354 | pm_runtime_put_noidle(&pci->dev); |
3342 | 3355 | ||
3356 | err = register_vga_switcheroo(chip); | ||
3357 | if (err < 0) { | ||
3358 | snd_printk(KERN_ERR SFX | ||
3359 | "Error registering VGA-switcheroo client\n"); | ||
3360 | goto out_free; | ||
3361 | } | ||
3362 | |||
3343 | dev++; | 3363 | dev++; |
3344 | return 0; | 3364 | return 0; |
3345 | 3365 | ||
@@ -3419,39 +3439,30 @@ static void __devexit azx_remove(struct pci_dev *pci) | |||
3419 | static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { | 3439 | static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { |
3420 | /* CPT */ | 3440 | /* CPT */ |
3421 | { PCI_DEVICE(0x8086, 0x1c20), | 3441 | { PCI_DEVICE(0x8086, 0x1c20), |
3422 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3442 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3423 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3424 | /* PBG */ | 3443 | /* PBG */ |
3425 | { PCI_DEVICE(0x8086, 0x1d20), | 3444 | { PCI_DEVICE(0x8086, 0x1d20), |
3426 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3445 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3427 | AZX_DCAPS_BUFSIZE}, | ||
3428 | /* Panther Point */ | 3446 | /* Panther Point */ |
3429 | { PCI_DEVICE(0x8086, 0x1e20), | 3447 | { PCI_DEVICE(0x8086, 0x1e20), |
3430 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3448 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3431 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3432 | /* Lynx Point */ | 3449 | /* Lynx Point */ |
3433 | { PCI_DEVICE(0x8086, 0x8c20), | 3450 | { PCI_DEVICE(0x8086, 0x8c20), |
3434 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3451 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3435 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3436 | /* Lynx Point-LP */ | 3452 | /* Lynx Point-LP */ |
3437 | { PCI_DEVICE(0x8086, 0x9c20), | 3453 | { PCI_DEVICE(0x8086, 0x9c20), |
3438 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3454 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3439 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3440 | /* Lynx Point-LP */ | 3455 | /* Lynx Point-LP */ |
3441 | { PCI_DEVICE(0x8086, 0x9c21), | 3456 | { PCI_DEVICE(0x8086, 0x9c21), |
3442 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3457 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3443 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3444 | /* Haswell */ | 3458 | /* Haswell */ |
3445 | { PCI_DEVICE(0x8086, 0x0c0c), | 3459 | { PCI_DEVICE(0x8086, 0x0c0c), |
3446 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | | 3460 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH }, |
3447 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3448 | { PCI_DEVICE(0x8086, 0x0d0c), | 3461 | { PCI_DEVICE(0x8086, 0x0d0c), |
3449 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | | 3462 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH }, |
3450 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3451 | /* 5 Series/3400 */ | 3463 | /* 5 Series/3400 */ |
3452 | { PCI_DEVICE(0x8086, 0x3b56), | 3464 | { PCI_DEVICE(0x8086, 0x3b56), |
3453 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | | 3465 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH }, |
3454 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3455 | /* SCH */ | 3466 | /* SCH */ |
3456 | { PCI_DEVICE(0x8086, 0x811b), | 3467 | { PCI_DEVICE(0x8086, 0x811b), |
3457 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | | 3468 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | |
@@ -3553,6 +3564,8 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { | |||
3553 | /* Teradici */ | 3564 | /* Teradici */ |
3554 | { PCI_DEVICE(0x6549, 0x1200), | 3565 | { PCI_DEVICE(0x6549, 0x1200), |
3555 | .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, | 3566 | .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, |
3567 | { PCI_DEVICE(0x6549, 0x2200), | ||
3568 | .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, | ||
3556 | /* Creative X-Fi (CA0110-IBG) */ | 3569 | /* Creative X-Fi (CA0110-IBG) */ |
3557 | /* CTHDA chips */ | 3570 | /* CTHDA chips */ |
3558 | { PCI_DEVICE(0x1102, 0x0010), | 3571 | { PCI_DEVICE(0x1102, 0x0010), |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index cdd43eadbc6..1eeba738666 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -545,6 +545,7 @@ static int ad198x_build_pcms(struct hda_codec *codec) | |||
545 | if (spec->multiout.dig_out_nid) { | 545 | if (spec->multiout.dig_out_nid) { |
546 | info++; | 546 | info++; |
547 | codec->num_pcms++; | 547 | codec->num_pcms++; |
548 | codec->spdif_status_reset = 1; | ||
548 | info->name = "AD198x Digital"; | 549 | info->name = "AD198x Digital"; |
549 | info->pcm_type = HDA_PCM_TYPE_SPDIF; | 550 | info->pcm_type = HDA_PCM_TYPE_SPDIF; |
550 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = ad198x_pcm_digital_playback; | 551 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = ad198x_pcm_digital_playback; |
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 61a71131711..3bcb6717235 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -101,8 +101,8 @@ enum { | |||
101 | #define CS420X_VENDOR_NID 0x11 | 101 | #define CS420X_VENDOR_NID 0x11 |
102 | #define CS_DIG_OUT1_PIN_NID 0x10 | 102 | #define CS_DIG_OUT1_PIN_NID 0x10 |
103 | #define CS_DIG_OUT2_PIN_NID 0x15 | 103 | #define CS_DIG_OUT2_PIN_NID 0x15 |
104 | #define CS_DMIC1_PIN_NID 0x12 | 104 | #define CS_DMIC1_PIN_NID 0x0e |
105 | #define CS_DMIC2_PIN_NID 0x0e | 105 | #define CS_DMIC2_PIN_NID 0x12 |
106 | 106 | ||
107 | /* coef indices */ | 107 | /* coef indices */ |
108 | #define IDX_SPDIF_STAT 0x0000 | 108 | #define IDX_SPDIF_STAT 0x0000 |
@@ -466,6 +466,7 @@ static int parse_output(struct hda_codec *codec) | |||
466 | memcpy(cfg->speaker_pins, cfg->line_out_pins, | 466 | memcpy(cfg->speaker_pins, cfg->line_out_pins, |
467 | sizeof(cfg->speaker_pins)); | 467 | sizeof(cfg->speaker_pins)); |
468 | cfg->line_outs = 0; | 468 | cfg->line_outs = 0; |
469 | memset(cfg->line_out_pins, 0, sizeof(cfg->line_out_pins)); | ||
469 | } | 470 | } |
470 | 471 | ||
471 | return 0; | 472 | return 0; |
@@ -1079,14 +1080,18 @@ static void init_input(struct hda_codec *codec) | |||
1079 | cs_automic(codec, NULL); | 1080 | cs_automic(codec, NULL); |
1080 | 1081 | ||
1081 | coef = 0x000a; /* ADC1/2 - Digital and Analog Soft Ramp */ | 1082 | coef = 0x000a; /* ADC1/2 - Digital and Analog Soft Ramp */ |
1083 | cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); | ||
1084 | |||
1085 | coef = cs_vendor_coef_get(codec, IDX_BEEP_CFG); | ||
1082 | if (is_active_pin(codec, CS_DMIC2_PIN_NID)) | 1086 | if (is_active_pin(codec, CS_DMIC2_PIN_NID)) |
1083 | coef |= 0x0500; /* DMIC2 2 chan on, GPIO1 off */ | 1087 | coef |= 1 << 4; /* DMIC2 2 chan on, GPIO1 off */ |
1084 | if (is_active_pin(codec, CS_DMIC1_PIN_NID)) | 1088 | if (is_active_pin(codec, CS_DMIC1_PIN_NID)) |
1085 | coef |= 0x1800; /* DMIC1 2 chan on, GPIO0 off | 1089 | coef |= 1 << 3; /* DMIC1 2 chan on, GPIO0 off |
1086 | * No effect if SPDIF_OUT2 is | 1090 | * No effect if SPDIF_OUT2 is |
1087 | * selected in IDX_SPDIF_CTL. | 1091 | * selected in IDX_SPDIF_CTL. |
1088 | */ | 1092 | */ |
1089 | cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); | 1093 | |
1094 | cs_vendor_coef_set(codec, IDX_BEEP_CFG, coef); | ||
1090 | } else { | 1095 | } else { |
1091 | if (spec->mic_detect) | 1096 | if (spec->mic_detect) |
1092 | cs_automic(codec, NULL); | 1097 | cs_automic(codec, NULL); |
@@ -1107,7 +1112,7 @@ static const struct hda_verb cs_coef_init_verbs[] = { | |||
1107 | | 0x0400 /* Disable Coefficient Auto increment */ | 1112 | | 0x0400 /* Disable Coefficient Auto increment */ |
1108 | )}, | 1113 | )}, |
1109 | /* Beep */ | 1114 | /* Beep */ |
1110 | {0x11, AC_VERB_SET_COEF_INDEX, IDX_DAC_CFG}, | 1115 | {0x11, AC_VERB_SET_COEF_INDEX, IDX_BEEP_CFG}, |
1111 | {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */ | 1116 | {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */ |
1112 | 1117 | ||
1113 | {} /* terminator */ | 1118 | {} /* terminator */ |
@@ -1728,8 +1733,7 @@ static int cs421x_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
1728 | 1733 | ||
1729 | } | 1734 | } |
1730 | 1735 | ||
1731 | static struct snd_kcontrol_new cs421x_capture_source = { | 1736 | static const struct snd_kcontrol_new cs421x_capture_source = { |
1732 | |||
1733 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1737 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1734 | .name = "Capture Source", | 1738 | .name = "Capture Source", |
1735 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | 1739 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, |
@@ -1946,7 +1950,7 @@ static int cs421x_suspend(struct hda_codec *codec) | |||
1946 | } | 1950 | } |
1947 | #endif | 1951 | #endif |
1948 | 1952 | ||
1949 | static struct hda_codec_ops cs421x_patch_ops = { | 1953 | static const struct hda_codec_ops cs421x_patch_ops = { |
1950 | .build_controls = cs421x_build_controls, | 1954 | .build_controls = cs421x_build_controls, |
1951 | .build_pcms = cs_build_pcms, | 1955 | .build_pcms = cs_build_pcms, |
1952 | .init = cs421x_init, | 1956 | .init = cs421x_init, |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8253b4eeb6a..ad68d223f8a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -2598,8 +2598,10 @@ static const char *alc_get_line_out_pfx(struct alc_spec *spec, int ch, | |||
2598 | return "PCM"; | 2598 | return "PCM"; |
2599 | break; | 2599 | break; |
2600 | } | 2600 | } |
2601 | if (snd_BUG_ON(ch >= ARRAY_SIZE(channel_name))) | 2601 | if (ch >= ARRAY_SIZE(channel_name)) { |
2602 | snd_BUG(); | ||
2602 | return "PCM"; | 2603 | return "PCM"; |
2604 | } | ||
2603 | 2605 | ||
2604 | return channel_name[ch]; | 2606 | return channel_name[ch]; |
2605 | } | 2607 | } |
@@ -5405,6 +5407,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
5405 | SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF), | 5407 | SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF), |
5406 | SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF), | 5408 | SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF), |
5407 | SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 5,1", ALC885_FIXUP_MACPRO_GPIO), | 5409 | SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 5,1", ALC885_FIXUP_MACPRO_GPIO), |
5410 | SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF), | ||
5408 | SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF), | 5411 | SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF), |
5409 | SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF), | 5412 | SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF), |
5410 | SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF), | 5413 | SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF), |
@@ -5675,6 +5678,7 @@ static const struct hda_verb alc268_beep_init_verbs[] = { | |||
5675 | 5678 | ||
5676 | enum { | 5679 | enum { |
5677 | ALC268_FIXUP_INV_DMIC, | 5680 | ALC268_FIXUP_INV_DMIC, |
5681 | ALC268_FIXUP_HP_EAPD, | ||
5678 | }; | 5682 | }; |
5679 | 5683 | ||
5680 | static const struct alc_fixup alc268_fixups[] = { | 5684 | static const struct alc_fixup alc268_fixups[] = { |
@@ -5682,10 +5686,26 @@ static const struct alc_fixup alc268_fixups[] = { | |||
5682 | .type = ALC_FIXUP_FUNC, | 5686 | .type = ALC_FIXUP_FUNC, |
5683 | .v.func = alc_fixup_inv_dmic_0x12, | 5687 | .v.func = alc_fixup_inv_dmic_0x12, |
5684 | }, | 5688 | }, |
5689 | [ALC268_FIXUP_HP_EAPD] = { | ||
5690 | .type = ALC_FIXUP_VERBS, | ||
5691 | .v.verbs = (const struct hda_verb[]) { | ||
5692 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 0}, | ||
5693 | {} | ||
5694 | } | ||
5695 | }, | ||
5685 | }; | 5696 | }; |
5686 | 5697 | ||
5687 | static const struct alc_model_fixup alc268_fixup_models[] = { | 5698 | static const struct alc_model_fixup alc268_fixup_models[] = { |
5688 | {.id = ALC268_FIXUP_INV_DMIC, .name = "inv-dmic"}, | 5699 | {.id = ALC268_FIXUP_INV_DMIC, .name = "inv-dmic"}, |
5700 | {.id = ALC268_FIXUP_HP_EAPD, .name = "hp-eapd"}, | ||
5701 | {} | ||
5702 | }; | ||
5703 | |||
5704 | static const struct snd_pci_quirk alc268_fixup_tbl[] = { | ||
5705 | /* below is codec SSID since multiple Toshiba laptops have the | ||
5706 | * same PCI SSID 1179:ff00 | ||
5707 | */ | ||
5708 | SND_PCI_QUIRK(0x1179, 0xff06, "Toshiba P200", ALC268_FIXUP_HP_EAPD), | ||
5689 | {} | 5709 | {} |
5690 | }; | 5710 | }; |
5691 | 5711 | ||
@@ -5720,7 +5740,7 @@ static int patch_alc268(struct hda_codec *codec) | |||
5720 | 5740 | ||
5721 | spec = codec->spec; | 5741 | spec = codec->spec; |
5722 | 5742 | ||
5723 | alc_pick_fixup(codec, alc268_fixup_models, NULL, alc268_fixups); | 5743 | alc_pick_fixup(codec, alc268_fixup_models, alc268_fixup_tbl, alc268_fixups); |
5724 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); | 5744 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); |
5725 | 5745 | ||
5726 | /* automatic parse from the BIOS config */ | 5746 | /* automatic parse from the BIOS config */ |
@@ -5821,7 +5841,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
5821 | return alc_parse_auto_config(codec, alc269_ignore, ssids); | 5841 | return alc_parse_auto_config(codec, alc269_ignore, ssids); |
5822 | } | 5842 | } |
5823 | 5843 | ||
5824 | static void alc269_toggle_power_output(struct hda_codec *codec, int power_up) | 5844 | static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) |
5825 | { | 5845 | { |
5826 | int val = alc_read_coef_idx(codec, 0x04); | 5846 | int val = alc_read_coef_idx(codec, 0x04); |
5827 | if (power_up) | 5847 | if (power_up) |
@@ -5838,10 +5858,10 @@ static void alc269_shutup(struct hda_codec *codec) | |||
5838 | if (spec->codec_variant != ALC269_TYPE_ALC269VB) | 5858 | if (spec->codec_variant != ALC269_TYPE_ALC269VB) |
5839 | return; | 5859 | return; |
5840 | 5860 | ||
5841 | if ((alc_get_coef0(codec) & 0x00ff) == 0x017) | 5861 | if (spec->codec_variant == ALC269_TYPE_ALC269VB) |
5842 | alc269_toggle_power_output(codec, 0); | 5862 | alc269vb_toggle_power_output(codec, 0); |
5843 | if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { | 5863 | if (spec->codec_variant == ALC269_TYPE_ALC269VB && |
5844 | alc269_toggle_power_output(codec, 0); | 5864 | (alc_get_coef0(codec) & 0x00ff) == 0x018) { |
5845 | msleep(150); | 5865 | msleep(150); |
5846 | } | 5866 | } |
5847 | } | 5867 | } |
@@ -5851,24 +5871,22 @@ static int alc269_resume(struct hda_codec *codec) | |||
5851 | { | 5871 | { |
5852 | struct alc_spec *spec = codec->spec; | 5872 | struct alc_spec *spec = codec->spec; |
5853 | 5873 | ||
5854 | if (spec->codec_variant == ALC269_TYPE_ALC269VB || | 5874 | if (spec->codec_variant == ALC269_TYPE_ALC269VB) |
5875 | alc269vb_toggle_power_output(codec, 0); | ||
5876 | if (spec->codec_variant == ALC269_TYPE_ALC269VB && | ||
5855 | (alc_get_coef0(codec) & 0x00ff) == 0x018) { | 5877 | (alc_get_coef0(codec) & 0x00ff) == 0x018) { |
5856 | alc269_toggle_power_output(codec, 0); | ||
5857 | msleep(150); | 5878 | msleep(150); |
5858 | } | 5879 | } |
5859 | 5880 | ||
5860 | codec->patch_ops.init(codec); | 5881 | codec->patch_ops.init(codec); |
5861 | 5882 | ||
5862 | if (spec->codec_variant == ALC269_TYPE_ALC269VB || | 5883 | if (spec->codec_variant == ALC269_TYPE_ALC269VB) |
5884 | alc269vb_toggle_power_output(codec, 1); | ||
5885 | if (spec->codec_variant == ALC269_TYPE_ALC269VB && | ||
5863 | (alc_get_coef0(codec) & 0x00ff) == 0x017) { | 5886 | (alc_get_coef0(codec) & 0x00ff) == 0x017) { |
5864 | alc269_toggle_power_output(codec, 1); | ||
5865 | msleep(200); | 5887 | msleep(200); |
5866 | } | 5888 | } |
5867 | 5889 | ||
5868 | if (spec->codec_variant == ALC269_TYPE_ALC269VB || | ||
5869 | (alc_get_coef0(codec) & 0x00ff) == 0x018) | ||
5870 | alc269_toggle_power_output(codec, 1); | ||
5871 | |||
5872 | snd_hda_codec_resume_amp(codec); | 5890 | snd_hda_codec_resume_amp(codec); |
5873 | snd_hda_codec_resume_cache(codec); | 5891 | snd_hda_codec_resume_cache(codec); |
5874 | hda_call_check_power_status(codec, 0x01); | 5892 | hda_call_check_power_status(codec, 0x01); |
@@ -6186,6 +6204,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
6186 | SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), | 6204 | SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), |
6187 | SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK), | 6205 | SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK), |
6188 | SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK), | 6206 | SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK), |
6207 | SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK), | ||
6189 | SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK), | 6208 | SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK), |
6190 | SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), | 6209 | SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), |
6191 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), | 6210 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), |
@@ -7046,6 +7065,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
7046 | { .id = 0x10ec0282, .name = "ALC282", .patch = patch_alc269 }, | 7065 | { .id = 0x10ec0282, .name = "ALC282", .patch = patch_alc269 }, |
7047 | { .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 }, | 7066 | { .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 }, |
7048 | { .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 }, | 7067 | { .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 }, |
7068 | { .id = 0x10ec0292, .name = "ALC292", .patch = patch_alc269 }, | ||
7049 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", | 7069 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", |
7050 | .patch = patch_alc861 }, | 7070 | .patch = patch_alc861 }, |
7051 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, | 7071 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, |
@@ -7059,6 +7079,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
7059 | .patch = patch_alc662 }, | 7079 | .patch = patch_alc662 }, |
7060 | { .id = 0x10ec0663, .name = "ALC663", .patch = patch_alc662 }, | 7080 | { .id = 0x10ec0663, .name = "ALC663", .patch = patch_alc662 }, |
7061 | { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 }, | 7081 | { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 }, |
7082 | { .id = 0x10ec0668, .name = "ALC668", .patch = patch_alc662 }, | ||
7062 | { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 }, | 7083 | { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 }, |
7063 | { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 }, | 7084 | { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 }, |
7064 | { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, | 7085 | { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, |
@@ -7076,6 +7097,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
7076 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc882 }, | 7097 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc882 }, |
7077 | { .id = 0x10ec0892, .name = "ALC892", .patch = patch_alc662 }, | 7098 | { .id = 0x10ec0892, .name = "ALC892", .patch = patch_alc662 }, |
7078 | { .id = 0x10ec0899, .name = "ALC898", .patch = patch_alc882 }, | 7099 | { .id = 0x10ec0899, .name = "ALC898", .patch = patch_alc882 }, |
7100 | { .id = 0x10ec0900, .name = "ALC1150", .patch = patch_alc882 }, | ||
7079 | {} /* terminator */ | 7101 | {} /* terminator */ |
7080 | }; | 7102 | }; |
7081 | 7103 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 770013ff556..9ba8af05617 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1763,6 +1763,8 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { | |||
1763 | "HP", STAC_HP_ZEPHYR), | 1763 | "HP", STAC_HP_ZEPHYR), |
1764 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3660, | 1764 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3660, |
1765 | "HP Mini", STAC_92HD83XXX_HP_LED), | 1765 | "HP Mini", STAC_92HD83XXX_HP_LED), |
1766 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x144E, | ||
1767 | "HP Pavilion dv5", STAC_92HD83XXX_HP_INV_LED), | ||
1766 | {} /* terminator */ | 1768 | {} /* terminator */ |
1767 | }; | 1769 | }; |
1768 | 1770 | ||
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 72a2f60b087..019e1a00414 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -1809,11 +1809,11 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec) | |||
1809 | { | 1809 | { |
1810 | struct via_spec *spec = codec->spec; | 1810 | struct via_spec *spec = codec->spec; |
1811 | const struct auto_pin_cfg *cfg = &spec->autocfg; | 1811 | const struct auto_pin_cfg *cfg = &spec->autocfg; |
1812 | int i, dac_num; | 1812 | int i; |
1813 | hda_nid_t nid; | 1813 | hda_nid_t nid; |
1814 | 1814 | ||
1815 | spec->multiout.num_dacs = 0; | ||
1815 | spec->multiout.dac_nids = spec->private_dac_nids; | 1816 | spec->multiout.dac_nids = spec->private_dac_nids; |
1816 | dac_num = 0; | ||
1817 | for (i = 0; i < cfg->line_outs; i++) { | 1817 | for (i = 0; i < cfg->line_outs; i++) { |
1818 | hda_nid_t dac = 0; | 1818 | hda_nid_t dac = 0; |
1819 | nid = cfg->line_out_pins[i]; | 1819 | nid = cfg->line_out_pins[i]; |
@@ -1824,16 +1824,13 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec) | |||
1824 | if (!i && parse_output_path(codec, nid, dac, 1, | 1824 | if (!i && parse_output_path(codec, nid, dac, 1, |
1825 | &spec->out_mix_path)) | 1825 | &spec->out_mix_path)) |
1826 | dac = spec->out_mix_path.path[0]; | 1826 | dac = spec->out_mix_path.path[0]; |
1827 | if (dac) { | 1827 | if (dac) |
1828 | spec->private_dac_nids[i] = dac; | 1828 | spec->private_dac_nids[spec->multiout.num_dacs++] = dac; |
1829 | dac_num++; | ||
1830 | } | ||
1831 | } | 1829 | } |
1832 | if (!spec->out_path[0].depth && spec->out_mix_path.depth) { | 1830 | if (!spec->out_path[0].depth && spec->out_mix_path.depth) { |
1833 | spec->out_path[0] = spec->out_mix_path; | 1831 | spec->out_path[0] = spec->out_mix_path; |
1834 | spec->out_mix_path.depth = 0; | 1832 | spec->out_mix_path.depth = 0; |
1835 | } | 1833 | } |
1836 | spec->multiout.num_dacs = dac_num; | ||
1837 | return 0; | 1834 | return 0; |
1838 | } | 1835 | } |
1839 | 1836 | ||
@@ -3628,6 +3625,7 @@ static void set_widgets_power_state_vt2002P(struct hda_codec *codec) | |||
3628 | */ | 3625 | */ |
3629 | enum { | 3626 | enum { |
3630 | VIA_FIXUP_INTMIC_BOOST, | 3627 | VIA_FIXUP_INTMIC_BOOST, |
3628 | VIA_FIXUP_ASUS_G75, | ||
3631 | }; | 3629 | }; |
3632 | 3630 | ||
3633 | static void via_fixup_intmic_boost(struct hda_codec *codec, | 3631 | static void via_fixup_intmic_boost(struct hda_codec *codec, |
@@ -3642,13 +3640,35 @@ static const struct hda_fixup via_fixups[] = { | |||
3642 | .type = HDA_FIXUP_FUNC, | 3640 | .type = HDA_FIXUP_FUNC, |
3643 | .v.func = via_fixup_intmic_boost, | 3641 | .v.func = via_fixup_intmic_boost, |
3644 | }, | 3642 | }, |
3643 | [VIA_FIXUP_ASUS_G75] = { | ||
3644 | .type = HDA_FIXUP_PINS, | ||
3645 | .v.pins = (const struct hda_pintbl[]) { | ||
3646 | /* set 0x24 and 0x33 as speakers */ | ||
3647 | { 0x24, 0x991301f0 }, | ||
3648 | { 0x33, 0x991301f1 }, /* subwoofer */ | ||
3649 | { } | ||
3650 | } | ||
3651 | }, | ||
3645 | }; | 3652 | }; |
3646 | 3653 | ||
3647 | static const struct snd_pci_quirk vt2002p_fixups[] = { | 3654 | static const struct snd_pci_quirk vt2002p_fixups[] = { |
3655 | SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75), | ||
3648 | SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST), | 3656 | SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST), |
3649 | {} | 3657 | {} |
3650 | }; | 3658 | }; |
3651 | 3659 | ||
3660 | /* NIDs 0x24 and 0x33 on VT1802 have connections to non-existing NID 0x3e | ||
3661 | * Replace this with mixer NID 0x1c | ||
3662 | */ | ||
3663 | static void fix_vt1802_connections(struct hda_codec *codec) | ||
3664 | { | ||
3665 | static hda_nid_t conn_24[] = { 0x14, 0x1c }; | ||
3666 | static hda_nid_t conn_33[] = { 0x1c }; | ||
3667 | |||
3668 | snd_hda_override_conn_list(codec, 0x24, ARRAY_SIZE(conn_24), conn_24); | ||
3669 | snd_hda_override_conn_list(codec, 0x33, ARRAY_SIZE(conn_33), conn_33); | ||
3670 | } | ||
3671 | |||
3652 | /* patch for vt2002P */ | 3672 | /* patch for vt2002P */ |
3653 | static int patch_vt2002P(struct hda_codec *codec) | 3673 | static int patch_vt2002P(struct hda_codec *codec) |
3654 | { | 3674 | { |
@@ -3663,6 +3683,8 @@ static int patch_vt2002P(struct hda_codec *codec) | |||
3663 | spec->aa_mix_nid = 0x21; | 3683 | spec->aa_mix_nid = 0x21; |
3664 | override_mic_boost(codec, 0x2b, 0, 3, 40); | 3684 | override_mic_boost(codec, 0x2b, 0, 3, 40); |
3665 | override_mic_boost(codec, 0x29, 0, 3, 40); | 3685 | override_mic_boost(codec, 0x29, 0, 3, 40); |
3686 | if (spec->codec_type == VT1802) | ||
3687 | fix_vt1802_connections(codec); | ||
3666 | add_secret_dac_path(codec); | 3688 | add_secret_dac_path(codec); |
3667 | 3689 | ||
3668 | snd_hda_pick_fixup(codec, NULL, vt2002p_fixups, via_fixups); | 3690 | snd_hda_pick_fixup(codec, NULL, vt2002p_fixups, via_fixups); |