Add SubsystemId for usb cards
Commit Message
This patch add SubsystemId for usb cards, to be able to make changes to
GetSignalQuality and GetSignalStrength functions.
Jose Alberto
Comments
If the linux-media guys every get their act together in that area,
this wouldn't be necessary. Standardized statistics has been discussed
(at length) a number of times but unfortunately nothing was ever
agreed on and merged.
On Sat, May 24, 2014 at 8:12 AM, Jose Alberto Reguero
<jareguero@telefonica.net> wrote:
> This patch add SubsystemId for usb cards, to be able to make changes to
> GetSignalQuality and GetSignalStrength functions.
>
> Jose Alberto
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>
@@ -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;
}