Compare commits
17 Commits
android-16
...
android-13
Author | SHA1 | Date | |
---|---|---|---|
|
e03895bd83 | ||
|
a6aeac42b1 | ||
|
419d7029f5 | ||
|
3ae444d56d | ||
|
3711aeb1a6 | ||
|
f8bc3154c6 | ||
|
168d1e93f1 | ||
|
46955e713d | ||
|
8ea29a6c93 | ||
|
1042d2ea67 | ||
|
3804a2d54e | ||
|
f84b2d41d7 | ||
|
426961a804 | ||
|
e2553ec70c | ||
|
070bcb0fd3 | ||
|
3a8006c220 | ||
|
c06fbeb7b2 |
@@ -13,16 +13,11 @@ PRODUCT_CHARACTERISTICS := automotive,nosdcard
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
|
||||
$(call inherit-product, packages/services/Car/car_product/build/car.mk)
|
||||
|
||||
# Android Automotive
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.automotive.vehicle@2.0-default-service
|
||||
|
||||
# Bluetooth
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
bluetooth.device.class_of_device=38,4,8 \
|
||||
bluetooth.profile.a2dp.source.enabled=false \
|
||||
bluetooth.profile.asha.central.enabled=false \
|
||||
bluetooth.profile.avrcp.target.enabled=false \
|
||||
bluetooth.profile.bap.broadcast.assist.enabled=false \
|
||||
bluetooth.profile.bap.unicast.client.enabled=false \
|
||||
bluetooth.profile.bas.client.enabled=false \
|
||||
@@ -32,6 +27,7 @@ PRODUCT_VENDOR_PROPERTIES += \
|
||||
bluetooth.profile.hfp.ag.enabled=false \
|
||||
bluetooth.profile.hid.device.enabled=false \
|
||||
bluetooth.profile.hid.host.enabled=false \
|
||||
bluetooth.profile.map.client.enabled=false \
|
||||
bluetooth.profile.map.server.enabled=false \
|
||||
bluetooth.profile.mcp.server.enabled=false \
|
||||
bluetooth.profile.opp.enabled=false \
|
||||
@@ -39,6 +35,13 @@ PRODUCT_VENDOR_PROPERTIES += \
|
||||
bluetooth.profile.sap.server.enabled=false \
|
||||
bluetooth.profile.vcp.controller.enabled=false
|
||||
|
||||
# Broadcast radio
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.broadcastradio@2.0-service
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.broadcastradio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.broadcastradio.xml
|
||||
|
||||
# Camera
|
||||
ENABLE_CAMERA_SERVICE := true
|
||||
|
||||
@@ -60,8 +63,13 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
# Permissions
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.software.activities_on_secondary_displays.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.activities_on_secondary_displays.xml \
|
||||
frameworks/native/data/etc/car_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/car_core_hardware.xml
|
||||
|
||||
# Vehicle
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.automotive.vehicle@2.0-default-service
|
||||
|
||||
# Device identifier. This must come after all inclusions.
|
||||
PRODUCT_DEVICE := rpi4
|
||||
PRODUCT_NAME := aosp_rpi4_car
|
||||
|
@@ -84,9 +84,44 @@ struct alsa_stream_out {
|
||||
unsigned int written;
|
||||
};
|
||||
|
||||
static int probe_pcm_out_card() {
|
||||
FILE *fp;
|
||||
char card_node[] = "/proc/asound/card0/id";
|
||||
char card_id[16];
|
||||
|
||||
char card_prop[PROPERTY_VALUE_MAX];
|
||||
property_get("persist.audio.device", card_prop, "");
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
card_node[17] = i + '0';
|
||||
if ((fp = fopen(card_node, "r")) != NULL) {
|
||||
fgets(card_id, sizeof(card_id), fp);
|
||||
ALOGV("%s: %s", card_node, card_id);
|
||||
if (!strcmp(card_prop, "jack") && !strncmp(card_id, "Headphones", 10)) {
|
||||
fclose(fp);
|
||||
ALOGI("Using PCM card %d for 3.5mm audio jack", i);
|
||||
return i;
|
||||
} else if (!strcmp(card_prop, "dac") && strncmp(card_id, "Headphones", 10)
|
||||
&& strncmp(card_id, "vc4hdmi", 7)) {
|
||||
fclose(fp);
|
||||
ALOGI("Using PCM card %d for audio DAC %s", i, card_id);
|
||||
return i;
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
ALOGE("Could not probe PCM card for %s, using PCM card 0", card_prop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_pcm_card()
|
||||
{
|
||||
char card[PROPERTY_VALUE_MAX];
|
||||
property_get("persist.audio.pcm.card.auto", card, "false");
|
||||
if (!strcmp(card, "true"))
|
||||
return probe_pcm_out_card();
|
||||
|
||||
property_get("persist.audio.pcm.card", card, "0");
|
||||
return atoi(card);
|
||||
}
|
||||
|
@@ -86,11 +86,11 @@ struct alsa_stream_out {
|
||||
};
|
||||
|
||||
static void get_alsa_device_name(char *name) {
|
||||
char hdmiDevice[PROPERTY_VALUE_MAX];
|
||||
property_get("persist.audio.hdmi.device", hdmiDevice, "vc4hdmi0");
|
||||
char hdmi_device[PROPERTY_VALUE_MAX];
|
||||
property_get("persist.audio.hdmi.device", hdmi_device, "vc4hdmi0");
|
||||
|
||||
// use card configured in vc4-hdmi.conf to get IEC958 subframe conversion
|
||||
sprintf(name, "default:CARD=%s", hdmiDevice);
|
||||
sprintf(name, "default:CARD=%s", hdmi_device);
|
||||
}
|
||||
|
||||
/* must be called with hw device and output stream mutexes locked */
|
||||
|
@@ -15,6 +15,9 @@ dtparam=krnbt=on
|
||||
camera_auto_detect=1
|
||||
start_x=1
|
||||
|
||||
# CPU
|
||||
arm_boost=1
|
||||
|
||||
# Display
|
||||
disable_overscan=1
|
||||
|
||||
@@ -23,6 +26,7 @@ disable_overscan=1
|
||||
#dtoverlay=rpi-backlight
|
||||
|
||||
# Graphics acceleration
|
||||
disable_fw_kms_setup=1
|
||||
dtoverlay=vc4-kms-v3d
|
||||
dtoverlay=cma,cma-512
|
||||
|
||||
|
@@ -0,0 +1,10 @@
|
||||
service vendor.camera-provider-2-5 /vendor/bin/hw/android.hardware.camera.provider@2.5-service_64
|
||||
class hal
|
||||
user cameraserver
|
||||
group audio camera input drmrpc
|
||||
ioprio rt 4
|
||||
capabilities SYS_NICE
|
||||
task_profiles CameraServiceCapacity MaxPerformance
|
||||
override
|
||||
setenv LIBCAMERA_LOG_LEVELS *:WARN
|
||||
setenv LIBCAMERA_LOG_FILE syslog
|
@@ -100,6 +100,9 @@ PRODUCT_PACKAGES += \
|
||||
camera.libcamera \
|
||||
ipa_rpi
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(DEVICE_PATH)/camera/android.hardware.camera.provider@2.5-service_64.rpi.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/android.hardware.camera.provider@2.5-service_64.rpi.rc
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(DEVICE_PATH)/camera/camera_hal.yaml:$(TARGET_COPY_OUT_VENDOR)/etc/libcamera/camera_hal.yaml \
|
||||
external/libcamera/src/ipa/raspberrypi/data/imx219.json:$(TARGET_COPY_OUT_VENDOR)/etc/libcamera/ipa/raspberrypi/imx219.json \
|
||||
|
@@ -24,6 +24,12 @@
|
||||
<!-- Whether charging_sounds should be shown or not. -->
|
||||
<bool name="config_show_charging_sounds">false</bool>
|
||||
|
||||
<!-- Whether data_saver should be shown or not. -->
|
||||
<bool name="config_show_data_saver">false</bool>
|
||||
|
||||
<!-- Whether battery from app_info_settings is available or not. -->
|
||||
<bool name="config_show_app_info_settings_battery">false</bool>
|
||||
|
||||
<!-- Whether top_level_battery should be shown or not. -->
|
||||
<bool name="config_show_top_level_battery">false</bool>
|
||||
|
||||
|
@@ -12,9 +12,6 @@ on post-fs-data
|
||||
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
|
||||
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
|
||||
|
||||
# Set indication (checked by vold) that we have finished this action
|
||||
setprop vold.post_fs_data_done 1
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
# Reinit lmkd to reconfigure lmkd properties
|
||||
setprop lmkd.reinit 1
|
||||
|
@@ -6,11 +6,11 @@
|
||||
/dev/cec1 u:object_r:cec_device:s0
|
||||
|
||||
# DRM
|
||||
/vendor/bin/hw/android\.hardware\.drm(@[0-9]+\.[0-9]+)?-service\.clearkey u:object_r:hal_drm_clearkey_exec:s0
|
||||
/vendor/bin/hw/android\.hardware\.drm(@[0-9]+\.[0-9]+)?-service\.widevine u:object_r:hal_drm_widevine_exec:s0
|
||||
/vendor/bin/hw/android\.hardware\.drm-service\.clearkey u:object_r:hal_drm_clearkey_exec:s0
|
||||
/vendor/bin/hw/android\.hardware\.drm-service\.widevine u:object_r:hal_drm_widevine_exec:s0
|
||||
|
||||
# FFmpeg
|
||||
/vendor/bin/hw/android\.hardware\.media\.c2@1\.2-service-ffmpeg(.*)? u:object_r:mediacodec_exec:s0
|
||||
/vendor/bin/hw/android\.hardware\.media\.c2@1\.2-service-ffmpeg u:object_r:mediacodec_exec:s0
|
||||
|
||||
# Gatekeeper
|
||||
/vendor/bin/hw/android\.hardware\.gatekeeper@1\.0-service\.software u:object_r:hal_gatekeeper_default_exec:s0
|
||||
|
@@ -53,6 +53,7 @@ persist.ffmpeg_codec2.v4l2.h265=true
|
||||
ro.hardware.hwcomposer=drm
|
||||
ro.hardware.vulkan=broadcom
|
||||
ro.opengles.version=196609
|
||||
vendor.hwc.drm.ctm=DRM_OR_IGNORE
|
||||
|
||||
# LMKD
|
||||
ro.lmk.critical=0
|
||||
|
Reference in New Issue
Block a user