]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
freebsd: Assume all devices on FreeBSD are USB 2.0 per default because
authorBernhard Froehlich <decke@bluelife.at>
Sun, 5 Jan 2014 21:02:18 +0000 (22:02 +0100)
committerBernhard Froehlich <decke@bluelife.at>
Sun, 5 Jan 2014 21:02:18 +0000 (22:02 +0100)
FreeBSD does not have sysfs to read the device speed and type properly.
The good thing is that there are no PCI devices that support V4L right
now so all supported devices are from webcamd which only supports USB
devices so that default is always correct.

src/main.c

index 967eddfb938a282df17f22029971d16ade0c8826..adae1a8bc31e1b12b4a4bb4dee8473fea7ab6819 100644 (file)
@@ -946,8 +946,13 @@ get_device_connection(const char *dev)
   snprintf(path, sizeof(path),  "/sys/class/%s/device/speed", dev);
 
   if(readlinefromfile(path, l, sizeof(l))) {
+#if defined(PLATFORM_FREEBSD)
+    // Assume USB 2.0 on FreeBSD because there are no supported PCI devices
+    return HOSTCONNECTION_USB480;
+#else
     // Unable to read speed, assume it's PCI
     return HOSTCONNECTION_PCI;
+#endif
   } else {
     speed = atoi(l);