diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-05-30 10:07:09 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-06-06 11:31:52 -0400 |
commit | 5c90680e42b08a1e4a6800ca02e75ad201f8037f (patch) | |
tree | 0504c8eb775c871cfded805e02ec32c41e0e4f91 /sound/pci | |
parent | c67e2228b799ea586f4f6ba7006ce61431f8dde6 (diff) |
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')
-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 aa4d4d716704..3e3126ba8276 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) | |||
3006 | unregister_reboot_notifier(&chip->reboot_notifier); | 3006 | unregister_reboot_notifier(&chip->reboot_notifier); |
3007 | } | 3007 | } |
3008 | 3008 | ||
3009 | static int azx_first_init(struct azx *chip); | ||
3010 | static int azx_probe_continue(struct azx *chip); | 3009 | static int azx_probe_continue(struct azx *chip); |
3011 | 3010 | ||
3012 | #ifdef SUPPORT_VGA_SWITCHEROO | 3011 | #ifdef SUPPORT_VGA_SWITCHEROO |
@@ -3033,8 +3032,7 @@ static void azx_vs_set_state(struct pci_dev *pci, | |||
3033 | snd_printk(KERN_INFO SFX | 3032 | snd_printk(KERN_INFO SFX |
3034 | "%s: Start delayed initialization\n", | 3033 | "%s: Start delayed initialization\n", |
3035 | pci_name(chip->pci)); | 3034 | pci_name(chip->pci)); |
3036 | if (azx_first_init(chip) < 0 || | 3035 | if (azx_probe_continue(chip) < 0) { |
3037 | azx_probe_continue(chip) < 0) { | ||
3038 | snd_printk(KERN_ERR SFX | 3036 | snd_printk(KERN_ERR SFX |
3039 | "%s: initialization error\n", | 3037 | "%s: initialization error\n", |
3040 | pci_name(chip->pci)); | 3038 | pci_name(chip->pci)); |
@@ -3735,11 +3733,6 @@ static int azx_probe(struct pci_dev *pci, | |||
3735 | } | 3733 | } |
3736 | 3734 | ||
3737 | probe_now = !chip->disabled; | 3735 | probe_now = !chip->disabled; |
3738 | if (probe_now) { | ||
3739 | err = azx_first_init(chip); | ||
3740 | if (err < 0) | ||
3741 | goto out_free; | ||
3742 | } | ||
3743 | 3736 | ||
3744 | #ifdef CONFIG_SND_HDA_PATCH_LOADER | 3737 | #ifdef CONFIG_SND_HDA_PATCH_LOADER |
3745 | if (patch[dev] && *patch[dev]) { | 3738 | if (patch[dev] && *patch[dev]) { |
@@ -3776,6 +3769,10 @@ static int azx_probe_continue(struct azx *chip) | |||
3776 | int dev = chip->dev_index; | 3769 | int dev = chip->dev_index; |
3777 | int err; | 3770 | int err; |
3778 | 3771 | ||
3772 | err = azx_first_init(chip); | ||
3773 | if (err < 0) | ||
3774 | goto out_free; | ||
3775 | |||
3779 | #ifdef CONFIG_SND_HDA_INPUT_BEEP | 3776 | #ifdef CONFIG_SND_HDA_INPUT_BEEP |
3780 | chip->beep_mode = beep_mode[dev]; | 3777 | chip->beep_mode = beep_mode[dev]; |
3781 | #endif | 3778 | #endif |