summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilbok Lee <gilbok.lee@samsung.com>2017-11-07 17:43:29 +0900
committerGilbok Lee <gilbok.lee@samsung.com>2017-11-14 14:58:01 +0900
commitd89cd1f10c08171160605ce48d5804e566779344 (patch)
tree0df969cd5770600e2a83992c2cb4fd8779801205
parente89f7316b81eae8880cc186c8b1a8046d3684cd0 (diff)
downloadlibmm-radio-d89cd1f10c08171160605ce48d5804e566779344.tar.gz
libmm-radio-d89cd1f10c08171160605ce48d5804e566779344.tar.bz2
libmm-radio-d89cd1f10c08171160605ce48d5804e566779344.zip
Change log message
[Version] 0.2.32 [Profile] Mobile, Wearable [Issue Type] Fix bugs Change-Id: I3951d405e6e869344c8dbf28a7be6b4026c0ec2d
-rwxr-xr-xpackaging/libmm-radio.spec2
-rw-r--r--src/mm_radio.c10
-rwxr-xr-x[-rw-r--r--]src/mm_radio_priv_emulator.c138
-rwxr-xr-x[-rw-r--r--]src/mm_radio_priv_hal.c108
4 files changed, 129 insertions, 129 deletions
diff --git a/packaging/libmm-radio.spec b/packaging/libmm-radio.spec
index d44a5dc..6047692 100755
--- a/packaging/libmm-radio.spec
+++ b/packaging/libmm-radio.spec
@@ -1,6 +1,6 @@
Name: libmm-radio
Summary: Multimedia Framework Radio Library
-Version: 0.2.31
+Version: 0.2.32
Release: 0
Group: System/Libraries
License: Apache-2.0
diff --git a/src/mm_radio.c b/src/mm_radio.c
index ca47130..b092fd6 100644
--- a/src/mm_radio.c
+++ b/src/mm_radio.c
@@ -95,7 +95,7 @@ int mm_radio_create(MMHandleType *hradio)
/* alloc radio structure */
new_radio = (mm_radio_t *)malloc(sizeof(mm_radio_t));
if (!new_radio) {
- MMRADIO_LOG_CRITICAL("cannot allocate memory for radio\n");
+ MMRADIO_LOG_CRITICAL("cannot allocate memory for radio");
goto ERROR;
}
memset(new_radio, 0, sizeof(mm_radio_t));
@@ -104,7 +104,7 @@ int mm_radio_create(MMHandleType *hradio)
result = _mmradio_create_radio(new_radio);
if (result != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio creation failed\n");
+ MMRADIO_LOG_ERROR("radio creation failed");
goto ERROR;
}
@@ -139,7 +139,7 @@ int mm_radio_destroy(MMHandleType hradio)
result = _mmradio_destroy(radio);
if (result != MM_ERROR_NONE)
- MMRADIO_LOG_ERROR("failed to destroy radio\n");
+ MMRADIO_LOG_ERROR("failed to destroy radio");
/* free radio */
MMRADIO_FREEIF(radio);
@@ -180,7 +180,7 @@ int mm_radio_unrealize(MMHandleType hradio)
MMRADIO_RETURN_VAL_IF_FAIL(radio, MM_ERROR_RADIO_NOT_INITIALIZED);
mm_radio_get_state((hradio), &state);
- MMRADIO_LOG_DEBUG("mm_radio_unrealize state: %d\n", state);
+ MMRADIO_LOG_DEBUG("mm_radio_unrealize state: %d", state);
if (state == MM_RADIO_STATE_SCANNING)
mm_radio_scan_stop(hradio);
@@ -428,7 +428,7 @@ int mm_radio_get_signal_strength(MMHandleType hradio, int *value)
MMRADIO_CMD_UNLOCK(radio);
- MMRADIO_LOG_INFO("signal strength = %d\n", *value);
+ MMRADIO_LOG_INFO("signal strength = %d", *value);
MMRADIO_LOG_FLEAVE();
return ret;
diff --git a/src/mm_radio_priv_emulator.c b/src/mm_radio_priv_emulator.c
index f282349..1fcd7ae 100644..100755
--- a/src/mm_radio_priv_emulator.c
+++ b/src/mm_radio_priv_emulator.c
@@ -191,7 +191,7 @@ int _mmradio_apply_region(mm_radio_t * radio, MMRadioRegionType region, bool upd
/* chech device is opened or not. if it's not ready, skip to apply region to device now */
if (radio->radio_fd < 0) {
- MMRADIO_LOG_DEBUG("not opened device. just updating region info. \n");
+ MMRADIO_LOG_DEBUG("not opened device. just updating region info.");
return MM_ERROR_NONE;
}
@@ -216,7 +216,7 @@ int _mmradio_apply_region(mm_radio_t * radio, MMRadioRegionType region, bool upd
int _mmradio_create_radio(mm_radio_t * radio)
{
- int ret = 0;
+ int ret = MM_ERROR_NONE;
MMRADIO_LOG_FENTER();
@@ -233,7 +233,7 @@ int _mmradio_create_radio(mm_radio_t * radio)
/* create command lock */
ret = pthread_mutex_init(&radio->cmd_lock, NULL);
if (ret) {
- MMRADIO_LOG_ERROR("mutex creation failed\n");
+ MMRADIO_LOG_ERROR("failed to create mutex");
return MM_ERROR_RADIO_INTERNAL;
}
@@ -242,7 +242,7 @@ int _mmradio_create_radio(mm_radio_t * radio)
/* initialize resource manager */
ret = mmradio_resource_manager_init(&(radio->resource_manager), radio);
if (ret) {
- MMRADIO_LOG_ERROR("failed to initialize resource manager\n");
+ MMRADIO_LOG_ERROR("failed to initialize resource manager");
return MM_ERROR_RADIO_INTERNAL;
}
@@ -255,7 +255,7 @@ int _mmradio_create_radio(mm_radio_t * radio)
if (ret) {
/* NOTE : we are dealing it as an error since we cannot expect it's behavior */
- MMRADIO_LOG_ERROR("mmradio_audio_focus_register is failed\n");
+ MMRADIO_LOG_ERROR("failed to register sound focus");
return MM_ERROR_RADIO_INTERNAL;
}
#endif
@@ -265,7 +265,7 @@ int _mmradio_create_radio(mm_radio_t * radio)
return MM_ERROR_NONE;
}
-int _mmradio_realize(mm_radio_t * radio)
+int _mmradio_realize(mm_radio_t *radio)
{
int ret = MM_ERROR_NONE;
@@ -282,7 +282,7 @@ int _mmradio_realize(mm_radio_t * radio)
/* open device */
radio->radio_fd = 11;
- MMRADIO_LOG_DEBUG("radio device fd : %d\n", radio->radio_fd);
+ MMRADIO_LOG_DEBUG("radio device fd : %d", radio->radio_fd);
/* check region country type if it's updated or not */
if (radio->region_setting.country == MM_RADIO_REGION_GROUP_NONE) {
@@ -307,7 +307,7 @@ int _mmradio_realize(mm_radio_t * radio)
#ifdef USE_GST_PIPELINE
ret = _mmradio_realize_pipeline(radio);
if (ret) {
- MMRADIO_LOG_ERROR("_mmradio_realize_pipeline is failed\n");
+ MMRADIO_LOG_ERROR("failed to realize pipeline");
return ret;
}
#endif
@@ -337,7 +337,7 @@ int _mmradio_unrealize(mm_radio_t * radio)
#ifdef TIZEN_FEATURE_SOUND_FOCUS
ret = mmradio_release_sound_focus(&radio->sound_focus);
if (ret) {
- MMRADIO_LOG_ERROR("mmradio_release_sound_focus is failed\n");
+ MMRADIO_LOG_ERROR("failed to release sound focus");
return ret;
}
#endif
@@ -345,14 +345,14 @@ int _mmradio_unrealize(mm_radio_t * radio)
#ifdef USE_GST_PIPELINE
ret = _mmradio_destroy_pipeline(radio);
if (ret) {
- MMRADIO_LOG_ERROR("_mmradio_destroy_pipeline is failed\n");
+ MMRADIO_LOG_ERROR("failed to destroy pipeline");
return ret;
}
#endif
MMRADIO_LOG_FLEAVE();
- return MM_ERROR_NONE;
+ return ret;
}
int _mmradio_destroy(mm_radio_t * radio)
@@ -368,14 +368,14 @@ int _mmradio_destroy(mm_radio_t * radio)
int ret = 0;
ret = mmradio_sound_focus_deregister(&radio->sound_focus);
if (ret) {
- MMRADIO_LOG_ERROR("failed to deregister sound focus\n");
+ MMRADIO_LOG_ERROR("failed to deregister sound focus");
return MM_ERROR_RADIO_INTERNAL;
}
#endif
ret = mmradio_resource_manager_deinit(&radio->resource_manager);
if (ret) {
- MMRADIO_LOG_ERROR("failed to initialize resource manager\n");
+ MMRADIO_LOG_ERROR("failed to deinitialize resource manager");
return MM_ERROR_RADIO_INTERNAL;
}
@@ -392,17 +392,17 @@ int _mmradio_set_frequency(mm_radio_t * radio, int freq)
MMRADIO_CHECK_INSTANCE(radio);
MMRADIO_CHECK_STATE_RETURN_IF_FAIL(radio, MMRADIO_COMMAND_SET_FREQ);
- MMRADIO_SLOG_DEBUG("Setting %d frequency\n", freq);
- MMRADIO_LOG_DEBUG("radio->freq: %d freq: %d\n", radio->freq, freq);
+ MMRADIO_SLOG_DEBUG("Setting %d frequency", freq);
+ MMRADIO_LOG_DEBUG("radio->freq: %d freq: %d", radio->freq, freq);
if (radio->radio_fd < 0) {
- MMRADIO_LOG_DEBUG("radio device is not opened yet\n");
+ MMRADIO_LOG_DEBUG("radio device is not opened yet");
return MM_ERROR_NONE;
}
/* check frequency range */
if (freq < radio->region_setting.band_min || freq > radio->region_setting.band_max) {
- MMRADIO_LOG_ERROR("out of frequency range\n", freq);
+ MMRADIO_LOG_ERROR("out of frequency range", freq);
return MM_ERROR_INVALID_ARGUMENT;
}
@@ -433,7 +433,7 @@ int _mmradio_get_frequency(mm_radio_t * radio, int *pFreq)
/* just return stored frequency if radio device is not ready */
if (radio->radio_fd < 0) {
- MMRADIO_SLOG_DEBUG("freq : %d\n", radio->freq);
+ MMRADIO_SLOG_DEBUG("freq : %d", radio->freq);
*pFreq = radio->freq;
return MM_ERROR_NONE;
}
@@ -459,7 +459,7 @@ int _mmradio_mute(mm_radio_t * radio)
#ifdef USE_GST_PIPELINE
if (radio->pGstreamer_s) {
g_object_set(radio->pGstreamer_s->volume, "mute", 1, NULL);
- MMRADIO_LOG_DEBUG("g_object set mute\n");
+ MMRADIO_LOG_DEBUG("g_object set mute");
}
#endif
MMRADIO_LOG_FLEAVE();
@@ -479,7 +479,7 @@ int _mmradio_unmute(mm_radio_t * radio)
#ifdef USE_GST_PIPELINE
if (radio->pGstreamer_s) {
g_object_set(radio->pGstreamer_s->volume, "mute", 0, NULL);
- MMRADIO_LOG_DEBUG("g_object set un-mute\n");
+ MMRADIO_LOG_DEBUG("g_object set unmute");
}
#endif
@@ -516,7 +516,7 @@ int __mmradio_set_deemphasis(mm_radio_t * radio)
break;
default:
- MMRADIO_LOG_ERROR("not availabe de-emphasis value\n");
+ MMRADIO_LOG_ERROR("not availabe de-emphasis value");
return MM_ERROR_COMMON_INVALID_ARGUMENT;
}
@@ -554,7 +554,7 @@ int _mmradio_set_message_callback(mm_radio_t * radio, MMMessageCallback callback
radio->msg_cb = callback;
radio->msg_cb_param = user_param;
- MMRADIO_LOG_DEBUG("msg_cb : 0x%x msg_cb_param : 0x%x\n", callback, user_param);
+ MMRADIO_LOG_DEBUG("msg_cb : 0x%x msg_cb_param : 0x%x", callback, user_param);
MMRADIO_LOG_FLEAVE();
@@ -588,11 +588,11 @@ int _mmradio_start(mm_radio_t * radio)
MMRADIO_CHECK_INSTANCE(radio);
MMRADIO_CHECK_STATE_RETURN_IF_FAIL(radio, MMRADIO_COMMAND_START);
- MMRADIO_SLOG_DEBUG("now tune to frequency : %d\n", radio->freq);
+ MMRADIO_SLOG_DEBUG("now tune to frequency : %d", radio->freq);
ret = mmradio_resource_manager_prepare(&radio->resource_manager, MM_RADIO_RESOURCE_TYPE_RADIO);
if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("resource manager prepare fail");
+ MMRADIO_LOG_ERROR("failed to prepare resource manager");
return MM_ERROR_RADIO_INTERNAL;
}
@@ -607,7 +607,7 @@ int _mmradio_start(mm_radio_t * radio)
if (radio->sound_focus.handle > 0) {
ret = mmradio_acquire_sound_focus(&radio->sound_focus);
if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("failed to set sound focus");
+ MMRADIO_LOG_ERROR("failed to acquire sound focus");
return ret;
}
}
@@ -648,7 +648,7 @@ int _mmradio_start(mm_radio_t * radio)
#ifdef USE_GST_PIPELINE
ret = _mmradio_start_pipeline(radio);
if (ret) {
- MMRADIO_LOG_ERROR("_mmradio_start_pipeline is failed\n");
+ MMRADIO_LOG_ERROR("failed to start pipeline");
return ret;
}
#endif
@@ -688,7 +688,7 @@ int _mmradio_stop(mm_radio_t * radio)
if (resource_state == MM_RADIO_RESOURCE_STATE_PREPARED) {
ret = mmradio_resource_manager_unprepare(&radio->resource_manager);
if (ret != MM_ERROR_NONE)
- MMRADIO_LOG_ERROR("resource manager unprepare fail");
+ MMRADIO_LOG_ERROR("failed to unprepare resource manager");
}
}
@@ -696,7 +696,7 @@ int _mmradio_stop(mm_radio_t * radio)
if (radio->sound_focus.handle > 0) {
ret = mmradio_release_sound_focus(&radio->sound_focus);
if (ret) {
- MMRADIO_LOG_ERROR("mmradio_release_audio_focus is failed\n");
+ MMRADIO_LOG_ERROR("failed to release sound focus");
return ret;
}
}
@@ -707,7 +707,7 @@ int _mmradio_stop(mm_radio_t * radio)
#ifdef USE_GST_PIPELINE
ret = _mmradio_stop_pipeline(radio);
if (ret) {
- MMRADIO_LOG_ERROR("_mmradio_stop_pipeline is failed\n");
+ MMRADIO_LOG_ERROR("failed to stop pipeline");
return ret;
}
#endif
@@ -737,7 +737,7 @@ int _mmradio_realize_pipeline(mm_radio_t * radio)
g_object_set(radio->pGstreamer_s->audiosrc, "wave", val, "volume", 0.8, NULL);
if (!radio->pGstreamer_s->pipeline || !radio->pGstreamer_s->audiosrc || !radio->pGstreamer_s->queue2 || !radio->pGstreamer_s->volume || !radio->pGstreamer_s->audiosink) {
- MMRADIO_LOG_DEBUG("One element could not be created. Exiting.\n");
+ MMRADIO_LOG_DEBUG("One element could not be created. Exiting.");
return MM_ERROR_RADIO_NOT_INITIALIZED;
}
@@ -753,7 +753,7 @@ int _mmradio_realize_pipeline(mm_radio_t * radio)
radio->pGstreamer_s->volume,
radio->pGstreamer_s->audiosink,
NULL)) {
- MMRADIO_LOG_DEBUG("Fail to link error (src - queue - volue - sink)\n");
+ MMRADIO_LOG_DEBUG("failed to element link (src - queue - volue - sink)");
return MM_ERROR_RADIO_NOT_INITIALIZED;
}
MMRADIO_LOG_FLEAVE();
@@ -768,7 +768,7 @@ int _mmradio_start_pipeline(mm_radio_t * radio)
MMRADIO_LOG_FENTER();
if (gst_element_set_state(radio->pGstreamer_s->pipeline, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
- MMRADIO_LOG_ERROR("Fail to change pipeline state");
+ MMRADIO_LOG_ERROR("failed to change pipeline state");
gst_object_unref(radio->pGstreamer_s->pipeline);
g_free(radio->pGstreamer_s);
return MM_ERROR_RADIO_INVALID_STATE;
@@ -781,7 +781,7 @@ int _mmradio_start_pipeline(mm_radio_t * radio)
g_free(radio->pGstreamer_s);
return MM_ERROR_RADIO_INVALID_STATE;
} else {
- MMRADIO_LOG_DEBUG("GST_STATE_NULL ret_state = %d (GST_STATE_CHANGE_SUCCESS)\n", ret_state);
+ MMRADIO_LOG_DEBUG("GST_STATE_NULL ret_state = %d (GST_STATE_CHANGE_SUCCESS)", ret_state);
}
MMRADIO_LOG_FLEAVE();
@@ -808,7 +808,7 @@ int _mmradio_stop_pipeline(mm_radio_t * radio)
g_free(radio->pGstreamer_s);
return MM_ERROR_RADIO_INVALID_STATE;
} else {
- MMRADIO_LOG_DEBUG("GST_STATE_NULL ret_state = %d (GST_STATE_CHANGE_SUCCESS)\n", ret_state);
+ MMRADIO_LOG_DEBUG("GST_STATE_NULL ret_state = %d (GST_STATE_CHANGE_SUCCESS)", ret_state);
}
MMRADIO_LOG_FLEAVE();
return ret;
@@ -821,7 +821,7 @@ int _mmradio_destroy_pipeline(mm_radio_t * radio)
MMRADIO_LOG_FENTER();
if (gst_element_set_state(radio->pGstreamer_s->pipeline, GST_STATE_NULL) == GST_STATE_CHANGE_FAILURE) {
- MMRADIO_LOG_DEBUG("Fail to change pipeline state");
+ MMRADIO_LOG_DEBUG("failed to change pipeline state");
gst_object_unref(radio->pGstreamer_s->pipeline);
g_free(radio->pGstreamer_s);
return MM_ERROR_RADIO_INVALID_STATE;
@@ -834,7 +834,7 @@ int _mmradio_destroy_pipeline(mm_radio_t * radio)
g_free(radio->pGstreamer_s);
return MM_ERROR_RADIO_INVALID_STATE;
} else {
- MMRADIO_LOG_DEBUG("GST_STATE_NULL ret_state = %d (GST_STATE_CHANGE_SUCCESS)\n", ret_state);
+ MMRADIO_LOG_DEBUG("GST_STATE_NULL ret_state = %d (GST_STATE_CHANGE_SUCCESS)", ret_state);
}
gst_object_unref(radio->pGstreamer_s->pipeline);
@@ -856,13 +856,13 @@ int _mmradio_seek(mm_radio_t * radio, MMRadioSeekDirectionType direction)
/* if( _mmradio_mute(radio) != MM_ERROR_NONE) */
/* return MM_ERROR_RADIO_NOT_INITIALIZED; */
- MMRADIO_SLOG_DEBUG("trying to seek. direction[0:UP/1:DOWN) %d\n", direction);
+ MMRADIO_SLOG_DEBUG("trying to seek. direction[0:UP/1:DOWN) %d", direction);
radio->seek_direction = direction;
ret = pthread_create(&radio->seek_thread, NULL, (void *)__mmradio_seek_thread, (void *)radio);
if (ret) {
- MMRADIO_LOG_DEBUG("failed create thread\n");
+ MMRADIO_LOG_DEBUG("failed to create thread");
return MM_ERROR_RADIO_INTERNAL;
}
@@ -885,7 +885,7 @@ int _mmradio_start_scan(mm_radio_t * radio)
scan_tr_id = pthread_create(&radio->scan_thread, NULL, (void *)__mmradio_scan_thread, (void *)radio);
if (scan_tr_id != 0) {
- MMRADIO_LOG_DEBUG("failed to create thread : scan\n");
+ MMRADIO_LOG_DEBUG("failed to create thread : scan");
return MM_ERROR_RADIO_NOT_INITIALIZED;
}
@@ -924,7 +924,7 @@ int _mm_radio_get_signal_strength(mm_radio_t * radio, int *value)
/* just return stored frequency if radio device is not ready */
if (radio->radio_fd < 0) {
- MMRADIO_SLOG_DEBUG("Device not ready so sending 0\n");
+ MMRADIO_SLOG_DEBUG("Device not ready so sending 0");
*value = 0;
return MM_ERROR_NONE;
}
@@ -959,7 +959,7 @@ void __mmradio_scan_thread(mm_radio_t * radio)
int freq = 0;
MMMessageParamType param = { 0, };
- MMRADIO_LOG_DEBUG("scanning....\n");
+ MMRADIO_LOG_DEBUG("scanning....");
/* now we can get new frequency from radio device */
@@ -971,7 +971,7 @@ void __mmradio_scan_thread(mm_radio_t * radio)
MMRADIO_LOG_DEBUG("freq: %d", freq);
if (freq < prev_freq) {
- MMRADIO_LOG_DEBUG("scanning wrapped around. stopping scan\n");
+ MMRADIO_LOG_DEBUG("scanning wrapped around. stopping scan");
break;
}
@@ -979,13 +979,13 @@ void __mmradio_scan_thread(mm_radio_t * radio)
continue;
prev_freq = param.radio_scan.frequency = freq;
- MMRADIO_SLOG_DEBUG("scanning : new frequency : [%d]\n", param.radio_scan.frequency);
+ MMRADIO_SLOG_DEBUG("scanning : new frequency : [%d]", param.radio_scan.frequency);
/* drop if max freq is scanned */
if (param.radio_scan.frequency == radio->region_setting.band_max
|| param.radio_scan.frequency > radio->region_setting.band_max
|| param.radio_scan.frequency < radio->region_setting.band_min) {
- MMRADIO_LOG_DEBUG("%d freq is dropping...and stopping scan\n", param.radio_scan.frequency);
+ MMRADIO_LOG_DEBUG("%d freq is dropping...and stopping scan", param.radio_scan.frequency);
break;
}
@@ -1059,7 +1059,7 @@ void __mmradio_seek_thread(mm_radio_t * radio)
MMRADIO_POST_MSG(radio, MM_MESSAGE_RADIO_SEEK_START, NULL);
- MMRADIO_LOG_DEBUG("seeking....\n");
+ MMRADIO_LOG_DEBUG("seeking....");
EmultatorIdx = 0;
while (!seek_stop) {
@@ -1086,11 +1086,11 @@ void __mmradio_seek_thread(mm_radio_t * radio)
MMRADIO_LOG_DEBUG("radio->freq: %d EmultatorIdx: %d", radio->freq, EmultatorIdx);
}
- MMRADIO_LOG_DEBUG("found frequency\n");
+ MMRADIO_LOG_DEBUG("found frequency");
/* if same freq is found, ignore it and search next one. */
if (freq == radio->prev_seek_freq) {
- MMRADIO_LOG_DEBUG("It's same with previous found one. So, trying next one. \n");
+ MMRADIO_LOG_DEBUG("It's same with previous found one. So, trying next one.");
continue;
}
@@ -1099,7 +1099,7 @@ void __mmradio_seek_thread(mm_radio_t * radio)
/* now tune to new frequency */
ret = _mmradio_set_frequency(radio, freq);
if (ret) {
- MMRADIO_LOG_ERROR("failed to tune to new frequency\n");
+ MMRADIO_LOG_ERROR("failed to tune to new frequency");
goto SEEK_FAILED;
}
}
@@ -1116,7 +1116,7 @@ void __mmradio_seek_thread(mm_radio_t * radio)
}
#endif
param.radio_scan.frequency = radio->prev_seek_freq = freq;
- MMRADIO_SLOG_DEBUG("seeking : new frequency : [%d]\n", param.radio_scan.frequency);
+ MMRADIO_SLOG_DEBUG("seeking : new frequency : [%d]", param.radio_scan.frequency);
MMRADIO_POST_MSG(radio, MM_MESSAGE_RADIO_SEEK_FINISH, &param);
seek_stop = true;
}
@@ -1143,11 +1143,11 @@ static bool __mmradio_post_message(mm_radio_t * radio, enum MMMessageType msgtyp
MMRADIO_LOG_FENTER();
if (!radio->msg_cb) {
- MMRADIO_LOG_WARNING("failed to post a message\n");
+ MMRADIO_LOG_WARNING("failed to post a message because msg cb didn't register");
return false;
}
- MMRADIO_LOG_DEBUG("address of msg_cb : %d\n", radio->msg_cb);
+ MMRADIO_LOG_DEBUG("address of msg_cb : %d", radio->msg_cb);
radio->msg_cb(msgtype, param, radio->msg_cb_param);
@@ -1166,7 +1166,7 @@ static int __mmradio_check_state(mm_radio_t * radio, MMRadioCommand command)
radio_state = __mmradio_get_state(radio);
- MMRADIO_LOG_DEBUG("incomming command : %d current state : %d\n", command, radio_state);
+ MMRADIO_LOG_DEBUG("incomming command : %d current state : %d", command, radio_state);
switch (command) {
case MMRADIO_COMMAND_CREATE:
@@ -1263,11 +1263,11 @@ static int __mmradio_check_state(mm_radio_t * radio, MMRadioCommand command)
break;
default:
- MMRADIO_LOG_DEBUG("not handled in FSM. don't care it\n");
+ MMRADIO_LOG_DEBUG("not handled in FSM. don't care it");
break;
}
- MMRADIO_LOG_DEBUG("status OK\n");
+ MMRADIO_LOG_DEBUG("status OK");
radio->cmd = command;
@@ -1276,12 +1276,12 @@ static int __mmradio_check_state(mm_radio_t * radio, MMRadioCommand command)
return MM_ERROR_NONE;
INVALID_STATE:
- MMRADIO_LOG_WARNING("invalid state. current : %d command : %d\n", radio_state, command);
+ MMRADIO_LOG_WARNING("invalid state. current : %d command : %d", radio_state, command);
MMRADIO_LOG_FLEAVE();
return MM_ERROR_RADIO_INVALID_STATE;
NO_OP:
- MMRADIO_LOG_WARNING("mm-radio is in the desired state(%d). doing noting\n", radio_state);
+ MMRADIO_LOG_WARNING("mm-radio is in the desired state(%d). doing noting", radio_state);
MMRADIO_LOG_FLEAVE();
return MM_ERROR_RADIO_NO_OP;
@@ -1295,12 +1295,12 @@ static bool __mmradio_set_state(mm_radio_t * radio, int new_state)
MMRADIO_LOG_FENTER();
if (!radio) {
- MMRADIO_LOG_WARNING("calling set_state with invalid radio handle\n");
+ MMRADIO_LOG_WARNING("calling set_state with invalid radio handle");
return false;
}
if (radio->current_state == new_state && radio->pending_state == 0) {
- MMRADIO_LOG_WARNING("we are in same state\n");
+ MMRADIO_LOG_WARNING("we are in same state");
return true;
}
@@ -1348,7 +1348,7 @@ static int __mmradio_get_state(mm_radio_t * radio)
{
MMRADIO_CHECK_INSTANCE(radio);
- MMRADIO_LOG_DEBUG("radio state : current : [%d] old : [%d] pending : [%d]\n",
+ MMRADIO_LOG_DEBUG("radio state : current : [%d] old : [%d] pending : [%d]",
radio->current_state, radio->old_state, radio->pending_state);
return radio->current_state;
@@ -1378,12 +1378,12 @@ static void __mmradio_sound_focus_cb(int id, mm_sound_focus_type_e focus_type,
MMRADIO_CMD_LOCK(radio);
result = _mmradio_stop(radio);
if (result)
- MMRADIO_LOG_ERROR("failed to stop radio\n");
+ MMRADIO_LOG_ERROR("failed to stop radio");
MMRADIO_CMD_UNLOCK(radio);
radio->sound_focus.by_focus_cb = false;
- MMRADIO_LOG_DEBUG("FOCUS_IS_RELEASED cur_focus_type : %d\n", radio->sound_focus.cur_focus_type);
+ MMRADIO_LOG_DEBUG("FOCUS_IS_RELEASED cur_focus_type : %d", radio->sound_focus.cur_focus_type);
}
break;
@@ -1397,12 +1397,12 @@ static void __mmradio_sound_focus_cb(int id, mm_sound_focus_type_e focus_type,
if ((postMsg) && (FOCUS_FOR_BOTH == radio->sound_focus.cur_focus_type))
MMRADIO_POST_MSG(radio, MM_MESSAGE_READY_TO_RESUME, &msg);
- MMRADIO_LOG_DEBUG("FOCUS_IS_ACQUIRED cur_focus_type : %d\n", radio->sound_focus.cur_focus_type);
+ MMRADIO_LOG_DEBUG("FOCUS_IS_ACQUIRED cur_focus_type : %d", radio->sound_focus.cur_focus_type);
}
break;
default:
- MMRADIO_LOG_DEBUG("Unknown focus_state\n");
+ MMRADIO_LOG_DEBUG("Unknown focus_state");
break;
}
@@ -1437,7 +1437,7 @@ static void __mmradio_sound_focus_watch_cb(int id, mm_sound_focus_type_e focus_t
radio->sound_focus.by_focus_cb = false;
- MMRADIO_LOG_DEBUG("FOCUS_IS_RELEASED cur_focus_type : %d\n", radio->sound_focus.cur_focus_type);
+ MMRADIO_LOG_DEBUG("FOCUS_IS_RELEASED cur_focus_type : %d", radio->sound_focus.cur_focus_type);
}
break;
@@ -1451,12 +1451,12 @@ static void __mmradio_sound_focus_watch_cb(int id, mm_sound_focus_type_e focus_t
if ((postMsg) && (FOCUS_FOR_BOTH == radio->sound_focus.cur_focus_type))
MMRADIO_POST_MSG(radio, MM_MESSAGE_READY_TO_RESUME, &msg);
- MMRADIO_LOG_DEBUG("FOCUS_IS_ACQUIRED cur_focus_type : %d\n", radio->sound_focus.cur_focus_type);
+ MMRADIO_LOG_DEBUG("FOCUS_IS_ACQUIRED cur_focus_type : %d", radio->sound_focus.cur_focus_type);
}
break;
default:
- MMRADIO_LOG_DEBUG("Unknown focus_state\n");
+ MMRADIO_LOG_DEBUG("Unknown focus_state");
break;
}
@@ -1557,7 +1557,7 @@ int _mmradio_set_volume(mm_radio_t *radio, float volume)
}
if (radio->radio_fd < 0) {
- MMRADIO_LOG_DEBUG("radio device is not opened yet\n");
+ MMRADIO_LOG_DEBUG("radio device is not opened yet");
radio->local_volume = volume;
return MM_ERROR_NONE;
}
@@ -1567,7 +1567,7 @@ int _mmradio_set_volume(mm_radio_t *radio, float volume)
#ifdef USE_GST_PIPELINE
if (radio->pGstreamer_s && radio->pGstreamer_s->volume) {
g_object_set(radio->pGstreamer_s->volume, "volume", volume, NULL);
- MMRADIO_LOG_DEBUG("g_object set volume\n");
+ MMRADIO_LOG_DEBUG("g_object set volume");
}
#endif
MMRADIO_LOG_FLEAVE();
@@ -1584,7 +1584,7 @@ int _mmradio_get_volume(mm_radio_t *radio, float *pVolume)
MMRADIO_RETURN_VAL_IF_FAIL(pVolume, MM_ERROR_INVALID_ARGUMENT);
- MMRADIO_SLOG_DEBUG("volume : %f\n", radio->local_volume);
+ MMRADIO_SLOG_DEBUG("volume : %f", radio->local_volume);
*pVolume = radio->local_volume;
diff --git a/src/mm_radio_priv_hal.c b/src/mm_radio_priv_hal.c
index 6e9cffd..18493a9 100644..100755
--- a/src/mm_radio_priv_hal.c
+++ b/src/mm_radio_priv_hal.c
@@ -197,22 +197,22 @@ int _mmradio_create_radio(mm_radio_t *radio)
/* create command lock */
ret = pthread_mutex_init(&radio->cmd_lock, NULL);
if (ret) {
- MMRADIO_LOG_ERROR("mutex creation failed");
+ MMRADIO_LOG_ERROR("failed to create mutex");
return MM_ERROR_RADIO_INTERNAL;
}
ret = pthread_mutex_init(&radio->volume_lock, NULL);
if (ret) {
- MMRADIO_LOG_ERROR("volume mutex creation failed");
+ MMRADIO_LOG_ERROR("failed to create volume mutex");
return MM_ERROR_RADIO_INTERNAL;
}
MMRADIO_SET_STATE(radio, MM_RADIO_STATE_NULL);
/* initialize resource manager */
- ret = mmradio_resource_manager_init(&radio->resource_manager, radio);
+ ret = mmradio_resource_manager_init(&(radio->resource_manager), radio);
if (ret) {
- MMRADIO_LOG_ERROR("failed to initialize resource manager\n");
+ MMRADIO_LOG_ERROR("failed to initialize resource manager");
return MM_ERROR_RADIO_INTERNAL;
}
@@ -224,14 +224,14 @@ int _mmradio_create_radio(mm_radio_t *radio)
if (ret) {
/* NOTE : we are dealing it as an error since we cannot expect it's behavior */
- MMRADIO_LOG_ERROR("mmradio_audio_focus_register is failed");
+ MMRADIO_LOG_ERROR("failed to register sound focus");
return MM_ERROR_RADIO_INTERNAL;
}
#endif
ret = radio_hal_interface_init(&(radio->hal_inf));
if (ret) {
- MMRADIO_LOG_ERROR("mmradio hal interface init failed");
+ MMRADIO_LOG_ERROR("failed to init mmradio hal interface");
return ret;
}
@@ -255,7 +255,7 @@ int _mmradio_realize(mm_radio_t *radio)
ret = pthread_mutex_init(&radio->seek_cancel_mutex, NULL);
if (ret < 0) {
- MMRADIO_LOG_ERROR("Mutex creation failed %d", ret);
+ MMRADIO_LOG_ERROR("failed to create seek cancel mutex %d", ret);
return MM_ERROR_RADIO_INTERNAL;
}
@@ -273,7 +273,7 @@ int _mmradio_realize(mm_radio_t *radio)
#ifdef TIZEN_FEATURE_SOUND_VSTREAM
ret = sound_manager_create_stream_information_internal(SOUND_STREAM_TYPE_RADIO, NULL, radio, &radio->stream_info);
if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("sound_manager_create_stream_information_internal error");
+ MMRADIO_LOG_ERROR("failed to create stream information");
MMRADIO_LOG_FLEAVE();
return ret;
}
@@ -287,7 +287,7 @@ int _mmradio_realize(mm_radio_t *radio)
ret = sound_manager_get_max_volume(SOUND_TYPE_MEDIA, &max);
if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_WARNING("sound_manager_get_max_volume error");
+ MMRADIO_LOG_WARNING("failed to get max volume");
radio->max_media_volume = DEFAULT_MAX_MEDIA_VOLUME;
} else {
radio->max_media_volume = max;
@@ -296,7 +296,7 @@ int _mmradio_realize(mm_radio_t *radio)
ret = mm_sound_volume_get_value(VOLUME_TYPE_MEDIA, &volume);
if (ret != MM_ERROR_NONE)
- MMRADIO_LOG_WARNING("failed to get MEDIA_VOLUME");
+ MMRADIO_LOG_WARNING("failed to get media volume");
MMRADIO_VOLUME_LOCK(radio);
radio->media_volume = volume;
@@ -304,7 +304,7 @@ int _mmradio_realize(mm_radio_t *radio)
ret = mm_sound_add_volume_changed_callback(__mmradio_volume_changed_cb, (void *)radio, &radio->volume_subs_id);
if (ret != MM_ERROR_NONE)
- MMRADIO_LOG_WARNING("mm_sound_add_volume_changed_callback error");
+ MMRADIO_LOG_WARNING("failed to register volume changed callback");
MMRADIO_SET_STATE(radio, MM_RADIO_STATE_READY);
@@ -361,18 +361,18 @@ int _mmradio_destroy(mm_radio_t *radio)
ret = radio_hal_interface_deinit(radio->hal_inf);
if (ret) {
- MMRADIO_LOG_ERROR("mmradio hal interface deinit failed");
+ MMRADIO_LOG_ERROR("failed to deinitialize radio hal interface");
return ret;
}
/* destroy command lock */
ret = pthread_mutex_destroy(&radio->cmd_lock);
if (ret)
- MMRADIO_LOG_ERROR("mutex destroy failed\n");
+ MMRADIO_LOG_ERROR("failed to destory muxtex");
ret = pthread_mutex_destroy(&radio->volume_lock);
if (ret)
- MMRADIO_LOG_ERROR("volume mutex destroy failed\n");
+ MMRADIO_LOG_ERROR("failed to destory volume mutex");
#ifdef TIZEN_FEATURE_SOUND_FOCUS
ret = mmradio_sound_focus_deregister(&radio->sound_focus);
@@ -384,7 +384,7 @@ int _mmradio_destroy(mm_radio_t *radio)
ret = mmradio_resource_manager_deinit(&radio->resource_manager);
if (ret) {
- MMRADIO_LOG_ERROR("failed to initialize resource manager\n");
+ MMRADIO_LOG_ERROR("failed to deinitialize resource manager");
return MM_ERROR_RADIO_INTERNAL;
}
@@ -409,7 +409,7 @@ int _mmradio_set_frequency(mm_radio_t *radio, int freq)
ret = radio_hal_set_frequency(radio->hal_inf, freq);
if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_set_frequency error");
+ MMRADIO_LOG_ERROR("failed to set radio hal frequency");
MMRADIO_LOG_FLEAVE();
return ret;
}
@@ -433,7 +433,7 @@ int _mmradio_get_frequency(mm_radio_t *radio, int *pFreq)
ret = radio_hal_get_frequency(radio->hal_inf, &freq);
if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_get_frequency error");
+ MMRADIO_LOG_ERROR("failed to get radio hal frequency");
*pFreq = 0;
return ret;
}
@@ -461,7 +461,7 @@ int _mmradio_mute(mm_radio_t *radio)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_mute is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_mute error");
+ MMRADIO_LOG_ERROR("failed to set radio hal mute");
MMRADIO_LOG_FLEAVE();
return ret;
}
@@ -485,7 +485,7 @@ int _mmradio_unmute(mm_radio_t *radio)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_unmute is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_unmute error");
+ MMRADIO_LOG_ERROR("failed to set radio hal unmute");
MMRADIO_LOG_FLEAVE();
return ret;
}
@@ -547,7 +547,7 @@ int _mmradio_start(mm_radio_t *radio)
if (radio->sound_focus.handle > 0) {
ret = mmradio_acquire_sound_focus(&radio->sound_focus);
if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("failed to set sound focus");
+ MMRADIO_LOG_ERROR("failed to acquire sound focus");
return ret;
}
}
@@ -579,7 +579,7 @@ int _mmradio_start(mm_radio_t *radio)
if (!radio->is_ready) {
ret = mmradio_resource_manager_prepare(&radio->resource_manager, MM_RADIO_RESOURCE_TYPE_RADIO);
if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("resource manager prepare fail");
+ MMRADIO_LOG_ERROR("failed to prepare resource manager");
return MM_ERROR_RADIO_INTERNAL;
}
ret = mmradio_resource_manager_acquire(&radio->resource_manager);
@@ -592,7 +592,7 @@ int _mmradio_start(mm_radio_t *radio)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_prepare is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_prepare_device error");
+ MMRADIO_LOG_ERROR("failed to prepare radio hal");
goto error2;
}
@@ -600,7 +600,7 @@ int _mmradio_start(mm_radio_t *radio)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_open is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_init error");
+ MMRADIO_LOG_ERROR("failed to open radio hal");
goto error1;
}
radio->is_ready = TRUE;
@@ -610,11 +610,11 @@ int _mmradio_start(mm_radio_t *radio)
ret = mm_sound_volume_get_value(VOLUME_TYPE_MEDIA, &volume);
if (ret != MM_ERROR_NONE)
- MMRADIO_LOG_WARNING("failed to get MEDIA_VOLUME");
+ MMRADIO_LOG_WARNING("failed to get media volume");
ret = __mmradio_set_media_volume(radio, volume);
if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("failed to media volume");
+ MMRADIO_LOG_ERROR("failed to set media volume");
goto error1;
}
@@ -622,21 +622,21 @@ int _mmradio_start(mm_radio_t *radio)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_start is not supported");
} else if (ret) {
- MMRADIO_LOG_ERROR("failed to radio_hal_start");
+ MMRADIO_LOG_ERROR("failed to start radio hal");
goto error1;
}
/* set stored frequency */
ret = radio_hal_set_frequency(radio->hal_inf, radio->freq);
if (ret) {
- MMRADIO_LOG_ERROR("failed to radio_hal_set_frequency");
+ MMRADIO_LOG_ERROR("failed to set radio hal frequency");
goto error1;
}
#ifdef TIZEN_FEATURE_SOUND_VSTREAM
ret = sound_manager_start_virtual_stream(radio->vstream);
if (ret) {
- MMRADIO_LOG_ERROR("failed to sound_manager_start_virtual_stream");
+ MMRADIO_LOG_ERROR("failed to start sound manager virtual stream");
goto error;
}
#endif
@@ -684,7 +684,7 @@ int _mmradio_stop(mm_radio_t *radio)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_unmute is not supported");
} else if (ret) {
- MMRADIO_LOG_ERROR("failed to radio_hal_stop");
+ MMRADIO_LOG_ERROR("failed to stop radio hal");
return ret;
}
@@ -693,7 +693,7 @@ int _mmradio_stop(mm_radio_t *radio)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_close is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_close_device error");
+ MMRADIO_LOG_ERROR("failed to close radio hal");
return ret;
}
@@ -701,7 +701,7 @@ int _mmradio_stop(mm_radio_t *radio)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_unprepare is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_close_device error");
+ MMRADIO_LOG_ERROR("failed to unprepare radio hal");
return ret;
}
@@ -722,7 +722,7 @@ int _mmradio_stop(mm_radio_t *radio)
if (resource_state == MM_RADIO_RESOURCE_STATE_PREPARED) {
ret = mmradio_resource_manager_unprepare(&radio->resource_manager);
if (ret != MM_ERROR_NONE)
- MMRADIO_LOG_ERROR("resource manager unprepare fail");
+ MMRADIO_LOG_ERROR("failed to unprepare resource manager");
}
}
@@ -730,7 +730,7 @@ int _mmradio_stop(mm_radio_t *radio)
if (radio->sound_focus.handle > 0) {
ret = mmradio_release_sound_focus(&radio->sound_focus);
if (ret) {
- MMRADIO_LOG_ERROR("mmradio_release_audio_focus is failed");
+ MMRADIO_LOG_ERROR("failed to release sound focus");
return ret;
}
}
@@ -765,7 +765,7 @@ int _mmradio_seek(mm_radio_t *radio, MMRadioSeekDirectionType direction)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_mute is not supported");
} else if (ret) {
- MMRADIO_LOG_ERROR("failed to radio_hal_mute");
+ MMRADIO_LOG_ERROR("failed to set radio hal mute");
return ret;
}
radio->seek_unmute = TRUE;
@@ -777,7 +777,7 @@ int _mmradio_seek(mm_radio_t *radio, MMRadioSeekDirectionType direction)
ret = pthread_create(&radio->seek_thread, NULL, (void *)__mmradio_seek_thread, (void *)radio);
if (ret) {
- MMRADIO_LOG_DEBUG("failed create thread");
+ MMRADIO_LOG_DEBUG("failed to create thread");
radio->is_seeking = FALSE;
radio->seek_cancel = TRUE;
if (radio->seek_unmute) {
@@ -785,7 +785,7 @@ int _mmradio_seek(mm_radio_t *radio, MMRadioSeekDirectionType direction)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_mute is not supported");
} else if (ret) {
- MMRADIO_LOG_ERROR("failed to radio_hal_mute");
+ MMRADIO_LOG_ERROR("failed to set radio hal mute");
radio->seek_unmute = FALSE;
return ret;
}
@@ -845,7 +845,7 @@ int _mmradio_start_scan(mm_radio_t *radio)
if (!radio->is_ready) {
ret = mmradio_resource_manager_prepare(&radio->resource_manager, MM_RADIO_RESOURCE_TYPE_RADIO);
if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("resource manager prepare fail");
+ MMRADIO_LOG_ERROR("failed to prepare resource manager");
return MM_ERROR_RADIO_INTERNAL;
}
ret = mmradio_resource_manager_acquire(&radio->resource_manager);
@@ -859,7 +859,7 @@ int _mmradio_start_scan(mm_radio_t *radio)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_prepare is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_prepare_device error");
+ MMRADIO_LOG_ERROR("failed to prepare radio hal");
return ret;
}
@@ -867,7 +867,7 @@ int _mmradio_start_scan(mm_radio_t *radio)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_open is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_init error");
+ MMRADIO_LOG_ERROR("failed to open radio hal");
MMRADIO_LOG_FLEAVE();
return ret;
}
@@ -937,7 +937,7 @@ int _mm_radio_get_signal_strength(mm_radio_t *radio, int *value)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_unmute is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_get_signal_strength error");
+ MMRADIO_LOG_ERROR("failed to get radio hal signal strength");
*value = 0;
MMRADIO_LOG_FLEAVE();
return ret;
@@ -961,7 +961,7 @@ void __mmradio_scan_thread(mm_radio_t *radio)
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_mute is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_mute error");
+ MMRADIO_LOG_ERROR("faied to set radio hal mute");
goto FINISHED;
}
ret = radio_hal_set_frequency(radio->hal_inf, radio->region_setting.band_min);
@@ -1034,14 +1034,14 @@ FINISHED:
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_unmute is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_unmute error");
+ MMRADIO_LOG_ERROR("failed to set radio hal unmute");
goto FINISHED_ERR;
}
ret = radio_hal_set_frequency(radio->hal_inf, prev_freq);
if (ret == MM_ERROR_NOT_SUPPORT_API) {
MMRADIO_LOG_WARNING("radio_hal_set_frequency is not supported");
} else if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_set_frequency error");
+ MMRADIO_LOG_ERROR("failed to set radio hal frequency");
goto FINISHED_ERR;
}
}
@@ -1056,13 +1056,13 @@ FINISHED_ERR:
if (ret == MM_ERROR_NOT_SUPPORT_API)
MMRADIO_LOG_WARNING("radio_hal_close is not supported");
else if (ret != MM_ERROR_NONE)
- MMRADIO_LOG_ERROR("radio_hal_close_device error");
+ MMRADIO_LOG_ERROR("failed to close radio hal");
ret = radio_hal_unprepare(radio->hal_inf);
if (ret == MM_ERROR_NOT_SUPPORT_API)
MMRADIO_LOG_WARNING("radio_hal_unprepare is not supported");
else if (ret != MM_ERROR_NONE)
- MMRADIO_LOG_ERROR("radio_hal_close_device error");
+ MMRADIO_LOG_ERROR("failed to unprepare radio hal");
radio->is_ready = FALSE;
@@ -1079,7 +1079,7 @@ FINISHED_ERR:
if (resource_state == MM_RADIO_RESOURCE_STATE_PREPARED) {
ret = mmradio_resource_manager_unprepare(&radio->resource_manager);
if (ret != MM_ERROR_NONE)
- MMRADIO_LOG_ERROR("resource manager unprepare fail");
+ MMRADIO_LOG_ERROR("failed to unprepare resource manager");
}
}
@@ -1140,7 +1140,7 @@ void __mmradio_seek_thread(mm_radio_t *radio)
ret = radio_hal_seek(radio->hal_inf, radio->seek_direction);
pthread_mutex_unlock(&radio->seek_cancel_mutex);
if (ret) {
- MMRADIO_LOG_ERROR("radio_hal_seek failed");
+ MMRADIO_LOG_ERROR("failed to seek radio hal");
goto SEEK_FAILED;
}
@@ -1178,7 +1178,7 @@ void __mmradio_seek_thread(mm_radio_t *radio)
*/
ret = radio_hal_unmute(radio->hal_inf);
if (ret) {
- MMRADIO_LOG_ERROR("failed to tune to new frequency");
+ MMRADIO_LOG_ERROR("failed to set unmute radio hal");
goto SEEK_FAILED;
}
radio->seek_unmute = FALSE;
@@ -1204,7 +1204,7 @@ SEEK_FAILED:
*/
ret = radio_hal_unmute(radio->hal_inf);
if (ret)
- MMRADIO_LOG_ERROR("failed to tune to new frequency");
+ MMRADIO_LOG_ERROR("failed to set unmute radio hal");
radio->seek_unmute = FALSE;
}
/* freq -1 means it's failed to seek */
@@ -1222,7 +1222,7 @@ static bool __mmradio_post_message(mm_radio_t *radio, enum MMMessageType msgtype
MMRADIO_LOG_FENTER();
if (!radio->msg_cb) {
- MMRADIO_LOG_WARNING("failed to post a message");
+ MMRADIO_LOG_WARNING("failed to post a message because msg cb didn't register");
return false;
}
@@ -1556,7 +1556,7 @@ static void __mmradio_volume_changed_cb(volume_type_t type, unsigned int volume,
MMRADIO_LOG_INFO("Change FM Radio volume to %d", volume);
ret = __mmradio_set_media_volume(radio, volume);
if (ret != MM_ERROR_NONE)
- MMRADIO_LOG_ERROR("__mmradio_set_media_volume error");
+ MMRADIO_LOG_ERROR("failed to set media volume");
return;
}
}
@@ -1621,7 +1621,7 @@ int _mmradio_set_volume(mm_radio_t *radio, float volume)
ret = radio_hal_set_volume(radio->hal_inf, volume);
if (ret != MM_ERROR_NONE)
- MMRADIO_LOG_ERROR("radio_hal_set_volume error");
+ MMRADIO_LOG_ERROR("failed to set radio hal volume");
MMRADIO_LOG_FLEAVE();
@@ -1641,7 +1641,7 @@ int _mmradio_get_volume(mm_radio_t *radio, float *pVolume)
ret = radio_hal_get_volume(radio->hal_inf, &volume);
if (ret != MM_ERROR_NONE) {
- MMRADIO_LOG_ERROR("radio_hal_get_volume error");
+ MMRADIO_LOG_ERROR("failed to get radio hal volume");
*pVolume = 0;
return ret;
}
@@ -1673,7 +1673,7 @@ static int __mmradio_set_media_volume(mm_radio_t *radio, unsigned int level)
ret = radio_hal_set_media_volume(radio->hal_inf, level);
if (ret != MM_ERROR_NONE)
- MMRADIO_LOG_ERROR("radio_hal_set_media_volume error");
+ MMRADIO_LOG_ERROR("failed to set radio hal media volume");
MMRADIO_LOG_FLEAVE();