Skip to content

Commit

Permalink
ALSA: fm801: Initialize chip after IRQ handler is registered
Browse files Browse the repository at this point in the history
The commit b56fa68 ("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: b56fa68 ("ALSA: fm801: detect FM-only card earlier")
Reported-by: Émeric MASCHINO <[email protected]>
Tested-by: Émeric MASCHINO <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Cc: <[email protected]> # v4.5+
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
andy-shev authored and tiwai committed Jul 18, 2017
1 parent 8954293 commit 610e1ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/pci/fm801.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,8 +1235,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)) {
Expand All @@ -1248,6 +1246,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;
Expand Down

0 comments on commit 610e1ae

Please sign in to comment.