+int _set_effect_method_with_reference_by_id(sound_stream_info_h stream_info, sound_effect_method_with_reference_e method, int device_id)
+{
+ sound_stream_info_s *stream_h = (sound_stream_info_s*)stream_info;
+
+ SM_ARG_CHECK(stream_h);
+
+ if (!stream_h->stream_conf_info.avail_in_devices[0]) {
+ LOGE("stream_h[%p, %s] does not support any input devices", stream_h, stream_h->stream_type);
+ return SOUND_MANAGER_ERROR_POLICY;
+ }
+
+ if (method == SOUND_MANAGER_STREAM_NO_METHOD ||
+ device_id == SOUND_MANAGER_STREAM_NO_REFERENCE_DEVICE)
+ return SOUND_MANAGER_ERROR_INVALID_PARAMETER;
+
+ stream_h->sound_effect.reference_method = method;
+ stream_h->sound_effect.reference_device_id = device_id;
+
+ LOGI("set a effect. stream_h[%p, %s], method[%d], reference device[id:%d]",
+ stream_h, stream_h->stream_type, method, device_id);
+
+ return SOUND_MANAGER_ERROR_NONE;
+}
+