Commit Graph

8 Commits

Author SHA1 Message Date
Michael Bestas
e33227ed63 libfmjni: Resolve property isolation issues
* Set system instead of vendor properties for FM init
  on devices that don't use firmware download.
* Shut the radio down properly while we are at it.

Change-Id: I8f77a4f822ec8c609fe3526d7e96ea19d46cb1f8
2020-04-23 18:38:52 +03:00
Adithya R
b221d13da7 libfmjni: Fix wrong BT SOC property name
Derp by CAF

Author: Atman <masteratman@gmail.com>
Date:   Mon Jun 3 19:29:05 2019 +0000

    Partially revert "fm: Fix wrong BT SOC property name"

    It makes no sense to use vendor.qcom.bluetoth.soc prop because FMApp is located in /system and after
    the vendor-system isolation, the FMApp can't read the aforementioned prop.

    We should be reading the vendor.bluetooth.soc prop which resides in system which
    the FMApp can actually read after the enforced isolation.

    A recursive grep actually confirms that the prop is being used in stock blobs.

    This also addresses the issue of hal_bluetooth_qti, hal_audio_default trying to read vendor.qcom.bluetooth.soc.

    The device is expected to declare vendor.bluetooth.soc in system.prop.

    This partially reverts commit 518b8c1609a0763544fc0aa268e4de57be70ef75.

    Change-Id: I461e63c25c241361c0a87ce23c04e16cfb7280a0
    Signed-off-by: Atman <masteratman@gmail.com>

Change-Id: Ice597f953e5a2ac363d483649b78fd8bfeffa8a8
2019-10-03 19:12:25 +03:00
Adrian DC
1c877cc00a libfmjni: Resolve FM_DEVICE_PATH R/O open flag
* libfm_jni/FmRadioController.cpp:96:58:
    error: 'open' has superfluous mode bits; missing O_CREAT?

 * jni/android_hardware_fm.cpp:668:47:
    error: 'open' has superfluous mode bits; missing O_CREAT?

Change-Id: I3f4f3bf4e27ea55539ec81b2e59b17be6dcb0892
2019-10-03 19:12:25 +03:00
Adrian DC
38e4935acb libfmjni: Remove unused variables
* libfm_jni/FmPerformanceParams.cpp:
    443:16: error: unused variable 'sinr'

 * libfm_jni/ConfigFmThs.cpp:
    425:17: error: unused variable 'ret'
    433:9: error: unused variable 'value'
    566:9: error: unused variable 'index'

 * libfm_jni/ConfFileParser.cpp:
    328:16: error: unused variable 'num_of_keys'
    536:9: error: unused variable 'grp_name'
    537:16: error: unused variable 'len'
    732:13: error: unused function 'key_exist'

 * libfm_jni/FmRadioController.cpp:
    651:9: error: unused variable 'stationList

 * libfm_jni/FmPerformanceParams.cpp:
    442:16: error: unused variable 'sinr'

Change-Id: I9c4839d1bc8b64c536b8a7db7c2094001f2562ba
2019-10-03 19:12:25 +03:00
AdrianDC
589a1dd62c libfmjni: Improve and fix FM jni logs
* Log cur_fm_state as Debug instead of Error
 * Log successful and state logs as Debug and Info instead of Error
 * Log step by step firmware download as Info and Debug
 * Fix logging of the is_rds_support
 * Add __func__ name for the cur_fm_state logs
 * Add a cur_fm_state log for Stop_Scan_Seek
 * Add missing LOG_TAG for all sources using ALOG*
 * Avoid double log on error in IsRdsSupport
 * Fix typos, relevant warnings and cleanup related sources

Change-Id: I2abe77c6f00c02ef106b569bef5db6b366e76df1
2019-10-03 19:12:25 +03:00
AdrianDC
172afb463a libfmjni: Add support for internal antenna hardware
* Devices defining the hw.fm.internal_antenna property
    will switch to internal antenna to allow proper FM receival

Change-Id: I3dabccb27dee8110def3b6c46bbb61252a6e3267
Signed-off-by: AdrianDC <radian.dc@gmail.com>
2019-10-03 19:12:25 +03:00
Venkateshwarlu Domakonda
f8378e9a0e FM: Fix the issue with patchdownloader
- Avoid patchdownloader for Silabs based targets.
- Make changes to treat only negative return values as errors.
- Change the calibration data path.

Change-Id: I611d5f6d64734e2a3a41456bb18b1e612862e0ed
2015-07-27 18:40:03 +05:30
Venkateshwarlu Domakonda
6ff7436b7e libfmjni: Implement hal layer
Implement HAL layer that can be plugged in
with Android FM APP to get fm functionalities.

Change-Id: Id16d37a320fdbacb505ba7ecc431622db17bd4d7
2015-04-09 03:27:16 -07:00