compilation: murphy support in avsys-audio-path
authorJanos Kovacs <jankovac503@gmail.com>
Sun, 26 Aug 2012 23:38:54 +0000 (02:38 +0300)
committerJaska Uimonen <jaska.uimonen@helsinki.fi>
Wed, 7 Nov 2012 12:19:23 +0000 (14:19 +0200)
avsys-audio-pasimple.c
avsys-audio-path.c

index 99c91c8..4f762c4 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 bcb3c66..b1d4c06 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);
@@ -290,10 +297,12 @@ static int __load_conf(avsys_audio_conf *data)
        return AVSYS_STATE_SUCCESS;
 }
 
+#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 };
@@ -328,6 +337,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");
 
@@ -348,6 +361,8 @@ int avsys_audio_path_ex_init(void)
        control->control_aif_before_path_set = conf.control_aif_before_path_set;
        control->gain_debug_mode = conf.gain_debug_mode;
 
+#endif  /* MURPHY_SUPPORT */
+
        control->mute = AVSYS_AUDIO_UNMUTE;
        control->path_fixed = PATH_FIXED_NONE;
 
@@ -363,6 +378,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))
@@ -370,6 +389,7 @@ int avsys_audio_path_ex_init(void)
 
        if (AVSYS_SUCCESS(err))
                err = __avsys_audio_path_set_ascn_ap_capture(control);
+#endif
 
        return err;
 }
@@ -391,6 +411,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 };
@@ -494,6 +518,7 @@ int avsys_audio_path_ex_reset(int forced)
        }
 
        return err;
+#endif  /* MURPHY_SUPPORT */
 }
 
 EXPORT_API
@@ -541,6 +566,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",
@@ -570,6 +598,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;
@@ -616,10 +645,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, };
@@ -675,7 +705,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;
@@ -764,7 +794,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;
@@ -786,7 +816,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
@@ -796,7 +826,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;
@@ -816,6 +846,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] = { "AIF2 Capture", "AIF2 Playback", "AIF3 Capture", "AIF3 Playback", "AIF4 Playback" };
 
@@ -890,6 +921,8 @@ 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)
 {
@@ -903,6 +936,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 {
@@ -912,6 +946,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");
@@ -931,6 +966,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__);
                }
@@ -938,6 +976,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;
 
@@ -961,6 +1000,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)) {
@@ -977,11 +1017,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;
 }
@@ -1025,8 +1067,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);
 
@@ -1150,7 +1194,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)) {
@@ -1170,19 +1218,23 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option)
                        case AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL:
                                control->path_fixed_pid[PATH_FIXED_TYPE_CALL] = current_pid;
                        case AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT:
+#ifndef MURPHY_SUPPORT
                                if (control->path.playback == AVSYS_AUDIO_PATH_EX_BTHEADSET) {
                                        SET_AIF(AIF3_PLAYBACK);
                                        SET_AIF(AIF3_CAPTURE);
                                }
+#endif
                                break;
 
                        case AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL:
                                control->path_fixed_pid[PATH_FIXED_TYPE_CALL] = current_pid;
+#ifndef MURPHY_SUPPORT
                                SET_AIF(AIF2_PLAYBACK);
 
                                if (control->path.playback == AVSYS_AUDIO_PATH_EX_BTHEADSET) {
                                        SET_AIF(AIF3_PLAYBACK);
                                }
+#endif
                                break;
 
                        case AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO:
@@ -1209,18 +1261,22 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option)
                        switch (local_gain.capture) {
                        case AVSYS_AUDIO_CAPTURE_GAIN_VIDEOCALL:
                                control->path_fixed_pid[PATH_FIXED_TYPE_CALL] = current_pid;
+#ifndef MURPHY_SUPPORT
                                if (control->path.capture == AVSYS_AUDIO_PATH_EX_BTMIC) {
                                        SET_AIF(AIF3_CAPTURE);
                                }
+#endif
                                break;
 
                        case AVSYS_AUDIO_CAPTURE_GAIN_VOICECALL:
                                control->path_fixed_pid[PATH_FIXED_TYPE_CALL] = current_pid;
+#ifndef MURPHY_SUPPORT
                                SET_AIF(AIF2_CAPTURE);
 
                                if (control->path.capture == AVSYS_AUDIO_PATH_EX_BTMIC) {
                                        SET_AIF(AIF3_CAPTURE);
                                }
+#endif
                                break;
 
                        case AVSYS_AUDIO_CAPTURE_GAIN_FMRADIO:
@@ -1232,44 +1288,65 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option)
 
        /* Open AIFs */
        if (control->control_aif_before_path_set) {
+        /* FIXME: this will be moved to after alsa scenraio set */
+#if !defined(MURPHY_SUPPORT)
         err = __avsys_open_aif(AIF_control);
+#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) {
-               err = __avsys_open_aif(AIF_control);
+#if !defined(MURPHY_SUPPORT)
+        err = __avsys_open_aif(AIF_control);
+#else
+        err = AVSYS_STATE_SUCCESS;
+#endif
        }
 
 FINISHED:
@@ -1384,6 +1461,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))) {
@@ -1403,6 +1481,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__);
@@ -1423,6 +1502,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__);
@@ -1434,6 +1514,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)
@@ -1474,6 +1555,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 };
@@ -1847,6 +1929,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. */
@@ -1935,7 +2019,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;
 }