msm: audio: qdsp6v2: Removed ifdef's from RTAC code
When real-time audio calibration (RTAC) is used a separate
set of void functions defined in the header file is used.
All ifdef references for RTAC were removed from all other
files.
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
diff --git a/sound/soc/msm/qdsp6/q6adm.c b/sound/soc/msm/qdsp6/q6adm.c
index 799deda..5c1dfd8 100644
--- a/sound/soc/msm/qdsp6/q6adm.c
+++ b/sound/soc/msm/qdsp6/q6adm.c
@@ -17,11 +17,13 @@
#include <linux/uaccess.h>
#include <linux/atomic.h>
#include <linux/bitops.h>
-#include <mach/qdsp6v2/rtac.h>
+
+#include <mach/qdsp6v2/audio_dev_ctl.h>
#include <mach/qdsp6v2/audio_acdb.h>
+#include <mach/qdsp6v2/rtac.h>
+
#include <sound/apr_audio.h>
#include <sound/q6afe.h>
-#include <mach/qdsp6v2/audio_dev_ctl.h>
#define TIMEOUT_MS 1000
#define AUDIO_RX 0x0
@@ -77,11 +79,9 @@
pr_debug("APR_BASIC_RSP_RESULT\n");
switch (payload[0]) {
case ADM_CMD_SET_PARAMS:
-#ifdef CONFIG_MSM8X60_RTAC
if (rtac_make_adm_callback(payload,
data->payload_size))
break;
-#endif
case ADM_CMD_COPP_CLOSE:
case ADM_CMD_MEMORY_MAP:
case ADM_CMD_MEMORY_UNMAP:
@@ -117,13 +117,11 @@
wake_up(&this_adm.wait);
}
break;
-#ifdef CONFIG_MSM8X60_RTAC
case ADM_CMDRSP_GET_PARAMS:
pr_debug("%s: ADM_CMDRSP_GET_PARAMS\n", __func__);
rtac_make_adm_callback(payload,
data->payload_size);
break;
-#endif
default:
pr_err("%s: Unknown cmd:0x%x\n", __func__,
data->opcode);
@@ -265,10 +263,8 @@
/* have to convert path to dev ctrl standard */
send_adm_cal(port_id, (route.path + 1));
-#ifdef CONFIG_MSM8X60_RTAC
rtac_add_adm_device(port_id, atomic_read(&this_adm.copp_id[index]),
(route.path + 1), session_id);
-#endif
fail_cmd:
return ret;
}
@@ -330,9 +326,7 @@
ret = -ENODEV;
return ret;
}
-#ifdef CONFIG_MSM8X60_RTAC
rtac_set_adm_handle(this_adm.apr);
-#endif
}
if (atomic_read(&this_adm.copp_cnt[index]) == 0) {
@@ -433,9 +427,7 @@
ret = -ENODEV;
return ret;
}
-#ifdef CONFIG_MSM8X60_RTAC
rtac_set_adm_handle(this_adm.apr);
-#endif
}
@@ -582,12 +574,10 @@
for (i = 0; i < num_copps; i++)
send_adm_cal(port_id[i], path);
-#ifdef CONFIG_MSM8X60_RTAC
for (i = 0; i < num_copps; i++)
rtac_add_adm_device(port_id[i], atomic_read(&this_adm.copp_id
[afe_get_port_index(port_id[i])]),
path, session_id);
-#endif
return 0;
fail_cmd:
@@ -615,9 +605,7 @@
ret = -ENODEV;
return ret;
}
-#ifdef CONFIG_MSM8X60_RTAC
rtac_set_adm_handle(this_adm.apr);
-#endif
}
cmd_size = sizeof(struct adm_cmd_memory_map_regions)
@@ -741,7 +729,6 @@
return ret;
}
-#ifdef CONFIG_MSM8X60_RTAC
int adm_get_copp_id(int port_index)
{
pr_debug("%s\n", __func__);
@@ -753,7 +740,6 @@
return atomic_read(&this_adm.copp_id[port_index]);
}
-#endif
int adm_close(int port_id)
{
@@ -812,7 +798,6 @@
ret = -EINVAL;
goto fail_cmd;
}
-
}
fail_cmd:
diff --git a/sound/soc/msm/qdsp6/q6asm.c b/sound/soc/msm/qdsp6/q6asm.c
index fddf34f..96d49a3 100644
--- a/sound/soc/msm/qdsp6/q6asm.c
+++ b/sound/soc/msm/qdsp6/q6asm.c
@@ -27,18 +27,22 @@
#include <linux/msm_audio.h>
#include <linux/android_pmem.h>
#include <linux/memory_alloc.h>
+#include <linux/debugfs.h>
+#include <linux/time.h>
+#include <linux/atomic.h>
+
+#include <asm/ioctls.h>
+
#include <mach/memory.h>
#include <mach/debug_mm.h>
#include <mach/peripheral-loader.h>
#include <mach/qdsp6v2/audio_acdb.h>
#include <mach/qdsp6v2/rtac.h>
#include <mach/msm_subsystem_map.h>
+
#include <sound/apr_audio.h>
#include <sound/q6asm.h>
-#include <asm/atomic.h>
-#include <asm/ioctls.h>
-#include <linux/debugfs.h>
-#include <linux/time.h>
+
#define TRUE 0x01
#define FALSE 0x00
@@ -389,9 +393,8 @@
pr_err("%s Registration with APR failed\n", __func__);
goto fail;
}
-#ifdef CONFIG_MSM8X60_RTAC
rtac_set_asm_handle(n, ac->apr);
-#endif
+
pr_debug("%s Registering the common port with APR\n", __func__);
if (atomic_read(&this_mmap.ref_cnt) == 0) {
this_mmap.apr = apr_register("ADSP", "ASM", \
@@ -679,11 +682,9 @@
token = data->token;
switch (payload[0]) {
case ASM_STREAM_CMD_SET_PP_PARAMS:
-#ifdef CONFIG_MSM8X60_RTAC
if (rtac_make_asm_callback(ac->session, payload,
data->payload_size))
break;
-#endif
case ASM_SESSION_CMD_PAUSE:
case ASM_DATA_CMD_EOS:
case ASM_STREAM_CMD_CLOSE:
@@ -765,12 +766,10 @@
}
break;
}
-#ifdef CONFIG_MSM8X60_RTAC
case ASM_STREAM_CMDRSP_GET_PP_PARAMS:
rtac_make_asm_callback(ac->session, payload,
data->payload_size);
break;
-#endif
case ASM_DATA_EVENT_READ_DONE:{
struct audio_port_data *port = &ac->port[OUT];
@@ -2847,7 +2846,6 @@
return -EINVAL;
}
-#ifdef CONFIG_MSM8X60_RTAC
int q6asm_get_apr_service_id(int session_id)
{
pr_debug("%s\n", __func__);
@@ -2859,7 +2857,6 @@
return ((struct apr_svc *)session[session_id]->apr)->id;
}
-#endif
static int __init q6asm_init(void)