if (ret != MM_ERROR_NONE) {
MMRADIO_LOG_ERROR("failed to get current frequency");
} else {
- if (freq < prev_freq) {
- MMRADIO_LOG_DEBUG("scanning wrapped around. stopping scan");
+ if (freq <= prev_freq) {
+ MMRADIO_LOG_ERROR("frequency is less than previous [%d] -> [%d] we wrapped around, we are finished scanning", prev_freq, freq);
break;
}
- if (freq == prev_freq)
- continue;
-
prev_freq = param.radio_scan.frequency = (int)freq;
MMRADIO_LOG_INFO("scanning : new frequency : [%d]", param.radio_scan.frequency);
/* drop if max freq is scanned */
- if (param.radio_scan.frequency == radio->region_setting.band_max) {
+ if (param.radio_scan.frequency >= radio->region_setting.band_max) {
MMRADIO_LOG_WARNING("%d freq is dropping...and stopping scan", param.radio_scan.frequency);
break;
}
if (result)
MMRADIO_LOG_ERROR("failed to stop radio");
+ radio->sound_focus.by_focus_cb = MMRADIO_FOCUS_CB_NONE;
+
MMRADIO_LOG_DEBUG("FOCUS_IS_RELEASED cur_focus_type : %d", radio->sound_focus.cur_focus_type);
}
break;
result = _mmradio_stop(radio);
if (result)
MMRADIO_LOG_ERROR("failed to stop radio");
+ radio->sound_focus.by_focus_cb = MMRADIO_FOCUS_CB_NONE;
MMRADIO_LOG_DEBUG("FOCUS_IS_RELEASED cur_focus_type : %d\n", radio->sound_focus.cur_focus_type);
}