V4L/DVB (10125): em28xx: Don't do AC97 vendor detection for i2s audio devices
authorDevin Heitmueller <dheitmueller@linuxtv.org>
Tue, 30 Dec 2008 03:17:09 +0000 (00:17 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 30 Dec 2008 11:40:38 +0000 (09:40 -0200)
The current code was trying to query the AC97 registers for the vendor
information even if it was clearly not a AC97 audio device (resulting in errors
in the dmesg output).  This was due to a bug in the way we did the check.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/em28xx/em28xx-core.c

index 5d14822..f850451 100644 (file)
@@ -497,7 +497,8 @@ int em28xx_audio_setup(struct em28xx *dev)
                dev->audio_mode.i2s_5rates = 1;
        }
 
-       if (!(cfg & EM28XX_CHIPCFG_AC97)) {
+       if ((cfg & EM28XX_CHIPCFG_AUDIOMASK) != EM28XX_CHIPCFG_AC97) {
+               /* Skip the code that does AC97 vendor detection */
                dev->audio_mode.ac97 = EM28XX_NO_AC97;
                goto init_audio;
        }