[usbtunerhelper] Fix wrong fec at SET_FRONTEND.
authorhschang <chang@dev3>
Tue, 4 Aug 2015 09:57:58 +0000 (18:57 +0900)
committerhschang <chang@dev3>
Tue, 4 Aug 2015 09:57:58 +0000 (18:57 +0900)
meta-openvuplus/recipes-vuplus/usbtunerhelper/usbtunerhelper.bb
meta-openvuplus/recipes-vuplus/usbtunerhelper/usbtunerhelper/setfrontend_ofdm_fecauto.patch [new file with mode: 0644]

index f93d975..59439c7 100644 (file)
@@ -4,7 +4,7 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
 
 PV = "1.0+git${SRCPV}"
-PR = "r5"
+PR = "r6"
 SRC_REV = ""
 
 SRC_URI = " \
@@ -12,6 +12,7 @@ SRC_URI = " \
        file://no_usb_device.patch;striplevel=1 \
        file://fix_set_delsys.patch \
        file://get_avail_vtuner.patch \
+       file://setfrontend_ofdm_fecauto.patch \
        file://${PN}.sh \
        "
 
diff --git a/meta-openvuplus/recipes-vuplus/usbtunerhelper/usbtunerhelper/setfrontend_ofdm_fecauto.patch b/meta-openvuplus/recipes-vuplus/usbtunerhelper/usbtunerhelper/setfrontend_ofdm_fecauto.patch
new file mode 100644 (file)
index 0000000..91b661f
--- /dev/null
@@ -0,0 +1,33 @@
+diff --git a/usbtunerhelper.c b/usbtunerhelper.c
+index 7906f9b..5bdd359 100644
+--- a/usbtunerhelper.c
++++ b/usbtunerhelper.c
+@@ -90,6 +90,7 @@ struct vtuner_adapter
+       int firstdata;
+       pthread_t eventthread, pumpthread;
+       __u16 pidlist[30];
++      fe_type_t fe_type;
+ };
+ struct vtuner_adapter adapters[MAX_ADAPTERS];
+@@ -294,6 +295,11 @@ void *event_proc(void *ptr)
+                       {
+                       case MSG_SET_FRONTEND:
+                               adapter->firstdata = 1;
++                              if ((adapter->fe_type == FE_OFDM) && (message.body.dvb_frontend_parameters.u.ofdm.code_rate_HP != FEC_AUTO))
++                              {
++                                      message.body.dvb_frontend_parameters.u.ofdm.code_rate_HP = FEC_AUTO;
++                                      printf("[FE_SET_FRONTEND] OFDM CODE RATE HP SETTED AUTO\n", adapter->vtunerindex);
++                              }
+                               ioctl(adapter->frontend, FE_SET_FRONTEND, &message.body.dvb_frontend_parameters);
+                               break;
+                       case MSG_GET_FRONTEND:
+@@ -585,6 +591,8 @@ int init_adapter(int id)
+               goto error;
+       }
++      adapter->fe_type = fe_info.type;
++
+       ioctl(adapter->vtuner, VTUNER_SET_NAME, adapter->name);
+       ioctl(adapter->vtuner, VTUNER_SET_TYPE, type);
+       ioctl(adapter->vtuner, VTUNER_SET_FE_INFO, &fe_info);