update new sdk
This commit is contained in:
parent
f33907443a
commit
744c72c133
1643 changed files with 83006 additions and 28021 deletions
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#define LOG_TAG "audio_hw_primary"
|
||||
#define LOG_NDEBUG 0
|
||||
//#define LOG_NDEBUG 0
|
||||
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
|
@ -303,6 +303,7 @@ static inline void print_sunxi_stream_in(const struct sunxi_stream_in *in)
|
|||
static uint32_t out_get_sample_rate(const struct audio_stream *stream)
|
||||
{
|
||||
struct sunxi_stream_out *out = (struct sunxi_stream_out *)stream;
|
||||
ALOGV("out_set_sample_rate: %d", out->sample_rate);
|
||||
|
||||
return out->sample_rate;
|
||||
}
|
||||
|
@ -326,7 +327,7 @@ static size_t out_get_buffer_size(const struct audio_stream *stream)
|
|||
static audio_channel_mask_t out_get_channels(const struct audio_stream *stream)
|
||||
{
|
||||
struct sunxi_stream_out *out = (struct sunxi_stream_out *)stream;
|
||||
//ALOGV("out_get_channels: return %d", out->channel_mask);
|
||||
ALOGV("out_get_channels: %#x", out->channel_mask);
|
||||
char val[PROPERTY_VALUE_MAX];
|
||||
property_get("vts.native_server.on", val, "0");
|
||||
if (strcmp(val, "0") == 0) {
|
||||
|
@ -338,8 +339,8 @@ static audio_channel_mask_t out_get_channels(const struct audio_stream *stream)
|
|||
|
||||
static audio_format_t out_get_format(const struct audio_stream *stream)
|
||||
{
|
||||
//ALOGV("out_get_format");
|
||||
struct sunxi_stream_out *out = (struct sunxi_stream_out *)stream;
|
||||
ALOGV("out_get_format: %#x", out->format);
|
||||
|
||||
return out->format;
|
||||
}
|
||||
|
@ -347,7 +348,7 @@ static audio_format_t out_get_format(const struct audio_stream *stream)
|
|||
static int out_set_format(struct audio_stream *stream, audio_format_t format)
|
||||
{
|
||||
UNUSED(stream);
|
||||
ALOGV("out_set_format: %d",format);
|
||||
ALOGV("out_set_format: %#x",format);
|
||||
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
@ -454,7 +455,7 @@ static void select_devices(struct sunxi_audio_device *adev)
|
|||
int out_pdev = 0;
|
||||
int in_pdev = 0;
|
||||
|
||||
ALOGD("select_devices:mode(%#x),out_devices(%#x),in_devices(%#x),"
|
||||
ADLOG("select_devices:mode(%#x),out_devices(%#x),in_devices(%#x),"
|
||||
"active_output(%p),active_input(%p).",
|
||||
adev->mode, adev->out_devices, adev->in_devices,
|
||||
adev->active_output, adev->active_input);
|
||||
|
@ -519,7 +520,6 @@ static void select_devices(struct sunxi_audio_device *adev)
|
|||
|
||||
static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
|
||||
{
|
||||
ALOGV("out_set_parameters");
|
||||
struct sunxi_stream_out *out = (struct sunxi_stream_out *)stream;
|
||||
struct sunxi_audio_device *adev = out->dev;
|
||||
struct str_parms *parms;
|
||||
|
@ -586,7 +586,7 @@ static int out_set_volume(struct audio_stream_out *stream, float left,
|
|||
|
||||
int start_output_stream(struct sunxi_stream_out *out)
|
||||
{
|
||||
ALOGV("start_output_stream");
|
||||
ALOGD("start_output_stream");
|
||||
int ret = 0;
|
||||
struct sunxi_audio_device *adev = out->dev;
|
||||
int platform_device;
|
||||
|
@ -640,6 +640,8 @@ int start_output_stream(struct sunxi_stream_out *out)
|
|||
platform_plugins_process_start_stream(adev->platform,
|
||||
ON_START_OUTPUT_STREAM,
|
||||
out->config);
|
||||
ADLOG("+++++++++++++++ start_output_stream: pcm sample_rate: %d,pcm fmt: 0x%08x,pcm channels: %d",
|
||||
out->config.rate, out->config.format, out->config.channels);
|
||||
|
||||
out->pcm = pcm_open(out->card, out->port, PCM_OUT | PCM_MONOTONIC,
|
||||
&out->config);
|
||||
|
@ -662,6 +664,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
|
|||
size_t frame_size = audio_stream_out_frame_size(stream);
|
||||
size_t out_frames = bytes / frame_size;
|
||||
ssize_t ret = 0;
|
||||
ALOGV("out_write");
|
||||
|
||||
pthread_mutex_lock(&out->lock);
|
||||
if (out->standby) {
|
||||
|
@ -787,8 +790,8 @@ static int out_get_presentation_position(const struct audio_stream_out *stream,
|
|||
/** audio_stream_in implementation **/
|
||||
static uint32_t in_get_sample_rate(const struct audio_stream *stream)
|
||||
{
|
||||
ALOGV("in_get_sample_rate");
|
||||
struct sunxi_stream_in *in = (struct sunxi_stream_in *)stream;
|
||||
ALOGV("in_get_sample_rate: %d", in->sample_rate);
|
||||
|
||||
return in->sample_rate;
|
||||
}
|
||||
|
@ -819,7 +822,7 @@ static size_t in_get_buffer_size(const struct audio_stream *stream)
|
|||
|
||||
static audio_channel_mask_t in_get_channels(const struct audio_stream *stream)
|
||||
{
|
||||
//ALOGV("in_get_channels");
|
||||
ALOGV("in_get_channels");
|
||||
struct sunxi_stream_in *in = (struct sunxi_stream_in *)stream;
|
||||
|
||||
return in->channel_mask;
|
||||
|
@ -828,7 +831,7 @@ static audio_channel_mask_t in_get_channels(const struct audio_stream *stream)
|
|||
static audio_format_t in_get_format(const struct audio_stream *stream)
|
||||
{
|
||||
UNUSED(stream);
|
||||
//ALOGV("in_get_format");
|
||||
ALOGV("in_get_format");
|
||||
|
||||
return AUDIO_FORMAT_PCM_16_BIT;
|
||||
}
|
||||
|
@ -836,6 +839,7 @@ static audio_format_t in_get_format(const struct audio_stream *stream)
|
|||
static int in_set_format(struct audio_stream *stream, audio_format_t format)
|
||||
{
|
||||
UNUSED(stream); UNUSED(format);
|
||||
ALOGV("in_set_format");
|
||||
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
@ -860,7 +864,7 @@ static int in_standby(struct audio_stream *stream)
|
|||
struct sunxi_stream_in *in = (struct sunxi_stream_in *)stream;
|
||||
struct sunxi_audio_device *adev = in->dev;
|
||||
int status = 0;
|
||||
ALOGV("%s: enter", __func__);
|
||||
ALOGD("%s: enter", __func__);
|
||||
|
||||
pthread_mutex_lock(&in->lock);
|
||||
pthread_mutex_lock(&adev->lock);
|
||||
|
@ -941,7 +945,7 @@ static int in_set_parameters(struct audio_stream *stream, const char *kvpairs)
|
|||
int ret, val = 0;
|
||||
int status = 0;
|
||||
|
||||
ALOGV("%s: enter: kvpairs=%s", __func__, kvpairs);
|
||||
ALOGD("%s: enter: kvpairs=%s", __func__, kvpairs);
|
||||
parms = str_parms_create_str(kvpairs);
|
||||
|
||||
/* in stream routing */
|
||||
|
@ -970,6 +974,7 @@ static char * in_get_parameters(const struct audio_stream *stream,
|
|||
const char *keys)
|
||||
{
|
||||
UNUSED(stream); UNUSED(keys);
|
||||
ALOGV("start_input_stream");
|
||||
|
||||
return strdup("");
|
||||
}
|
||||
|
@ -977,13 +982,14 @@ static char * in_get_parameters(const struct audio_stream *stream,
|
|||
static int in_set_gain(struct audio_stream_in *stream, float gain)
|
||||
{
|
||||
UNUSED(stream); UNUSED(gain);
|
||||
ALOGV("in_set_gain");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int start_input_stream(struct sunxi_stream_in *in)
|
||||
{
|
||||
ALOGV("start_input_stream");
|
||||
ALOGD("start_input_stream");
|
||||
int ret = 0;
|
||||
struct sunxi_audio_device *adev = in->dev;
|
||||
int platform_device;
|
||||
|
@ -1002,6 +1008,8 @@ int start_input_stream(struct sunxi_stream_in *in)
|
|||
|
||||
update_debug_flag();
|
||||
print_sunxi_stream_in(in);
|
||||
ADLOG("+++++++++++++++ start_input_stream: pcm sample_rate: %d,pcm fmt: 0x%08x,pcm channels: %d",
|
||||
in->config.rate, in->config.format, in->config.channels);
|
||||
|
||||
in->pcm = pcm_open(in->card, in->port, PCM_IN | PCM_MONOTONIC, &in->config);
|
||||
if (!pcm_is_ready(in->pcm)) {
|
||||
|
@ -1069,6 +1077,7 @@ static ssize_t in_read(struct audio_stream_in *stream, void* buffer,
|
|||
size_t frames = bytes / audio_stream_in_frame_size(stream);
|
||||
int i;
|
||||
int ret = -1;
|
||||
ALOGV("in_read");
|
||||
|
||||
pthread_mutex_lock(&in->lock);
|
||||
|
||||
|
@ -1155,6 +1164,8 @@ static int in_add_audio_effect(const struct audio_stream *stream,
|
|||
effect_handle_t effect)
|
||||
{
|
||||
UNUSED(stream); UNUSED(effect);
|
||||
ALOGV("in_add_audio_effect");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1162,6 +1173,8 @@ static int in_remove_audio_effect(const struct audio_stream *stream,
|
|||
effect_handle_t effect)
|
||||
{
|
||||
UNUSED(stream); UNUSED(effect);
|
||||
ALOGV("in_remove_audio_effect");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1174,7 +1187,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
|
|||
const char *address __unused)
|
||||
{
|
||||
UNUSED(handle);
|
||||
ALOGV("adev_open_output_stream");
|
||||
ALOGD("adev_open_output_stream");
|
||||
|
||||
struct sunxi_audio_device *adev = (struct sunxi_audio_device *)dev;
|
||||
struct sunxi_stream_out *out;
|
||||
|
@ -1229,7 +1242,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
|
|||
} else {
|
||||
out->format = config->format;
|
||||
out->sample_rate = config->sample_rate;
|
||||
ALOGD("+++++++++++++++ channel_mask: add out-get-channel_mask for vts!!");
|
||||
ALOGV("+++++++++++++++ channel_mask: add out-get-channel_mask for vts!!");
|
||||
out->channel_mask_vts = config->channel_mask;
|
||||
out->channel_mask = AUDIO_CHANNEL_OUT_STEREO;
|
||||
}
|
||||
|
@ -1245,7 +1258,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
|
|||
config->channel_mask = out_get_channels(&out->stream.common);
|
||||
config->sample_rate = out_get_sample_rate(&out->stream.common);
|
||||
|
||||
ALOGV("+++++++++++++++ adev_open_output_stream: req_sample_rate: %d, fmt: %x, channel_mask: %d",
|
||||
ADLOG("+++++++++++++++ adev_open_output_stream: req_sample_rate: %d, fmt: 0x%08x, channel_mask: 0x%08x",
|
||||
config->sample_rate, config->format, config->channel_mask);
|
||||
|
||||
platform_plugins_process(adev->platform, ON_OPEN_OUTPUT_STREAM);
|
||||
|
@ -1275,7 +1288,7 @@ static void adev_close_output_stream(struct audio_hw_device *dev,
|
|||
|
||||
static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs)
|
||||
{
|
||||
ALOGV("adev_set_parameters, %s", kvpairs);
|
||||
ALOGD("adev_set_parameters, %s", kvpairs);
|
||||
struct sunxi_audio_device *adev = (struct sunxi_audio_device *)dev;
|
||||
struct sunxi_stream_out *out = adev->active_output;
|
||||
|
||||
|
@ -1386,7 +1399,7 @@ static int adev_set_mode(struct audio_hw_device *dev, audio_mode_t mode)
|
|||
|
||||
static int adev_set_mic_mute(struct audio_hw_device *dev, bool state)
|
||||
{
|
||||
ALOGD("%s: state %d\n", __func__, state);
|
||||
ALOGV("%s: state %d\n", __func__, state);
|
||||
struct sunxi_audio_device *adev = (struct sunxi_audio_device *)dev;
|
||||
|
||||
pthread_mutex_lock(&adev->lock);
|
||||
|
@ -1480,11 +1493,11 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
|
|||
audio_source_t source __unused)
|
||||
{
|
||||
UNUSED(handle);
|
||||
ALOGV("adev_open_input_stream...");
|
||||
ALOGD("adev_open_input_stream...");
|
||||
|
||||
struct sunxi_audio_device *adev = (struct sunxi_audio_device *)dev;
|
||||
struct sunxi_stream_in *in;
|
||||
int channel_count = popcount(config->channel_mask);
|
||||
int channel_count = audio_channel_count_from_in_mask(config->channel_mask);
|
||||
int ret;
|
||||
|
||||
in = (struct sunxi_stream_in *)calloc(1, sizeof(struct sunxi_stream_in));
|
||||
|
@ -1524,6 +1537,8 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
|
|||
|
||||
memcpy(&in->config, &in_pcm_config, sizeof(struct pcm_config));
|
||||
in->config.channels = channel_count;
|
||||
ADLOG("+++++++++++++++ adev_open_input_stream: req_sample_rate: %d, fmt: 0x%08x, channel_mask: 0x%08x",
|
||||
config->sample_rate, config->format, config->channel_mask);
|
||||
|
||||
*stream_in = &in->stream;
|
||||
|
||||
|
@ -1607,7 +1622,7 @@ static int adev_close(hw_device_t *device)
|
|||
static int adev_open(const hw_module_t* module, const char* name,
|
||||
hw_device_t** device)
|
||||
{
|
||||
ALOGV("adev_open: %s", name);
|
||||
ALOGD("adev_open: %s", name);
|
||||
|
||||
struct sunxi_audio_device *adev;
|
||||
int ret;
|
||||
|
|
8
android/hardware/aw/gpu/mali-utgard/mali400/arm64/aw_version
Normal file → Executable file
8
android/hardware/aw/gpu/mali-utgard/mali400/arm64/aw_version
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
|||
mali400: r8p1-00rel0 um android oreo_mr1 arm64 003
|
||||
mali400: r8p1-00rel0 um android oreo_mr1 arm64 008
|
||||
|
||||
Fix mali-utgard prerotate issue on Android O;
|
||||
Fix Dajing platform failed on CtsThemeHostTestCases issue;
|
||||
|
||||
Build parameters:
|
||||
VARIANT=mali400-r1p1-gles-linux-android-oreo-prerotate-no_profiling-dma_buf-rgb_is_xrgb-no_Werror-egl_wait_sync
|
||||
|
@ -10,5 +10,5 @@ CONFIG=release
|
|||
CROSS_COMPILE=aarch64-linux-
|
||||
|
||||
MD5 Info:
|
||||
5e47d50472785b632c0835cb36836196 lib/libGLES_mali.so
|
||||
955a65789eb92586d356385c1714b4d6 lib64/libGLES_mali.so
|
||||
49c90f5da5373fb7f4b7751e5ef6cfa8 lib/libGLES_mali.so
|
||||
63de2088e7437fbb9f2aa627a4baa81e lib64/libGLES_mali.so
|
||||
|
|
BIN
android/hardware/aw/gpu/mali-utgard/mali400/arm64/lib/libGLES_mali.so
Normal file → Executable file
BIN
android/hardware/aw/gpu/mali-utgard/mali400/arm64/lib/libGLES_mali.so
Normal file → Executable file
Binary file not shown.
BIN
android/hardware/aw/gpu/mali-utgard/mali400/arm64/lib64/libGLES_mali.so
Normal file → Executable file
BIN
android/hardware/aw/gpu/mali-utgard/mali400/arm64/lib64/libGLES_mali.so
Normal file → Executable file
Binary file not shown.
|
@ -64,6 +64,7 @@ typedef struct eventThreadContext {
|
|||
}eventThreadContext_t;
|
||||
|
||||
int hdmifd = -1;
|
||||
static int hdmihotplug=0;
|
||||
eventThreadContext_t eventContext;
|
||||
#define EPOLL_COUNT 6
|
||||
static void *eventThreadLoop(void *user);
|
||||
|
@ -302,6 +303,7 @@ hotplugUeventParse(eventThreadContext_t *context, const char *msg)
|
|||
read(hdmifd, &state, 1);
|
||||
ALOGD("Receive %s hotplug state[%d]", switch_name, state-48);
|
||||
callHotplug(context, display, state == '1'? 1 : 0);
|
||||
hdmihotplug= (state == '1'? 1 : 0);
|
||||
}
|
||||
}
|
||||
while (*msg++);
|
||||
|
@ -336,8 +338,10 @@ static void *eventThreadLoop(void *user)
|
|||
for (int i = 0; i < context->numberDisplay; i++) {
|
||||
display = context->display[i];
|
||||
if (strcmp(context->display[0]->displayName, "hdmi")) {
|
||||
if (!strcmp(display->displayName, "hdmi"))
|
||||
if (!strcmp(display->displayName, "hdmi")){
|
||||
callHotplug(context, display, state == '1'? 1 : 0);
|
||||
hdmihotplug=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -388,14 +392,14 @@ init_epoll:
|
|||
== sizeof(cmd_esg)) {
|
||||
switch(cmd_esg.cmd) {
|
||||
case 1:// switch hdmi mode
|
||||
ALOGD("chang hdmi[%d] mode[%d] from user",cmd_esg.disp, cmd_esg.data);
|
||||
ALOGD("chang hdmi[%d] mode[%d] hdmihotplug[%d] from user",cmd_esg.disp, cmd_esg.data,hdmihotplug);
|
||||
if (cmd_esg.disp != 1 ||
|
||||
context->display[cmd_esg.disp]->default_mode == cmd_esg.data)
|
||||
context->display[cmd_esg.disp]->default_mode == cmd_esg.data ||(hdmihotplug==0))
|
||||
break;
|
||||
callHotplug(context, context->display[cmd_esg.disp], 0);
|
||||
context->display[cmd_esg.disp]->default_mode = cmd_esg.data;
|
||||
|
||||
callHotplug(context, context->display[cmd_esg.disp], 1);
|
||||
// if(hdmihotplug==1)
|
||||
callHotplug(context, context->display[cmd_esg.disp], 1);
|
||||
break;
|
||||
case 2://3D
|
||||
if (((enum display_3d_mode)cmd_esg.data != DISPLAY_3D_LEFT_RIGHT_HDMI) &&
|
||||
|
@ -411,7 +415,9 @@ init_epoll:
|
|||
|
||||
default:
|
||||
ALOGD("not a right mesg");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1513,7 +1513,11 @@ KeyMaster_V2_Update(const keymaster_device_t* dev,
|
|||
|
||||
keymaster_error_t err_type = KM_ERROR_OK;
|
||||
uint32_t in_params_size;
|
||||
in_params_size = compute_param_set_length(in_params);
|
||||
if(in_params) {
|
||||
in_params_size = compute_param_set_length(in_params);
|
||||
} else {
|
||||
in_params_size = 0;
|
||||
}
|
||||
|
||||
uint32_t paramsize;
|
||||
paramsize = sizeof(TEE_params_expand) +
|
||||
|
|
|
@ -75,7 +75,7 @@ static size_t tee_fs_get_absolute_filename(char *file, char *out,
|
|||
/* Safe to cast since we have checked that sizes are OK */
|
||||
return (size_t)s;
|
||||
}
|
||||
|
||||
#ifdef CREATE_TEE_DIR
|
||||
static int do_mkdir(const char *path, mode_t mode)
|
||||
{
|
||||
struct stat st;
|
||||
|
@ -113,19 +113,20 @@ static int mkpath(const char *path, mode_t mode)
|
|||
free(subpath);
|
||||
return status;
|
||||
}
|
||||
|
||||
#endif
|
||||
int tee_supp_fs_init(void)
|
||||
{
|
||||
size_t n;
|
||||
#ifdef CREATE_TEE_DIR
|
||||
mode_t mode = 0700;
|
||||
|
||||
#endif
|
||||
n = snprintf(tee_fs_root, sizeof(tee_fs_root), "%s/tee/", TEE_FS_PARENT_PATH);
|
||||
if (n >= sizeof(tee_fs_root))
|
||||
return -1;
|
||||
|
||||
#ifdef CREATE_TEE_DIR
|
||||
if (mkpath(tee_fs_root, mode) != 0)
|
||||
return -1;
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
44
android/hardware/aw/sensors/aw_sensors/AccelSensor.cpp
Normal file → Executable file
44
android/hardware/aw/sensors/aw_sensors/AccelSensor.cpp
Normal file → Executable file
|
@ -262,13 +262,18 @@ int AccelSensor::readEvents(sensors_event_t* data, int count) {
|
|||
return -EINVAL;
|
||||
|
||||
ssize_t n = mInputReader.fill(data_fd);
|
||||
if (n < 0)
|
||||
return n;
|
||||
|
||||
if (n < 0) {
|
||||
ALOGE(" sensor AceelSensor readEvents fill buffer failed\n");
|
||||
return n;
|
||||
}
|
||||
int numEventReceived = 0;
|
||||
input_event const* event;
|
||||
ssize_t dataAvailable = 0;
|
||||
dataAvailable = mInputReader.readEvent(&event);
|
||||
if (dataAvailable <= 0)
|
||||
ALOGE("sensor no sensor data available\n");
|
||||
|
||||
while (count && mInputReader.readEvent(&event)) {
|
||||
while (count && dataAvailable) {
|
||||
int type = event->type;
|
||||
|
||||
if ((type == EV_ABS) || (type == EV_REL) || (type == EV_KEY)) {
|
||||
|
@ -276,28 +281,26 @@ int AccelSensor::readEvents(sensors_event_t* data, int count) {
|
|||
mInputReader.next();
|
||||
} else if (type == EV_SYN) {
|
||||
int64_t time = timevalToNano(event->time);
|
||||
|
||||
if (mPendingMask) {
|
||||
mPendingMask = 0;
|
||||
mPendingEvent.timestamp = time;
|
||||
|
||||
if (mEnabled) {
|
||||
*data++ = mPendingEvent;
|
||||
mAccData = mPendingEvent;
|
||||
count--;
|
||||
numEventReceived++;
|
||||
}
|
||||
}
|
||||
if (mPendingMask) {
|
||||
mPendingMask = 0;
|
||||
mPendingEvent.timestamp = time;
|
||||
*data++ = mPendingEvent;
|
||||
mAccData = mPendingEvent;
|
||||
count--;
|
||||
numEventReceived++;
|
||||
} else
|
||||
ALOGE("AccelSensor error no data but sync event\n");
|
||||
|
||||
if (!mPendingMask) {
|
||||
mInputReader.next();
|
||||
}
|
||||
|
||||
} else {
|
||||
ALOGE("AccelSensor: unknown event (type=%d, code=%d)",
|
||||
type, event->code);
|
||||
mInputReader.next();
|
||||
}
|
||||
}
|
||||
|
||||
dataAvailable = mInputReader.readEvent(&event);
|
||||
}
|
||||
|
||||
return numEventReceived;
|
||||
|
@ -332,6 +335,11 @@ void AccelSensor::processEvent(int code, int value) {
|
|||
mPendingMask = 1;
|
||||
mPendingEvent.acceleration.z = value * direct_z ;
|
||||
break;
|
||||
|
||||
default:
|
||||
ALOGE("AccelSensor: unknown code (value=%d, code=%d)\n",
|
||||
value, code);
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_SENSOR
|
||||
|
|
11
android/hardware/aw/sensors/aw_sensors/InputEventReader.cpp
Normal file → Executable file
11
android/hardware/aw/sensors/aw_sensors/InputEventReader.cpp
Normal file → Executable file
|
@ -50,11 +50,12 @@ InputEventCircularReader::~InputEventCircularReader()
|
|||
ssize_t InputEventCircularReader::fill(int fd)
|
||||
{
|
||||
size_t numEventsRead = 0;
|
||||
if (mFreeSpace) {
|
||||
if (mFreeSpace > 0) {
|
||||
const ssize_t nread = read(fd, mHead, mFreeSpace * sizeof(input_event));
|
||||
if (nread<0 || nread % sizeof(input_event)) {
|
||||
if (nread <= 0 || nread % sizeof(input_event)) {
|
||||
// we got a partial event!!
|
||||
return nread<0 ? -errno : -EINVAL;
|
||||
ALOGE("sensor InputEventCircular read data frome fd fail\n");
|
||||
return nread < 0 ? -errno : -EINVAL;
|
||||
}
|
||||
|
||||
numEventsRead = nread / sizeof(input_event);
|
||||
|
@ -68,7 +69,9 @@ ssize_t InputEventCircularReader::fill(int fd)
|
|||
mHead = mBuffer + s;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ALOGE("sensor InputEventCircular no free space for data\n");
|
||||
}
|
||||
|
||||
return numEventsRead;
|
||||
}
|
||||
|
|
24
android/hardware/aw/sensors/aw_sensors/ProximitySensor.cpp
Normal file → Executable file
24
android/hardware/aw/sensors/aw_sensors/ProximitySensor.cpp
Normal file → Executable file
|
@ -126,25 +126,23 @@ int ProximitySensor::readEvents(sensors_event_t* data, int count)
|
|||
processEvent(event->code, event->value);
|
||||
mInputReader.next();
|
||||
} else if (type == EV_SYN) {
|
||||
int64_t time = timevalToNano(event->time);
|
||||
int64_t time = timevalToNano(event->time);
|
||||
if (mPendingMask) {
|
||||
mPendingMask = 0;
|
||||
mPendingEvent.timestamp = time;
|
||||
|
||||
if (mPendingMask) {
|
||||
mPendingMask = 0;
|
||||
mPendingEvent.timestamp = time;
|
||||
*data++ = mPendingEvent;
|
||||
count--;
|
||||
numEventReceived++;
|
||||
} else
|
||||
ALOGE("ProximitySensor sensor error no data but sync event\n");
|
||||
|
||||
if (mEnabled) {
|
||||
*data++ = mPendingEvent;
|
||||
count--;
|
||||
numEventReceived++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mPendingMask) {
|
||||
if (!mPendingMask) {
|
||||
mInputReader.next();
|
||||
}
|
||||
|
||||
} else {
|
||||
ALOGE("AccelSensor: unknown event (type=%d, code=%d)",
|
||||
ALOGE("ProximitySensor: unknown event (type=%d, code=%d)",
|
||||
type, event->code);
|
||||
mInputReader.next();
|
||||
}
|
||||
|
|
10
android/hardware/aw/sensors/aw_sensors/sensorDetect.cpp
Normal file → Executable file
10
android/hardware/aw/sensors/aw_sensors/sensorDetect.cpp
Normal file → Executable file
|
@ -119,9 +119,9 @@ struct sensor_extend_t proSensorList[] = {
|
|||
SENSORS_PROXIMITY_HANDLE,
|
||||
SENSOR_TYPE_PROXIMITY,
|
||||
1.0f, 0.1f,
|
||||
0.873f, 0,
|
||||
0.873f, 50000,
|
||||
0,0,SENSOR_STRING_TYPE_PROXIMITY,
|
||||
0,0,SENSOR_FLAG_WAKE_UP,
|
||||
0,1000000,(SENSOR_FLAG_WAKE_UP | SENSOR_FLAG_ON_CHANGE_MODE),
|
||||
{ },
|
||||
},
|
||||
}
|
||||
|
@ -154,9 +154,9 @@ struct sensor_extend_t ligSensorList[] = {
|
|||
SENSORS_LIGHT_HANDLE,
|
||||
SENSOR_TYPE_LIGHT,
|
||||
4096.0f, 1.0f,
|
||||
0.09f, 0,
|
||||
0.09f, 50000,
|
||||
0,0,SENSOR_STRING_TYPE_LIGHT,
|
||||
0,0,SENSOR_FLAG_ON_CHANGE_MODE,
|
||||
0,1000000,SENSOR_FLAG_ON_CHANGE_MODE,
|
||||
{ },
|
||||
},
|
||||
},
|
||||
|
@ -243,7 +243,7 @@ struct sensor_extend_t gsensorList[] = {
|
|||
SENSOR_TYPE_ACCELEROMETER,
|
||||
4.0f*9.81f,
|
||||
(4.0f*9.81f)/1024.0f,
|
||||
0.2f, 8100,
|
||||
0.2f, 10000,
|
||||
0,0,SENSOR_STRING_TYPE_ACCELEROMETER,
|
||||
0,1000000,SENSOR_FLAG_CONTINUOUS_MODE,
|
||||
{ },
|
||||
|
|
11
android/hardware/aw/sensors/aw_sensors/sensors.cpp
Normal file → Executable file
11
android/hardware/aw/sensors/aw_sensors/sensors.cpp
Normal file → Executable file
|
@ -285,6 +285,7 @@ int sensors_poll_context_t::pollEvents(sensors_event_t* data, int count)
|
|||
{
|
||||
int nbEvents = 0;
|
||||
int n = 0;
|
||||
int noInCnt = 0;
|
||||
// check flush pending
|
||||
for (int i = 0; i < 10; i++) {
|
||||
if(getFlushPending(i)) {
|
||||
|
@ -301,7 +302,7 @@ int sensors_poll_context_t::pollEvents(sensors_event_t* data, int count)
|
|||
|
||||
n = poll(mPollFds, sNumber, -1);
|
||||
if (n<0) {
|
||||
ALOGE(" AW poll() failed (%s)", strerror(errno));
|
||||
ALOGE(" AW sensor poll() failed (%s)", strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
if (mPollFds[wake].revents & POLLIN) {
|
||||
|
@ -314,7 +315,6 @@ int sensors_poll_context_t::pollEvents(sensors_event_t* data, int count)
|
|||
// read sensor event
|
||||
for (int i = 0 ; (count >= 0) && (i < sNumber) ; i++) {
|
||||
SensorBase* const sensor(mSensors[i]);
|
||||
|
||||
#ifdef DEBUG_SENSOR
|
||||
ALOGE("AW count:%d, mPollFds[%d].revents:%d, hasPendingEvents():%d,sNumber:%d\n",
|
||||
count, i, mPollFds[i].revents, sensor->hasPendingEvents(),sNumber);
|
||||
|
@ -324,10 +324,15 @@ int sensors_poll_context_t::pollEvents(sensors_event_t* data, int count)
|
|||
if (nb < count) {
|
||||
mPollFds[i].revents = 0;
|
||||
}
|
||||
if (nb <= 0)
|
||||
ALOGE("AW sensor: %d error readEvents return %d\n", i, nb);
|
||||
count -= nb;
|
||||
nbEvents += nb;
|
||||
data += nb;
|
||||
}
|
||||
} else
|
||||
noInCnt++;
|
||||
if (noInCnt == sNumber)
|
||||
ALOGE("AW sensor error no data pollin\n");
|
||||
}
|
||||
return nbEvents;
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -14,10 +14,11 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
include hardware/aw/wlan/config/config.mk
|
||||
include hardware/aw/wlan/firmware/broadcom/ap6212/device-bcm.mk
|
||||
#include hardware/aw/wlan/firmware/broadcom/ap6356s/device-bcm.mk
|
||||
#include hardware/aw/wlan/firmware/broadcom/ap6255/device-bcm.mk
|
||||
#include hardware/aw/wlan/firmware/broadcom/ap6210/device-bcm.mk
|
||||
#include hardware/aw/wlan/firmware/broadcom/ap6330/device-bcm.mk
|
||||
#include hardware/aw/wlan/firmware/broadcom/ap6335/device-bcm.mk
|
||||
include hardware/aw/wlan/firmware/broadcom/ap6356s/device-bcm.mk
|
||||
include hardware/aw/wlan/firmware/broadcom/ap6255/device-bcm.mk
|
||||
include hardware/aw/wlan/firmware/broadcom/ap6210/device-bcm.mk
|
||||
include hardware/aw/wlan/firmware/broadcom/ap6330/device-bcm.mk
|
||||
include hardware/aw/wlan/firmware/broadcom/ap6335/device-bcm.mk
|
||||
|
||||
|
|
|
@ -68,5 +68,8 @@ endif
|
|||
ifeq ($(TARGET_PRODUCT), gce_x86_phone)
|
||||
include $(LOCAL_PATH)/conf/google/gce_x86/Android.mk
|
||||
endif
|
||||
ifneq ($(filter tulip_m64%,$(TARGET_PRODUCT)),)
|
||||
include $(LOCAL_PATH)/conf/allwinner/m64/Android.mk
|
||||
endif
|
||||
|
||||
endif # BOARD_HAVE_BLUETOOTH_BCM
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := bt_vendor.conf
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/bluetooth
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
||||
|
||||
include $(BUILD_PREBUILT)
|
|
@ -0,0 +1,5 @@
|
|||
# UART device port where Bluetooth controller is attached
|
||||
UartPort = /dev/ttyS1
|
||||
|
||||
# Firmware patch file location
|
||||
FwPatchFilePath = /system/vendor/modules/
|
|
@ -53,6 +53,8 @@
|
|||
#define USERIAL_BAUD_3M 14
|
||||
#define USERIAL_BAUD_4M 15
|
||||
#define USERIAL_BAUD_AUTO 16
|
||||
#define USERIAL_BAUD_2_5M 17
|
||||
#define USERIAL_BAUD_3_5M 18
|
||||
|
||||
/**** Data Format ****/
|
||||
/* Stop Bits */
|
||||
|
|
15
android/hardware/broadcom/libbt/src/bt_vendor_brcm.c
Normal file → Executable file
15
android/hardware/broadcom/libbt/src/bt_vendor_brcm.c
Normal file → Executable file
|
@ -148,14 +148,17 @@ static int op(bt_vendor_opcode_t opcode, void *param)
|
|||
case BT_VND_OP_POWER_CTRL:
|
||||
{
|
||||
int *state = (int *) param;
|
||||
upio_set_bluetooth_power(UPIO_BT_POWER_OFF);
|
||||
if (*state == BT_VND_PWR_ON)
|
||||
if (*state == BT_VND_PWR_OFF)
|
||||
{
|
||||
ALOGW("NOTE: BT_VND_PWR_OFF now");
|
||||
upio_set_bluetooth_power(UPIO_BT_POWER_OFF);
|
||||
usleep(200000);
|
||||
}
|
||||
else if (*state == BT_VND_PWR_ON)
|
||||
{
|
||||
ALOGW("NOTE: BT_VND_PWR_ON now forces power-off first");
|
||||
ALOGW("NOTE: BT_VND_PWR_ON now");
|
||||
upio_set_bluetooth_power(UPIO_BT_POWER_ON);
|
||||
} else {
|
||||
/* Make sure wakelock is released */
|
||||
hw_lpm_set_wake_state(false);
|
||||
usleep(500000);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -158,6 +158,11 @@ typedef struct {
|
|||
const uint32_t delay_time;
|
||||
} fw_settlement_entry_t;
|
||||
|
||||
/* AMPAK FW auto detection table */
|
||||
typedef struct {
|
||||
char *chip_id;
|
||||
char *updated_chip_id;
|
||||
} fw_auto_detection_entry_t;
|
||||
|
||||
/******************************************************************************
|
||||
** Externs
|
||||
|
@ -232,9 +237,23 @@ static uint8_t bt_sco_i2spcm_param[SCO_I2SPCM_PARAM_SIZE] =
|
|||
static const fw_settlement_entry_t fw_settlement_table[] = {
|
||||
{"BCM43241", 200},
|
||||
{"BCM43341", 100},
|
||||
{(const char *) NULL, 100} // Giving the generic fw settlement delay setting.
|
||||
{(const char *) NULL, 200} // Giving the generic fw settlement delay setting.
|
||||
};
|
||||
|
||||
static const fw_auto_detection_entry_t fw_auto_detection_table[] = {
|
||||
{"4343A0","BCM43438A0"}, //AP6212
|
||||
{"BCM43430A1","BCM43438A1"}, //AP6212A
|
||||
{"BCM20702A","BCM20710A1"}, //AP6210B
|
||||
{"BCM4335C0","BCM4339A0"}, //AP6335
|
||||
{"BCM4330B1","BCM40183B2"}, //AP6330
|
||||
{"BCM4324B3","BCM43241B4"}, //AP62X2
|
||||
{"BCM4350C0","BCM4354A1"}, //AP6354
|
||||
{"BCM4354A2","BCM4356A2"}, //AP6356
|
||||
// {"BCM4345C0","BCM4345C0"}, //AP6255
|
||||
// {"BCM43341B0","BCM43341B0"}, //AP6234
|
||||
// {"BCM2076B1","BCM2076B1"}, //AP6476
|
||||
{(const char *) NULL, NULL}
|
||||
};
|
||||
|
||||
/*
|
||||
* NOTICE:
|
||||
|
@ -359,10 +378,16 @@ uint8_t line_speed_to_userial_baud(uint32_t line_speed)
|
|||
|
||||
if (line_speed == 4000000)
|
||||
baud = USERIAL_BAUD_4M;
|
||||
else if (line_speed == 3500000)
|
||||
baud = USERIAL_BAUD_3_5M;
|
||||
else if (line_speed == 3000000)
|
||||
baud = USERIAL_BAUD_3M;
|
||||
else if (line_speed == 2500000)
|
||||
baud = USERIAL_BAUD_2_5M;
|
||||
else if (line_speed == 2000000)
|
||||
baud = USERIAL_BAUD_2M;
|
||||
else if (line_speed == 1500000)
|
||||
baud = USERIAL_BAUD_1_5M;
|
||||
else if (line_speed == 1000000)
|
||||
baud = USERIAL_BAUD_1M;
|
||||
else if (line_speed == 921600)
|
||||
|
@ -436,6 +461,7 @@ static uint8_t hw_config_findpatch(char *p_chip_id_str)
|
|||
struct dirent *dp;
|
||||
int filenamelen;
|
||||
uint8_t retval = FALSE;
|
||||
fw_auto_detection_entry_t *p_entry;
|
||||
|
||||
BTHWDBG("Target name = [%s]", p_chip_id_str);
|
||||
|
||||
|
@ -457,6 +483,18 @@ static uint8_t hw_config_findpatch(char *p_chip_id_str)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
p_entry = (fw_auto_detection_entry_t *)fw_auto_detection_table;
|
||||
while (p_entry->chip_id != NULL)
|
||||
{
|
||||
if (strstr(p_chip_id_str, p_entry->chip_id)!=NULL)
|
||||
{
|
||||
strcpy(p_chip_id_str,p_entry->updated_chip_id);
|
||||
break;
|
||||
}
|
||||
p_entry++;
|
||||
}
|
||||
BTHWDBG("Updated Target name = [%s]", p_chip_id_str);
|
||||
|
||||
if ((dirp = opendir(fw_patchfile_path)) != NULL)
|
||||
{
|
||||
/* Fetch next filename in patchfile directory */
|
||||
|
|
|
@ -90,10 +90,16 @@ uint8_t userial_to_tcio_baud(uint8_t cfg_baud, uint32_t *baud)
|
|||
*baud = B115200;
|
||||
else if (cfg_baud == USERIAL_BAUD_4M)
|
||||
*baud = B4000000;
|
||||
else if (cfg_baud == USERIAL_BAUD_3_5M)
|
||||
*baud = B3500000;
|
||||
else if (cfg_baud == USERIAL_BAUD_3M)
|
||||
*baud = B3000000;
|
||||
else if (cfg_baud == USERIAL_BAUD_2_5M)
|
||||
*baud = B2500000;
|
||||
else if (cfg_baud == USERIAL_BAUD_2M)
|
||||
*baud = B2000000;
|
||||
else if (cfg_baud == USERIAL_BAUD_1_5M)
|
||||
*baud = B1500000;
|
||||
else if (cfg_baud == USERIAL_BAUD_1M)
|
||||
*baud = B1000000;
|
||||
else if (cfg_baud == USERIAL_BAUD_921600)
|
||||
|
@ -247,6 +253,17 @@ int userial_vendor_open(tUSERIAL_CFG *p_cfg)
|
|||
return -1;
|
||||
}
|
||||
|
||||
// Compatible with all the broadcom chips, add by River
|
||||
#if 1
|
||||
usleep(100000);
|
||||
close(vnd_userial.fd);
|
||||
if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR)) == -1)
|
||||
{
|
||||
ALOGE("userial vendor open: unable to open %s", vnd_userial.port_name);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
tcflush(vnd_userial.fd, TCIOFLUSH);
|
||||
|
||||
tcgetattr(vnd_userial.fd, &vnd_userial.termios);
|
||||
|
|
81
android/hardware/interfaces/cas/1.0/default/CasImpl.cpp
Normal file → Executable file
81
android/hardware/interfaces/cas/1.0/default/CasImpl.cpp
Normal file → Executable file
|
@ -31,19 +31,8 @@ namespace cas {
|
|||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
|
||||
struct CasImpl::PluginHolder : public RefBase {
|
||||
public:
|
||||
explicit PluginHolder(CasPlugin *plugin) : mPlugin(plugin) {}
|
||||
~PluginHolder() { if (mPlugin != NULL) delete mPlugin; }
|
||||
CasPlugin* get() { return mPlugin; }
|
||||
|
||||
private:
|
||||
CasPlugin *mPlugin;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(PluginHolder);
|
||||
};
|
||||
|
||||
CasImpl::CasImpl(const sp<ICasListener> &listener)
|
||||
: mPluginHolder(NULL), mListener(listener) {
|
||||
: mListener(listener) {
|
||||
ALOGV("CTOR");
|
||||
}
|
||||
|
||||
|
@ -69,7 +58,8 @@ void CasImpl::OnEvent(
|
|||
|
||||
void CasImpl::init(const sp<SharedLibrary>& library, CasPlugin *plugin) {
|
||||
mLibrary = library;
|
||||
mPluginHolder = new PluginHolder(plugin);
|
||||
std::shared_ptr<CasPlugin> holder(plugin);
|
||||
std::atomic_store(&mPluginHolder, holder);
|
||||
}
|
||||
|
||||
void CasImpl::onEvent(
|
||||
|
@ -88,21 +78,22 @@ void CasImpl::onEvent(
|
|||
|
||||
Return<Status> CasImpl::setPrivateData(const HidlCasData& pvtData) {
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
sp<PluginHolder> holder = mPluginHolder;
|
||||
if (holder == NULL) {
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
}
|
||||
return toStatus(holder->get()->setPrivateData(pvtData));
|
||||
return toStatus(holder->setPrivateData(pvtData));
|
||||
}
|
||||
|
||||
Return<void> CasImpl::openSession(openSession_cb _hidl_cb) {
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
CasSessionId sessionId;
|
||||
|
||||
sp<PluginHolder> holder = mPluginHolder;
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
status_t err = INVALID_OPERATION;
|
||||
if (holder != NULL) {
|
||||
err = holder->get()->openSession(&sessionId);
|
||||
if (holder.get() != nullptr) {
|
||||
err = holder->openSession(&sessionId);
|
||||
holder.reset();
|
||||
}
|
||||
|
||||
_hidl_cb(toStatus(err), sessionId);
|
||||
|
@ -114,87 +105,87 @@ Return<Status> CasImpl::setSessionPrivateData(
|
|||
const HidlCasSessionId &sessionId, const HidlCasData& pvtData) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__,
|
||||
sessionIdToString(sessionId).string());
|
||||
sp<PluginHolder> holder = mPluginHolder;
|
||||
if (holder == NULL) {
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
}
|
||||
return toStatus(
|
||||
holder->get()->setSessionPrivateData(
|
||||
sessionId, pvtData));
|
||||
return toStatus(holder->setSessionPrivateData(sessionId, pvtData));
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::closeSession(const HidlCasSessionId &sessionId) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__,
|
||||
sessionIdToString(sessionId).string());
|
||||
sp<PluginHolder> holder = mPluginHolder;
|
||||
if (holder == NULL) {
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
}
|
||||
return toStatus(holder->get()->closeSession(sessionId));
|
||||
return toStatus(holder->closeSession(sessionId));
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::processEcm(
|
||||
const HidlCasSessionId &sessionId, const HidlCasData& ecm) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__,
|
||||
sessionIdToString(sessionId).string());
|
||||
sp<PluginHolder> holder = mPluginHolder;
|
||||
if (holder == NULL) {
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
}
|
||||
|
||||
return toStatus(holder->get()->processEcm(sessionId, ecm));
|
||||
return toStatus(holder->processEcm(sessionId, ecm));
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::processEmm(const HidlCasData& emm) {
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
sp<PluginHolder> holder = mPluginHolder;
|
||||
if (holder == NULL) {
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
}
|
||||
|
||||
return toStatus(holder->get()->processEmm(emm));
|
||||
return toStatus(holder->processEmm(emm));
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::sendEvent(
|
||||
int32_t event, int32_t arg,
|
||||
const HidlCasData& eventData) {
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
sp<PluginHolder> holder = mPluginHolder;
|
||||
if (holder == NULL) {
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
}
|
||||
|
||||
status_t err = holder->get()->sendEvent(event, arg, eventData);
|
||||
status_t err = holder->sendEvent(event, arg, eventData);
|
||||
return toStatus(err);
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::provision(const hidl_string& provisionString) {
|
||||
ALOGV("%s: provisionString=%s", __FUNCTION__, provisionString.c_str());
|
||||
sp<PluginHolder> holder = mPluginHolder;
|
||||
if (holder == NULL) {
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
}
|
||||
|
||||
return toStatus(holder->get()->provision(String8(provisionString.c_str())));
|
||||
return toStatus(holder->provision(String8(provisionString.c_str())));
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::refreshEntitlements(
|
||||
int32_t refreshType,
|
||||
const HidlCasData& refreshData) {
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
sp<PluginHolder> holder = mPluginHolder;
|
||||
if (holder == NULL) {
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
}
|
||||
|
||||
status_t err = holder->get()->refreshEntitlements(refreshType, refreshData);
|
||||
status_t err = holder->refreshEntitlements(refreshType, refreshData);
|
||||
return toStatus(err);
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::release() {
|
||||
ALOGV("%s: plugin=%p", __FUNCTION__,
|
||||
mPluginHolder != NULL ? mPluginHolder->get() : NULL);
|
||||
mPluginHolder.clear();
|
||||
ALOGV("%s: plugin=%p", __FUNCTION__, mPluginHolder.get());
|
||||
|
||||
std::shared_ptr<CasPlugin> holder(nullptr);
|
||||
std::atomic_store(&mPluginHolder, holder);
|
||||
|
||||
return Status::OK;
|
||||
}
|
||||
|
||||
|
|
2
android/hardware/interfaces/cas/1.0/default/CasImpl.h
Normal file → Executable file
2
android/hardware/interfaces/cas/1.0/default/CasImpl.h
Normal file → Executable file
|
@ -88,7 +88,7 @@ public:
|
|||
private:
|
||||
struct PluginHolder;
|
||||
sp<SharedLibrary> mLibrary;
|
||||
sp<PluginHolder> mPluginHolder;
|
||||
std::shared_ptr<CasPlugin> mPluginHolder;
|
||||
sp<ICasListener> mListener;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(CasImpl);
|
||||
|
|
53
android/hardware/interfaces/cas/1.0/default/DescramblerImpl.cpp
Normal file → Executable file
53
android/hardware/interfaces/cas/1.0/default/DescramblerImpl.cpp
Normal file → Executable file
|
@ -50,12 +50,12 @@ CHECK_SUBSAMPLE_DEF(CryptoPlugin);
|
|||
|
||||
DescramblerImpl::DescramblerImpl(
|
||||
const sp<SharedLibrary>& library, DescramblerPlugin *plugin) :
|
||||
mLibrary(library), mPlugin(plugin) {
|
||||
ALOGV("CTOR: mPlugin=%p", mPlugin);
|
||||
mLibrary(library), mPluginHolder(plugin) {
|
||||
ALOGV("CTOR: plugin=%p", mPluginHolder.get());
|
||||
}
|
||||
|
||||
DescramblerImpl::~DescramblerImpl() {
|
||||
ALOGV("DTOR: mPlugin=%p", mPlugin);
|
||||
ALOGV("DTOR: plugin=%p", mPluginHolder.get());
|
||||
release();
|
||||
}
|
||||
|
||||
|
@ -63,12 +63,22 @@ Return<Status> DescramblerImpl::setMediaCasSession(const HidlCasSessionId& sessi
|
|||
ALOGV("%s: sessionId=%s", __FUNCTION__,
|
||||
sessionIdToString(sessionId).string());
|
||||
|
||||
return toStatus(mPlugin->setMediaCasSession(sessionId));
|
||||
std::shared_ptr<DescramblerPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
}
|
||||
|
||||
return toStatus(holder->setMediaCasSession(sessionId));
|
||||
}
|
||||
|
||||
Return<bool> DescramblerImpl::requiresSecureDecoderComponent(
|
||||
const hidl_string& mime) {
|
||||
return mPlugin->requiresSecureDecoderComponent(String8(mime.c_str()));
|
||||
std::shared_ptr<DescramblerPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return holder->requiresSecureDecoderComponent(String8(mime.c_str()));
|
||||
}
|
||||
|
||||
static inline bool validateRangeForSize(
|
||||
|
@ -86,6 +96,16 @@ Return<void> DescramblerImpl::descramble(
|
|||
descramble_cb _hidl_cb) {
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
// hidl_memory's size is stored in uint64_t, but mapMemory's mmap will map
|
||||
// size in size_t. If size is over SIZE_MAX, mapMemory mapMemory could succeed
|
||||
// but the mapped memory's actual size will be smaller than the reported size.
|
||||
if (srcBuffer.heapBase.size() > SIZE_MAX) {
|
||||
ALOGE("Invalid hidl_memory size: %llu", srcBuffer.heapBase.size());
|
||||
android_errorWriteLog(0x534e4554, "79376389");
|
||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||
return Void();
|
||||
}
|
||||
|
||||
sp<IMemory> srcMem = mapMemory(srcBuffer.heapBase);
|
||||
|
||||
// Validate if the offset and size in the SharedBuffer is consistent with the
|
||||
|
@ -143,10 +163,21 @@ Return<void> DescramblerImpl::descramble(
|
|||
dstBuffer.secureMemory.getNativeHandle());
|
||||
dstPtr = static_cast<void *>(handle);
|
||||
}
|
||||
|
||||
// Get a local copy of the shared_ptr for the plugin. Note that before
|
||||
// calling the HIDL callback, this shared_ptr must be manually reset,
|
||||
// since the client side could proceed as soon as the callback is called
|
||||
// without waiting for this method to go out of scope.
|
||||
std::shared_ptr<DescramblerPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
_hidl_cb(toStatus(INVALID_OPERATION), 0, NULL);
|
||||
return Void();
|
||||
}
|
||||
|
||||
// Casting hidl SubSample to DescramblerPlugin::SubSample, but need
|
||||
// to ensure structs are actually idential
|
||||
|
||||
int32_t result = mPlugin->descramble(
|
||||
int32_t result = holder->descramble(
|
||||
dstBuffer.type != BufferType::SHARED_MEMORY,
|
||||
(DescramblerPlugin::ScramblingControl)scramblingControl,
|
||||
subSamples.size(),
|
||||
|
@ -157,17 +188,17 @@ Return<void> DescramblerImpl::descramble(
|
|||
dstOffset,
|
||||
NULL);
|
||||
|
||||
holder.reset();
|
||||
_hidl_cb(toStatus(result >= 0 ? OK : result), result, NULL);
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<Status> DescramblerImpl::release() {
|
||||
ALOGV("%s: mPlugin=%p", __FUNCTION__, mPlugin);
|
||||
ALOGV("%s: plugin=%p", __FUNCTION__, mPluginHolder.get());
|
||||
|
||||
std::shared_ptr<DescramblerPlugin> holder(nullptr);
|
||||
std::atomic_store(&mPluginHolder, holder);
|
||||
|
||||
if (mPlugin != NULL) {
|
||||
delete mPlugin;
|
||||
mPlugin = NULL;
|
||||
}
|
||||
return Status::OK;
|
||||
}
|
||||
|
||||
|
|
2
android/hardware/interfaces/cas/1.0/default/DescramblerImpl.h
Normal file → Executable file
2
android/hardware/interfaces/cas/1.0/default/DescramblerImpl.h
Normal file → Executable file
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
private:
|
||||
sp<SharedLibrary> mLibrary;
|
||||
DescramblerPlugin *mPlugin;
|
||||
std::shared_ptr<DescramblerPlugin> mPluginHolder;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(DescramblerImpl);
|
||||
};
|
||||
|
|
97
android/hardware/libhardware/include/hardware/hal_public/README
Executable file
97
android/hardware/libhardware/include/hardware/hal_public/README
Executable file
|
@ -0,0 +1,97 @@
|
|||
================================================================
|
||||
Copyright (C) 2017 Albert Yu (yuxyun@allwinnertech.com)
|
||||
|
||||
================================================================
|
||||
GPU Type list
|
||||
=============
|
||||
Mali GPU
|
||||
Mali Utgard
|
||||
Mali-400
|
||||
Mali-450
|
||||
|
||||
Mali Midgard
|
||||
Mali-T720
|
||||
Mali-T760
|
||||
|
||||
Imagination GPU
|
||||
SGX544
|
||||
RGX6230
|
||||
|
||||
================================================================
|
||||
GPU Type on Allwinner platforms
|
||||
A10/A13/R8
|
||||
Mali-400 MP1
|
||||
|
||||
A20/T2/A23/A33/R16/H3/A64/H64/R18/V40/A20E/R40/T3
|
||||
Mali-400 MP2
|
||||
|
||||
A31/A31S
|
||||
SGX-544 MP2
|
||||
|
||||
A83T/H8/H8vr/V66/T8/R58
|
||||
SGX-544 MP1
|
||||
|
||||
A80/A80T
|
||||
RGX-6230 MP2
|
||||
|
||||
H5
|
||||
Mali-450 MP4
|
||||
|
||||
H6
|
||||
Mali-T720 MP2
|
||||
|
||||
A63/VR9
|
||||
Mali-T760 MP2
|
||||
|
||||
================================================================
|
||||
Macro definition
|
||||
================
|
||||
SUNXI_YUV_ALIGN
|
||||
Define the aligned value of YUV format, e.g. if SUNXI_YUV_ALIGN is
|
||||
16, then the stride value will be aligned by 16 (if the width is 15, then
|
||||
the stride value will be 16).
|
||||
|
||||
SUNXI_MEM_CONTIGUOUS
|
||||
The flag to descript if the buffer is physical contiguous. This flag
|
||||
is stored in flags which is in private_handle_t. As for some Allwinner plat-
|
||||
forms, some hardware modules such as DE and VE do not have IOMMU, so physical
|
||||
contiguous buffers are essential. This flag is useful for HWC to determine
|
||||
which hardware module (DE or GPU) to composite the corresponding layer data.
|
||||
|
||||
================================================================
|
||||
The description of some variables
|
||||
=================================
|
||||
private_handle_t
|
||||
When new a Graphic Buffer, the Gralloc alloc funciton will be called
|
||||
to allocate a Graphic Buffer, and at the same time the buffer information
|
||||
will be stored in private_handle_t whose virtual address will be assigned to
|
||||
buffer_handle_t in Gralloc alloc. Actually, Android uses buffer_handle_t
|
||||
instead of private_handle_t to share buffer information between two processes.
|
||||
|
||||
share_fd
|
||||
Stores the shared fd of this buffer, and other software modules can use
|
||||
it to do import to get a useful ion handle.
|
||||
|
||||
width
|
||||
Stores the width of the Graphic Buffer.
|
||||
|
||||
height
|
||||
Stores the height of the Graphic Buffer.
|
||||
|
||||
format
|
||||
Stores the format of the Graphic Buffer, and all useful formats are
|
||||
defined in:
|
||||
system/core/include/system/graphics.h
|
||||
|
||||
usage
|
||||
Stores the Gralloc usage value, and all useful usage flags are defined in:
|
||||
hardware/libhardware/include/hardware/gralloc.h
|
||||
|
||||
flags
|
||||
Stores some flags such as SUNXI_MEM_CONTIGUOUS. Currently we just support
|
||||
SUNXI_MEM_CONTIGUOUS.
|
||||
|
||||
aw_buf_id
|
||||
Sometimes we wanna know the track of certain buffer, and with this variable,
|
||||
we can print its value in Gralloc, HWC, CedarX and everywhere we want, in this way
|
||||
we can get when the buffer is allocated, when the buffer is freed and so on.
|
|
@ -24,6 +24,7 @@ extern "C" {
|
|||
const char *get_wifi_vendor_name();
|
||||
const char *get_wifi_module_name();
|
||||
const char *get_wifi_driver_name();
|
||||
const char *get_wifi_driver_module_name();
|
||||
const char *get_fw_path_sta();
|
||||
const char *get_fw_path_ap();
|
||||
const char *get_fw_path_p2p();
|
||||
|
|
18
android/hardware/libhardware_legacy/wifi_hardware_info/Android.mk
Normal file → Executable file
18
android/hardware/libhardware_legacy/wifi_hardware_info/Android.mk
Normal file → Executable file
|
@ -12,10 +12,14 @@ endif
|
|||
ifdef WIFI_MODULE_NAME
|
||||
LOCAL_CFLAGS += -DWIFI_MODULE_NAME=\"$(WIFI_MODULE_NAME)\"
|
||||
else
|
||||
ifdef BOARD_USR_WIFI
|
||||
LOCAL_CFLAGS += -DWIFI_MODULE_NAME=\"$(BOARD_USR_WIFI)\"
|
||||
else
|
||||
ifdef WIFI_DRIVER_MODULE_NAME
|
||||
LOCAL_CFLAGS += -DWIFI_MODULE_NAME=\"$(WIFI_DRIVER_MODULE_NAME)\"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef WIFI_DRIVER_NAME
|
||||
LOCAL_CFLAGS += -DWIFI_DRIVER_NAME=\"$(WIFI_DRIVER_NAME)\"
|
||||
|
@ -26,6 +30,10 @@ LOCAL_CFLAGS += -DWIFI_DRIVER_NAME=\"$(drivername)\"
|
|||
endif
|
||||
endif
|
||||
|
||||
ifdef WIFI_DRIVER_MODULE_NAME
|
||||
LOCAL_CFLAGS += -DWIFI_DRIVER_MODULE_NAME=\"$(WIFI_DRIVER_MODULE_NAME)\"
|
||||
endif
|
||||
|
||||
ifdef WIFI_DRIVER_FW_PATH_STA
|
||||
LOCAL_CFLAGS += -DWIFI_DRIVER_FW_PATH_STA=\"$(WIFI_DRIVER_FW_PATH_STA)\"
|
||||
endif
|
||||
|
@ -38,6 +46,16 @@ ifdef WIFI_DRIVER_FW_PATH_P2P
|
|||
LOCAL_CFLAGS += -DWIFI_DRIVER_FW_PATH_P2P=\"$(WIFI_DRIVER_FW_PATH_P2P)\"
|
||||
endif
|
||||
|
||||
modulestring=$(shell echo $(LOCAL_CFLAGS) | grep -oP 'WIFI_MODULE_NAME\s*=\s*[^\s]+' \
|
||||
| sed -e 's/WIFI_MODULE_NAME\s*=\s*//g' -e 's/"//g')
|
||||
ifeq (rtl8723bs,$(modulestring))
|
||||
LOCAL_CFLAGS += -DWIFI_USE_RTL8723BS
|
||||
else
|
||||
ifeq (rtl8723bs_vq0,$(modulestring))
|
||||
LOCAL_CFLAGS += -DWIFI_USE_RTL8723BS_VQ0
|
||||
endif
|
||||
endif
|
||||
|
||||
LOCAL_MODULE:= libwifi_hardware_info
|
||||
LOCAL_SRC_FILES += wifi_hardware_info.c
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
|
42
android/hardware/libhardware_legacy/wifi_hardware_info/wifi_hardware_info.c
Normal file → Executable file
42
android/hardware/libhardware_legacy/wifi_hardware_info/wifi_hardware_info.c
Normal file → Executable file
|
@ -39,6 +39,7 @@ struct wifi_hardware_info {
|
|||
unsigned long device_id;
|
||||
char *module_name;
|
||||
char *driver_name;
|
||||
char *driver_module_name;
|
||||
char *vendor_name;
|
||||
char *fw_path_sta;
|
||||
char *fw_path_ap;
|
||||
|
@ -50,24 +51,40 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x18179,
|
||||
.module_name = "rtl8189es",
|
||||
.driver_name = "8189es",
|
||||
.driver_module_name = "8189es",
|
||||
.vendor_name = "realtek",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
.fw_path_p2p = "P2P",
|
||||
},
|
||||
#ifdef WIFI_USE_RTL8723BS_VQ0
|
||||
{
|
||||
.device_id = 0x1b723,
|
||||
.module_name = "rtl8723bs_vq0",
|
||||
.driver_name = "8723bs-vq0",
|
||||
.driver_module_name = "8723bs_vq0",
|
||||
.vendor_name = "realtek",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
.fw_path_p2p = "P2P",
|
||||
},
|
||||
#else
|
||||
{
|
||||
.device_id = 0x1b723,
|
||||
.module_name = "rtl8723bs",
|
||||
.driver_name = "8723bs",
|
||||
.driver_module_name = "8723bs",
|
||||
.vendor_name = "realtek",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
.fw_path_p2p = "P2P",
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.device_id = 0x1b703,
|
||||
.module_name = "8723cs",
|
||||
.module_name = "rtl8723cs",
|
||||
.driver_name = "8723cs",
|
||||
.driver_module_name = "8723cs",
|
||||
.vendor_name = "realtek",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
|
@ -77,6 +94,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x1d723,
|
||||
.module_name = "rtl8723ds",
|
||||
.driver_name = "8723ds",
|
||||
.driver_module_name = "8723ds",
|
||||
.vendor_name = "realtek",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
|
@ -86,6 +104,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x08179,
|
||||
.module_name = "rtl8188etv",
|
||||
.driver_name = "8188eu",
|
||||
.driver_module_name = "8188eu",
|
||||
.vendor_name = "realtek",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
|
@ -95,6 +114,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x00179,
|
||||
.module_name = "rtl8188eu",
|
||||
.driver_name = "8188eu",
|
||||
.driver_module_name = "8188eu",
|
||||
.vendor_name = "realtek",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
|
@ -104,6 +124,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x0818b,
|
||||
.module_name = "rtl8192eu",
|
||||
.driver_name = "8192eu",
|
||||
.driver_module_name = "8192eu",
|
||||
.vendor_name = "realtek",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
|
@ -113,6 +134,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x0b720,
|
||||
.module_name = "rtl8723bu",
|
||||
.driver_name = "8723bu",
|
||||
.driver_module_name = "8723bu",
|
||||
.vendor_name = "realtek",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
|
@ -122,6 +144,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x1f179,
|
||||
.module_name = "rtl8189fs",
|
||||
.driver_name = "8189fs",
|
||||
.driver_module_name = "8189fs",
|
||||
.vendor_name = "realtek",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
|
@ -131,6 +154,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x1B822,
|
||||
.module_name = "rtl88x2bs",
|
||||
.driver_name = "88x2bs",
|
||||
.driver_module_name = "88x2bs",
|
||||
.vendor_name = "realtek",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
|
@ -140,6 +164,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x1a9a6,
|
||||
.module_name = "ap6212",
|
||||
.driver_name = "bcmdhd",
|
||||
.driver_module_name = "bcmdhd",
|
||||
.vendor_name = "broadcom",
|
||||
.fw_path_sta = "/system/vendor/modules/fw_bcm43438a0.bin",
|
||||
.fw_path_ap = "/system/vendor/modules/fw_bcm43438a0_apsta.bin",
|
||||
|
@ -149,6 +174,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x14356,
|
||||
.module_name = "ap6356s",
|
||||
.driver_name = "bcmdhd",
|
||||
.driver_module_name = "bcmdhd",
|
||||
.vendor_name = "broadcom",
|
||||
.fw_path_sta = "/system/vendor/modules/fw_bcm4356a2_ag.bin",
|
||||
.fw_path_ap = "/system/vendor/modules/fw_bcm4356a2_apsta.bin",
|
||||
|
@ -158,6 +184,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x1a9bf,
|
||||
.module_name = "ap6255",
|
||||
.driver_name = "bcmdhd",
|
||||
.driver_module_name = "bcmdhd",
|
||||
.vendor_name = "broadcom",
|
||||
.fw_path_sta = "/system/vendor/modules/fw_bcm43455c0_ag.bin",
|
||||
.fw_path_ap = "/system/vendor/modules/fw_bcm43455c0_ag_apsta.bin",
|
||||
|
@ -167,6 +194,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x12281,
|
||||
.module_name = "xr819",
|
||||
.driver_name = "xradio_wlan",
|
||||
.driver_module_name = "xradio_wlan",
|
||||
.vendor_name = "xradio",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
|
@ -176,6 +204,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
.device_id = 0x1050a,
|
||||
.module_name = "qca6174a",
|
||||
.driver_name = "qualcomm",
|
||||
.driver_module_name = "qualcomm",
|
||||
.vendor_name = "atheros",
|
||||
.fw_path_sta = "STA",
|
||||
.fw_path_ap = "AP",
|
||||
|
@ -185,7 +214,7 @@ static const struct wifi_hardware_info wifi_list[] = {
|
|||
};
|
||||
/* default select rtl8189es if get wifi_hardware_info failed */
|
||||
static struct wifi_hardware_info selected_wifi = {
|
||||
0x18179, "rtl8189es", "8189es", "realtek", "STA", "AP", "P2P"
|
||||
0x18179, "rtl8189es", "8189es", "8189es", "realtek", "STA", "AP", "P2P"
|
||||
};
|
||||
|
||||
static const char realtek_wpa_supplicant_para[] =
|
||||
|
@ -557,10 +586,11 @@ static void get_wifi_hardware_info(struct wifi_hardware_info *wifiinfo)
|
|||
|
||||
if (initialed == false) {
|
||||
|
||||
#if defined(WIFI_VENDOR_NAME) && defined(WIFI_MODULE_NAME) && defined(WIFI_DRIVER_NAME)
|
||||
#if defined(WIFI_VENDOR_NAME) && defined(WIFI_MODULE_NAME) && defined(WIFI_DRIVER_NAME) && defined(WIFI_DRIVER_MODULE_NAME)
|
||||
wifiinfo->vendor_name = WIFI_VENDOR_NAME;
|
||||
wifiinfo->module_name = WIFI_MODULE_NAME;
|
||||
wifiinfo->driver_name = WIFI_DRIVER_NAME;
|
||||
wifiinfo->driver_module_name = WIFI_DRIVER_MODULE_NAME;
|
||||
#if defined(WIFI_DRIVER_FW_PATH_STA)
|
||||
wifiinfo->fw_path_sta = WIFI_DRIVER_FW_PATH_STA;
|
||||
#endif
|
||||
|
@ -687,6 +717,12 @@ const char *get_wifi_driver_name()
|
|||
return selected_wifi.driver_name;
|
||||
}
|
||||
|
||||
const char *get_wifi_driver_module_name()
|
||||
{
|
||||
get_wifi_hardware_info(&selected_wifi);
|
||||
return selected_wifi.driver_module_name;
|
||||
}
|
||||
|
||||
const char *get_fw_path_sta()
|
||||
{
|
||||
get_wifi_hardware_info(&selected_wifi);
|
||||
|
|
2
android/hardware/qcom/display/msm8998/sdm/libs/hwc2/hwc_session.cpp
Normal file → Executable file
2
android/hardware/qcom/display/msm8998/sdm/libs/hwc2/hwc_session.cpp
Normal file → Executable file
|
@ -1262,7 +1262,7 @@ android::status_t HWCSession::SetColorModeById(const android::Parcel *input_parc
|
|||
auto device = static_cast<hwc2_device_t *>(this);
|
||||
|
||||
if (display > HWC_DISPLAY_VIRTUAL) {
|
||||
return -EINVAL;
|
||||
return android::BAD_VALUE;
|
||||
}
|
||||
|
||||
auto err = CallDisplayFunction(device, display, &HWCDisplay::SetColorModeById, mode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue