summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2013-12-27 03:16:13 (GMT)
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-07 07:11:59 (GMT)
commitb99f0aadd33fad269c8e62b5bec8b5c012a44a56 (patch)
treed0836373a7c51f1e8d63be445ccbf391ec952770 /drivers/media/usb/em28xx/em28xx-cards.c
parent9634614f35ec17a4af8660c025122b477dad7d0b (diff)
downloadlinux-b99f0aadd33fad269c8e62b5bec8b5c012a44a56.tar.xz
[media] em28xx: check if a device has audio earlier
Better to split chipset detection from the audio setup. So, move the detection code to em28xx_init_dev(). Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-cards.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-cards.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index b258693..95ba1ce 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -2930,6 +2930,16 @@ static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
}
}
+ if (dev->chip_id == CHIP_ID_EM2870 ||
+ dev->chip_id == CHIP_ID_EM2874 ||
+ dev->chip_id == CHIP_ID_EM28174 ||
+ dev->chip_id == CHIP_ID_EM28178) {
+ /* Digital only device - don't load any alsa module */
+ dev->audio_mode.has_audio = false;
+ dev->has_audio_class = false;
+ dev->has_alsa_audio = false;
+ }
+
if (chip_name != default_chip_name)
printk(KERN_INFO DRIVER_NAME
": chip ID is %s\n", chip_name);
@@ -3199,6 +3209,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
dev->alt = -1;
dev->is_audio_only = has_audio && !(has_video || has_dvb);
dev->has_alsa_audio = has_audio;
+ dev->audio_mode.has_audio = has_audio;
dev->has_video = has_video;
dev->audio_ifnum = ifnum;