forked from KFire-Android/android_device_amazon_otter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
197 changed files
with
7,654 additions
and
8,272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,5 @@ | ||
This device board was based on the work by G1011999 @ GitHub. | ||
|
||
Use this local_manifest.xml with AOSP: | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<manifest> | ||
Much of the day-to-day "grind it out and fix bugs" work done by JackpotClavin | ||
|
||
<remote name = "githubp" fetch="git://github.com/" /> | ||
|
||
<remote name = "omapzoom" fetch="git://git.omapzoom.org/" /> | ||
|
||
<project path="device/amazon/otter" name="KFire-Android/device-amazon-otter" | ||
remote="githubp" | ||
revision="master" /> | ||
|
||
<project path="device/ti/proprietary-open" name="device/ti/proprietary-open" | ||
remote="omapzoom" | ||
revision="ics-mr1"/> | ||
|
||
<project path="kernel" name="KFire-Android/Android-kernel-for-kindle-fire" | ||
remote="githubp" | ||
revision="master"/> | ||
|
||
<project path="vendor/amazon/otter" name="KFire-Android/android_vendor_amazon_otter" | ||
remote="githubp" | ||
revision="ics"/> | ||
|
||
</manifest> | ||
Select work done by Hashcode (HD video codecs, kernel modules, and some advisory role) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,39 @@ | ||
# Copyright (C) 2011 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. | ||
ifeq ($(BOARD_USES_AUDIO_LEGACY),true) | ||
|
||
LOCAL_PATH := $(call my-dir) | ||
|
||
include $(CLEAR_VARS) | ||
# output for libaudio intermediates | ||
LIBAUDIO_INTERMEDIATES_PREREQS := $(PRODUCT_OUT)/obj/lib | ||
|
||
LOCAL_MODULE := audio.primary.omap4430 | ||
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw | ||
LOCAL_SRC_FILES := audio_hw.c | ||
LOCAL_C_INCLUDES += \ | ||
external/tinyalsa/include \ | ||
system/media/audio_utils/include \ | ||
system/media/audio_effects/include | ||
LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libdl | ||
LOCAL_MODULE_TAGS := optional | ||
# prerequisites for building audio | ||
file := $(LIBAUDIO_INTERMEDIATES_PREREQS)/libaudio.so | ||
$(file) : device/amazon/otter/audio/libaudio.so | ||
@echo "Copy libaudio.so -> $@" | ||
@mkdir -p $(dir $@) | ||
@rm -rf $@ | ||
$(hide) cp -a device/amazon/otter/audio/libaudio.so $@ | ||
|
||
include $(BUILD_SHARED_LIBRARY) | ||
file := $(LIBAUDIO_INTERMEDIATES_PREREQS)/alsa.omap4.so | ||
$(file) : device/amazon/otter/audio/alsa.omap4.so | ||
@echo "Copy libaudio.so -> $@" | ||
@mkdir -p $(dir $@) | ||
@rm -rf $@ | ||
$(hide) cp -a device/amazon/otter/audio/alsa.omap4.so $@ | ||
|
||
file := $(LIBAUDIO_INTERMEDIATES_PREREQS)/libaudiomodemgeneric.so | ||
$(file) : device/amazon/otter/audio/libaudiomodemgeneric.so | ||
@echo "Copy libaudio.so -> $@" | ||
@mkdir -p $(dir $@) | ||
@rm -rf $@ | ||
$(hide) cp -a device/amazon/otter/audio/libaudiomodemgeneric.so $@ | ||
|
||
file := $(LIBAUDIO_INTERMEDIATES_PREREQS)/libasound.so | ||
$(file) : device/amazon/otter/audio/libasound.so | ||
@echo "Copy libasound.so -> $@" | ||
@mkdir -p $(dir $@) | ||
@rm -rf $@ | ||
$(hide) cp -a device/amazon/otter/audio/libasound.so $@ | ||
|
||
include $(all-subdir-makefiles) | ||
|
||
endif # BOARD_USES_AUDIO_LEGACY |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# | ||
# Copyright (C) 2011 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. | ||
|
||
LOCAL_PATH := $(call my-dir) | ||
|
||
include $(CLEAR_VARS) | ||
|
||
LOCAL_MODULE := audio.primary.omap4430 | ||
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw | ||
LOCAL_MODULE_TAGS := optional | ||
|
||
LOCAL_SHARED_LIBRARIES := \ | ||
libcutils \ | ||
libutils \ | ||
libmedia \ | ||
libhardware_legacy | ||
|
||
LOCAL_SHARED_LIBRARIES += libdl | ||
|
||
LOCAL_SHARED_LIBRARIES += libaudio | ||
|
||
|
||
LOCAL_STATIC_LIBRARIES := \ | ||
libmedia_helper | ||
|
||
LOCAL_WHOLE_STATIC_LIBRARIES := \ | ||
libaudiohw_legacy | ||
|
||
include $(BUILD_SHARED_LIBRARY) | ||
|
||
include $(CLEAR_VARS) | ||
|
||
LOCAL_SRC_FILES := \ | ||
AudioPolicyManagerBase.cpp \ | ||
AudioPolicyCompatClient.cpp \ | ||
audio_policy_hal.cpp | ||
|
||
ifeq ($(AUDIO_POLICY_TEST),true) | ||
LOCAL_CFLAGS += -DAUDIO_POLICY_TEST | ||
endif | ||
|
||
ifeq ($(BOARD_HAVE_BLUETOOTH),true) | ||
LOCAL_CFLAGS += -DWITH_A2DP | ||
endif | ||
|
||
LOCAL_STATIC_LIBRARIES := libmedia_helper | ||
LOCAL_MODULE := libaudiopolicy_legacy22 | ||
LOCAL_MODULE_TAGS := optional | ||
|
||
include $(BUILD_STATIC_LIBRARY) | ||
|
||
|
||
# The default audio policy, for now still implemented on top of legacy | ||
# policy code | ||
include $(CLEAR_VARS) | ||
|
||
LOCAL_SRC_FILES := \ | ||
AudioPolicyManagerDefault.cpp | ||
|
||
LOCAL_SHARED_LIBRARIES := \ | ||
libcutils \ | ||
libutils \ | ||
libmedia | ||
|
||
LOCAL_STATIC_LIBRARIES := \ | ||
libmedia_helper | ||
|
||
LOCAL_WHOLE_STATIC_LIBRARIES := \ | ||
libaudiopolicy_legacy2 | ||
|
||
ifeq ($(BOARD_USES_AUDIO_LEGACY),true) | ||
LOCAL_SHARED_LIBRARIES += libaudiopolicy | ||
endif | ||
|
||
LOCAL_C_INCLUDES := $(LOCAL_PATH) | ||
LOCAL_MODULE := audio_policy.otter_this_is_not_used | ||
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw | ||
LOCAL_MODULE_TAGS := optional | ||
|
||
ifeq ($(BOARD_HAVE_BLUETOOTH),true) | ||
LOCAL_CFLAGS += -DWITH_A2DP | ||
endif | ||
|
||
include $(BUILD_SHARED_LIBRARY) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
/* | ||
* Copyright (C) 2011 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. | ||
*/ | ||
|
||
#define LOG_TAG "AudioPolicyCompatClient" | ||
//#define LOG_NDEBUG 0 | ||
|
||
#include <stdint.h> | ||
#include <AudioSystem.h> | ||
|
||
#include <hardware/hardware.h> | ||
#include <system/audio.h> | ||
#include <system/audio_policy.h> | ||
#include <hardware/audio_policy.h> | ||
|
||
#include <hardware_legacy/AudioSystemLegacy.h> | ||
|
||
#include "AudioPolicyCompatClient.h" | ||
|
||
namespace android_audio_legacy { | ||
|
||
audio_io_handle_t AudioPolicyCompatClient::openOutput(uint32_t *pDevices, | ||
uint32_t *pSamplingRate, | ||
uint32_t *pFormat, | ||
uint32_t *pChannels, | ||
uint32_t *pLatencyMs, | ||
AudioSystem::output_flags flags) | ||
{ | ||
return mServiceOps->open_output(mService, pDevices, pSamplingRate, pFormat, | ||
pChannels, pLatencyMs, | ||
(audio_policy_output_flags_t)flags); | ||
} | ||
|
||
audio_io_handle_t AudioPolicyCompatClient::openDuplicateOutput(audio_io_handle_t output1, | ||
audio_io_handle_t output2) | ||
{ | ||
return mServiceOps->open_duplicate_output(mService, output1, output2); | ||
} | ||
|
||
status_t AudioPolicyCompatClient::closeOutput(audio_io_handle_t output) | ||
{ | ||
return mServiceOps->close_output(mService, output); | ||
} | ||
|
||
status_t AudioPolicyCompatClient::suspendOutput(audio_io_handle_t output) | ||
{ | ||
return mServiceOps->suspend_output(mService, output); | ||
} | ||
|
||
status_t AudioPolicyCompatClient::restoreOutput(audio_io_handle_t output) | ||
{ | ||
return mServiceOps->restore_output(mService, output); | ||
} | ||
|
||
audio_io_handle_t AudioPolicyCompatClient::openInput(uint32_t *pDevices, | ||
uint32_t *pSamplingRate, | ||
uint32_t *pFormat, | ||
uint32_t *pChannels, | ||
uint32_t acoustics) | ||
{ | ||
return mServiceOps->open_input(mService, pDevices, pSamplingRate, pFormat, | ||
pChannels, acoustics); | ||
} | ||
|
||
status_t AudioPolicyCompatClient::closeInput(audio_io_handle_t input) | ||
{ | ||
return mServiceOps->close_input(mService, input); | ||
} | ||
|
||
status_t AudioPolicyCompatClient::setStreamOutput(AudioSystem::stream_type stream, | ||
audio_io_handle_t output) | ||
{ | ||
return mServiceOps->set_stream_output(mService, (audio_stream_type_t)stream, | ||
output); | ||
} | ||
|
||
status_t AudioPolicyCompatClient::moveEffects(int session, audio_io_handle_t srcOutput, | ||
audio_io_handle_t dstOutput) | ||
{ | ||
return mServiceOps->move_effects(mService, session, srcOutput, dstOutput); | ||
} | ||
|
||
String8 AudioPolicyCompatClient::getParameters(audio_io_handle_t ioHandle, const String8& keys) | ||
{ | ||
char *str; | ||
String8 out_str8; | ||
|
||
str = mServiceOps->get_parameters(mService, ioHandle, keys.string()); | ||
out_str8 = String8(str); | ||
free(str); | ||
|
||
return out_str8; | ||
} | ||
|
||
void AudioPolicyCompatClient::setParameters(audio_io_handle_t ioHandle, | ||
const String8& keyValuePairs, | ||
int delayMs) | ||
{ | ||
mServiceOps->set_parameters(mService, ioHandle, keyValuePairs.string(), | ||
delayMs); | ||
} | ||
|
||
status_t AudioPolicyCompatClient::setStreamVolume( | ||
AudioSystem::stream_type stream, | ||
float volume, | ||
audio_io_handle_t output, | ||
int delayMs) | ||
{ | ||
return mServiceOps->set_stream_volume(mService, (audio_stream_type_t)stream, | ||
volume, output, delayMs); | ||
} | ||
|
||
status_t AudioPolicyCompatClient::startTone(ToneGenerator::tone_type tone, | ||
AudioSystem::stream_type stream) | ||
{ | ||
return mServiceOps->start_tone(mService, | ||
AUDIO_POLICY_TONE_IN_CALL_NOTIFICATION, | ||
(audio_stream_type_t)stream); | ||
} | ||
|
||
status_t AudioPolicyCompatClient::stopTone() | ||
{ | ||
return mServiceOps->stop_tone(mService); | ||
} | ||
|
||
status_t AudioPolicyCompatClient::setVoiceVolume(float volume, int delayMs) | ||
{ | ||
return mServiceOps->set_voice_volume(mService, volume, delayMs); | ||
} | ||
|
||
}; // namespace android_audio_legacy |
Oops, something went wrong.