Skip to content

Commit

Permalink
added kernel modules and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Hashcode committed Jan 22, 2012
1 parent 0d85683 commit cdb653e
Show file tree
Hide file tree
Showing 197 changed files with 7,654 additions and 8,272 deletions.
34 changes: 18 additions & 16 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ ARCH_ARM_HAVE_TLS_REGISTER := true
# Kernel
BOARD_KERNEL_BASE := 0x80000000
BOARD_KERNEL_PAGESIZE := 4096
#BOARD_KERNEL_CMDLINE := console=ttyO2,115200n8 mem=463M@0x80000000 init=/init vram=5M omapfb.vram=0:5M
BOARD_KERNEL_CMDLINE := console=ttyO2,115200n8 console=ttyUSB0,9600n8 mem=463M@0x80000000 init=/init vram=32M omapfb.vram=0:16M
BOARD_KERNEL_CMDLINE := console=ttyO2,115200n8 mem=463M@0x80000000 init=/init vram=5M omapfb.vram=0:5M
TARGET_NO_RADIOIMAGE := true
TARGET_NO_BOOTLOADER := true
TARGET_BOOTLOADER_BOARD_NAME := otter
Expand All @@ -54,20 +53,23 @@ BOARD_FLASH_BLOCK_SIZE := 4096


# Connectivity - Wi-Fi
USES_TI_MAC80211 := true
ifdef USES_TI_MAC80211
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_wl12xx
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_wl12xx
BOARD_WLAN_DEVICE := wl12xx_mac80211
BOARD_SOFTAP_DEVICE := wl12xx_mac80211
WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/wl12xx_sdio.ko"
WIFI_DRIVER_MODULE_NAME := "wl12xx_sdio"
WIFI_FIRMWARE_LOADER := ""
COMMON_GLOBAL_CFLAGS += -DUSES_TI_MAC80211
endif
BOARD_WPA_SUPPLICANT_DRIVER := CUSTOM
BOARD_HOSTAPD_DRIVER := CUSTOM
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := libCustomWifi
WPA_SUPPLICANT_VERSION := VER_0_6_X
HOSTAPD_VERSION := VER_0_6_X
BOARD_SOFTAP_DEVICE := wl1283
BOARD_WLAN_DEVICE := wl1283
#BOARD_WLAN_TI_STA_DK_ROOT := system/wlan/ti/wilink_6_1
WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/tiwlan_drv.ko"
WIFI_DRIVER_MODULE_NAME := "tiwlan_drv"
WIFI_DRIVER_MODULE_ARG := ""
WIFI_FIRMWARE_LOADER := "wlan_loader"
WIFI_DRIVER_FW_STA_PATH := "/system/etc/wifi/fw_wlan1283.bin"
WIFI_DRIVER_FW_AP_PATH := "/system/etc/wifi/fw_wlan1283_AP.bin"
PRODUCT_WIRELESS_TOOLS := true
AP_CONFIG_DRIVER_WILINK := true
WPA_SUPPL_APPROX_USE_RSSI := true


# Bluetooth
Expand Down
26 changes: 2 additions & 24 deletions README
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)
57 changes: 33 additions & 24 deletions audio/Android.mk
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 added audio/alsa.omap4.so
Binary file not shown.
97 changes: 97 additions & 0 deletions audio/audio.module/Android.mk
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)

143 changes: 143 additions & 0 deletions audio/audio.module/AudioPolicyCompatClient.cpp
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
Loading

0 comments on commit cdb653e

Please sign in to comment.