ALSA: fm801: detect FM-only card earlier
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 21 Dec 2015 17:09:53 +0000 (19:09 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 21 Dec 2015 18:53:50 +0000 (19:53 +0100)
commitb56fa687e02b27f8bd9d282950a88c2ed23d766b
treeea2b9c44eaee4c4e2ea88bb713b09c712f7e3cf5
parentdbec6719ac036f68568d8488805d41346c021eff
ALSA: fm801: detect FM-only card earlier

If user does not supply tea575x_tuner parameter the driver tries to detect the
tuner type. The failed codec initialization is considered as FM-only card
present, however the driver still registers an IRQ handler for it.

Move codec detection earlier to set tea575x_tuner parameter before check.

Here the following functions are introduced
 reset_coded()                       resets AC97 codec
 snd_fm801_chip_multichannel_init()  initializes cards with multichannel support

Fixes: 5618955c4269 (ALSA: fm801: move to pcim_* and devm_* functions)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/fm801.c