diff options
author | Satish Kodishala <skodisha@codeaurora.org> | 2014-08-22 16:11:16 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-08-26 22:06:47 -0700 |
commit | c5d940d803fc9a4f75d1dc7763ee0303d4d27ef6 (patch) | |
tree | 1bb21942b4d6327d80777bf6f100989778504a5a /qcom | |
parent | fccef14765bb2cb96406ff515ba9f90f388ef77f (diff) | |
download | android_hardware_qcom_fm-c5d940d803fc9a4f75d1dc7763ee0303d4d27ef6.tar.gz android_hardware_qcom_fm-c5d940d803fc9a4f75d1dc7763ee0303d4d27ef6.tar.bz2 android_hardware_qcom_fm-c5d940d803fc9a4f75d1dc7763ee0303d4d27ef6.zip |
FM: Add RFstats app support for Silabs chip
Add RFstats app support for Silabs chip to be
able to configure performance parameters.
CRs-fixed: 713647
Change-Id: I7946eb54ed0627dbce95010b0b52c2de1c94d166
Diffstat (limited to 'qcom')
-rw-r--r-- | qcom/fmradio/FmReceiver.java | 108 | ||||
-rw-r--r-- | qcom/fmradio/FmRxControls.java | 60 |
2 files changed, 168 insertions, 0 deletions
diff --git a/qcom/fmradio/FmReceiver.java b/qcom/fmradio/FmReceiver.java index 832cb29..3f5eb62 100644 --- a/qcom/fmradio/FmReceiver.java +++ b/qcom/fmradio/FmReceiver.java @@ -2493,6 +2493,114 @@ public class FmReceiver extends FmTransceiver } /*============================================================== + FUNCTION: setRssiThreshold + ==============================================================*/ + /** + * Sets the RSSI threshold value + * + * <p> + * This method sets the RSSI threshold value. + * + * <p> + */ + public boolean setRssiThreshold(int data) + { + int re = mControl.setRssiThreshold(sFd, data); + if (re < 0) + return false; + else + return true; + } + +/*============================================================== + FUNCTION: getRssiThreshold + ==============================================================*/ + /** + * Gets the Rssi threshold value + * + * <p> + * This method gets the currently set Rssi threshold value. + * + * <p> + */ + public int getRssiThreshold() + { + return mControl.getRssiThreshold(sFd); + } + +/*============================================================== + FUNCTION: setAfJumpRssiThreshold + ==============================================================*/ + /** + * Sets the Af jump RSSI threshold value + * + * <p> + * This method sets the AF jump RSSI threshold value. + * + * <p> + */ + public boolean setAfJumpRssiThreshold(int data) + { + int re = mControl.setAfJumpRssiThreshold(sFd, data); + if (re < 0) + return false; + else + return true; + } + +/*============================================================== + FUNCTION: getAfJumpRssiThreshold + ==============================================================*/ + /** + * Gets the Af jump RSSI threshold value + * + * <p> + * This method gets the currently set AF jump RSSI threshold value. + * + * <p> + */ + public int getAfJumpRssiThreshold() + { + return mControl.getAfJumpRssiThreshold(sFd); + } + +/*============================================================== + FUNCTION: setRdsFifoCnt + ==============================================================*/ + /** + * Sets the RDS FIFO count value + * + * <p> + * This method sets the RDS FIFO count value. + * + * <p> + */ + public boolean setRdsFifoCnt(int data) + { + int re = mControl.setRdsFifoCnt(sFd, data); + if (re < 0) + return false; + else + return true; + } + +/*============================================================== + FUNCTION: getRdsFifoCnt + ==============================================================*/ + /** + * Gets the RDS FIFO count value + * + * <p> + * This method gets the currently set RDS FIFO count value. + * + * <p> + */ + public int getRdsFifoCnt() + { + return mControl.getRdsFifoCnt(sFd); + } + +/*============================================================== FUNCTION: setSINRsamples ==============================================================*/ /** diff --git a/qcom/fmradio/FmRxControls.java b/qcom/fmradio/FmRxControls.java index ad69496..b959b70 100644 --- a/qcom/fmradio/FmRxControls.java +++ b/qcom/fmradio/FmRxControls.java @@ -72,6 +72,7 @@ class FmRxControls private static final int V4L2_CID_PRIVATE_TAVARUA_RDSON = V4L2_CID_PRIVATE_BASE + 15; private static final int V4L2_CID_PRIVATE_TAVARUA_RDSGROUP_PROC = V4L2_CID_PRIVATE_BASE + 16; private static final int V4L2_CID_PRIVATE_TAVARUA_LP_MODE = V4L2_CID_PRIVATE_BASE + 17; + private static final int V4L2_CID_PRIVATE_TAVARUA_RDSD_BUF = V4L2_CID_PRIVATE_BASE + 19; private static final int V4L2_CID_PRIVATE_TAVARUA_IOVERC = V4L2_CID_PRIVATE_BASE + 24; private static final int V4L2_CID_PRIVATE_TAVARUA_INTDET = V4L2_CID_PRIVATE_BASE + 25; private static final int V4L2_CID_PRIVATE_TAVARUA_MPX_DCC = V4L2_CID_PRIVATE_BASE + 26; @@ -95,6 +96,8 @@ class FmRxControls 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_CID_PRIVATE_RSSI_TH = V4L2_CID_PRIVATE_BASE + 0x3E; + private static final int V4L2_CID_PRIVATE_AF_JUMP_RSSI_TH = V4L2_CID_PRIVATE_BASE + 0x3F; private static final int V4L2_CTRL_CLASS_USER = 0x980000; private static final int V4L2_CID_BASE = V4L2_CTRL_CLASS_USER | 0x900; @@ -225,6 +228,63 @@ class FmRxControls } /* + * Set rssi threshold + */ + public int setRssiThreshold(int fd, int sBuff) + { + int re = FmReceiverJNI.setControlNative(fd, V4L2_CID_PRIVATE_RSSI_TH, sBuff); + if ( re < 0) + Log.e(TAG, "Failed to set RSSI threshold data"); + return re; + } + + /* + * Get Rssi threshold + */ + public int getRssiThreshold(int fd) + { + return FmReceiverJNI.getControlNative(fd, V4L2_CID_PRIVATE_RSSI_TH); + } + + /* + * Set AF jump rssi threshold + */ + public int setAfJumpRssiThreshold(int fd, int sBuff) + { + int re = FmReceiverJNI.setControlNative(fd, V4L2_CID_PRIVATE_AF_JUMP_RSSI_TH, sBuff); + if ( re < 0) + Log.e(TAG, "Failed to set AF Jump Rssithreshold data"); + return re; + } + + /* + * Get AF jump Rssi threshold + */ + public int getAfJumpRssiThreshold(int fd) + { + return FmReceiverJNI.getControlNative(fd, V4L2_CID_PRIVATE_AF_JUMP_RSSI_TH); + } + + /* + * Set RDS FIFO count + */ + public int setRdsFifoCnt(int fd, int sBuff) + { + int re = FmReceiverJNI.setControlNative(fd, V4L2_CID_PRIVATE_TAVARUA_RDSD_BUF, sBuff); + if ( re < 0) + Log.e(TAG, "Failed to set RDS fifo count data"); + return re; + } + + /* + * Get RDS FIFO count + */ + public int getRdsFifoCnt(int fd) + { + return FmReceiverJNI.getControlNative(fd, V4L2_CID_PRIVATE_TAVARUA_RDSD_BUF); + } + + /* * Set number of sinr samples to take in to account for SINR avg calculation */ public int setSINRsamples(int fd, int sBuff) |