ALSA: hda: remember last command for each codec

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by Wu Fengguang and committed by Takashi Iwai feb27340 c32649fe

+6 -5
+6 -5
sound/pci/hda/hda_intel.c
··· 418 418 unsigned int probing :1; /* codec probing phase */ 419 419 420 420 /* for debugging */ 421 - unsigned int last_cmd; /* last issued command (to sync) */ 421 + unsigned int last_cmd[AZX_MAX_CODECS]; 422 422 423 423 /* for pending irqs */ 424 424 struct work_struct irq_pending_work; ··· 668 668 669 669 if (chip->msi) { 670 670 snd_printk(KERN_WARNING SFX "No response from codec, " 671 - "disabling MSI: last cmd=0x%08x\n", chip->last_cmd); 671 + "disabling MSI: last cmd=0x%08x\n", 672 + chip->last_cmd[addr]); 672 673 free_irq(chip->irq, chip); 673 674 chip->irq = -1; 674 675 pci_disable_msi(chip->pci); ··· 684 683 if (!chip->polling_mode) { 685 684 snd_printk(KERN_WARNING SFX "azx_get_response timeout, " 686 685 "switching to polling mode: last cmd=0x%08x\n", 687 - chip->last_cmd); 686 + chip->last_cmd[addr]); 688 687 chip->polling_mode = 1; 689 688 goto again; 690 689 } ··· 708 707 709 708 snd_printk(KERN_ERR "hda_intel: azx_get_response timeout, " 710 709 "switching to single_cmd mode: last cmd=0x%08x\n", 711 - chip->last_cmd); 710 + chip->last_cmd[addr]); 712 711 chip->single_cmd = 1; 713 712 bus->response_reset = 0; 714 713 /* re-initialize CORB/RIRB */ ··· 795 794 { 796 795 struct azx *chip = bus->private_data; 797 796 798 - chip->last_cmd = val; 797 + chip->last_cmd[azx_command_addr(val)] = val; 799 798 if (chip->single_cmd) 800 799 return azx_single_send_cmd(bus, val); 801 800 else