Permalink
Browse files

msm8660: Fixes to build with CM

  • Loading branch information...
1 parent d811170 commit 13f6e0240320f30a066232c5462f8790196ab3c1 @Kali- Kali- committed Jul 15, 2012
Showing with 91 additions and 66 deletions.
  1. +6 −5 Android.mk
  2. +0 −6 msm8660/Android.mk
  3. +3 −55 msm8660/AudioHardware.cpp
  4. +31 −0 msm8660/acdb.h
  5. +51 −0 msm8660/control.h
View
@@ -1,15 +1,16 @@
+ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
+
AUDIO_HW_ROOT := $(call my-dir)
ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true)
include $(AUDIO_HW_ROOT)/alsa_sound/Android.mk
-endif
-
-ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true)
include $(AUDIO_HW_ROOT)/libalsa-intf/Android.mk
endif
-ifeq ($(call is-board-platform,msm7627a),true)
+ifeq ($(TARGET_BOARD_PLATFORM),msm7x27a)
include $(AUDIO_HW_ROOT)/msm7627a/Android.mk
endif
-ifeq ($(call is-board-platform,msm8660),true)
+ifeq ($(TARGET_BOARD_PLATFORM),msm8660)
include $(AUDIO_HW_ROOT)/msm8660/Android.mk
endif
+
+endif
View
@@ -1,6 +1,3 @@
-ifneq ($(BUILD_TINY_ANDROID),true)
-ifeq ($(strip $(QC_PROP)),true)
-
#AUDIO_POLICY_TEST := true
#ENABLE_AUDIO_DUMP := true
@@ -97,6 +94,3 @@ LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/
LOCAL_SRC_FILES := audio_policy.conf
include $(BUILD_PREBUILT)
-
-endif #QC_PROP
-endif # not BUILD_TINY_ANDROID
@@ -38,62 +38,10 @@
#endif
#include <linux/msm_audio_mvs.h>
#include <sys/mman.h>
+#include "control.h"
+#include "acdb.h"
-
-// ToDo: Remove this definition
-#define QC_PROP
-#if defined(QC_PROP)
- #include "control.h"
-
- extern "C" {
-#ifdef QCOM_ACDB_ENABLED
- #include "acdb-loader.h"
- #include "acdb-id-mapper.h"
-#endif
- }
-#else
- #define msm_mixer_count() (-EPERM)
- #define msm_mixer_open(name, card) (-EPERM)
- #define msm_mixer_close() (-EPERM)
- #define msm_get_device(name) (-EPERM)
- #define msm_en_device(dev_id, set) (-EPERM)
- #define msm_route_stream(dir, dec_id, dev_id, set) (-EPERM)
- #define msm_route_voice(tx, rx, set) (-EPERM)
- #define msm_set_volume(dec_id, vol) (-EPERM)
- #define msm_get_device_class(device_id) (-EPERM)
- #define msm_get_device_capability(device_id) (-EPERM)
- #define msm_get_device_list() (-EPERM)
- #define msm_get_device_count() (-EPERM)
- #define msm_start_voice() (-EPERM)
- #define msm_end_voice() (-EPERM)
- #define msm_set_voice_tx_mute(mute) (-EPERM)
- #define msm_set_voice_rx_vol(volume) (-EPERM)
- #define msm_set_device_volume(dev_id,volume) (-EPERM)
- #define msm_reset_all_device() (-EPERM)
- #define acdb_ioctl(ioctl, cmd, cmd_len, res, res_len) (-EPERM)
- #define acdb_loader_send_anc_cal(arg1) (-EPERM)
- #define msm_enable_anc(arg1, arg2) (-EPERM)
- #define acdb_loader_send_audio_cal(arg1, arg2) (-EPERM)
- #define acdb_loader_send_voice_cal(arg1, arg2) (-EPERM)
- #define acdb_mapper_get_acdb_id_from_dev_name(arg1, arg2) (-EPERM)
- #define acdb_loader_init_ACDB() (-EPERM)
- #define acdb_loader_deallocate_ACDB() (-EPERM)
- #define INVALID_ACDB_ID -1
-#endif
-
-#ifndef QCOM_ACDB_ENABLED
- #define acdb_ioctl(ioctl, cmd, cmd_len, res, res_len) (-EPERM)
- #define acdb_loader_send_anc_cal(arg1) (-EPERM)
- #define msm_enable_anc(arg1, arg2) (-EPERM)
- #define acdb_loader_send_audio_cal(arg1, arg2) (-EPERM)
- #define acdb_loader_send_voice_cal(arg1, arg2) (-EPERM)
- #define acdb_mapper_get_acdb_id_from_dev_name(arg1, arg2) (-EPERM)
- #define acdb_loader_init_ACDB() (-EPERM)
- #define acdb_loader_deallocate_ACDB() (-EPERM)
- #define INVALID_ACDB_ID -1
-#endif
-
-
+#define VOICE_SESSION_NAME "Voice session"
// hardware specific functions
View
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2012 The CyanogenMod 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.
+ */
+
+#ifndef __MSM_ACDB_CONTROL
+#define __MSM_ACDB_CONTROL
+
+__BEGIN_DECLS
+
+int acdb_loader_send_anc_cal(int id);
+void acdb_loader_send_audio_cal(int id, int capability);
+void acdb_loader_send_voice_cal(int tx_id, int rx_id);
+void acdb_mapper_get_acdb_id_from_dev_name(char *name, int *id);
+int acdb_loader_init_ACDB();
+void acdb_loader_deallocate_ACDB();
+
+__END_DECLS
+
+#endif
View
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2009 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.
+ */
+
+#ifndef __MSM_AUDIO_ALSA_CONTROL
+#define __MSM_AUDIO_ALSA_CONTROL
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+extern const char **msm_get_device_list(void);
+extern int msm_mixer_count(void);
+extern int msm_mixer_open(const char *name, int id);
+extern void msm_mixer_close(void);
+extern int msm_get_device(const char *name);
+extern int msm_en_device(int device, short enable);
+extern int msm_route_stream(int dir, int dec_id, int dev_id, int set);
+extern int msm_route_voice(int tx, int rx, int set);
+extern int msm_set_volume(int dec_id, float vol);
+extern int msm_get_device_class(int dev_id);
+extern int msm_get_device_capability(int dev_id);
+extern int msm_get_device_count(void);
+extern void msm_start_voice(void);
+extern int msm_end_voice(void);
+extern void msm_set_voice_tx_mute(int mute);
+extern int msm_set_voice_rx_vol(int volume);
+extern void msm_set_device_volume(int dev_id, int volume);
+extern void msm_device_mute(int dev_id, int mute);
+extern int msm_reset_all_device(void);
+extern int msm_enable_anc(int dev_id, int enable);
+int msm_get_voc_session(const char *name);
+int msm_start_voice_ext(int id);
+int msm_end_voice_ext(int id);
+int msm_set_voice_tx_mute_ext(int mute, int id);
+int msm_set_voice_rx_vol_ext(int volume, int id);
+__END_DECLS
+
+#endif

0 comments on commit 13f6e02

Please sign in to comment.