From 273d74d9b0574e072c359d022f08c996a77b1177 Mon Sep 17 00:00:00 2001 From: Nitin Dhingra Date: Tue, 31 Jan 2012 14:18:15 +0530 Subject: FM Radio: Remove analog volume control - CG2910/05 We have put condition in FM driver to select Analog Volume setting (volume set operation during Rx default setting) only for CG2900, since it is not applicable for CG2910. ST-Ericsson Linux next: Not Tested, ER 373024 ST-Ericsson ID: 373024 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I6e4c0c58c3517ea4db378d1da0f035a02dbc93fe Depends-On: I2aef93cda48a484a52c61dc1359802bac0bd609d Signed-off-by: Nitin Dhingra Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/47151 Reviewed-by: QATOOLS Reviewed-by: QABUILD --- drivers/media/radio/CG2900/cg2900_fm_api.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/media/radio/CG2900/cg2900_fm_api.c b/drivers/media/radio/CG2900/cg2900_fm_api.c index 9f828ebf6e2..95d56bb52a0 100644 --- a/drivers/media/radio/CG2900/cg2900_fm_api.c +++ b/drivers/media/radio/CG2900/cg2900_fm_api.c @@ -1362,17 +1362,22 @@ int cg2900_fm_set_rx_default_settings( goto error; } - /* Set the Analog Out Volume to Max */ - vol_in_percentage = (u8) - (((u16) (MAX_ANALOG_VOLUME) * 100) - / MAX_ANALOG_VOLUME); - result = fmd_set_volume(vol_in_percentage); - if (0 != result) { - FM_ERR_REPORT("cg2900_fm_switch_on: " - "FMRSetVolume failed %x", - (unsigned int)result); - result = -EINVAL; - goto error; + /* Currently, not supported for CG2905/10 */ + if (version_info.revision == CG2900_PG1_REV + || version_info.revision == CG2900_PG2_REV + || version_info.revision == CG2900_PG1_SPECIAL_REV) { + /* Set the Analog Out Volume to Max */ + vol_in_percentage = (u8) + (((u16) (MAX_ANALOG_VOLUME) * 100) + / MAX_ANALOG_VOLUME); + result = fmd_set_volume(vol_in_percentage); + if (0 != result) { + FM_ERR_REPORT("cg2900_fm_switch_on: " + "FMRSetVolume failed %x", + (unsigned int)result); + result = -EINVAL; + goto error; + } } error: -- cgit v1.2.3