Permalink
Browse files

star: Assorted fixes, and add a common star initrc

  • Loading branch information...
1 parent 3efffc5 commit f1a5be22ddece033b8630115da9818cb09c6f19e @rmcc rmcc committed Sep 2, 2012
View
@@ -14,7 +14,7 @@ TARGET_ARCH_VARIANT_FPU := vfpv3-d16
ARCH_ARM_HAVE_TLS_REGISTER := true
ARCH_ARM_USE_NON_NEON_MEMCPY := true
-#TARGET_SPECIFIC_HEADER_PATH := device/lge/star-common/include
+TARGET_SPECIFIC_HEADER_PATH := device/lge/star-common/include
#TARGET_USERIMAGES_USE_EXT4 := true
@@ -31,16 +31,18 @@ TARGET_DONT_SET_AUDIO_AAC_FORMAT := true
BOARD_HAS_NO_MISC_PARTITION := true
-BOARD_WLAN_DEVICE := bcmdhd
+BOARD_WLAN_DEVICE := bcm4329
WIFI_DRIVER_FW_PATH_STA := "/system/etc/wl/rtecdc.bin"
WIFI_DRIVER_FW_PATH_AP := "/system/etc/wl/rtecdc-apsta.bin"
-WIFI_DRIVER_MODULE_NAME := "wireless"
-WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/wireless.ko"
-WIFI_DRIVER_MODULE_ARG := "firmware_path=/etc/wl/rtecdc.bin nvram_path=/etc/wl/nvram.txt config_path=/data/misc/wifi/config"
-WPA_SUPPLICANT_VERSION := VER_0_8_X
-BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
-WIFI_DRIVER_HAS_LGE_SOFTAP := true
-BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+WIFI_DRIVER_MODULE_NAME := "wireless"
+WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/wireless.ko"
+WIFI_DRIVER_MODULE_ARG := "firmware_path=/system/etc/wl/rtecdc.bin nvram_path=/etc/wl/nvram.txt config_path=/data/misc/wifi/config"
+WPA_SUPPLICANT_VERSION := VER_0_6_X
+#BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_wext
+#BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_wext
+WIFI_DRIVER_HAS_LGE_SOFTAP := true
+BOARD_WPA_SUPPLICANT_DRIVER := WEXT
+BOARD_WEXT_NO_COMBO_SCAN := true
BOARD_HAS_VIBRATOR_IMPLEMENTATION := ../../device/lge/star-common/vibrator.c
@@ -52,9 +54,6 @@ TARGET_RECOVERY_PRE_COMMAND := "/system/bin/setup-recovery"
BOARD_MOBILEDATA_INTERFACE_NAME := "vsnet0"
-
-BOARD_FORCE_STATIC_A2DP := true
-
BOARD_USE_SKIA_LCDTEXT := true
USE_OPENGL_RENDERER := true
BOARD_NO_ALLOW_DEQUEUE_CURRENT_BUFFER := true
@@ -63,3 +62,5 @@ TARGET_NEEDS_BLUETOOTH_INIT_DELAY := true
#MAX_EGL_CACHE_SIZE := 10
COMMON_GLOBAL_CFLAGS += -DICS_AUDIO_BLOB -DICS_CAMERA_BLOB
+
+BOARD_SYSFS_LIGHT_SENSOR := "/sys/devices/platform/i2c-gpio.5/i2c-5/5-0060/alc"
View
@@ -0,0 +1,78 @@
+#
+# ALSA library configuration file
+#
+# Matching the current kernel config:
+# WM8994 PCM HIFI / SPDIF PCM / BT SCO PCM / VOICE CALL PCM / BT VOICE CALL
+#
+# (PS: SCO vs VOICE CALL?)
+
+pcm.music {
+ type plug
+ slave {
+ pcm "hw:0,0"
+ channels 2
+ rate 48000
+ }
+}
+
+pcm.aux {
+ type plug
+ slave {
+ pcm "hw:0,1"
+ channels 2
+ rate 44100
+ }
+}
+
+#pcm.voice {
+# type plug
+# slave {
+# pcm "hw:0,2"
+# channels 1
+# rate 16000
+# }
+#}
+
+pcm.voice_call {
+ type plug
+ slave {
+ pcm "hw:0,3"
+ channels 1
+ rate 8000
+ }
+}
+
+pcm.bt_voice_call {
+ type plug
+ slave {
+ pcm "hw:0,4"
+ channels 1
+ rate 8000
+ }
+}
+
+pcm.music_and_voice {
+ type asym
+
+ playback.pcm {
+ type plug
+
+ slave.pcm {
+ type multi
+
+ slaves.a.pcm music
+ slaves.b.pcm voice
+ slaves.a.channels 2
+ slaves.b.channels 1
+
+ bindings.0.slave a
+ bindings.0.channel 0
+ bindings.1.slave a
+ bindings.1.channel 1
+ bindings.2.slave b
+ bindings.2.channel 0
+ }
+ route_policy duplicate
+ }
+ capture.pcm "voice"
+}
View
@@ -1,64 +0,0 @@
-/*
- * 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.
- */
-
-#include <string.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <sys/mount.h>
-
-/* Set serialnumber properties on star devices, since they're
- * not exported by the bootloader to cmdline as expected */
-
-
-/* Ugly hack is ugly...
- *
- * There's a very narrow window in which the hardware properties
- * can be written, since init sets them immediately after launching
- * the property service, and they can only be set once.
- * So our only chance to overwrite them is to set them during that
- * launch, by inserting them into default.prop */
-
-int main() {
- FILE *fp;
- char buf[256];
- char serial[32];
-
- if ((fp = fopen("/proc/cpuinfo", "r")) == NULL)
- return 0;
-
- while(fgets(buf, 256, fp) != NULL) {
- if (strstr(buf, "Serial") != NULL) {
- strtok(buf, ":");
- strncpy(serial, strtok(NULL, " "), 32);
- }
- }
- fclose(fp);
-
- if (serial == NULL)
- return 0;
-
- mount("rootfs", "/", "rootfs", MS_REMOUNT|0, NULL);
-
- if ((fp = fopen("/default.prop", "a")) == NULL)
- return 0;
- sprintf(buf, "ro.serialno=%s", serial);
- fputs(buf, fp);
- fclose(fp);
-
- //mount("rootfs","/","rootfs",MS_REMOUNT|MS_RDONLY,NULL);
-
- return 0;
-}
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2008 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 A2DP_AUDIO_HARDWARE_H
-#define A2DP_AUDIO_HARDWARE_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <utils/threads.h>
-
-#include <hardware_legacy/AudioHardwareBase.h>
-
-
-namespace android_audio_legacy {
- using android::Mutex;
-
-class A2dpAudioInterface : public AudioHardwareBase
-{
- class A2dpAudioStreamOut;
-
-public:
- A2dpAudioInterface(AudioHardwareInterface* hw);
- virtual ~A2dpAudioInterface();
- virtual status_t initCheck();
-
- virtual status_t setVoiceVolume(float volume);
- virtual status_t setMasterVolume(float volume);
-
- status_t setSpeakerBoostModeOn(bool mode) { return 0; };
- status_t setLGMicModeOn(bool mode) { return 0; };
-
- virtual status_t setMode(int mode);
-
- status_t setVoIPCallState(bool state) { return 0; };
- status_t getVoIPCallState(bool *state) { return 0; };
-
- status_t setForceRoutingMode(int mode) { return 0; };
- status_t getForceRoutingMode(int *mode) { return 0; };
-
- // mic mute
- virtual status_t setMicMute(bool state);
- virtual status_t getMicMute(bool* state);
-
- virtual status_t setParameters(const String8& keyValuePairs);
- virtual String8 getParameters(const String8& keys);
-
- virtual size_t getInputBufferSize(uint32_t sampleRate, int format, int channelCount);
-
- // create I/O streams
- virtual AudioStreamOut* openOutputStream(
- uint32_t devices,
- int *format=0,
- uint32_t *channels=0,
- uint32_t *sampleRate=0,
- status_t *status=0);
- virtual void closeOutputStream(AudioStreamOut* out);
-
- virtual AudioStreamIn* openInputStream(
- uint32_t devices,
- int *format,
- uint32_t *channels,
- uint32_t *sampleRate,
- status_t *status,
- AudioSystem::audio_in_acoustics acoustics);
- virtual void closeInputStream(AudioStreamIn* in);
-// static AudioHardwareInterface* createA2dpInterface();
-
-protected:
- virtual status_t dump(int fd, const Vector<String16>& args);
-
-private:
- class A2dpAudioStreamOut : public AudioStreamOut {
- public:
- A2dpAudioStreamOut();
- virtual ~A2dpAudioStreamOut();
- status_t set(uint32_t device,
- int *pFormat,
- uint32_t *pChannels,
- uint32_t *pRate);
- virtual uint32_t sampleRate() const { return 44100; }
- // SBC codec wants a multiple of 512
- virtual size_t bufferSize() const { return 512 * 20; }
- virtual uint32_t channels() const { return AudioSystem::CHANNEL_OUT_STEREO; }
- virtual int format() const { return AudioSystem::PCM_16_BIT; }
- virtual uint32_t latency() const { return ((1000*bufferSize())/frameSize())/sampleRate() + 200; }
- virtual status_t setVolume(float left, float right) { return INVALID_OPERATION; }
- virtual ssize_t write(const void* buffer, size_t bytes);
- status_t standby();
- virtual status_t dump(int fd, const Vector<String16>& args);
- virtual status_t setParameters(const String8& keyValuePairs);
- virtual String8 getParameters(const String8& keys);
- virtual status_t getRenderPosition(uint32_t *dspFrames);
-
- private:
- friend class A2dpAudioInterface;
- status_t init();
- status_t close();
- status_t close_l();
- status_t setAddress(const char* address);
- status_t setBluetoothEnabled(bool enabled);
- status_t setSuspended(bool onOff);
- status_t standby_l();
-
- private:
- int mFd;
- bool mStandby;
- int mStartCount;
- int mRetryCount;
- char mA2dpAddress[20];
- void* mData;
- Mutex mLock;
- bool mBluetoothEnabled;
- uint32_t mDevice;
- bool mClosing;
- bool mSuspended;
- nsecs_t mLastWriteTime;
- uint32_t mBufferDurationUs;
- };
-
- friend class A2dpAudioStreamOut;
-
- A2dpAudioStreamOut* mOutput;
- AudioHardwareInterface *mHardwareInterface;
- char mA2dpAddress[20];
- bool mBluetoothEnabled;
- bool mSuspended;
-};
-
-
-// ----------------------------------------------------------------------------
-
-}; // namespace android
-
-#endif // A2DP_AUDIO_HARDWARE_H
Oops, something went wrong.

0 comments on commit f1a5be2

Please sign in to comment.