* limitations under the License.
*/
+#include <telephony/ril.h>
+
#ifndef SAMSUNG_AUDIO_H
#define SAMSUNG_AUDIO_H
#define SOUND_PLAYBACK_VOICE_DEVICE 1
#define SOUND_CAPTURE_VOICE_DEVICE 1
+/* Wideband AMR callback */
+#ifndef RIL_UNSOL_SNDMGR_WB_AMR_REPORT
+#ifdef RIL_UNSOL_WB_AMR_STATE
+#define RIL_UNSOL_SNDMGR_WB_AMR_REPORT RIL_UNSOL_WB_AMR_STATE
+#else
+#define RIL_UNSOL_SNDMGR_WB_AMR_REPORT 0
+#endif
+#endif
+
/* Unusupported
#define SOUND_CAPTURE_LOOPBACK_AEC_DEVICE 1
#define SOUND_CAPTURE_HOTWORD_DEVICE 0
#ifndef RIL_INTERFACE_H
#define RIL_INTERFACE_H
-#include <telephony/ril.h>
+#include <samsung_audio.h>
#include <secril-client.h>
typedef void (*ril_wb_amr_callback)(void *data, int enable);
session->wb_amr = true;
ALOGV("%s: Forcing voice config: %s", __func__, voice_config);
} else {
- /* register callback for wideband AMR setting */
- ret = ril_set_wb_amr_callback(&session->ril,
- voice_session_wb_amr_callback,
- (void *)adev);
- if (ret != 0) {
- ALOGE("%s: Failed to register WB_AMR callback", __func__);
- free(session);
- return NULL;
+ if (RIL_UNSOL_SNDMGR_WB_AMR_REPORT > 0) {
+ /* register callback for wideband AMR setting */
+ ret = ril_set_wb_amr_callback(&session->ril,
+ voice_session_wb_amr_callback,
+ (void *)adev);
+ if (ret != 0) {
+ ALOGE("%s: Failed to register WB_AMR callback", __func__);
+ free(session);
+ return NULL;
+ }
+
+ ALOGV("%s: Registered WB_AMR callback", __func__);
+ } else {
+ ALOGV("%s: WB_AMR callback not supported", __func__);
}
-
- ALOGV("%s: Registered WB_AMR callback", __func__);
}
return session;