diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-05-30 22:07:09 +0800 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-06-06 17:31:52 +0200 |
commit | 5c90680e42b08a1e4a6800ca02e75ad201f8037f (patch) | |
tree | 0504c8eb775c871cfded805e02ec32c41e0e4f91 /sound/pci/hda | |
parent | c67e2228b799ea586f4f6ba7006ce61431f8dde6 (diff) | |
download | kernel_goldelico_gta04-5c90680e42b08a1e4a6800ca02e75ad201f8037f.zip kernel_goldelico_gta04-5c90680e42b08a1e4a6800ca02e75ad201f8037f.tar.gz kernel_goldelico_gta04-5c90680e42b08a1e4a6800ca02e75ad201f8037f.tar.bz2 |
ALSA: hda - Move azx_first_init() into azx_probe_continue()
This is a preliminary work for the upcoming Haswell HDMI audio fixes.
azx_first_init() function can be safely called after the f/w loader,
since the f/w loader doesn't require the sound hardware initialization
beforehand. Moving it into azx_probe_continue() cleans up the code
flow a bit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index aa4d4d7..3e3126b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -3006,7 +3006,6 @@ static void azx_notifier_unregister(struct azx *chip) unregister_reboot_notifier(&chip->reboot_notifier); } -static int azx_first_init(struct azx *chip); static int azx_probe_continue(struct azx *chip); #ifdef SUPPORT_VGA_SWITCHEROO @@ -3033,8 +3032,7 @@ static void azx_vs_set_state(struct pci_dev *pci, snd_printk(KERN_INFO SFX "%s: Start delayed initialization\n", pci_name(chip->pci)); - if (azx_first_init(chip) < 0 || - azx_probe_continue(chip) < 0) { + if (azx_probe_continue(chip) < 0) { snd_printk(KERN_ERR SFX "%s: initialization error\n", pci_name(chip->pci)); @@ -3735,11 +3733,6 @@ static int azx_probe(struct pci_dev *pci, } probe_now = !chip->disabled; - if (probe_now) { - err = azx_first_init(chip); - if (err < 0) - goto out_free; - } #ifdef CONFIG_SND_HDA_PATCH_LOADER if (patch[dev] && *patch[dev]) { @@ -3776,6 +3769,10 @@ static int azx_probe_continue(struct azx *chip) int dev = chip->dev_index; int err; + err = azx_first_init(chip); + if (err < 0) + goto out_free; + #ifdef CONFIG_SND_HDA_INPUT_BEEP chip->beep_mode = beep_mode[dev]; #endif |