mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 15:02:43 +02:00
libspark/hw_caps: check vfd version first (needed to discriminate between Pingulux and Pingulux Plus)
Origin commit data
------------------
Branch: master
Commit: 2477b3f497
Author: martii <m4rtii@gmx.de>
Date: 2013-08-18 (Sun, 18 Aug 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -39,7 +39,18 @@ hw_caps_t *get_hwcaps(void)
|
||||
const char *tmp;
|
||||
char buf[1024];
|
||||
int len = -1, ret, val;
|
||||
int fd = open("/proc/cmdline", O_RDONLY);
|
||||
int fd = open (FP_DEV, O_RDWR);
|
||||
if (fd != -1) {
|
||||
ret = ioctl(fd, VFDGETVERSION, &val);
|
||||
if (ret < 0)
|
||||
fprintf(stderr, "[hardware_caps] %s: VFDGETVERSION %m\n", __func__);
|
||||
else if (val == 1) { /* VFD, others not yet seen in the wild */
|
||||
caps.display_type = HW_DISPLAY_LINE_TEXT;
|
||||
caps.display_xres = 8;
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
fd = open("/proc/cmdline", O_RDONLY);
|
||||
if (fd != -1) {
|
||||
len = read(fd, buf, sizeof(buf) - 1);
|
||||
close(fd);
|
||||
@@ -62,6 +73,8 @@ hw_caps_t *get_hwcaps(void)
|
||||
case 0x090008:
|
||||
tmp = "Edision Pingulux";
|
||||
caps.has_SCART = 1; // RCA qualifies ... --martii
|
||||
if (caps.display_type == HW_DISPLAY_LINE_TEXT)
|
||||
tmp = "Edision Pingulux Plus";
|
||||
break;
|
||||
case 0x09000a:
|
||||
tmp = "Amiko Alien SDH8900";
|
||||
@@ -146,16 +159,5 @@ hw_caps_t *get_hwcaps(void)
|
||||
tmp = "(NO STB_ID FOUND)";
|
||||
strcpy(caps.boxname, tmp);
|
||||
}
|
||||
fd = open (FP_DEV, O_RDWR);
|
||||
if (fd != -1) {
|
||||
ret = ioctl(fd, VFDGETVERSION, &val);
|
||||
if (ret < 0)
|
||||
fprintf(stderr, "[hardware_caps] %s: VFDGETVERSION %m\n", __func__);
|
||||
else if (val == 1) { /* VFD, others not yet seen in the wild */
|
||||
caps.display_type = HW_DISPLAY_LINE_TEXT;
|
||||
caps.display_xres = 8;
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
return ∩︀
|
||||
}
|
||||
|
Reference in New Issue
Block a user