aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-02-05 03:09:25 -0500
committerTakashi Iwai <tiwai@suse.de>2010-02-05 03:09:25 -0500
commit794d6206508673d7c7426976d4e78e6af10b3e4f (patch)
treed429dc7a774f9cd5d6b77509edcacdb813831ce3 /sound/pci/hda
parentcec27c891b805b2ab2302f9fcbdacb6f179ac0d4 (diff)
parent9492837a6f54b069e13e40e3c89898bb8837a386 (diff)
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_intel.c22
-rw-r--r--sound/pci/hda/patch_realtek.c7
2 files changed, 23 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 12230a2ed4f..353412bb5cc 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -425,6 +425,7 @@ struct azx {
425 425
426 /* flags */ 426 /* flags */
427 int position_fix; 427 int position_fix;
428 int poll_count;
428 unsigned int running :1; 429 unsigned int running :1;
429 unsigned int initialized :1; 430 unsigned int initialized :1;
430 unsigned int single_cmd :1; 431 unsigned int single_cmd :1;
@@ -505,7 +506,7 @@ static char *driver_short_names[] __devinitdata = {
505#define get_azx_dev(substream) (substream->runtime->private_data) 506#define get_azx_dev(substream) (substream->runtime->private_data)
506 507
507static int azx_acquire_irq(struct azx *chip, int do_disconnect); 508static int azx_acquire_irq(struct azx *chip, int do_disconnect);
508 509static int azx_send_cmd(struct hda_bus *bus, unsigned int val);
509/* 510/*
510 * Interface for HD codec 511 * Interface for HD codec
511 */ 512 */
@@ -663,11 +664,12 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
663{ 664{
664 struct azx *chip = bus->private_data; 665 struct azx *chip = bus->private_data;
665 unsigned long timeout; 666 unsigned long timeout;
667 int do_poll = 0;
666 668
667 again: 669 again:
668 timeout = jiffies + msecs_to_jiffies(1000); 670 timeout = jiffies + msecs_to_jiffies(1000);
669 for (;;) { 671 for (;;) {
670 if (chip->polling_mode) { 672 if (chip->polling_mode || do_poll) {
671 spin_lock_irq(&chip->reg_lock); 673 spin_lock_irq(&chip->reg_lock);
672 azx_update_rirb(chip); 674 azx_update_rirb(chip);
673 spin_unlock_irq(&chip->reg_lock); 675 spin_unlock_irq(&chip->reg_lock);
@@ -675,6 +677,9 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
675 if (!chip->rirb.cmds[addr]) { 677 if (!chip->rirb.cmds[addr]) {
676 smp_rmb(); 678 smp_rmb();
677 bus->rirb_error = 0; 679 bus->rirb_error = 0;
680
681 if (!do_poll)
682 chip->poll_count = 0;
678 return chip->rirb.res[addr]; /* the last value */ 683 return chip->rirb.res[addr]; /* the last value */
679 } 684 }
680 if (time_after(jiffies, timeout)) 685 if (time_after(jiffies, timeout))
@@ -687,6 +692,16 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
687 } 692 }
688 } 693 }
689 694
695 if (!chip->polling_mode && chip->poll_count < 2) {
696 snd_printdd(SFX "azx_get_response timeout, "
697 "polling the codec once: last cmd=0x%08x\n",
698 chip->last_cmd[addr]);
699 do_poll = 1;
700 chip->poll_count++;
701 goto again;
702 }
703
704
690 if (!chip->polling_mode) { 705 if (!chip->polling_mode) {
691 snd_printk(KERN_WARNING SFX "azx_get_response timeout, " 706 snd_printk(KERN_WARNING SFX "azx_get_response timeout, "
692 "switching to polling mode: last cmd=0x%08x\n", 707 "switching to polling mode: last cmd=0x%08x\n",
@@ -2042,7 +2057,7 @@ static int azx_acquire_irq(struct azx *chip, int do_disconnect)
2042{ 2057{
2043 if (request_irq(chip->pci->irq, azx_interrupt, 2058 if (request_irq(chip->pci->irq, azx_interrupt,
2044 chip->msi ? 0 : IRQF_SHARED, 2059 chip->msi ? 0 : IRQF_SHARED,
2045 "HDA Intel", chip)) { 2060 "hda_intel", chip)) {
2046 printk(KERN_ERR "hda-intel: unable to grab IRQ %d, " 2061 printk(KERN_ERR "hda-intel: unable to grab IRQ %d, "
2047 "disabling device\n", chip->pci->irq); 2062 "disabling device\n", chip->pci->irq);
2048 if (do_disconnect) 2063 if (do_disconnect)
@@ -2331,6 +2346,7 @@ static void __devinit check_probe_mask(struct azx *chip, int dev)
2331 */ 2346 */
2332static struct snd_pci_quirk msi_black_list[] __devinitdata = { 2347static struct snd_pci_quirk msi_black_list[] __devinitdata = {
2333 SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */ 2348 SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */
2349 SND_PCI_QUIRK(0x1043, 0x829c, "ASUS", 0), /* nvidia */
2334 {} 2350 {}
2335}; 2351};
2336 2352
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 82772f0ab3e..0c224977c8c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9514,6 +9514,7 @@ static struct alc_config_preset alc882_presets[] = {
9514 .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), 9514 .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes),
9515 .channel_mode = alc883_3ST_6ch_modes, 9515 .channel_mode = alc883_3ST_6ch_modes,
9516 .need_dac_fix = 1, 9516 .need_dac_fix = 1,
9517 .const_channel_count = 6,
9517 .num_mux_defs = 9518 .num_mux_defs =
9518 ARRAY_SIZE(alc888_2_capture_sources), 9519 ARRAY_SIZE(alc888_2_capture_sources),
9519 .input_mux = alc888_2_capture_sources, 9520 .input_mux = alc888_2_capture_sources,
@@ -10423,7 +10424,7 @@ static void alc262_hp_t5735_setup(struct hda_codec *codec)
10423 struct alc_spec *spec = codec->spec; 10424 struct alc_spec *spec = codec->spec;
10424 10425
10425 spec->autocfg.hp_pins[0] = 0x15; 10426 spec->autocfg.hp_pins[0] = 0x15;
10426 spec->autocfg.speaker_pins[0] = 0x0c; /* HACK: not actually a pin */ 10427 spec->autocfg.speaker_pins[0] = 0x14;
10427} 10428}
10428 10429
10429static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = { 10430static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = {
@@ -11852,9 +11853,9 @@ static struct alc_config_preset alc262_presets[] = {
11852 .num_channel_mode = ARRAY_SIZE(alc262_modes), 11853 .num_channel_mode = ARRAY_SIZE(alc262_modes),
11853 .channel_mode = alc262_modes, 11854 .channel_mode = alc262_modes,
11854 .input_mux = &alc262_capture_source, 11855 .input_mux = &alc262_capture_source,
11855 .unsol_event = alc_automute_amp_unsol_event, 11856 .unsol_event = alc_sku_unsol_event,
11856 .setup = alc262_hp_t5735_setup, 11857 .setup = alc262_hp_t5735_setup,
11857 .init_hook = alc_automute_amp, 11858 .init_hook = alc_inithook,
11858 }, 11859 },
11859 [ALC262_HP_RP5700] = { 11860 [ALC262_HP_RP5700] = {
11860 .mixers = { alc262_hp_rp5700_mixer }, 11861 .mixers = { alc262_hp_rp5700_mixer },