summaryrefslogtreecommitdiffstats
path: root/qcom
diff options
context:
space:
mode:
authorVenkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>2013-04-30 14:20:42 +0530
committerVenkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>2013-05-02 15:58:33 +0530
commitb5b6d1275940c5f10d1ea8b0a79010c7c3b46332 (patch)
tree76f97287a31c4b71e3ed9515c4daa440c9eb2f50 /qcom
parent6e573927326d03abe024d5b7e6fcc9ebdab71253 (diff)
downloadandroid_hardware_qcom_fm-b5b6d1275940c5f10d1ea8b0a79010c7c3b46332.tar.gz
android_hardware_qcom_fm-b5b6d1275940c5f10d1ea8b0a79010c7c3b46332.tar.bz2
android_hardware_qcom_fm-b5b6d1275940c5f10d1ea8b0a79010c7c3b46332.zip
FM: Configure repeat count for PS string
Added support for setting repeat count for PS string to get refined PS string from receiver. CRs-Fixed: 474719 Change-Id: I709d10a2d8b1693194c3b114ab821bfb8791ed51
Diffstat (limited to 'qcom')
-rw-r--r--qcom/fmradio/FmReceiver.java10
-rw-r--r--qcom/fmradio/FmRxControls.java11
2 files changed, 21 insertions, 0 deletions
diff --git a/qcom/fmradio/FmReceiver.java b/qcom/fmradio/FmReceiver.java
index 3d179af..ac32ff9 100644
--- a/qcom/fmradio/FmReceiver.java
+++ b/qcom/fmradio/FmReceiver.java
@@ -1888,6 +1888,16 @@ public class FmReceiver extends FmTransceiver
return mControl.setCFOMeanTh(sFd, th);
}
+ public boolean setPSRxRepeatCount(int count) {
+ int state = getFMState();
+ /* Check current state of FM device */
+ if (state == FMState_Turned_Off){
+ Log.d(TAG, "setRxRepeatcount failed");
+ return false;
+ }
+ return mControl.setPSRxRepeatCount(sFd, count);
+ }
+
/*==============================================================
FUNCTION: setRdsGroupOptions
==============================================================*/
diff --git a/qcom/fmradio/FmRxControls.java b/qcom/fmradio/FmRxControls.java
index ff3366e..ad69496 100644
--- a/qcom/fmradio/FmRxControls.java
+++ b/qcom/fmradio/FmRxControls.java
@@ -94,6 +94,7 @@ class FmRxControls
private static final int V4L2_CID_PRIVATE_CF0TH12 = V4L2_CID_PRIVATE_BASE + 0x3A;
private static final int V4L2_CID_PRIVATE_SINRFIRSTSTAGE = V4L2_CID_PRIVATE_BASE + 0x3B;
private static final int V4L2_CID_PRIVATE_RMSSIFIRSTSTAGE = V4L2_CID_PRIVATE_BASE + 0x3C;
+ private static final int V4L2_CID_PRIVATE_RXREPEATCOUNT = V4L2_CID_PRIVATE_BASE + 0x3D;
private static final int V4L2_CTRL_CLASS_USER = 0x980000;
private static final int V4L2_CID_BASE = V4L2_CTRL_CLASS_USER | 0x900;
@@ -660,4 +661,14 @@ class FmRxControls
}
}
+ public boolean setPSRxRepeatCount(int fd, int count) {
+ int ret;
+ ret = FmReceiverJNI.setControlNative(fd, V4L2_CID_PRIVATE_RXREPEATCOUNT, count);
+ if (ret < 0) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
}