summaryrefslogtreecommitdiff
path: root/drivers/media/radio/CG2900/cg2900_fm_driver.h
diff options
context:
space:
mode:
authorAnupam Roy <anupam.roy@stericsson.com>2012-02-06 10:25:38 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:06:03 +0200
commit7433881f47bafb6cb765a8e3b1e422449ac9d2ea (patch)
tree58c138700b1093fe03246f54c3eb73127da7d6f8 /drivers/media/radio/CG2900/cg2900_fm_driver.h
parentd49bd9347fcf6da0addeb8b36aeb13dceeecfa72 (diff)
CG2900 FM Radio: Implement FMR_RP_Stereo_SetControl_BlendingRSSI
This implementation controls the stereo-threshold level by adjusting the min and max RSSI levels. The threshold for switching is optimized(lowered), which was by default a bit too high. ST-Ericsson Linux next: NA ST-Ericsson ID: 410120 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I35e4202de8066dff80f371285eb298caa23b9656 Signed-off-by: Anupam Roy <anupam.roy@stericsson.com> Change-Id: Ibcec6ec65aef6f324810504415b530564ac942b2 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/49998 Reviewed-by: Anurag GUPTA-1 <anurag.gupta@stericsson.com> Reviewed-by: Hemant GUPTA <hemant.gupta@stericsson.com>
Diffstat (limited to 'drivers/media/radio/CG2900/cg2900_fm_driver.h')
-rw-r--r--drivers/media/radio/CG2900/cg2900_fm_driver.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/media/radio/CG2900/cg2900_fm_driver.h b/drivers/media/radio/CG2900/cg2900_fm_driver.h
index b1ddda5f5a8..55ff60035c9 100644
--- a/drivers/media/radio/CG2900/cg2900_fm_driver.h
+++ b/drivers/media/radio/CG2900/cg2900_fm_driver.h
@@ -140,6 +140,12 @@ enum fmd_debug_levels {
* This is just a hexadecimal number with no units.
*/
#define DEFAULT_PEAK_NOISE_VALUE 0x0035
+/* Defines the RF level (at the antenna pin) at which the stereo blending
+ * function will stop limiting the channel separation */
+#define STEREO_BLENDING_MIN_RSSI 0x0005
+/* Defines the RF level (at the antenna pin) at which the stereo blending
+ * function will start limiting the channel separation */
+#define STEREO_BLENDING_MAX_RSSI 0x0100
/*
* Default Average Noise level for a channel to be considered valid for CG2900.
* This is just a hexadecimal number with no units.
@@ -186,6 +192,7 @@ enum fmd_debug_levels {
#define CMD_FMR_RP_GET_RSSI 0x0083
#define CMD_FMR_RP_GET_STATE 0x0063
#define CMD_FMR_RP_STEREO_SET_MODE 0x0123
+#define CMD_FMR_RP_STEREO_SET_CONTROL_BLENDING_RSSI 0x0143
#define CMD_FMR_SET_ANTENNA 0x0663
#define CMD_FMR_SP_AF_SWITCH_GET_RESULT 0x0603
#define CMD_FMR_SP_AF_SWITCH_START 0x04A3
@@ -244,6 +251,7 @@ enum fmd_debug_levels {
#define CMD_SP_TUNE_GET_CHANNEL_PARAM_LEN 0
#define CMD_SP_TUNE_GET_CHANNEL_RSP_PARAM_LEN 1
#define CMD_RP_STEREO_SET_MODE_PARAM_LEN 1
+#define CMD_RP_STEREO_SET_CONTROL_BLENDING_RSSI_PARAM_LEN 2
#define CMD_RP_GET_RSSI_PARAM_LEN 0
#define CMD_RP_GET_RSSI_RSP_PARAM_LEN 1
#define CMD_RP_GET_STATE_PARAM_LEN 0
@@ -800,6 +808,26 @@ int fmd_rx_set_stereo_mode(
);
/**
+ * fmd_rx_set_stereo_ctrl_blending_rssi() - Sets the stereo blending control setting.
+ *
+ * @min_rssi: Defines the RF level (at the antenna pin) at which the stereo blending
+ * function will stop limiting the channel separation
+ * @max_rssi: Defines the RF level (at the antenna pin) at which the stereo blending
+ * function will start limiting the channel separation.
+ *
+ * Returns:
+ * 0, if no error.
+ * -EINVAL, if parameter is invalid.
+ * -ENOEXEC, if preconditions are violated.
+ * -EBUSY, if FM Driver is not in idle state.
+ * -EINVAL, if wrong response received from chip.
+ */
+int fmd_rx_set_stereo_ctrl_blending_rssi(
+ u16 min_rssi,
+ u16 max_rssi
+ );
+
+/**
* fmd_rx_get_stereo_mode() - Gets the currently used FM mode.
*
* FMD_STEREOMODE_MONO, FMD_STEREOMODE_STEREO and