hal: change dts notifier nodes path to satisfy seandroid policy

Change dts notifier nodes path to /data/misc/dts/ to
satisfy seandroid policy.
Also remove AudioUtil source and header file from this project
as writing to route node is already moved to AudioPolicyManager.

Change-Id: I656e28077a6224b25e26d7476401bfb11fd141c8
diff --git a/hal/audio_extn/AudioUtil.c b/hal/audio_extn/AudioUtil.c
deleted file mode 100644
index 45bf55f..0000000
--- a/hal/audio_extn/AudioUtil.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*Copyright (C) 2014 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* This file was modified by DTS, Inc. The portions of the
-* code modified by DTS, Inc are copyrighted and
-* licensed separately, as follows:
-*
-*  (C) 2014 DTS, Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*    http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-#define LOG_TAG "AudioUtil"
-//#define LOG_NDEBUG 0
-#include <utils/Log.h>
-#include <stdlib.h>
-
-#include <cutils/properties.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sound/devdep_params.h>
-#include <sound/asound.h>
-#include "AudioUtil.h"
-
-#define ROUTE_PATH    "/data/data/dts/route"
-#define DEVICE_NODE   "/dev/snd/hwC0D3"
-
-static int32_t mDevices = 0;
-static int32_t mCurrDevice = 0;
-
-void create_route_node(void)
-{
-    char prop[PROPERTY_VALUE_MAX] = "true";
-    int fd;
-    property_get("use.dts_eagle", prop, "0");
-    if (!strncmp("true", prop, sizeof("true")) || atoi(prop)) {
-        ALOGV("create_route_node");
-        if ((fd=open(ROUTE_PATH, O_RDONLY)) < 0) {
-            ALOGV("No File exisit");
-        } else {
-            ALOGV("A file with the same name exist. Remove it before creating it");
-            close(fd);
-            remove(ROUTE_PATH);
-        }
-        if ((fd=creat(ROUTE_PATH, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0) {
-            ALOGE("opening route node failed returned");
-            return;
-        }
-        chmod(ROUTE_PATH, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH);
-        ALOGV("opening route  node successful");
-        close(fd);
-    }
-}
-
-void notify_route_node(int active_device, int devices)
-{
-    char prop[PROPERTY_VALUE_MAX] = "true";
-    char buf[1024];
-    int fd;
-    if ((mCurrDevice == active_device) &&
-        (mDevices == devices)) {
-        ALOGV("nothing to update to route node");
-        return;
-    }
-    mDevices = devices;
-    mCurrDevice = active_device;
-    property_get("use.dts_eagle", prop, "0");
-    if (!strncmp("true", prop, sizeof("true")) || atoi(prop)) {
-        ALOGV("notify active device : %d all_devices : %d", active_device, devices);
-        if ((fd=open(ROUTE_PATH, O_TRUNC|O_WRONLY)) < 0) {
-            ALOGV("Write device to route node failed");
-        } else {
-            ALOGV("Write device to route node successful");
-            snprintf(buf, sizeof(buf), "device=%d;all_devices=%d", active_device, devices);
-            int n = write(fd, buf, strlen(buf));
-            ALOGV("number of bytes written: %d", n);
-            close(fd);
-        }
-        int eaglefd = open(DEVICE_NODE, O_RDWR);
-        int32_t params[2] = {active_device, 1 /*is primary device*/};
-        if (eaglefd > 0) {
-            if(ioctl(eaglefd, DTS_EAGLE_IOCTL_SET_ACTIVE_DEVICE, &params) < 0) {
-                ALOGE("DTS_EAGLE (%s): error sending primary device\n", __func__);
-            }
-            ALOGD("DTS_EAGLE (%s): sent primary device\n", __func__);
-            close(eaglefd);
-        } else {
-            ALOGE("DTS_EAGLE (%s): error opening eagle\n", __func__);
-        }
-    }
-}
-
-void remove_route_node(void)
-{
-    char prop[PROPERTY_VALUE_MAX] = "true";
-    int fd;
-    property_get("use.dts_eagle", prop, "0");
-    if (!strncmp("true", prop, sizeof("true")) || atoi(prop)) {
-        ALOGV("remove_route_node");
-        if ((fd=open(ROUTE_PATH, O_RDONLY)) < 0) {
-            ALOGV("open route  node failed");
-        } else {
-            ALOGV("open route node successful");
-            ALOGV("Remove the file");
-            close(fd);
-            remove(ROUTE_PATH);
-        }
-    }
-}
diff --git a/hal/audio_extn/AudioUtil.h b/hal/audio_extn/AudioUtil.h
deleted file mode 100644
index 02789cc..0000000
--- a/hal/audio_extn/AudioUtil.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*Copyright (C) 2014 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* This file was modified by DTS, Inc. The portions of the
-* code modified by DTS, Inc are copyrighted and
-* licensed separately, as follows:
-*
-*  (C) 2014 DTS, Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*    http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-#ifndef AUDIO_UTIL_H_
-#define AUDIO_UTIL_H_
-
-#ifndef DTS_EAGLE
-#define create_route_node() (0)
-#define notify_route_node(active_device, devices) (0)
-#define remove_route_node() (0)
-#else
-void create_route_node(void);
-void notify_route_node(int active_device, int devices);
-void remove_route_node(void);
-#endif
-
-#endif  //AUDIO_UTIL_H_
diff --git a/hal/audio_extn/dts_eagle.c b/hal/audio_extn/dts_eagle.c
index 88c255d..83c3506 100644
--- a/hal/audio_extn/dts_eagle.c
+++ b/hal/audio_extn/dts_eagle.c
@@ -36,8 +36,8 @@
 #ifdef DTS_EAGLE
 
 #define AUDIO_PARAMETER_KEY_DTS_EAGLE   "DTS_EAGLE"
-#define STATE_NOTIFY_FILE               "/data/data/dts/stream"
-#define FADE_NOTIFY_FILE                "/data/data/dts/fade"
+#define STATE_NOTIFY_FILE               "/data/misc/dts/stream"
+#define FADE_NOTIFY_FILE                "/data/misc/dts/fade"
 #define DTS_EAGLE_KEY                   "DTS_EAGLE"
 #define DEVICE_NODE                     "/dev/snd/hwC0D3"
 #define MAX_LENGTH_OF_INTEGER_IN_STRING 13
diff --git a/post_proc/effect_util.c b/post_proc/effect_util.c
index cda89bc..8f7a604 100644
--- a/post_proc/effect_util.c
+++ b/post_proc/effect_util.c
@@ -44,7 +44,7 @@
                               "bassboost_param_strength"
 };
 
-#define EFFECT_FILE "/data/data/dts/effect"
+#define EFFECT_FILE "/data/misc/dts/effect"
 #define MAX_LENGTH_OF_INTEGER_IN_STRING 13
 
 #ifdef DTS_EAGLE