summaryrefslogtreecommitdiff
path: root/meta-openvuplus/recipes-vuplus/aio-grab
diff options
context:
space:
mode:
authorhschang <chang@dev3>2019-09-30 05:54:06 (GMT)
committerhschang <chang@dev3>2019-09-30 05:54:06 (GMT)
commit2186911eda18e0c8182881ba322524d9ba4f756f (patch)
treee7c2710448b7d754658c9d805bf9a5b374e65df6 /meta-openvuplus/recipes-vuplus/aio-grab
parent9b256d49c210722f5d12b26c9e5284cd88ea4b12 (diff)
[aio-grab] support new LNB chip.
Diffstat (limited to 'meta-openvuplus/recipes-vuplus/aio-grab')
-rwxr-xr-xmeta-openvuplus/recipes-vuplus/aio-grab/aio-grab.bb4
-rw-r--r--meta-openvuplus/recipes-vuplus/aio-grab/aio-grab/aio-grab_vuplus_22f13d68e322e0609f457282ed5bf19376397f29.patch (renamed from meta-openvuplus/recipes-vuplus/aio-grab/aio-grab/aio-grab_vuplus_c469655e3498abdb58a36b4f62edbd9699ff6f84.patch)45
2 files changed, 29 insertions, 20 deletions
diff --git a/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab.bb b/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab.bb
index 5d727a5..1d38c39 100755
--- a/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab.bb
+++ b/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab.bb
@@ -2,13 +2,13 @@ SUMMARY = "Screen grabber for Set-Top-Boxes"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
SRCREV = "8394e1ba98c73d7c56d3235ef16cce253dc597cd"
-PR = "r5"
+PR = "r6"
DEPENDS = "jpeg libpng"
SRC_URI = " \
git://schwerkraft.elitedvb.net/aio-grab/aio-grab.git;protocol=git;tag=${SRCREV} \
- file://aio-grab_vuplus_c469655e3498abdb58a36b4f62edbd9699ff6f84.patch;striplevel=1 \
+ file://aio-grab_vuplus_22f13d68e322e0609f457282ed5bf19376397f29.patch;striplevel=1 \
"
S = "${WORKDIR}/git"
diff --git a/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab/aio-grab_vuplus_c469655e3498abdb58a36b4f62edbd9699ff6f84.patch b/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab/aio-grab_vuplus_22f13d68e322e0609f457282ed5bf19376397f29.patch
index 884a908..be80466 100644
--- a/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab/aio-grab_vuplus_c469655e3498abdb58a36b4f62edbd9699ff6f84.patch
+++ b/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab/aio-grab_vuplus_22f13d68e322e0609f457282ed5bf19376397f29.patch
@@ -8,7 +8,7 @@ index ccfb515..a6f8d11 100644
stamp-h1
+aio-grab_vuplus_*
diff --git a/main.c b/main.c
-index 190ff5f..0a4cc01 100644
+index 190ff5f..c6cb750 100644
--- a/main.c
+++ b/main.c
@@ -1,5 +1,5 @@
@@ -41,8 +41,8 @@ index 190ff5f..0a4cc01 100644
+#define IS_VUPLUS 1
+#if IS_VUPLUS
-+enum {UNKNOWN,PALLAS,VULCAN,XILLEON,BRCM7401,BRCM7400,BRCM7405,BRCM7335,BRCM7325,BRCM7346,BRCM7425,BRCM7362,BRCM_ARM};
-+char *stb_name[]={"unknown","Pallas","Vulcan","Xilleon","Brcm7401","Brcm7400","Brcm7405","Brcm7335","Brcm7325","Brcm7346","Brcm7425\/7241","Brcm7362", "Brcm_ARM"};
++enum {UNKNOWN,PALLAS,VULCAN,XILLEON,BRCM7401,BRCM7400,BRCM7405,BRCM7335,BRCM7325,BRCM7346,BRCM7425,BRCM7362,BRCM73625,BRCM_ARM};
++char *stb_name[]={"unknown","Pallas","Vulcan","Xilleon","Brcm7401","Brcm7400","Brcm7405","Brcm7335","Brcm7325","Brcm7346","Brcm7425\/7241","Brcm7362", "Brcm73625", "Brcm_ARM"};
+#else
enum {UNKNOWN,PALLAS,VULCAN,XILLEON,BRCM7401,BRCM7400,BRCM7405};
static const char *stb_name[]={"unknown","Pallas","Vulcan","Xilleon","Brcm7401","Brcm7400","Brcm7405"};
@@ -72,7 +72,7 @@ index 190ff5f..0a4cc01 100644
unsigned int xres_v = 0,yres_v = 0,xres_o,yres_o,xres,yres,aspect,width;
int c,osd_only,video_only,use_osd_res,use_png,use_jpg,jpg_quality,no_aspect,use_letterbox;
-@@ -205,11 +221,45 @@ int main(int argc, char **argv) {
+@@ -205,11 +221,47 @@ int main(int argc, char **argv) {
char filename[256] = { "/tmp/screenshot.bmp" };
// detect STB
@@ -101,6 +101,8 @@ index 190ff5f..0a4cc01 100644
+ stb_type=BRCM7425;
+ else if (strstr(upcase(line),"7241"))
+ stb_type=BRCM7425;
++ else if (strstr(upcase(line),"73625"))
++ stb_type=BRCM73625;
+ else if (strstr(upcase(line),"7362"))
+ stb_type=BRCM7362;
+ else if (strstr(upcase(line),"7366"))
@@ -119,7 +121,7 @@ index 190ff5f..0a4cc01 100644
line = file_getline("/proc/stb/info/model");
if (line == NULL)
return 1;
-@@ -221,6 +271,7 @@ int main(int argc, char **argv) {
+@@ -221,6 +273,7 @@ int main(int argc, char **argv) {
!strcmp(line, "dm800se") ||
!strcmp(line, "dm7020hd"))
stb_type = BRCM7405;
@@ -127,7 +129,7 @@ index 190ff5f..0a4cc01 100644
} else if (strstr(line, "xilleonfb")) {
stb_type = XILLEON;
} else if (strstr(line, "Pallas FB")) {
-@@ -325,9 +376,18 @@ int main(int argc, char **argv) {
+@@ -325,9 +378,18 @@ int main(int argc, char **argv) {
if (!video_only && !getosd(osd, &xres_o, &yres_o))
return 1;
@@ -149,7 +151,7 @@ index 190ff5f..0a4cc01 100644
// get aspect ratio
if (stb_type == VULCAN || stb_type == PALLAS)
-@@ -549,6 +609,22 @@ int main(int argc, char **argv) {
+@@ -549,6 +611,22 @@ int main(int argc, char **argv) {
}
// grabing the video picture
@@ -172,13 +174,13 @@ index 190ff5f..0a4cc01 100644
static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yres)
{
-@@ -563,16 +639,34 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -563,16 +641,34 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
perror("/dev/mem");
return false;
}
-
+#if IS_VUPLUS
-+ if (stb_type == BRCM7401 || stb_type == BRCM7400 || stb_type == BRCM7405 || stb_type == BRCM7335 || stb_type == BRCM7325 || stb_type == BRCM7346 || stb_type == BRCM7425 || stb_type == BRCM7362)
++ if (stb_type == BRCM7401 || stb_type == BRCM7400 || stb_type == BRCM7405 || stb_type == BRCM7335 || stb_type == BRCM7325 || stb_type == BRCM7346 || stb_type == BRCM7425 || stb_type == BRCM7362 || stb_type == BRCM73625)
+#else
if (stb_type == BRCM7401 || stb_type == BRCM7400 || stb_type == BRCM7405)
+#endif
@@ -209,7 +211,7 @@ index 190ff5f..0a4cc01 100644
unsigned char data[100];
unsigned int adr,adr2,ofs,ofs2,offset/*,vert_start,vert_end*/;
-@@ -582,12 +676,30 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -582,12 +678,37 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
memcpy(data,memory,100);
//vert_start=data[0x1B]<<8|data[0x1A];
//vert_end=data[0x19]<<8|data[0x18];
@@ -221,6 +223,13 @@ index 190ff5f..0a4cc01 100644
+ adr=(data[0x1f]<<24|data[0x1e]<<16|data[0x1d]<<8|data[0x1c])&0xFFFFFF00;
+ adr2=(data[0x23]<<24|data[0x22]<<16|data[0x21]<<8|data[0x20])&0xFFFFFF00;
+ offset=adr2-adr;
++ } else if(stb_type == BRCM73625) {
++ stride=data[0x19]<<8|data[0x18];
++ ofs=(data[0x54]<<8|data[0x53])>>4;
++ ofs2=(data[0x58]<<8|data[0x57])>>4;
++ adr=(data[0x37]<<24|data[0x36]<<16|data[0x35]<<8|data[0x34])&0xFFFFFF00;
++ adr2=(data[0x3f]<<24|data[0x3e]<<16|data[0x3d]<<8|data[0x3c])&0xFFFFFF00;
++ offset=adr2-adr;
+ } else {
+ stride=data[0x15]<<8|data[0x14];
+ ofs=(data[0x3c]<<8|data[0x3b])>>4;
@@ -240,19 +249,19 @@ index 190ff5f..0a4cc01 100644
munmap(memory, 100);
-@@ -609,7 +721,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -609,7 +730,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
assert(chroma);
// grabbing luma & chroma plane from the decoder memory
+#if IS_VUPLUS
-+ if (stb_type == BRCM7401 || stb_type == BRCM7405 || stb_type == BRCM7325 || stb_type == BRCM7346 || stb_type == BRCM7425 || stb_type == BRCM7362 ) {
++ if (stb_type == BRCM7401 || stb_type == BRCM7405 || stb_type == BRCM7325 || stb_type == BRCM7346 || stb_type == BRCM7425 || stb_type == BRCM7362 || stb_type == BRCM73625) {
+#else
if (stb_type == BRCM7401 || stb_type == BRCM7405) {
+#endif
// on dm800/dm500hd we have direct access to the decoder memory
memory = mmap(0, offset + stride*(ofs2+64), PROT_READ, MAP_SHARED, mem_fd, adr);
if (memory == MAP_FAILED) {
-@@ -620,7 +736,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -620,7 +745,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
usleep(50000); // we try to get a full picture, its not possible to get a sync from the decoder so we use a delay
// and hope we get a good timing. dont ask me why, but every DM800 i tested so far produced a good
// result with a 50ms delay
@@ -264,7 +273,7 @@ index 190ff5f..0a4cc01 100644
// on dm8000 we have to use dma, so dont change anything here until you really know what you are doing !
unsigned int i = 0;
-@@ -639,7 +759,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -639,7 +768,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
}
volatile unsigned long *mem_dma;
@@ -276,7 +285,7 @@ index 190ff5f..0a4cc01 100644
if (mem_dma == MAP_FAILED) {
perror("mmap");
return false;
-@@ -675,8 +799,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -675,8 +808,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
unsigned int t = 0, t2 = 0, dat1 = 0;
unsigned int chr_luma_stride = 0x40;
unsigned int sw;
@@ -289,7 +298,7 @@ index 190ff5f..0a4cc01 100644
chr_luma_stride *= 2;
xsub=chr_luma_stride;
-@@ -692,6 +819,7 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -692,6 +828,7 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
for (ytmp = 0; ytmp < ofs; ytmp++)
{
memcpy(luma + dat1, memory + t, xsub); // luma
@@ -297,13 +306,13 @@ index 190ff5f..0a4cc01 100644
t += chr_luma_stride;
switch (ofs2-ytmp) // the two switch commands are much faster than one if statement
-@@ -710,10 +838,17 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -710,10 +847,17 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
dat1+=stride;
}
}
-
+#if IS_VUPLUS
-+ if (stb_type == BRCM7401 || stb_type == BRCM7405 || stb_type == BRCM7325 || stb_type == BRCM7346 || stb_type == BRCM7425 || stb_type == BRCM7362) {
++ if (stb_type == BRCM7401 || stb_type == BRCM7405 || stb_type == BRCM7325 || stb_type == BRCM7346 || stb_type == BRCM7425 || stb_type == BRCM7362 || stb_type == BRCM73625) {
+#else
if (stb_type == BRCM7401 || stb_type == BRCM7405)
+#endif