[PATCH] Add SubsystemId for usb cards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch add SubsystemId for usb cards, to be able to make changes to 
GetSignalQuality and GetSignalStrength functions.

Jose Alberto
--- vdr-2.1.6/dvbdevice.c	2014-03-16 11:38:31.000000000 +0100
+++ vdr-actual/dvbdevice.c	2014-05-24 13:06:25.358513231 +0200
@@ -1750,12 +1735,26 @@ uint32_t cDvbDeviceProbe::GetSubsystemId
                              if (char *s = ReadLine.Read(f))
                                 SubsystemId = strtoul(s, NULL, 0) << 16;
                              fclose(f);
+                             } else {
+                                FileName = cString::sprintf("/sys/class/dvb/%s/device/idVendor", e->d_name);
+                                if ((f = fopen(FileName, "r")) != NULL) {
+                                   if (char *s = ReadLine.Read(f))
+                                      SubsystemId = strtoul(s, NULL, 16) << 16;
+                                   fclose(f);
+                                }
                              }
                           FileName = cString::sprintf("/sys/class/dvb/%s/device/subsystem_device", e->d_name);
                           if ((f = fopen(FileName, "r")) != NULL) {
                              if (char *s = ReadLine.Read(f))
                                 SubsystemId |= strtoul(s, NULL, 0);
                              fclose(f);
+                             } else {
+                                FileName = cString::sprintf("/sys/class/dvb/%s/device/idProduct", e->d_name);
+                                if ((f = fopen(FileName, "r")) != NULL) {
+                                   if (char *s = ReadLine.Read(f))
+                                      SubsystemId |= strtoul(s, NULL, 16);
+                                   fclose(f);
+                                }
                              }
                           break;
                           }
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux