diff options
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.h | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_eld.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 103 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 8 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 76 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 19 |
7 files changed, 147 insertions, 67 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 88480c0c58a0..c7df01b72cac 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -174,7 +174,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd, | |||
174 | mutex_lock(&bus->cmd_mutex); | 174 | mutex_lock(&bus->cmd_mutex); |
175 | err = bus->ops.command(bus, cmd); | 175 | err = bus->ops.command(bus, cmd); |
176 | if (!err && res) | 176 | if (!err && res) |
177 | *res = bus->ops.get_response(bus); | 177 | *res = bus->ops.get_response(bus, codec->addr); |
178 | mutex_unlock(&bus->cmd_mutex); | 178 | mutex_unlock(&bus->cmd_mutex); |
179 | snd_hda_power_down(codec); | 179 | snd_hda_power_down(codec); |
180 | if (res && *res == -1 && bus->rirb_error) { | 180 | if (res && *res == -1 && bus->rirb_error) { |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index cad79efaabc9..1b75f28ed092 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -568,7 +568,7 @@ struct hda_bus_ops { | |||
568 | /* send a single command */ | 568 | /* send a single command */ |
569 | int (*command)(struct hda_bus *bus, unsigned int cmd); | 569 | int (*command)(struct hda_bus *bus, unsigned int cmd); |
570 | /* get a response from the last command */ | 570 | /* get a response from the last command */ |
571 | unsigned int (*get_response)(struct hda_bus *bus); | 571 | unsigned int (*get_response)(struct hda_bus *bus, unsigned int addr); |
572 | /* free the private data */ | 572 | /* free the private data */ |
573 | void (*private_free)(struct hda_bus *); | 573 | void (*private_free)(struct hda_bus *); |
574 | /* attach a PCM stream */ | 574 | /* attach a PCM stream */ |
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index fcad5ec31773..9446a5abea13 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c | |||
@@ -508,7 +508,7 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry, | |||
508 | char name[64]; | 508 | char name[64]; |
509 | char *sname; | 509 | char *sname; |
510 | long long val; | 510 | long long val; |
511 | int n; | 511 | unsigned int n; |
512 | 512 | ||
513 | while (!snd_info_get_line(buffer, line, sizeof(line))) { | 513 | while (!snd_info_get_line(buffer, line, sizeof(line))) { |
514 | if (sscanf(line, "%s %llx", name, &val) != 2) | 514 | if (sscanf(line, "%s %llx", name, &val) != 2) |
@@ -539,7 +539,7 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry, | |||
539 | sname++; | 539 | sname++; |
540 | n = 10 * n + name[4] - '0'; | 540 | n = 10 * n + name[4] - '0'; |
541 | } | 541 | } |
542 | if (n < 0 || n > 31) /* double the CEA limit */ | 542 | if (n >= ELD_MAX_SAD) |
543 | continue; | 543 | continue; |
544 | if (!strcmp(sname, "_coding_type")) | 544 | if (!strcmp(sname, "_coding_type")) |
545 | e->sad[n].format = val; | 545 | e->sad[n].format = val; |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 77c1b840ca8b..175f07a381ba 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -253,7 +253,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; | |||
253 | 253 | ||
254 | /* STATESTS int mask: S3,SD2,SD1,SD0 */ | 254 | /* STATESTS int mask: S3,SD2,SD1,SD0 */ |
255 | #define AZX_MAX_CODECS 4 | 255 | #define AZX_MAX_CODECS 4 |
256 | #define STATESTS_INT_MASK 0x0f | 256 | #define STATESTS_INT_MASK ((1 << AZX_MAX_CODECS) - 1) |
257 | 257 | ||
258 | /* SD_CTL bits */ | 258 | /* SD_CTL bits */ |
259 | #define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */ | 259 | #define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */ |
@@ -361,8 +361,8 @@ struct azx_rb { | |||
361 | dma_addr_t addr; /* physical address of CORB/RIRB buffer */ | 361 | dma_addr_t addr; /* physical address of CORB/RIRB buffer */ |
362 | /* for RIRB */ | 362 | /* for RIRB */ |
363 | unsigned short rp, wp; /* read/write pointers */ | 363 | unsigned short rp, wp; /* read/write pointers */ |
364 | int cmds; /* number of pending requests */ | 364 | int cmds[AZX_MAX_CODECS]; /* number of pending requests */ |
365 | u32 res; /* last read value */ | 365 | u32 res[AZX_MAX_CODECS]; /* last read value */ |
366 | }; | 366 | }; |
367 | 367 | ||
368 | struct azx { | 368 | struct azx { |
@@ -418,7 +418,7 @@ struct azx { | |||
418 | unsigned int probing :1; /* codec probing phase */ | 418 | unsigned int probing :1; /* codec probing phase */ |
419 | 419 | ||
420 | /* for debugging */ | 420 | /* for debugging */ |
421 | unsigned int last_cmd; /* last issued command (to sync) */ | 421 | unsigned int last_cmd[AZX_MAX_CODECS]; |
422 | 422 | ||
423 | /* for pending irqs */ | 423 | /* for pending irqs */ |
424 | struct work_struct irq_pending_work; | 424 | struct work_struct irq_pending_work; |
@@ -513,6 +513,7 @@ static int azx_alloc_cmd_io(struct azx *chip) | |||
513 | 513 | ||
514 | static void azx_init_cmd_io(struct azx *chip) | 514 | static void azx_init_cmd_io(struct azx *chip) |
515 | { | 515 | { |
516 | spin_lock_irq(&chip->reg_lock); | ||
516 | /* CORB set up */ | 517 | /* CORB set up */ |
517 | chip->corb.addr = chip->rb.addr; | 518 | chip->corb.addr = chip->rb.addr; |
518 | chip->corb.buf = (u32 *)chip->rb.area; | 519 | chip->corb.buf = (u32 *)chip->rb.area; |
@@ -531,7 +532,8 @@ static void azx_init_cmd_io(struct azx *chip) | |||
531 | /* RIRB set up */ | 532 | /* RIRB set up */ |
532 | chip->rirb.addr = chip->rb.addr + 2048; | 533 | chip->rirb.addr = chip->rb.addr + 2048; |
533 | chip->rirb.buf = (u32 *)(chip->rb.area + 2048); | 534 | chip->rirb.buf = (u32 *)(chip->rb.area + 2048); |
534 | chip->rirb.wp = chip->rirb.rp = chip->rirb.cmds = 0; | 535 | chip->rirb.wp = chip->rirb.rp = 0; |
536 | memset(chip->rirb.cmds, 0, sizeof(chip->rirb.cmds)); | ||
535 | azx_writel(chip, RIRBLBASE, (u32)chip->rirb.addr); | 537 | azx_writel(chip, RIRBLBASE, (u32)chip->rirb.addr); |
536 | azx_writel(chip, RIRBUBASE, upper_32_bits(chip->rirb.addr)); | 538 | azx_writel(chip, RIRBUBASE, upper_32_bits(chip->rirb.addr)); |
537 | 539 | ||
@@ -543,30 +545,60 @@ static void azx_init_cmd_io(struct azx *chip) | |||
543 | azx_writew(chip, RINTCNT, 1); | 545 | azx_writew(chip, RINTCNT, 1); |
544 | /* enable rirb dma and response irq */ | 546 | /* enable rirb dma and response irq */ |
545 | azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN | ICH6_RBCTL_IRQ_EN); | 547 | azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN | ICH6_RBCTL_IRQ_EN); |
548 | spin_unlock_irq(&chip->reg_lock); | ||
546 | } | 549 | } |
547 | 550 | ||
548 | static void azx_free_cmd_io(struct azx *chip) | 551 | static void azx_free_cmd_io(struct azx *chip) |
549 | { | 552 | { |
553 | spin_lock_irq(&chip->reg_lock); | ||
550 | /* disable ringbuffer DMAs */ | 554 | /* disable ringbuffer DMAs */ |
551 | azx_writeb(chip, RIRBCTL, 0); | 555 | azx_writeb(chip, RIRBCTL, 0); |
552 | azx_writeb(chip, CORBCTL, 0); | 556 | azx_writeb(chip, CORBCTL, 0); |
557 | spin_unlock_irq(&chip->reg_lock); | ||
558 | } | ||
559 | |||
560 | static unsigned int azx_command_addr(u32 cmd) | ||
561 | { | ||
562 | unsigned int addr = cmd >> 28; | ||
563 | |||
564 | if (addr >= AZX_MAX_CODECS) { | ||
565 | snd_BUG(); | ||
566 | addr = 0; | ||
567 | } | ||
568 | |||
569 | return addr; | ||
570 | } | ||
571 | |||
572 | static unsigned int azx_response_addr(u32 res) | ||
573 | { | ||
574 | unsigned int addr = res & 0xf; | ||
575 | |||
576 | if (addr >= AZX_MAX_CODECS) { | ||
577 | snd_BUG(); | ||
578 | addr = 0; | ||
579 | } | ||
580 | |||
581 | return addr; | ||
553 | } | 582 | } |
554 | 583 | ||
555 | /* send a command */ | 584 | /* send a command */ |
556 | static int azx_corb_send_cmd(struct hda_bus *bus, u32 val) | 585 | static int azx_corb_send_cmd(struct hda_bus *bus, u32 val) |
557 | { | 586 | { |
558 | struct azx *chip = bus->private_data; | 587 | struct azx *chip = bus->private_data; |
588 | unsigned int addr = azx_command_addr(val); | ||
559 | unsigned int wp; | 589 | unsigned int wp; |
560 | 590 | ||
591 | spin_lock_irq(&chip->reg_lock); | ||
592 | |||
561 | /* add command to corb */ | 593 | /* add command to corb */ |
562 | wp = azx_readb(chip, CORBWP); | 594 | wp = azx_readb(chip, CORBWP); |
563 | wp++; | 595 | wp++; |
564 | wp %= ICH6_MAX_CORB_ENTRIES; | 596 | wp %= ICH6_MAX_CORB_ENTRIES; |
565 | 597 | ||
566 | spin_lock_irq(&chip->reg_lock); | 598 | chip->rirb.cmds[addr]++; |
567 | chip->rirb.cmds++; | ||
568 | chip->corb.buf[wp] = cpu_to_le32(val); | 599 | chip->corb.buf[wp] = cpu_to_le32(val); |
569 | azx_writel(chip, CORBWP, wp); | 600 | azx_writel(chip, CORBWP, wp); |
601 | |||
570 | spin_unlock_irq(&chip->reg_lock); | 602 | spin_unlock_irq(&chip->reg_lock); |
571 | 603 | ||
572 | return 0; | 604 | return 0; |
@@ -578,13 +610,14 @@ static int azx_corb_send_cmd(struct hda_bus *bus, u32 val) | |||
578 | static void azx_update_rirb(struct azx *chip) | 610 | static void azx_update_rirb(struct azx *chip) |
579 | { | 611 | { |
580 | unsigned int rp, wp; | 612 | unsigned int rp, wp; |
613 | unsigned int addr; | ||
581 | u32 res, res_ex; | 614 | u32 res, res_ex; |
582 | 615 | ||
583 | wp = azx_readb(chip, RIRBWP); | 616 | wp = azx_readb(chip, RIRBWP); |
584 | if (wp == chip->rirb.wp) | 617 | if (wp == chip->rirb.wp) |
585 | return; | 618 | return; |
586 | chip->rirb.wp = wp; | 619 | chip->rirb.wp = wp; |
587 | 620 | ||
588 | while (chip->rirb.rp != wp) { | 621 | while (chip->rirb.rp != wp) { |
589 | chip->rirb.rp++; | 622 | chip->rirb.rp++; |
590 | chip->rirb.rp %= ICH6_MAX_RIRB_ENTRIES; | 623 | chip->rirb.rp %= ICH6_MAX_RIRB_ENTRIES; |
@@ -592,18 +625,24 @@ static void azx_update_rirb(struct azx *chip) | |||
592 | rp = chip->rirb.rp << 1; /* an RIRB entry is 8-bytes */ | 625 | rp = chip->rirb.rp << 1; /* an RIRB entry is 8-bytes */ |
593 | res_ex = le32_to_cpu(chip->rirb.buf[rp + 1]); | 626 | res_ex = le32_to_cpu(chip->rirb.buf[rp + 1]); |
594 | res = le32_to_cpu(chip->rirb.buf[rp]); | 627 | res = le32_to_cpu(chip->rirb.buf[rp]); |
628 | addr = azx_response_addr(res_ex); | ||
595 | if (res_ex & ICH6_RIRB_EX_UNSOL_EV) | 629 | if (res_ex & ICH6_RIRB_EX_UNSOL_EV) |
596 | snd_hda_queue_unsol_event(chip->bus, res, res_ex); | 630 | snd_hda_queue_unsol_event(chip->bus, res, res_ex); |
597 | else if (chip->rirb.cmds) { | 631 | else if (chip->rirb.cmds[addr]) { |
598 | chip->rirb.res = res; | 632 | chip->rirb.res[addr] = res; |
599 | smp_wmb(); | 633 | smp_wmb(); |
600 | chip->rirb.cmds--; | 634 | chip->rirb.cmds[addr]--; |
601 | } | 635 | } else |
636 | snd_printk(KERN_ERR SFX "spurious response %#x:%#x, " | ||
637 | "last cmd=%#08x\n", | ||
638 | res, res_ex, | ||
639 | chip->last_cmd[addr]); | ||
602 | } | 640 | } |
603 | } | 641 | } |
604 | 642 | ||
605 | /* receive a response */ | 643 | /* receive a response */ |
606 | static unsigned int azx_rirb_get_response(struct hda_bus *bus) | 644 | static unsigned int azx_rirb_get_response(struct hda_bus *bus, |
645 | unsigned int addr) | ||
607 | { | 646 | { |
608 | struct azx *chip = bus->private_data; | 647 | struct azx *chip = bus->private_data; |
609 | unsigned long timeout; | 648 | unsigned long timeout; |
@@ -616,10 +655,10 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus) | |||
616 | azx_update_rirb(chip); | 655 | azx_update_rirb(chip); |
617 | spin_unlock_irq(&chip->reg_lock); | 656 | spin_unlock_irq(&chip->reg_lock); |
618 | } | 657 | } |
619 | if (!chip->rirb.cmds) { | 658 | if (!chip->rirb.cmds[addr]) { |
620 | smp_rmb(); | 659 | smp_rmb(); |
621 | bus->rirb_error = 0; | 660 | bus->rirb_error = 0; |
622 | return chip->rirb.res; /* the last value */ | 661 | return chip->rirb.res[addr]; /* the last value */ |
623 | } | 662 | } |
624 | if (time_after(jiffies, timeout)) | 663 | if (time_after(jiffies, timeout)) |
625 | break; | 664 | break; |
@@ -633,7 +672,8 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus) | |||
633 | 672 | ||
634 | if (chip->msi) { | 673 | if (chip->msi) { |
635 | snd_printk(KERN_WARNING SFX "No response from codec, " | 674 | snd_printk(KERN_WARNING SFX "No response from codec, " |
636 | "disabling MSI: last cmd=0x%08x\n", chip->last_cmd); | 675 | "disabling MSI: last cmd=0x%08x\n", |
676 | chip->last_cmd[addr]); | ||
637 | free_irq(chip->irq, chip); | 677 | free_irq(chip->irq, chip); |
638 | chip->irq = -1; | 678 | chip->irq = -1; |
639 | pci_disable_msi(chip->pci); | 679 | pci_disable_msi(chip->pci); |
@@ -648,7 +688,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus) | |||
648 | if (!chip->polling_mode) { | 688 | if (!chip->polling_mode) { |
649 | snd_printk(KERN_WARNING SFX "azx_get_response timeout, " | 689 | snd_printk(KERN_WARNING SFX "azx_get_response timeout, " |
650 | "switching to polling mode: last cmd=0x%08x\n", | 690 | "switching to polling mode: last cmd=0x%08x\n", |
651 | chip->last_cmd); | 691 | chip->last_cmd[addr]); |
652 | chip->polling_mode = 1; | 692 | chip->polling_mode = 1; |
653 | goto again; | 693 | goto again; |
654 | } | 694 | } |
@@ -672,7 +712,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus) | |||
672 | 712 | ||
673 | snd_printk(KERN_ERR "hda_intel: azx_get_response timeout, " | 713 | snd_printk(KERN_ERR "hda_intel: azx_get_response timeout, " |
674 | "switching to single_cmd mode: last cmd=0x%08x\n", | 714 | "switching to single_cmd mode: last cmd=0x%08x\n", |
675 | chip->last_cmd); | 715 | chip->last_cmd[addr]); |
676 | chip->single_cmd = 1; | 716 | chip->single_cmd = 1; |
677 | bus->response_reset = 0; | 717 | bus->response_reset = 0; |
678 | /* re-initialize CORB/RIRB */ | 718 | /* re-initialize CORB/RIRB */ |
@@ -692,7 +732,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus) | |||
692 | */ | 732 | */ |
693 | 733 | ||
694 | /* receive a response */ | 734 | /* receive a response */ |
695 | static int azx_single_wait_for_response(struct azx *chip) | 735 | static int azx_single_wait_for_response(struct azx *chip, unsigned int addr) |
696 | { | 736 | { |
697 | int timeout = 50; | 737 | int timeout = 50; |
698 | 738 | ||
@@ -700,7 +740,7 @@ static int azx_single_wait_for_response(struct azx *chip) | |||
700 | /* check IRV busy bit */ | 740 | /* check IRV busy bit */ |
701 | if (azx_readw(chip, IRS) & ICH6_IRS_VALID) { | 741 | if (azx_readw(chip, IRS) & ICH6_IRS_VALID) { |
702 | /* reuse rirb.res as the response return value */ | 742 | /* reuse rirb.res as the response return value */ |
703 | chip->rirb.res = azx_readl(chip, IR); | 743 | chip->rirb.res[addr] = azx_readl(chip, IR); |
704 | return 0; | 744 | return 0; |
705 | } | 745 | } |
706 | udelay(1); | 746 | udelay(1); |
@@ -708,7 +748,7 @@ static int azx_single_wait_for_response(struct azx *chip) | |||
708 | if (printk_ratelimit()) | 748 | if (printk_ratelimit()) |
709 | snd_printd(SFX "get_response timeout: IRS=0x%x\n", | 749 | snd_printd(SFX "get_response timeout: IRS=0x%x\n", |
710 | azx_readw(chip, IRS)); | 750 | azx_readw(chip, IRS)); |
711 | chip->rirb.res = -1; | 751 | chip->rirb.res[addr] = -1; |
712 | return -EIO; | 752 | return -EIO; |
713 | } | 753 | } |
714 | 754 | ||
@@ -716,6 +756,7 @@ static int azx_single_wait_for_response(struct azx *chip) | |||
716 | static int azx_single_send_cmd(struct hda_bus *bus, u32 val) | 756 | static int azx_single_send_cmd(struct hda_bus *bus, u32 val) |
717 | { | 757 | { |
718 | struct azx *chip = bus->private_data; | 758 | struct azx *chip = bus->private_data; |
759 | unsigned int addr = azx_command_addr(val); | ||
719 | int timeout = 50; | 760 | int timeout = 50; |
720 | 761 | ||
721 | bus->rirb_error = 0; | 762 | bus->rirb_error = 0; |
@@ -728,7 +769,7 @@ static int azx_single_send_cmd(struct hda_bus *bus, u32 val) | |||
728 | azx_writel(chip, IC, val); | 769 | azx_writel(chip, IC, val); |
729 | azx_writew(chip, IRS, azx_readw(chip, IRS) | | 770 | azx_writew(chip, IRS, azx_readw(chip, IRS) | |
730 | ICH6_IRS_BUSY); | 771 | ICH6_IRS_BUSY); |
731 | return azx_single_wait_for_response(chip); | 772 | return azx_single_wait_for_response(chip, addr); |
732 | } | 773 | } |
733 | udelay(1); | 774 | udelay(1); |
734 | } | 775 | } |
@@ -739,10 +780,11 @@ static int azx_single_send_cmd(struct hda_bus *bus, u32 val) | |||
739 | } | 780 | } |
740 | 781 | ||
741 | /* receive a response */ | 782 | /* receive a response */ |
742 | static unsigned int azx_single_get_response(struct hda_bus *bus) | 783 | static unsigned int azx_single_get_response(struct hda_bus *bus, |
784 | unsigned int addr) | ||
743 | { | 785 | { |
744 | struct azx *chip = bus->private_data; | 786 | struct azx *chip = bus->private_data; |
745 | return chip->rirb.res; | 787 | return chip->rirb.res[addr]; |
746 | } | 788 | } |
747 | 789 | ||
748 | /* | 790 | /* |
@@ -757,7 +799,7 @@ static int azx_send_cmd(struct hda_bus *bus, unsigned int val) | |||
757 | { | 799 | { |
758 | struct azx *chip = bus->private_data; | 800 | struct azx *chip = bus->private_data; |
759 | 801 | ||
760 | chip->last_cmd = val; | 802 | chip->last_cmd[azx_command_addr(val)] = val; |
761 | if (chip->single_cmd) | 803 | if (chip->single_cmd) |
762 | return azx_single_send_cmd(bus, val); | 804 | return azx_single_send_cmd(bus, val); |
763 | else | 805 | else |
@@ -765,13 +807,14 @@ static int azx_send_cmd(struct hda_bus *bus, unsigned int val) | |||
765 | } | 807 | } |
766 | 808 | ||
767 | /* get a response */ | 809 | /* get a response */ |
768 | static unsigned int azx_get_response(struct hda_bus *bus) | 810 | static unsigned int azx_get_response(struct hda_bus *bus, |
811 | unsigned int addr) | ||
769 | { | 812 | { |
770 | struct azx *chip = bus->private_data; | 813 | struct azx *chip = bus->private_data; |
771 | if (chip->single_cmd) | 814 | if (chip->single_cmd) |
772 | return azx_single_get_response(bus); | 815 | return azx_single_get_response(bus, addr); |
773 | else | 816 | else |
774 | return azx_rirb_get_response(bus); | 817 | return azx_rirb_get_response(bus, addr); |
775 | } | 818 | } |
776 | 819 | ||
777 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 820 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
@@ -1243,10 +1286,12 @@ static int probe_codec(struct azx *chip, int addr) | |||
1243 | (AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID; | 1286 | (AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID; |
1244 | unsigned int res; | 1287 | unsigned int res; |
1245 | 1288 | ||
1289 | mutex_lock(&chip->bus->cmd_mutex); | ||
1246 | chip->probing = 1; | 1290 | chip->probing = 1; |
1247 | azx_send_cmd(chip->bus, cmd); | 1291 | azx_send_cmd(chip->bus, cmd); |
1248 | res = azx_get_response(chip->bus); | 1292 | res = azx_get_response(chip->bus, addr); |
1249 | chip->probing = 0; | 1293 | chip->probing = 0; |
1294 | mutex_unlock(&chip->bus->cmd_mutex); | ||
1250 | if (res == -1) | 1295 | if (res == -1) |
1251 | return -EIO; | 1296 | return -EIO; |
1252 | snd_printdd(SFX "codec #%d probed OK\n", addr); | 1297 | snd_printdd(SFX "codec #%d probed OK\n", addr); |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index be7d25fa7f35..403588c6e3f6 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -3754,7 +3754,7 @@ static int ad1884a_mobile_master_sw_put(struct snd_kcontrol *kcontrol, | |||
3754 | int mute = (!ucontrol->value.integer.value[0] && | 3754 | int mute = (!ucontrol->value.integer.value[0] && |
3755 | !ucontrol->value.integer.value[1]); | 3755 | !ucontrol->value.integer.value[1]); |
3756 | /* toggle GPIO1 according to the mute state */ | 3756 | /* toggle GPIO1 according to the mute state */ |
3757 | snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, | 3757 | snd_hda_codec_write_cache(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, |
3758 | mute ? 0x02 : 0x0); | 3758 | mute ? 0x02 : 0x0); |
3759 | return ret; | 3759 | return ret; |
3760 | } | 3760 | } |
@@ -3835,9 +3835,11 @@ static struct hda_verb ad1884a_laptop_verbs[] = { | |||
3835 | /* Port-F (int speaker) mixer - route only from analog mixer */ | 3835 | /* Port-F (int speaker) mixer - route only from analog mixer */ |
3836 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | 3836 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, |
3837 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | 3837 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, |
3838 | /* Port-F pin */ | 3838 | /* Port-F (int speaker) pin */ |
3839 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | 3839 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, |
3840 | {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | 3840 | {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, |
3841 | /* required for compaq 6530s/6531s speaker output */ | ||
3842 | {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
3841 | /* Port-C pin - internal mic-in */ | 3843 | /* Port-C pin - internal mic-in */ |
3842 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | 3844 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, |
3843 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */ | 3845 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */ |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7e99763ca527..6f683e451f2b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -275,13 +275,13 @@ struct alc_spec { | |||
275 | */ | 275 | */ |
276 | unsigned int num_init_verbs; | 276 | unsigned int num_init_verbs; |
277 | 277 | ||
278 | char stream_name_analog[16]; /* analog PCM stream */ | 278 | char stream_name_analog[32]; /* analog PCM stream */ |
279 | struct hda_pcm_stream *stream_analog_playback; | 279 | struct hda_pcm_stream *stream_analog_playback; |
280 | struct hda_pcm_stream *stream_analog_capture; | 280 | struct hda_pcm_stream *stream_analog_capture; |
281 | struct hda_pcm_stream *stream_analog_alt_playback; | 281 | struct hda_pcm_stream *stream_analog_alt_playback; |
282 | struct hda_pcm_stream *stream_analog_alt_capture; | 282 | struct hda_pcm_stream *stream_analog_alt_capture; |
283 | 283 | ||
284 | char stream_name_digital[16]; /* digital PCM stream */ | 284 | char stream_name_digital[32]; /* digital PCM stream */ |
285 | struct hda_pcm_stream *stream_digital_playback; | 285 | struct hda_pcm_stream *stream_digital_playback; |
286 | struct hda_pcm_stream *stream_digital_capture; | 286 | struct hda_pcm_stream *stream_digital_capture; |
287 | 287 | ||
@@ -559,7 +559,7 @@ static int alc_pin_mode_get(struct snd_kcontrol *kcontrol, | |||
559 | 559 | ||
560 | /* Find enumerated value for current pinctl setting */ | 560 | /* Find enumerated value for current pinctl setting */ |
561 | i = alc_pin_mode_min(dir); | 561 | i = alc_pin_mode_min(dir); |
562 | while (alc_pin_mode_values[i] != pinctl && i <= alc_pin_mode_max(dir)) | 562 | while (i <= alc_pin_mode_max(dir) && alc_pin_mode_values[i] != pinctl) |
563 | i++; | 563 | i++; |
564 | *valp = i <= alc_pin_mode_max(dir) ? i: alc_pin_mode_min(dir); | 564 | *valp = i <= alc_pin_mode_max(dir) ? i: alc_pin_mode_min(dir); |
565 | return 0; | 565 | return 0; |
@@ -10631,6 +10631,18 @@ static void alc262_lenovo_3000_unsol_event(struct hda_codec *codec, | |||
10631 | alc262_lenovo_3000_automute(codec, 1); | 10631 | alc262_lenovo_3000_automute(codec, 1); |
10632 | } | 10632 | } |
10633 | 10633 | ||
10634 | static int amp_stereo_mute_update(struct hda_codec *codec, hda_nid_t nid, | ||
10635 | int dir, int idx, long *valp) | ||
10636 | { | ||
10637 | int i, change = 0; | ||
10638 | |||
10639 | for (i = 0; i < 2; i++, valp++) | ||
10640 | change |= snd_hda_codec_amp_update(codec, nid, i, dir, idx, | ||
10641 | HDA_AMP_MUTE, | ||
10642 | *valp ? 0 : HDA_AMP_MUTE); | ||
10643 | return change; | ||
10644 | } | ||
10645 | |||
10634 | /* bind hp and internal speaker mute (with plug check) */ | 10646 | /* bind hp and internal speaker mute (with plug check) */ |
10635 | static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol, | 10647 | static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol, |
10636 | struct snd_ctl_elem_value *ucontrol) | 10648 | struct snd_ctl_elem_value *ucontrol) |
@@ -10639,13 +10651,8 @@ static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol, | |||
10639 | long *valp = ucontrol->value.integer.value; | 10651 | long *valp = ucontrol->value.integer.value; |
10640 | int change; | 10652 | int change; |
10641 | 10653 | ||
10642 | change = snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0, | 10654 | change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp); |
10643 | HDA_AMP_MUTE, | 10655 | change |= amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp); |
10644 | valp ? 0 : HDA_AMP_MUTE); | ||
10645 | change |= snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0, | ||
10646 | HDA_AMP_MUTE, | ||
10647 | valp ? 0 : HDA_AMP_MUTE); | ||
10648 | |||
10649 | if (change) | 10656 | if (change) |
10650 | alc262_fujitsu_automute(codec, 0); | 10657 | alc262_fujitsu_automute(codec, 0); |
10651 | return change; | 10658 | return change; |
@@ -10680,10 +10687,7 @@ static int alc262_lenovo_3000_master_sw_put(struct snd_kcontrol *kcontrol, | |||
10680 | long *valp = ucontrol->value.integer.value; | 10687 | long *valp = ucontrol->value.integer.value; |
10681 | int change; | 10688 | int change; |
10682 | 10689 | ||
10683 | change = snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0, | 10690 | change = amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp); |
10684 | HDA_AMP_MUTE, | ||
10685 | valp ? 0 : HDA_AMP_MUTE); | ||
10686 | |||
10687 | if (change) | 10691 | if (change) |
10688 | alc262_lenovo_3000_automute(codec, 0); | 10692 | alc262_lenovo_3000_automute(codec, 0); |
10689 | return change; | 10693 | return change; |
@@ -11854,12 +11858,7 @@ static int alc268_acer_master_sw_put(struct snd_kcontrol *kcontrol, | |||
11854 | long *valp = ucontrol->value.integer.value; | 11858 | long *valp = ucontrol->value.integer.value; |
11855 | int change; | 11859 | int change; |
11856 | 11860 | ||
11857 | change = snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0, | 11861 | change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp); |
11858 | HDA_AMP_MUTE, | ||
11859 | valp[0] ? 0 : HDA_AMP_MUTE); | ||
11860 | change |= snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0, | ||
11861 | HDA_AMP_MUTE, | ||
11862 | valp[1] ? 0 : HDA_AMP_MUTE); | ||
11863 | if (change) | 11862 | if (change) |
11864 | alc268_acer_automute(codec, 0); | 11863 | alc268_acer_automute(codec, 0); |
11865 | return change; | 11864 | return change; |
@@ -12522,8 +12521,6 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = { | |||
12522 | ALC268_TOSHIBA), | 12521 | ALC268_TOSHIBA), |
12523 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), | 12522 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), |
12524 | SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO), | 12523 | SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO), |
12525 | SND_PCI_QUIRK_MASK(0x1179, 0xff00, 0xff00, "TOSHIBA A/Lx05", | ||
12526 | ALC268_TOSHIBA), | ||
12527 | SND_PCI_QUIRK(0x14c0, 0x0025, "COMPAL IFL90/JFL-92", ALC268_TOSHIBA), | 12524 | SND_PCI_QUIRK(0x14c0, 0x0025, "COMPAL IFL90/JFL-92", ALC268_TOSHIBA), |
12528 | SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER), | 12525 | SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER), |
12529 | SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1), | 12526 | SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1), |
@@ -12531,6 +12528,15 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = { | |||
12531 | {} | 12528 | {} |
12532 | }; | 12529 | }; |
12533 | 12530 | ||
12531 | /* Toshiba laptops have no unique PCI SSID but only codec SSID */ | ||
12532 | static struct snd_pci_quirk alc268_ssid_cfg_tbl[] = { | ||
12533 | SND_PCI_QUIRK(0x1179, 0xff0a, "TOSHIBA X-200", ALC268_AUTO), | ||
12534 | SND_PCI_QUIRK(0x1179, 0xff0e, "TOSHIBA X-200 HDMI", ALC268_AUTO), | ||
12535 | SND_PCI_QUIRK_MASK(0x1179, 0xff00, 0xff00, "TOSHIBA A/Lx05", | ||
12536 | ALC268_TOSHIBA), | ||
12537 | {} | ||
12538 | }; | ||
12539 | |||
12534 | static struct alc_config_preset alc268_presets[] = { | 12540 | static struct alc_config_preset alc268_presets[] = { |
12535 | [ALC267_QUANTA_IL1] = { | 12541 | [ALC267_QUANTA_IL1] = { |
12536 | .mixers = { alc267_quanta_il1_mixer, alc268_beep_mixer }, | 12542 | .mixers = { alc267_quanta_il1_mixer, alc268_beep_mixer }, |
@@ -12697,6 +12703,10 @@ static int patch_alc268(struct hda_codec *codec) | |||
12697 | alc268_models, | 12703 | alc268_models, |
12698 | alc268_cfg_tbl); | 12704 | alc268_cfg_tbl); |
12699 | 12705 | ||
12706 | if (board_config < 0 || board_config >= ALC268_MODEL_LAST) | ||
12707 | board_config = snd_hda_check_board_codec_sid_config(codec, | ||
12708 | ALC882_MODEL_LAST, alc268_models, alc268_ssid_cfg_tbl); | ||
12709 | |||
12700 | if (board_config < 0 || board_config >= ALC268_MODEL_LAST) { | 12710 | if (board_config < 0 || board_config >= ALC268_MODEL_LAST) { |
12701 | printk(KERN_INFO "hda_codec: Unknown model for %s, " | 12711 | printk(KERN_INFO "hda_codec: Unknown model for %s, " |
12702 | "trying auto-probe from BIOS...\n", codec->chip_name); | 12712 | "trying auto-probe from BIOS...\n", codec->chip_name); |
@@ -13564,6 +13574,8 @@ static int patch_alc269(struct hda_codec *codec) | |||
13564 | set_capture_mixer(spec); | 13574 | set_capture_mixer(spec); |
13565 | set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); | 13575 | set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); |
13566 | 13576 | ||
13577 | spec->vmaster_nid = 0x02; | ||
13578 | |||
13567 | codec->patch_ops = alc_patch_ops; | 13579 | codec->patch_ops = alc_patch_ops; |
13568 | if (board_config == ALC269_AUTO) | 13580 | if (board_config == ALC269_AUTO) |
13569 | spec->init_hook = alc269_auto_init; | 13581 | spec->init_hook = alc269_auto_init; |
@@ -15158,7 +15170,7 @@ static struct snd_pci_quirk alc861vd_cfg_tbl[] = { | |||
15158 | SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), | 15170 | SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), |
15159 | SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba A135", ALC861VD_LENOVO), | 15171 | SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba A135", ALC861VD_LENOVO), |
15160 | /*SND_PCI_QUIRK(0x1179, 0xff00, "DALLAS", ALC861VD_DALLAS),*/ /*lenovo*/ | 15172 | /*SND_PCI_QUIRK(0x1179, 0xff00, "DALLAS", ALC861VD_DALLAS),*/ /*lenovo*/ |
15161 | SND_PCI_QUIRK(0x1179, 0xff01, "DALLAS", ALC861VD_DALLAS), | 15173 | SND_PCI_QUIRK(0x1179, 0xff01, "Toshiba A135", ALC861VD_LENOVO), |
15162 | SND_PCI_QUIRK(0x1179, 0xff03, "Toshiba P205", ALC861VD_LENOVO), | 15174 | SND_PCI_QUIRK(0x1179, 0xff03, "Toshiba P205", ALC861VD_LENOVO), |
15163 | SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_DALLAS), | 15175 | SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_DALLAS), |
15164 | SND_PCI_QUIRK(0x1565, 0x820d, "Biostar NF61S SE", ALC861VD_6ST_DIG), | 15176 | SND_PCI_QUIRK(0x1565, 0x820d, "Biostar NF61S SE", ALC861VD_6ST_DIG), |
@@ -15578,9 +15590,12 @@ static int patch_alc861vd(struct hda_codec *codec) | |||
15578 | spec->stream_digital_playback = &alc861vd_pcm_digital_playback; | 15590 | spec->stream_digital_playback = &alc861vd_pcm_digital_playback; |
15579 | spec->stream_digital_capture = &alc861vd_pcm_digital_capture; | 15591 | spec->stream_digital_capture = &alc861vd_pcm_digital_capture; |
15580 | 15592 | ||
15581 | spec->adc_nids = alc861vd_adc_nids; | 15593 | if (!spec->adc_nids) { |
15582 | spec->num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids); | 15594 | spec->adc_nids = alc861vd_adc_nids; |
15583 | spec->capsrc_nids = alc861vd_capsrc_nids; | 15595 | spec->num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids); |
15596 | } | ||
15597 | if (!spec->capsrc_nids) | ||
15598 | spec->capsrc_nids = alc861vd_capsrc_nids; | ||
15584 | 15599 | ||
15585 | set_capture_mixer(spec); | 15600 | set_capture_mixer(spec); |
15586 | set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); | 15601 | set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); |
@@ -17497,9 +17512,12 @@ static int patch_alc662(struct hda_codec *codec) | |||
17497 | spec->stream_digital_playback = &alc662_pcm_digital_playback; | 17512 | spec->stream_digital_playback = &alc662_pcm_digital_playback; |
17498 | spec->stream_digital_capture = &alc662_pcm_digital_capture; | 17513 | spec->stream_digital_capture = &alc662_pcm_digital_capture; |
17499 | 17514 | ||
17500 | spec->adc_nids = alc662_adc_nids; | 17515 | if (!spec->adc_nids) { |
17501 | spec->num_adc_nids = ARRAY_SIZE(alc662_adc_nids); | 17516 | spec->adc_nids = alc662_adc_nids; |
17502 | spec->capsrc_nids = alc662_capsrc_nids; | 17517 | spec->num_adc_nids = ARRAY_SIZE(alc662_adc_nids); |
17518 | } | ||
17519 | if (!spec->capsrc_nids) | ||
17520 | spec->capsrc_nids = alc662_capsrc_nids; | ||
17503 | 17521 | ||
17504 | if (!spec->cap_mixer) | 17522 | if (!spec->cap_mixer) |
17505 | set_capture_mixer(spec); | 17523 | set_capture_mixer(spec); |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index da7f9f65c047..6990cfcb6a38 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -76,6 +76,7 @@ enum { | |||
76 | STAC_92HD73XX_AUTO, | 76 | STAC_92HD73XX_AUTO, |
77 | STAC_92HD73XX_NO_JD, /* no jack-detection */ | 77 | STAC_92HD73XX_NO_JD, /* no jack-detection */ |
78 | STAC_92HD73XX_REF, | 78 | STAC_92HD73XX_REF, |
79 | STAC_92HD73XX_INTEL, | ||
79 | STAC_DELL_M6_AMIC, | 80 | STAC_DELL_M6_AMIC, |
80 | STAC_DELL_M6_DMIC, | 81 | STAC_DELL_M6_DMIC, |
81 | STAC_DELL_M6_BOTH, | 82 | STAC_DELL_M6_BOTH, |
@@ -1777,6 +1778,7 @@ static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = { | |||
1777 | [STAC_92HD73XX_AUTO] = "auto", | 1778 | [STAC_92HD73XX_AUTO] = "auto", |
1778 | [STAC_92HD73XX_NO_JD] = "no-jd", | 1779 | [STAC_92HD73XX_NO_JD] = "no-jd", |
1779 | [STAC_92HD73XX_REF] = "ref", | 1780 | [STAC_92HD73XX_REF] = "ref", |
1781 | [STAC_92HD73XX_INTEL] = "intel", | ||
1780 | [STAC_DELL_M6_AMIC] = "dell-m6-amic", | 1782 | [STAC_DELL_M6_AMIC] = "dell-m6-amic", |
1781 | [STAC_DELL_M6_DMIC] = "dell-m6-dmic", | 1783 | [STAC_DELL_M6_DMIC] = "dell-m6-dmic", |
1782 | [STAC_DELL_M6_BOTH] = "dell-m6", | 1784 | [STAC_DELL_M6_BOTH] = "dell-m6", |
@@ -1789,6 +1791,10 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { | |||
1789 | "DFI LanParty", STAC_92HD73XX_REF), | 1791 | "DFI LanParty", STAC_92HD73XX_REF), |
1790 | SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101, | 1792 | SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101, |
1791 | "DFI LanParty", STAC_92HD73XX_REF), | 1793 | "DFI LanParty", STAC_92HD73XX_REF), |
1794 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5002, | ||
1795 | "Intel DG45ID", STAC_92HD73XX_INTEL), | ||
1796 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5003, | ||
1797 | "Intel DG45FC", STAC_92HD73XX_INTEL), | ||
1792 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0254, | 1798 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0254, |
1793 | "Dell Studio 1535", STAC_DELL_M6_DMIC), | 1799 | "Dell Studio 1535", STAC_DELL_M6_DMIC), |
1794 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0255, | 1800 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0255, |
@@ -1809,6 +1815,8 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { | |||
1809 | "Dell Studio 1537", STAC_DELL_M6_DMIC), | 1815 | "Dell Studio 1537", STAC_DELL_M6_DMIC), |
1810 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0, | 1816 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0, |
1811 | "Dell Studio 17", STAC_DELL_M6_DMIC), | 1817 | "Dell Studio 17", STAC_DELL_M6_DMIC), |
1818 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02be, | ||
1819 | "Dell Studio 1555", STAC_DELL_M6_DMIC), | ||
1812 | {} /* terminator */ | 1820 | {} /* terminator */ |
1813 | }; | 1821 | }; |
1814 | 1822 | ||
@@ -2264,7 +2272,7 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = { | |||
2264 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS), | 2272 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS), |
2265 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS), | 2273 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS), |
2266 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS), | 2274 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS), |
2267 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_3ST), | 2275 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_BIOS), |
2268 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS), | 2276 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS), |
2269 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS), | 2277 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS), |
2270 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS), | 2278 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS), |
@@ -4066,7 +4074,7 @@ static int stac92xx_add_jack(struct hda_codec *codec, | |||
4066 | jack->nid = nid; | 4074 | jack->nid = nid; |
4067 | jack->type = type; | 4075 | jack->type = type; |
4068 | 4076 | ||
4069 | sprintf(name, "%s at %s %s Jack", | 4077 | snprintf(name, sizeof(name), "%s at %s %s Jack", |
4070 | snd_hda_get_jack_type(def_conf), | 4078 | snd_hda_get_jack_type(def_conf), |
4071 | snd_hda_get_jack_connectivity(def_conf), | 4079 | snd_hda_get_jack_connectivity(def_conf), |
4072 | snd_hda_get_jack_location(def_conf)); | 4080 | snd_hda_get_jack_location(def_conf)); |
@@ -5643,6 +5651,13 @@ static int patch_stac927x(struct hda_codec *codec) | |||
5643 | /* GPIO2 High = Enable EAPD */ | 5651 | /* GPIO2 High = Enable EAPD */ |
5644 | spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04; | 5652 | spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04; |
5645 | spec->gpio_data = 0x04; | 5653 | spec->gpio_data = 0x04; |
5654 | switch (codec->subsystem_id) { | ||
5655 | case 0x1028022f: | ||
5656 | /* correct EAPD to be GPIO0 */ | ||
5657 | spec->eapd_mask = spec->gpio_mask = 0x01; | ||
5658 | spec->gpio_dir = spec->gpio_data = 0x01; | ||
5659 | break; | ||
5660 | }; | ||
5646 | spec->dmic_nids = stac927x_dmic_nids; | 5661 | spec->dmic_nids = stac927x_dmic_nids; |
5647 | spec->num_dmics = STAC927X_NUM_DMICS; | 5662 | spec->num_dmics = STAC927X_NUM_DMICS; |
5648 | 5663 | ||