Commit b773e274 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Kleber Sacilotto de Souza

ALSA: fm801: Initialize chip after IRQ handler is registered

BugLink: https://bugs.launchpad.net/bugs/1878232

commit 610e1ae9 upstream.

The commit b56fa687 ("ALSA: fm801: detect FM-only card earlier")
rearranged initialization calls, i.e. it makes snd_fm801_chip_init() to
be called before we register interrupt handler and set PCI bus
mastering.

Somehow it prevents FM801-AU to work properly. Thus, partially revert
initialization order changed by commit mentioned above.

Fixes: b56fa687 ("ALSA: fm801: detect FM-only card earlier")
Reported-by: default avatarÉmeric MASCHINO <emeric.maschino@gmail.com>
Tested-by: default avatarÉmeric MASCHINO <emeric.maschino@gmail.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: <stable@vger.kernel.org> # v4.5+
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 7d7eb66c
......@@ -1225,8 +1225,6 @@ static int snd_fm801_create(struct snd_card *card,
}
}
snd_fm801_chip_init(chip);
if ((chip->tea575x_tuner & TUNER_ONLY) == 0) {
if (devm_request_irq(&pci->dev, pci->irq, snd_fm801_interrupt,
IRQF_SHARED, KBUILD_MODNAME, chip)) {
......@@ -1238,6 +1236,8 @@ static int snd_fm801_create(struct snd_card *card,
pci_set_master(pci);
}
snd_fm801_chip_init(chip);
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
snd_fm801_free(chip);
return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment