mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-24 04:45:32 -04:00
universal7885: Add FMRadio app
* Created from scratch by me (Royna) with help of LineageOS repo [1], Sony Xperia Dev repo [2] * Basic input/output, channel selection is working [1]: https://github.com/LineageOS/android_hardware_samsung_slsi_fm [2]: https://github.com/sonyxperiadev/vendor-qcom-opensource-fm Change-Id: I922bbeb9f86e6a4c7bc993d27d2f9eeb2a712186 Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
4b0238fe98
commit
0519231d7b
38 changed files with 2164 additions and 0 deletions
65
universal7885-common/apps/FMRadio/jni/fm.h
Normal file
65
universal7885-common/apps/FMRadio/jni/fm.h
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
#define FM_FAILURE -1
|
||||
#define FM_SUCCESS 0
|
||||
|
||||
#define V4L2_CID_USER_S610_BASE (0x00980900 + 0x1070)
|
||||
enum s610_ctrl_id {
|
||||
V4L2_CID_S610_CH_SPACING = (V4L2_CID_USER_S610_BASE + 0x01),
|
||||
V4L2_CID_S610_CH_BAND = (V4L2_CID_USER_S610_BASE + 0x02),
|
||||
V4L2_CID_S610_SOFT_STEREO_BLEND = (V4L2_CID_USER_S610_BASE + 0x03),
|
||||
V4L2_CID_S610_SOFT_STEREO_BLEND_COEFF = (V4L2_CID_USER_S610_BASE+0x04),
|
||||
V4L2_CID_S610_SOFT_MUTE_COEFF = (V4L2_CID_USER_S610_BASE + 0x5),
|
||||
V4L2_CID_S610_RSSI_CURR = (V4L2_CID_USER_S610_BASE + 0x06),
|
||||
V4L2_CID_S610_SNR_CURR = (V4L2_CID_USER_S610_BASE + 0x07),
|
||||
V4L2_CID_S610_SEEK_CANCEL = (V4L2_CID_USER_S610_BASE + 0x08),
|
||||
V4L2_CID_S610_SEEK_MODE = (V4L2_CID_USER_S610_BASE + 0x09),
|
||||
V4L2_CID_S610_RDS_ON = (V4L2_CID_USER_S610_BASE + 0x0A),
|
||||
V4L2_CID_S610_IF_COUNT1 = (V4L2_CID_USER_S610_BASE + 0x0B),
|
||||
V4L2_CID_S610_IF_COUNT2 = (V4L2_CID_USER_S610_BASE + 0x0C),
|
||||
V4L2_CID_S610_RSSI_TH = (V4L2_CID_USER_S610_BASE + 0x0D),
|
||||
V4L2_CID_S610_KERNEL_VER = (V4L2_CID_USER_S610_BASE + 0x0E),
|
||||
V4L2_CID_S610_SOFT_STEREO_BLEND_REF = (V4L2_CID_USER_S610_BASE+0x0F),
|
||||
V4L2_CID_S610_REG_RW_ADDR = (V4L2_CID_USER_S610_BASE + 0x10),
|
||||
V4L2_CID_S610_REG_RW = (V4L2_CID_USER_S610_BASE + 0x11),
|
||||
};
|
||||
|
||||
/* Tunner modes */
|
||||
enum fm_tuner_mode {
|
||||
FM_TUNER_STOP_SEARCH_MODE = 0,
|
||||
FM_TUNER_PRESET_MODE = 1,
|
||||
FM_TUNER_AUTONOMOUS_SEARCH_MODE = 2,
|
||||
FM_TUNER_AUTONOMOUS_SEARCH_MODE_NEXT = 10
|
||||
};
|
||||
|
||||
/* channel spacing */
|
||||
enum fm_channel_spacing {
|
||||
FM_CHANNEL_SPACING_50KHZ = 1,
|
||||
FM_CHANNEL_SPACING_100KHZ = 2,
|
||||
FM_CHANNEL_SPACING_200KHZ = 4
|
||||
};
|
||||
|
||||
/* Mute modes */
|
||||
enum fm_mute_mode {
|
||||
FM_MUTE_ON = 0,
|
||||
FM_MUTE_OFF = 1,
|
||||
FM_MUTE_ATTENUATE = 2
|
||||
};
|
||||
|
||||
/* FM RDS modes */
|
||||
enum fm_rds_mode {
|
||||
FM_RDS_DISABLE = 0,
|
||||
FM_RDS_ENABLE = 1
|
||||
};
|
||||
|
||||
#define FM_RADIO_RDS_DATA_MAX 48
|
||||
|
||||
enum s610_freq_bands {
|
||||
S610_BAND_FM = 0,
|
||||
S610_BAND_AM = 1,
|
||||
};
|
||||
|
||||
enum s610_aud_mode {
|
||||
S610_AUD_ENABLE = 1,
|
||||
S610_AUD_DISABLE = 0,
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in a new issue