summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-07-16 21:40:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-10 10:26:23 +0200
commit5a257454a7f690343b62ca5cf3e316a699a3a7ed (patch)
treeb5e5f6655cb45d74f82ec2d4f00f7dde86d90a7e /sound
parent78db3bcbfc41216230a255984e5e7e5b61b6616e (diff)
ALSA: fm801: Initialize chip after IRQ handler is registered
commit 610e1ae9b533be82b3aa118b907e0a703256913d upstream. The commit b56fa687e02b ("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: b56fa687e02b ("ALSA: fm801: detect FM-only card earlier") Reported-by: Émeric MASCHINO <emeric.maschino@gmail.com> Tested-by: Émeric MASCHINO <emeric.maschino@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: <stable@vger.kernel.org> # v4.5+ Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/fm801.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index 53da0af93506..71a00b55d5ea 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -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;