summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-01-12 11:42:15 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-01-12 11:42:15 +0100
commit6514649439e7a0209945c70b7da10d6f0e4cb0ae (patch)
tree18548fcacb883481c78a6a8b7c160e6755aab9c8
parent77340e92732b250a20e875f16bad2f85f2e3483b (diff)
downloadvdr-6514649439e7a0209945c70b7da10d6f0e4cb0ae.tar.gz
vdr-6514649439e7a0209945c70b7da10d6f0e4cb0ae.tar.bz2
Added subsystem id support for DVB devices connected via USB
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--dvbdevice.c18
3 files changed, 20 insertions, 1 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 63a0eff1..2a33837a 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2618,6 +2618,7 @@ Jose Alberto Reguero <jareguero@telefonica.net>
for a patch that fixed part of a crash in i18n character set conversion
for fixing cDvbPlayer::NextFile() to handle files larger than 2GB
for implementing full handling of the stream types of Dolby Digital pids
+ for adding subsystem id support for DVB devices connected via USB
Patrice Staudt <staudt@engsystem.net>
for adding full weekday names to i18n.c for plugins to use
diff --git a/HISTORY b/HISTORY
index 9d3d88d1..c6368dce 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8344,3 +8344,5 @@ Video Disk Recorder Revision History
- Fixed support for systemd (thanks to Christopher Reimer).
- Added a missing backslash to the help text of the SVDRP command MOVR (thanks to
Lars Hanisch).
+- Added subsystem id support for DVB devices connected via USB (thanks to Jose
+ Alberto Reguero).
diff --git a/dvbdevice.c b/dvbdevice.c
index fb406f1a..da97567a 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 3.11 2014/03/16 10:38:31 kls Exp $
+ * $Id: dvbdevice.c 3.12 2015/01/12 11:24:51 kls Exp $
*/
#include "dvbdevice.h"
@@ -1751,12 +1751,28 @@ uint32_t cDvbDeviceProbe::GetSubsystemId(int Adapter, int Frontend)
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;
}
}