Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fm-commonsys
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
vendor
qcom-opensource
fm-commonsys
Commits
f9e05467
Commit
f9e05467
authored
5 years ago
by
Linux Build Service Account
Browse files
Options
Downloads
Plain Diff
Merge
9186a7bd
on remote branch
Change-Id: Idde69504ca848a70dabdcdac03aa0a37038389e1
parents
2b9a13e4
9186a7bd
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
helium/radio-helium.h
+5
-5
5 additions, 5 deletions
helium/radio-helium.h
jni/Android.mk
+3
-1
3 additions, 1 deletion
jni/Android.mk
jni/android_hardware_fm.cpp
+6
-87
6 additions, 87 deletions
jni/android_hardware_fm.cpp
with
14 additions
and
93 deletions
helium/radio-helium.h
+
5
−
5
View file @
f9e05467
...
...
@@ -146,20 +146,20 @@ typedef enum {
#define TUNE_PARAM 16
#define SIZE_ARRAY(x) (sizeof(x) / sizeof((x)[0]))
typedef
void
(
*
enb_result_cb
)();
typedef
void
(
*
enb_result_cb
)(
void
);
typedef
void
(
*
tune_rsp_cb
)(
int
Freq
);
typedef
void
(
*
seek_rsp_cb
)(
int
Freq
);
typedef
void
(
*
scan_rsp_cb
)();
typedef
void
(
*
scan_rsp_cb
)(
void
);
typedef
void
(
*
srch_list_rsp_cb
)(
uint16_t
*
scan_tbl
);
typedef
void
(
*
stereo_mode_cb
)(
bool
status
);
typedef
void
(
*
rds_avl_sts_cb
)(
bool
status
);
typedef
void
(
*
af_list_cb
)(
uint16_t
*
af_list
);
typedef
void
(
*
rt_cb
)(
char
*
rt
);
typedef
void
(
*
ps_cb
)(
char
*
ps
);
typedef
void
(
*
oda_cb
)();
typedef
void
(
*
oda_cb
)(
void
);
typedef
void
(
*
rt_plus_cb
)(
char
*
rt_plus
);
typedef
void
(
*
ert_cb
)(
char
*
ert
);
typedef
void
(
*
disable_cb
)();
typedef
void
(
*
disable_cb
)(
void
);
typedef
void
(
*
callback_thread_event
)(
unsigned
int
evt
);
typedef
void
(
*
rds_grp_cntrs_cb
)(
char
*
rds_params
);
typedef
void
(
*
rds_grp_cntrs_ext_cb
)(
char
*
rds_params
);
...
...
@@ -1252,7 +1252,7 @@ struct fm_hal_t {
};
struct
fm_interface_t
{
int
(
*
init
)(
const
fm_hal_callbacks_t
*
p_cb
);
int
(
*
hal_
init
)(
const
fm_hal_callbacks_t
*
p_cb
);
int
(
*
set_fm_ctrl
)(
int
opcode
,
int
val
);
int
(
*
get_fm_ctrl
)
(
int
opcode
,
int
*
val
);
};
...
...
This diff is collapsed.
Click to expand it.
jni/Android.mk
+
3
−
1
View file @
f9e05467
...
...
@@ -21,7 +21,9 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_C_INCLUDES
+=
$(
TARGET_OUT_INTERMEDIATES
)
/KERNEL_OBJ/usr/include
\
$(
TOP
)
/libnativehelper/include/nativehelper
\
$(
TOP
)
/vendor/qcom/opensource/commonsys-intf/bluetooth/include
\
$(
TOP
)
/vendor/qcom/opensource/commonsys/bluetooth_ext/system_bt_ext/btconfigstore
$(
TOP
)
/vendor/qcom/opensource/commonsys/bluetooth_ext/system_bt_ext/btconfigstore
\
vendor/qcom/opensource/commonsys/fm/helium
LOCAL_ADDITIONAL_DEPENDENCIES
:=
$(
TARGET_OUT_INTERMEDIATES
)
/KERNEL_OBJ/usr
LOCAL_MODULE
:=
libqcomfm_jni
...
...
This diff is collapsed.
Click to expand it.
jni/android_hardware_fm.cpp
+
6
−
87
View file @
f9e05467
...
...
@@ -45,7 +45,7 @@
#include
"android_runtime/AndroidRuntime.h"
#include
"bt_configstore.h"
#include
<vector>
#include
"radio-helium.h"
#define RADIO "/dev/radio0"
#define FM_JNI_SUCCESS 0L
...
...
@@ -96,42 +96,6 @@ bool isSocNameAvailable = false;
static
bt_configstore_interface_t
*
bt_configstore_intf
=
NULL
;
static
void
*
bt_configstore_lib_handle
=
NULL
;
typedef
void
(
*
enb_result_cb
)();
typedef
void
(
*
tune_rsp_cb
)(
int
Freq
);
typedef
void
(
*
seek_rsp_cb
)(
int
Freq
);
typedef
void
(
*
scan_rsp_cb
)();
typedef
void
(
*
srch_list_rsp_cb
)(
uint16_t
*
scan_tbl
);
typedef
void
(
*
stereo_mode_cb
)(
bool
status
);
typedef
void
(
*
rds_avl_sts_cb
)(
bool
status
);
typedef
void
(
*
af_list_cb
)(
uint16_t
*
af_list
);
typedef
void
(
*
rt_cb
)(
char
*
rt
);
typedef
void
(
*
ps_cb
)(
char
*
ps
);
typedef
void
(
*
oda_cb
)();
typedef
void
(
*
rt_plus_cb
)(
char
*
rt_plus
);
typedef
void
(
*
ert_cb
)(
char
*
ert
);
typedef
void
(
*
disable_cb
)();
typedef
void
(
*
callback_thread_event
)(
unsigned
int
evt
);
typedef
void
(
*
rds_grp_cntrs_cb
)(
char
*
rds_params
);
typedef
void
(
*
rds_grp_cntrs_ext_cb
)(
char
*
rds_params
);
typedef
void
(
*
fm_peek_cb
)(
char
*
peek_rsp
);
typedef
void
(
*
fm_ssbi_peek_cb
)(
char
*
ssbi_peek_rsp
);
typedef
void
(
*
fm_agc_gain_cb
)(
char
*
agc_gain_rsp
);
typedef
void
(
*
fm_ch_det_th_cb
)(
char
*
ch_det_rsp
);
typedef
void
(
*
fm_ecc_evt_cb
)(
char
*
ecc
);
typedef
void
(
*
fm_sig_thr_cb
)(
int
val
,
int
status
);
typedef
void
(
*
fm_get_ch_det_thrs_cb
)
(
int
val
,
int
status
);
typedef
void
(
*
fm_def_data_rd_cb
)
(
int
val
,
int
status
);
typedef
void
(
*
fm_get_blnd_cb
)
(
int
val
,
int
status
);
typedef
void
(
*
fm_set_ch_det_thrs_cb
)
(
int
status
);
typedef
void
(
*
fm_def_data_wrt_cb
)
(
int
status
);
typedef
void
(
*
fm_set_blnd_cb
)
(
int
status
);
typedef
void
(
*
fm_get_stn_prm_cb
)
(
int
val
,
int
status
);
typedef
void
(
*
fm_get_stn_dbg_prm_cb
)
(
int
val
,
int
status
);
typedef
void
(
*
fm_enable_sb_cb
)
(
int
status
);
typedef
void
(
*
fm_enable_sm_cb
)
(
int
status
);
static
JNIEnv
*
mCallbackEnv
=
NULL
;
static
jobject
mCallbacksObj
=
NULL
;
static
bool
mCallbacksObjCreated
=
false
;
...
...
@@ -178,7 +142,7 @@ static bool checkCallbackThread() {
return
true
;
}
void
fm_enabled_cb
()
{
void
fm_enabled_cb
(
void
)
{
ALOGD
(
"Entered %s"
,
__func__
);
if
(
slimbus_flag
)
{
...
...
@@ -216,7 +180,7 @@ void fm_seek_cmpl_cb(int Freq)
mCallbackEnv
->
CallVoidMethod
(
mCallbacksObj
,
method_seekCmplCallback
,
(
jint
)
Freq
);
}
void
fm_scan_next_cb
()
void
fm_scan_next_cb
(
void
)
{
ALOGI
(
"SCAN_NEXT"
);
if
(
!
checkCallbackThread
())
...
...
@@ -331,7 +295,7 @@ void fm_ps_update_cb(char *ps)
mCallbackEnv
->
DeleteLocalRef
(
ps_data
);
}
void
fm_oda_update_cb
()
void
fm_oda_update_cb
(
void
)
{
ALOGD
(
"ODA_EVT"
);
}
...
...
@@ -415,7 +379,7 @@ void rds_grp_cntrs_ext_rsp_cb(char * evt_buffer)
ALOGE
(
"rds_grp_cntrs_ext_rsp_cb"
);
}
void
fm_disabled_cb
()
void
fm_disabled_cb
(
void
)
{
ALOGE
(
"DISABLE"
);
if
(
!
checkCallbackThread
())
...
...
@@ -580,53 +544,8 @@ static void fm_enable_softmute_cb(int status)
ALOGD
(
"--fm_enable_softmute_cb"
);
}
typedef
struct
{
size_t
size
;
enb_result_cb
enabled_cb
;
tune_rsp_cb
tune_cb
;
seek_rsp_cb
seek_cmpl_cb
;
scan_rsp_cb
scan_next_cb
;
srch_list_rsp_cb
srch_list_cb
;
stereo_mode_cb
stereo_status_cb
;
rds_avl_sts_cb
rds_avail_status_cb
;
af_list_cb
af_list_update_cb
;
rt_cb
rt_update_cb
;
ps_cb
ps_update_cb
;
oda_cb
oda_update_cb
;
rt_plus_cb
rt_plus_update_cb
;
ert_cb
ert_update_cb
;
disable_cb
disabled_cb
;
rds_grp_cntrs_cb
rds_grp_cntrs_rsp_cb
;
rds_grp_cntrs_ext_cb
rds_grp_cntrs_ext_rsp_cb
;
fm_peek_cb
fm_peek_rsp_cb
;
fm_ssbi_peek_cb
fm_ssbi_peek_rsp_cb
;
fm_agc_gain_cb
fm_agc_gain_rsp_cb
;
fm_ch_det_th_cb
fm_ch_det_th_rsp_cb
;
fm_ecc_evt_cb
ext_country_code_cb
;
callback_thread_event
thread_evt_cb
;
fm_sig_thr_cb
fm_get_sig_thres_cb
;
fm_get_ch_det_thrs_cb
fm_get_ch_det_thr_cb
;
fm_def_data_rd_cb
fm_def_data_read_cb
;
fm_get_blnd_cb
fm_get_blend_cb
;
fm_set_ch_det_thrs_cb
fm_set_ch_det_thr_cb
;
fm_def_data_wrt_cb
fm_def_data_write_cb
;
fm_set_blnd_cb
fm_set_blend_cb
;
fm_get_stn_prm_cb
fm_get_station_param_cb
;
fm_get_stn_dbg_prm_cb
fm_get_station_debug_param_cb
;
fm_enable_sb_cb
fm_enable_slimbus_cb
;
fm_enable_sm_cb
fm_enable_softmute_cb
;
}
fm_vendor_callbacks_t
;
typedef
struct
{
int
(
*
hal_init
)(
fm_vendor_callbacks_t
*
p_cb
);
int
(
*
set_fm_ctrl
)(
int
ioctl
,
int
val
);
int
(
*
get_fm_ctrl
)
(
int
ioctl
,
int
*
val
);
}
fm_interface_t
;
fm_interface_t
*
vendor_interface
;
static
fm_
vendor
_callbacks_t
fm_callbacks
=
{
static
fm_
hal
_callbacks_t
fm_callbacks
=
{
sizeof
(
fm_callbacks
),
fm_enabled_cb
,
fm_tune_cb
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment