- if (MM_ERROR_NONE == _mm_session_util_read_information(-1, &hcamcorder->session_type, &hcamcorder->session_flags)) {
- _mmcam_dbg_log("use sound focus function.");
- hcamcorder->sound_focus_register = TRUE;
-
- if (MM_ERROR_NONE != mm_sound_focus_get_id(&hcamcorder->sound_focus_id)) {
- _mmcam_dbg_err("mm_sound_focus_get_uniq failed");
- ret = MM_ERROR_POLICY_BLOCKED;
- goto _ERR_DEFAULT_VALUE_INIT;
- }
-
- ret = mm_sound_register_focus_for_session(hcamcorder->sound_focus_id,
- getpid(), "media", _mmcamcorder_sound_focus_cb, hcamcorder);
- if (ret != MM_ERROR_NONE) {
- _mmcam_dbg_err("mm_sound_register_focus failed");
- ret = MM_ERROR_POLICY_BLOCKED;
- goto _ERR_DEFAULT_VALUE_INIT;
- }
-
- _mmcam_dbg_log("mm_sound_register_focus done - id %d, session type %d, flags 0x%x",
- hcamcorder->sound_focus_id, hcamcorder->session_type, hcamcorder->session_flags);
- } else {
- _mmcam_dbg_log("_mm_session_util_read_information failed. skip sound focus function.");
- hcamcorder->sound_focus_register = FALSE;
- }
-