From 7868f93374f6dd2fe5ba0000dcbb2f03a210dae5 Mon Sep 17 00:00:00 2001
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Date: Fri, 13 Apr 2012 11:17:49 +0200
Subject: [PATCH 2/2] ti-wpan: fix a typo and update for the new videodev2.h header

Change-Id: I0bbfdce1fe21991c9adf2930238d9a0f335fd387
---
 tools/FM/service/src/jni/JFmTxNative.h |   33 +-------------------------------
 tools/kfmapp/kfmapp.h                  |   28 ---------------------------
 2 files changed, 1 insertions(+), 60 deletions(-)

diff --git a/hardware/ti/wpan/tools/FM/service/src/jni/JFmTxNative.h b/hardware/ti/wpan/tools/FM/service/src/jni/JFmTxNative.h
index 24bc455..0dc0e71 100644
--- a/hardware/ti/wpan/tools/FM/service/src/jni/JFmTxNative.h
+++ b/hardware/ti/wpan/tools/FM/service/src/jni/JFmTxNative.h
@@ -42,7 +42,7 @@ extern "C" {
 #define FM_MODE_SWITCH_CTL_NAME   "Mode Switch"
 #define FM_MODE_OFF		   0
 #define FM_MODE_TX		   1
-#define FM_MODE_TX	           2
+#define FM_MODE_RX	           2
 
 #define FM_BAND_SWITCH_CTL_NAME    "Region Switch"
 #define FM_BAND_EUROPE_US          0
@@ -168,37 +168,6 @@ extern void setJBtlEnv(JNIEnv *env);
 
 }
 
-/* Following macros and structs are re-declared since android
-   file system has old videodev2.h but kfmapp needs new K35 videodev2.h
-   declarations, So need to remove these definitions once android headers
-   move to K35 plus */
-
-#define V4L2_CTRL_CLASS_FM_TX 0x009b0000        /* FM Modulator control class */
-/* FM Modulator class control IDs */
-#define V4L2_CID_FM_TX_CLASS_BASE               (V4L2_CTRL_CLASS_FM_TX | 0x900)
-#define V4L2_CID_FM_TX_CLASS                    (V4L2_CTRL_CLASS_FM_TX | 1)
-
-#define V4L2_CID_TUNE_PREEMPHASIS               (V4L2_CID_FM_TX_CLASS_BASE + 112)
-enum v4l2_preemphasis {
-	V4L2_PREEMPHASIS_DISABLED       = 0,
-	V4L2_PREEMPHASIS_50_uS          = 1,
-	V4L2_PREEMPHASIS_75_uS          = 2,
-};
-
-#define V4L2_CID_RDS_TX_DEVIATION               (V4L2_CID_FM_TX_CLASS_BASE + 1)
-#define V4L2_CID_RDS_TX_PI                      (V4L2_CID_FM_TX_CLASS_BASE + 2)
-#define V4L2_CID_RDS_TX_PTY                     (V4L2_CID_FM_TX_CLASS_BASE + 3)
-#define V4L2_CID_RDS_TX_PS_NAME                 (V4L2_CID_FM_TX_CLASS_BASE + 5)
-#define V4L2_CID_RDS_TX_RADIO_TEXT              (V4L2_CID_FM_TX_CLASS_BASE + 6)
-
-#define V4L2_CID_TUNE_POWER_LEVEL               (V4L2_CID_FM_TX_CLASS_BASE + 113)
-#define V4L2_CID_TUNE_ANTENNA_CAPACITOR         (V4L2_CID_FM_TX_CLASS_BASE + 114)
-#define V4L2_TUNER_SUB_RDS              0x0010
-
-
-#undef VIDIOC_S_MODULATOR
-#define VIDIOC_S_MODULATOR    1078220343
-
 struct v4l2_ext_control_kfmapp {
 	__u32 id;
 	__u32 size;
diff --git a/hardware/ti/wpan/tools/kfmapp/kfmapp.h b/hardware/ti/wpan/tools/kfmapp/kfmapp.h
index 1282498..5fbd2fb 100644
--- a/hardware/ti/wpan/tools/kfmapp/kfmapp.h
+++ b/hardware/ti/wpan/tools/kfmapp/kfmapp.h
@@ -90,34 +90,6 @@ struct tx_rds {
         unsigned char   text[25];
         unsigned int    af_freq;
 };
-#define V4L2_CTRL_CLASS_FM_TX 0x009b0000        /* FM Modulator control class */
-/* FM Modulator class control IDs */
-#define V4L2_CID_FM_TX_CLASS_BASE               (V4L2_CTRL_CLASS_FM_TX | 0x900)
-#define V4L2_CID_FM_TX_CLASS                    (V4L2_CTRL_CLASS_FM_TX | 1)
-
-#define V4L2_CID_TUNE_PREEMPHASIS               (V4L2_CID_FM_TX_CLASS_BASE + 112)
-enum v4l2_preemphasis {
-        V4L2_PREEMPHASIS_DISABLED       = 0,
-        V4L2_PREEMPHASIS_50_uS          = 1,
-        V4L2_PREEMPHASIS_75_uS          = 2,
-};
-
-#define V4L2_CID_RDS_TX_DEVIATION               (V4L2_CID_FM_TX_CLASS_BASE + 1)
-#define V4L2_CID_RDS_TX_PI                      (V4L2_CID_FM_TX_CLASS_BASE + 2)
-#define V4L2_CID_RDS_TX_PTY                     (V4L2_CID_FM_TX_CLASS_BASE + 3)
-#define V4L2_CID_RDS_TX_PS_NAME                 (V4L2_CID_FM_TX_CLASS_BASE + 5)
-#define V4L2_CID_RDS_TX_RADIO_TEXT              (V4L2_CID_FM_TX_CLASS_BASE + 6)
-
-#define V4L2_CID_TUNE_POWER_LEVEL               (V4L2_CID_FM_TX_CLASS_BASE + 113)
-#define V4L2_CID_TUNE_ANTENNA_CAPACITOR         (V4L2_CID_FM_TX_CLASS_BASE + 114)
-#define V4L2_TUNER_SUB_RDS              0x0010
-
-/* Following macros and structs are re-declared since android
-file system has old videodev2.h but kfmapp needs new K35 videodev2.h
-declarations, So need to remove these definitions once android headers
-move to K35 plus */
-#undef VIDIOC_S_MODULATOR
-#define VIDIOC_S_MODULATOR    1078220343
 
 struct v4l2_ext_control_kfmapp {
         __u32 id;
-- 
1.7.2.5

