17 Commits

Author SHA1 Message Date
Konsta
e03895bd83 ramdisk: remove vold.post_fs_data_done
* This was used by FDE which was removed in Android 13.
  0803ba0985
* Fixes 3ca55b2c31.
2024-05-03 21:51:46 +03:00
Konsta
a6aeac42b1 audio: reduce id name size
* Fixes 8ea29a6c93.
2024-05-03 21:51:39 +03:00
aloshchilov
419d7029f5 car: BT AVRCP target enabled 2024-04-17 17:23:36 +03:00
adufftpc
3ae444d56d car: Disabled BT MAP causing cyclic BT reconnect
Disabled BT Message Access Profile. Allows to keep connection to the paired device
2024-04-17 17:23:26 +03:00
Konsta
3711aeb1a6 libcamera: add override service for logging 2024-04-17 17:23:17 +03:00
Konsta
f8bc3154c6 overlay: hide data saver from settings 2023-12-07 20:20:06 +02:00
Konsta
168d1e93f1 overlay: hide more battery info from settings 2023-12-07 20:20:06 +02:00
Konsta
46955e713d boot: enable arm_boost
* Increases arm_freq to 1800 on Pi4B R1.4+.
  https://www.raspberrypi.com/documentation/computers/config_txt.html#arm_boost-raspberry-pi-4-only
  https://www.raspberrypi.com/documentation/computers/config_txt.html#overclocking
2023-11-26 22:09:59 +02:00
Konsta
8ea29a6c93 audio: probe pcm card for jack & dac 2023-11-26 22:09:50 +02:00
Konsta
1042d2ea67 hdmi audio: snake_case 2023-11-26 22:09:41 +02:00
Konsta
3804a2d54e boot: disable firmware kms setup
* https://www.raspberrypi.com/documentation/computers/config_txt.html#disable_fw_kms_setup
2023-11-26 22:09:30 +02:00
Konsta
f84b2d41d7 graphics: disable gpu color transform matrix 2023-11-26 22:08:58 +02:00
Konsta
426961a804 car: reorganize makefile 2023-10-13 19:52:23 +03:00
Konsta
e2553ec70c car: add broadcastradio hidl 2023-10-13 19:43:32 +03:00
Konsta
070bcb0fd3 car: add activities_on_secondary_displays permission
* Needed to display maps in home screen.
  f5124bfe5a
2023-10-13 16:38:01 +03:00
Konsta
3a8006c220 sepolicy: update for ffmpeg service
* There's no suffix in the service's name so drop the wildcard.
2023-10-12 10:34:10 +03:00
Konsta
c06fbeb7b2 sepolicy: update drm for aidl
* There no need for the wildcards for the HIDL versions.
2023-10-12 10:34:02 +03:00
10 changed files with 78 additions and 14 deletions

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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 */

View File

@@ -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

View File

@@ -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

View File

@@ -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 \

View File

@@ -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>

View File

@@ -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

View File

@@ -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

View File

@@ -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