summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-11-27 16:52:54 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 21:42:16 +0100
commit0731160aca15df5882387e07d61671e6746c658f (patch)
tree0c6945f465424337ee44fa9dcc28e8eefa878ad6 /drivers/media/video/em28xx
parentem28xx: em2800 chips support max width of 640 (diff)
downloadlinux-0731160aca15df5882387e07d61671e6746c658f.tar.xz
linux-0731160aca15df5882387e07d61671e6746c658f.zip
em28xx: don't load audio modules when AC97 is mis-detected
With em2800 hardware, AC97 hardware can be detected even when it doesn't exist. If, after probing for AC97, the driver won't find a companion chip, simply prevents the load of the audio modules. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r--drivers/media/video/em28xx/em28xx-core.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
index 33586004eb44..3f86d36dff2b 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -533,8 +533,15 @@ int em28xx_audio_setup(struct em28xx *dev)
vid1 = em28xx_read_ac97(dev, AC97_VENDOR_ID1);
if (vid1 < 0) {
- /* Device likely doesn't support AC97 */
+ /*
+ * Device likely doesn't support AC97
+ * Note: (some) em2800 devices without eeprom reports 0x91 on
+ * CHIPCFG register, even not having an AC97 chip
+ */
em28xx_warn("AC97 chip type couldn't be determined\n");
+ dev->audio_mode.ac97 = EM28XX_NO_AC97;
+ dev->has_alsa_audio = 0;
+ dev->audio_mode.has_audio = 0;
goto init_audio;
}