compilation: murphy support in avsys-audio-path
authorJanos Kovacs <jankovac503@gmail.com>
Sun, 26 Aug 2012 23:38:54 +0000 (02:38 +0300)
committerIsmo Puustinen <ismo.puustinen@intel.com>
Mon, 11 Mar 2013 11:47:29 +0000 (13:47 +0200)
avsys-audio-pasimple.c
avsys-audio-path.c

index aeeb999..7bbe983 100644 (file)
 #include "avsys-error.h"
 #include "avsys-debug.h"
 
+#ifdef MURPHY_SUPPORT
+#define PA_PROP_MEDIA_POLICY   "media.policy"
+#endif
+
 #define PA_SIMPLE_SAMPLES_PER_PERIOD_DEFAULT                           1536    /* frames */
 #define PA_SIMPLE_PERIODS_PER_BUFFER_FASTMODE                          4
 #define PA_SIMPLE_PERIODS_PER_BUFFER_DEFAULT                           6
index d173619..f46f75e 100644 (file)
@@ -47,9 +47,9 @@
 #define EXPORT_API __attribute__((__visibility__("default")))
 
 #define RET_IO_CTL_ERR_IF_FAIL(SECTION) { if(AVSYS_FAIL(SECTION)) { \
-                                                                       avsys_error_r(AVAUDIO,"%s %d\n",__func__,__LINE__); \
-                                                                       return AVSYS_STATE_ERR_IO_CONTROL; \
-                                                                       } }
+                                              avsys_error_r(AVAUDIO,"%s %d\n",__func__,__LINE__);         \
+                                              return AVSYS_STATE_ERR_IO_CONTROL;                          \
+                                        } }
 
 static int g_playback_path_select_data[AVSYS_AUDIO_PLAYBACK_GAIN_MAX][AVSYS_AUDIO_PATH_EX_OUTMAX] = {
                { /* AVSYS_AUDIO_PLAYBACK_GAIN_AP */
@@ -95,18 +95,18 @@ static int g_capture_path_select_data[AVSYS_AUDIO_CAPTURE_GAIN_MAX][AVSYS_AUDIO_
 
 static int g_playback_gain_select_data[AVSYS_AUDIO_PLAYBACK_GAIN_MAX][AVSYS_AUDIO_PLAYBACK_GAIN_MAX] = {
                {       /* AVSYS_AUDIO_PLAYBACK_GAIN_AP */
-                               AVSYS_AUDIO_PLAYBACK_GAIN_AP,                           /* AVSYS_AUDIO_PLAYBACK_GAIN_AP */
-                               AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO,                      /* AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO */
+                               AVSYS_AUDIO_PLAYBACK_GAIN_AP,                   /* AVSYS_AUDIO_PLAYBACK_GAIN_AP */
+                               AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO,              /* AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO */
                                AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL,            /* AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL */
                                AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL,            /* AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL */
                                AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT,            /* AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT */
                },
                {       /* AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO */
-                               AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO,                      /* AVSYS_AUDIO_PLAYBACK_GAIN_AP */
-                               AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO,                      /* AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO */
+                               AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO,              /* AVSYS_AUDIO_PLAYBACK_GAIN_AP */
+                               AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO,              /* AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO */
                                AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL,            /* AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL */
                                AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL,            /* AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL */
-                               AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO,                      /* AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT */
+                               AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO,              /* AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT */
                },
                {       /* AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL */
                                AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL,            /* AVSYS_AUDIO_PLAYBACK_GAIN_AP */
@@ -123,8 +123,8 @@ static int g_playback_gain_select_data[AVSYS_AUDIO_PLAYBACK_GAIN_MAX][AVSYS_AUDI
                                AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT,            /* AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT */
                },
                {       /* AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT */
-                               AVSYS_AUDIO_PLAYBACK_GAIN_AP,                           /* AVSYS_AUDIO_PLAYBACK_GAIN_AP */
-                               AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO,                      /* AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO */
+                               AVSYS_AUDIO_PLAYBACK_GAIN_AP,                   /* AVSYS_AUDIO_PLAYBACK_GAIN_AP */
+                               AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO,              /* AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO */
                                AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL,            /* AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL */
                                AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL,            /* AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL */
                                AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT,            /* AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT */
@@ -158,6 +158,13 @@ static int g_capture_gain_select_data[AVSYS_AUDIO_CAPTURE_GAIN_MAX][AVSYS_AUDIO_
                },
 };
 
+typedef struct {
+       char headset_detection;
+       char headset_node_number;
+} AudioSystemConf;
+
+
+#ifndef MURPHY_SUPPORT
 
 static int __avsys_audio_path_set_ascn_ap_playback(avsys_audio_path_ex_info_t *control);
 static int __avsys_audio_path_set_ascn_voicecall(avsys_audio_path_ex_info_t *control);
@@ -315,11 +322,12 @@ static bool __is_cp_wb ()
        avsys_info(AVAUDIO, "Result [%d] : [%s] capability!!!\n", ret, (ret)? "WB" : "NB");
        return ret;
 }
+#endif  /* MURPHY_SUPPORT */
 
 EXPORT_API
 int avsys_audio_path_ex_init(void)
 {
-       avsys_audio_path_ex_info_t *control = NULL;
+        avsys_audio_path_ex_info_t *control = NULL;
        avsys_audio_path_ex_info_t **temp = NULL;
        gain_info_t default_gain = { AVSYS_AUDIO_PLAYBACK_GAIN_AP, AVSYS_AUDIO_CAPTURE_GAIN_AP };
        path_info_t default_path = { AVSYS_AUDIO_PATH_EX_SPK, AVSYS_AUDIO_PATH_EX_MIC };
@@ -354,6 +362,10 @@ int avsys_audio_path_ex_init(void)
        control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK;
        control->inserted = AVSYS_AUDIO_INSERTED_NONE;
 
+#ifdef MURPHY_SUPPORT
+    control->gain_debug_mode = 0;
+#else  /* MURPHY_SUPPORT */
+
        if (AVSYS_FAIL(__load_conf(&conf)))
                avsys_error_r(AVAUDIO, "Can not load audio system configuration file\n");
 
@@ -375,6 +387,8 @@ int avsys_audio_path_ex_init(void)
        control->wb_enabled = __is_cp_wb();
        control->gain_debug_mode = conf.gain_debug_mode;
 
+#endif  /* MURPHY_SUPPORT */
+
        control->mute = AVSYS_AUDIO_UNMUTE;
        control->path_fixed = PATH_FIXED_NONE;
 
@@ -390,6 +404,10 @@ int avsys_audio_path_ex_init(void)
                index++;
        } while (index < PATH_FIXED_TYPE_MAX);
 
+
+#ifdef MURPHY_SUPPORT
+    err = AVSYS_STATE_SUCCESS;
+#else
        /* call path control */
        err = __avsys_audio_path_set_ascn_ap_playback(control);
        if (AVSYS_SUCCESS(err))
@@ -397,6 +415,7 @@ int avsys_audio_path_ex_init(void)
 
        if (AVSYS_SUCCESS(err))
                err = __avsys_audio_path_set_ascn_ap_capture(control);
+#endif
 
        return err;
 }
@@ -418,6 +437,10 @@ int avsys_audio_path_ex_fini(void)
 EXPORT_API
 int avsys_audio_path_ex_reset(int forced)
 {
+#ifdef MURPHY_SUPPORT
+        (void)forced;
+        return AVSYS_STATE_SUCCESS;
+#else
        avsys_audio_path_ex_info_t *control = NULL;
        avsys_audio_path_ex_info_t **temp = NULL;
        gain_info_t default_gain = { AVSYS_AUDIO_PLAYBACK_GAIN_AP, AVSYS_AUDIO_CAPTURE_GAIN_AP };
@@ -521,6 +544,7 @@ int avsys_audio_path_ex_reset(int forced)
        }
 
        return err;
+#endif  /* MURPHY_SUPPORT */
 }
 
 EXPORT_API
@@ -568,6 +592,9 @@ int avsys_audio_path_ex_dump(void)
        fprintf(stdout, "======================================================================\n");
 #if defined(_MMFW_I386_ALL_SIMULATOR)
        fprintf(stdout, " In simulator, follow informations don`t have means.\n");
+#elif defined(MURPHY_SUPPORT)
+        fprintf(stdout, " Murphy support is enabled. module-murphy-ivi is routing in pulseaudio.\n"
+                        " The information below does not make much sense ...\n");
 #endif
 
        fprintf(stdout, " GAIN                          : P (%-s / %-s) - R (%-s / %-s) - C (%-s / %-s)\n",
@@ -597,6 +624,7 @@ int avsys_audio_path_ex_dump(void)
        return AVSYS_STATE_SUCCESS;
 }
 
+#ifndef MURPHY_SUPPORT
 static int __avsys_audio_path_get_earjack_type (void)
 {
        int fd = 0;
@@ -643,10 +671,11 @@ static int __avsys_audio_path_get_earjack_type (void)
        close(fd);
        return readval;
 }
+#endif  /* MURPHY_SUPPORT */
 
 int avsys_audio_path_earjack_init(int *init_type, int *outfd)
 {
-#if !defined(_MMFW_I386_ALL_SIMULATOR)
+#if !defined(_MMFW_I386_ALL_SIMULATOR) && !defined(MURPHY_SUPPORT)
        char eventnode_filename[32] = { 0, };
        int fd = 0;
        avsys_audio_conf conf = { 0, };
@@ -705,7 +734,7 @@ int avsys_audio_path_earjack_init(int *init_type, int *outfd)
 
 int avsys_audio_path_earjack_wait(int fd, int *current_type, int *new_type, int *is_auto_mute)
 {
-#if !defined(_MMFW_I386_ALL_SIMULATOR)
+#if !defined(_MMFW_I386_ALL_SIMULATOR) && !defined(MURPHY_SUPPORT)
        fd_set set;
        int readtemp;
        int select_ret = 0;
@@ -794,7 +823,7 @@ int avsys_audio_path_earjack_wait(int fd, int *current_type, int *new_type, int
 
 int avsys_audio_path_earjack_process(int new_type)
 {
-#if !defined(_MMFW_I386_ALL_SIMULATOR)
+#if !defined(_MMFW_I386_ALL_SIMULATOR) && !defined(MURPHY_SUPPORT)
        avsys_audio_path_ex_info_t *control = NULL;
        avsys_audio_path_ex_info_t **temp = NULL;
        int err = AVSYS_STATE_SUCCESS;
@@ -816,7 +845,7 @@ int avsys_audio_path_earjack_process(int new_type)
 
 int avsys_audio_path_earjack_deinit(int fd)
 {
-#if !defined(_MMFW_I386_ALL_SIMULATOR)
+#if !defined(_MMFW_I386_ALL_SIMULATOR) && !defined(MURPHY_SUPPORT)
        close(fd);
        return AVSYS_STATE_SUCCESS;
 #else
@@ -826,7 +855,7 @@ int avsys_audio_path_earjack_deinit(int fd)
 
 int avsys_audio_path_earjack_unlock()
 {
-#ifdef EARJACK_LOCK            /* currently this is disabled to avoid semapore value increase */
+#if defined(EARJACK_LOCK) && !defined(MURPHY_SUPPORT)  /* currently EARJACK_LOCK is disabled to avoid semapore value increase */
        if (AVSYS_FAIL(avsys_audio_unlock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))) {
                avsys_error_r(AVAUDIO, "avsys_audio_unlock_sync() failed in %s\n", __func__);
                return AVSYS_STATE_ERR_INTERNAL;
@@ -846,6 +875,7 @@ enum {
        CMD_DEVICE_MAX
 };
 
+#ifndef MURPHY_SUPPORT
 avsys_audio_alsa_aif_handle_t *g_hAIF[AIF_DEVICE_MAX] = { NULL, NULL, NULL, NULL, NULL };
 char *strAIF[AIF_DEVICE_MAX] = { "AIF CP Capture", "AIF CP Playback", "AIF BT Capture", "AIF BT Playback", "AIF RADIO Playback" };
 
@@ -980,6 +1010,9 @@ static void __avsys_close_aif ()
        }
 }
 
+#endif  /* MURPHY_SUPPORT */
+
+
 static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_ex_info_t *control)
 {
        int err = AVSYS_STATE_SUCCESS;
@@ -992,6 +1025,7 @@ static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_
        case AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL:
        case AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL:
                if (getpid() == control->path_fixed_pid[PATH_FIXED_TYPE_CALL]) {
+#ifndef MURPHY_SUPPORT
                        if (!control->control_aif_before_path_set) {
                                __avsys_close_aif();
                        } else {
@@ -1001,6 +1035,7 @@ static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_
                        if (AVSYS_FAIL(avsys_audio_ascn_single_set(ASCN_CODEC_DISABLE_ON_SUSPEND))) {
                                avsys_error_r(AVAUDIO, "[%s] failed to set codec_disable_on_suspend\n", __func__);
                        }
+#endif  /* MURPHY_SUPPORT */
                } else {
                        if (control->path_fixed_pid[PATH_FIXED_TYPE_CALL] < 0) {
                                avsys_warning(AVAUDIO, "Sound path for call released already\n");
@@ -1020,6 +1055,9 @@ static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_
 
        case AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO:
                /* TODO: Reset & Codec disable on suspend script */
+#ifdef MURPHY_SUPPORT
+        control->p_path_status.playback = PS_PATH_NONE;
+#else
                if (AVSYS_FAIL(avsys_audio_ascn_single_set(ASCN_CODEC_DISABLE_ON_SUSPEND))) {
                        avsys_error_r(AVAUDIO, "[%s] failed to set codec_disable_on_suspend\n", __func__);
                }
@@ -1027,6 +1065,7 @@ static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_
                if (AVSYS_FAIL(avsys_audio_ascn_single_set(ASCN_STR_RESET_CAPTURE))) {
                        avsys_error_r(AVAUDIO, "[%s] failed to set reset\n", __func__);
                }
+#endif
 
                break;
 
@@ -1050,6 +1089,7 @@ static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_
                                control->path.capture = AVSYS_AUDIO_PATH_EX_HEADSETMIC;
                }
 
+#ifndef MURPHY_SUPPORT
                /* Playback */
                err = __avsys_audio_path_set_ascn_ap_playback(control);
                if (AVSYS_SUCCESS(err)) {
@@ -1066,11 +1106,13 @@ static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_
                if (AVSYS_FAIL(err)) {
                        avsys_error(AVAUDIO, "Set ap capture failure\n");
                }
+#endif
        }
 
+#ifndef MURPHY_SUPPORT
        if (close_aif_later == true) {
                __avsys_close_aif();
-       }
+#endif
 
        return err;
 }
@@ -1114,8 +1156,10 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option)
        pid_t current_pid;
        int err = AVSYS_STATE_SUCCESS;
        char req_release_path = 0;
+#ifndef MURPHY_SUPPORT
        char AIF_control[AIF_DEVICE_MAX] = { CMD_DEVICE_NONE, CMD_DEVICE_NONE, CMD_DEVICE_NONE, CMD_DEVICE_NONE, CMD_DEVICE_NONE };
        int iAIF = 0;
+#endif
 
        avsys_warning(AVAUDIO, "=================== [Input Param] gain %d, out %d, in %d, opt 0x%x ====================\n", gain, out, in, option);
 
@@ -1239,7 +1283,11 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option)
        if (req_release_path && (req_gain.playback == local_gain.playback) && (req_gain.capture == local_gain.capture)) {
                avsys_warning(AVAUDIO,"Release path for %d %d\n", local_gain.playback, local_gain.capture);
 
+#ifdef MURPHY_SUPPORT
+                err = AVSYS_STATE_SUCCESS;
+#else
                err = __avsys_audio_release_path(local_gain, control);
+#endif
                goto FINISHED;
        }
        if (CHECK_VALID(req_gain.playback)) {
@@ -1257,24 +1305,30 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option)
 
                        switch (local_gain.playback) {
                        case AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT:
+#ifndef MURPHY_SUPPORT
                                if (control->path.playback == AVSYS_AUDIO_PATH_EX_BTHEADSET) {
                                        SET_AIF(AIF_BT_PLAYBACK);
                                        SET_AIF(AIF_BT_CAPTURE);
                                }
+#endif
                                break;
 
                        case AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL:
                        case AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL:
+#ifndef MURPHY_SUPPORT
                                /* Set CP only for voicecall */
                                if (local_gain.capture == AVSYS_AUDIO_CAPTURE_GAIN_VOICECALL) {
                                        SET_AIF(AIF_CP_PLAYBACK);
                                }
+                               control->path_fixed_pid[PATH_FIXED_TYPE_CALL] = current_pid;
+                               SET_AIF(AIF2_PLAYBACK);
 
                                /* Voicecall / Videocall Common setting */
                                control->path_fixed_pid[PATH_FIXED_TYPE_CALL] = current_pid;
                                if (control->path.playback == AVSYS_AUDIO_PATH_EX_BTHEADSET) {
                                        SET_AIF(AIF_BT_PLAYBACK);
                                }
+#endif
                                break;
 
                        case AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO:
@@ -1301,16 +1355,24 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option)
                        switch (local_gain.capture) {
                        case AVSYS_AUDIO_CAPTURE_GAIN_VOICECALL:
                        case AVSYS_AUDIO_CAPTURE_GAIN_VIDEOCALL:
+                               /* Voicecall / Videocall Common setting */
+                               control->path_fixed_pid[PATH_FIXED_TYPE_CALL] = current_pid;
+#ifndef MURPHY_SUPPORT
                                /* Set CP only for voicecall */
                                if (local_gain.capture == AVSYS_AUDIO_CAPTURE_GAIN_VOICECALL) {
                                        SET_AIF(AIF_CP_CAPTURE);
                                }
-
-                               /* Voicecall / Videocall Common setting */
                                control->path_fixed_pid[PATH_FIXED_TYPE_CALL] = current_pid;
                                if (control->path.capture == AVSYS_AUDIO_PATH_EX_BTMIC) {
+                                       SET_AIF(AIF3_CAPTURE);
+                               }
+
+                               SET_AIF(AIF2_CAPTURE);
+
+                               if (control->path.capture == AVSYS_AUDIO_PATH_EX_BTMIC) {
                                        SET_AIF(AIF_BT_CAPTURE);
                                }
+#endif
                                break;
 
                        case AVSYS_AUDIO_CAPTURE_GAIN_FMRADIO:
@@ -1322,44 +1384,64 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option)
 
        /* Open AIFs */
        if (control->control_aif_before_path_set) {
+#if !defined(MURPHY_SUPPORT)
                err = __avsys_open_aif(AIF_control, control->wb_enabled);
+#else
+        err = AVSYS_STATE_SUCCESS;
+#endif
        }
 
        /* Do ALSA scenario control based on gain */
        /* Playback */
        if (local_gain.playback == AVSYS_AUDIO_PLAYBACK_GAIN_AP) {
                avsys_warning(AVAUDIO, "playback gain : ap\n");
+#ifndef MURPHY_SUPPORT
                err = __avsys_audio_path_set_ascn_ap_playback(control);
                if (AVSYS_SUCCESS(err)) {
                        err = __avsys_audio_path_set_hw_controls(control);
                }
+#endif
        } else if(local_gain.playback == AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT) {
                avsys_warning(AVAUDIO,"playback gain : callalert\n");
+#ifndef MURPHY_SUPPORT
                err = __avsys_audio_path_set_ascn_ap_playback(control);
                if (AVSYS_SUCCESS(err)) {
                        err = __avsys_audio_path_set_hw_controls(control);
                }
+#endif
        } else if (local_gain.playback == AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO &&
                           local_gain.capture == AVSYS_AUDIO_CAPTURE_GAIN_FMRADIO) {
                avsys_warning(AVAUDIO, "fmradio gain\n");
+#ifndef MURPHY_SUPPORT
                err = __avsys_audio_path_set_ascn_fmradio(control);
+#endif
        } else if (local_gain.playback == AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL &&
                           local_gain.capture == AVSYS_AUDIO_CAPTURE_GAIN_VOICECALL) {
                avsys_warning(AVAUDIO, "voicecall gain\n");
+#ifndef MURPHY_SUPPORT
                err = __avsys_audio_path_set_ascn_voicecall(control);
+#endif
        } else if (local_gain.playback == AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL &&
                           local_gain.capture == AVSYS_AUDIO_CAPTURE_GAIN_VIDEOCALL) {
                avsys_warning(AVAUDIO, "videocall gain\n");
+#ifndef MURPHY_SUPPORT
                err = __avsys_audio_path_set_ascn_videocall(control);
+#endif
        }
        /* Capture */
        if (local_gain.capture == AVSYS_AUDIO_CAPTURE_GAIN_AP) {
                avsys_warning(AVAUDIO, "capture gain : ap\n");
+#ifndef MURPHY_SUPPORT
                err = __avsys_audio_path_set_ascn_ap_capture(control);
+#endif
        }
 
        if (!control->control_aif_before_path_set) {
+#if !defined(MURPHY_SUPPORT)
                err = __avsys_open_aif(AIF_control, control->wb_enabled);
+#else
+        err = AVSYS_STATE_SUCCESS;
+#endif
        }
 
 FINISHED:
@@ -1474,6 +1556,7 @@ int avsys_audio_path_ex_set_mute(const int mute)
                        avsys_warning(AVAUDIO, "[Path Mute] run mute ctrl op: %d\n", mute);
                }
 
+#ifndef MURPHY_SUPPORT
                if (control->mute) {
                        if (AVSYS_FAIL(avsys_audio_ascn_single_set(ASCN_STR_PLAYBACK_MUTE))) {
                                if (AVSYS_FAIL(avsys_audio_unlock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))) {
@@ -1493,6 +1576,7 @@ int avsys_audio_path_ex_set_mute(const int mute)
                                return AVSYS_STATE_ERR_IO_CONTROL;
                        }
                }
+#endif
 
                if (AVSYS_FAIL(avsys_audio_unlock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))) {
                        avsys_error_r(AVAUDIO, "avsys_audio_unlock_sync() 2 failed in %s\n", __func__);
@@ -1513,6 +1597,7 @@ int avsys_audio_path_ex_set_mute(const int mute)
                        avsys_warning(AVAUDIO, "[Path Mute] run mute ctrl op: %d\n", mute);
                }
 
+#ifndef MURPHY_SUPPORT
                if (control->mute) {
                        if (AVSYS_FAIL(avsys_audio_ascn_single_set(ASCN_STR_PLAYBACK_MUTE))) {
                                avsys_error(AVAUDIO, "Mute fail %s\n", __func__);
@@ -1524,6 +1609,7 @@ int avsys_audio_path_ex_set_mute(const int mute)
                                return AVSYS_STATE_ERR_IO_CONTROL;
                        }
                }
+#endif
        }
 
        if (mute == AVSYS_AUDIO_UNMUTE || mute == AVSYS_AUDIO_UNMUTE_NOLOCK)
@@ -1564,6 +1650,7 @@ int avsys_audio_path_ex_get_mute(int *mute)
        return AVSYS_STATE_SUCCESS;
 }
 
+#ifndef MURPHY_SUPPORT
 static int __avsys_audio_path_set_ascn_ap_playback(avsys_audio_path_ex_info_t *control)
 {
        int cmd_gain[2] = { 0, 0 };
@@ -2070,6 +2157,8 @@ static int __avsys_audio_path_set_hw_controls(avsys_audio_path_ex_info_t *contro
        return AVSYS_STATE_SUCCESS;
 }
 
+#endif  /* MURPHY_SUPPORT */
+
 static bool __avsys_audio_path_check_cp_audio(int gain)
 {
        /*If video call uses CP audio, add AVSYS_AUDIO_GAIN_EX_VIDEOCALL to following code. */
@@ -2159,7 +2248,9 @@ int avsys_audio_path_set_single_ascn(char *str)
        if (!str)
                return AVSYS_STATE_ERR_INVALID_PARAMETER;
 
+#ifndef MURPHY_SUPPORT
        RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_single_set(str))
+#endif
 
        return AVSYS_STATE_SUCCESS;
 }