[-]
[+]
|
Changed |
_service:tar_git:mce-plugin-libhybris.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:mce-plugin-libhybris.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -1,8 +1,8 @@
<services>
<service name="tar_git">
- <param name="url">https://github.com/Sailfish-On-Vince/mce-plugin-libhybris.git</param>
- <param name="branch">vince_backend</param>
- <param name="revision"/>
+ <param name="url">https://github.com/mer-hybris/mce-plugin-libhybris.git</param>
+ <param name="branch">master</param>
+ <param name="revision">65bb85f8595788a05a995dd1aa2d1ca4624daf9b</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Deleted |
_service:tar_git:mce-plugin-libhybris-1.14.1+vince_backend.20210816085812.8.g1d10500.tar.bz2/inifiles/60-vince.ini
^
|
@@ -1,9 +0,0 @@
-[LEDConfigHybris]
-
-# Choose vince backend
-BackEnd=vince
-
-
-RedDirectory=/sys/class/leds/red
-GreenDirectory=/sys/class/leds/red
-BlueDirectory=/sys/class/leds/red
|
[-]
[+]
|
Deleted |
_service:tar_git:mce-plugin-libhybris-1.14.1+vince_backend.20210816085812.8.g1d10500.tar.bz2/sysfs-led-vince.c
^
|
@@ -1,372 +0,0 @@
-/** @file sysfs-led-vince.c
- *
- * mce-plugin-libhybris - Libhybris plugin for Mode Control Entity
- * <p>
- * Copyright (C) 2017 Jolla Ltd.
- * <p>
- * @author Simo Piiroinen <simo.piiroinen@jollamobile.com>
- * @author BirdZhang <0312birdzhang@gmail.com>
- *
- * mce-plugin-libhybris is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * mce-plugin-libhybris is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with mce-plugin-libhybris; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/* ========================================================================= *
- * RGB led control: vince backend
- *
- * Three channels, all of which:
- * - must have 'brightness' control file
- * - must have 'max_brightness' control file
- * - must have 'blink' control file
- *
- * Assumptions built into code:
- * - writing to 'blink' affects 'brightness' control too and vice versa
- * ========================================================================= */
-
-#include "sysfs-led-vince.h"
-#include "sysfs-led-util.h"
-#include "sysfs-val.h"
-#include "plugin-config.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#include <glib.h>
-
-/* ========================================================================= *
- * PROTOTYPES
- * ========================================================================= */
-
-typedef struct
-{
- const char *max_brightness;
- const char *brightness;
- const char *blink;
-} led_paths_vince_t;
-
-typedef struct
-{
- sysfsval_t *cached_max_brightness;
- sysfsval_t *cached_brightness;
- sysfsval_t *cached_blink;
-
- int control_value;
- bool control_blink;
-
-} led_channel_vince_t;
-
-/* ------------------------------------------------------------------------- *
- * ONE_CHANNEL
- * ------------------------------------------------------------------------- */
-
-static void led_channel_vince_init (led_channel_vince_t *self);
-static void led_channel_vince_close (led_channel_vince_t *self);
-static bool led_channel_vince_probe (led_channel_vince_t *self, const led_paths_vince_t *path);
-static void led_channel_vince_set_value (led_channel_vince_t *self, int value);
-static void led_channel_vince_set_blink (led_channel_vince_t *self, int on_ms, int off_ms);
-
-/* ------------------------------------------------------------------------- *
- * ALL_CHANNELS
- * ------------------------------------------------------------------------- */
-
-static void led_control_vince_blink_cb (void *data, int on_ms, int off_ms);
-static void led_control_vince_value_cb (void *data, int r, int g, int b);
-static void led_control_vince_close_cb (void *data);
-
-bool led_control_vince_probe (led_control_t *self);
-
-/* ========================================================================= *
- * ONE_CHANNEL
- * ========================================================================= */
-
-static void
-led_channel_vince_init(led_channel_vince_t *self)
-{
- self->cached_max_brightness = sysfsval_create();
- self->cached_brightness = sysfsval_create();
- self->cached_blink = sysfsval_create();
-
- self->control_blink = false;
- self->control_value = 0;
-}
-
-static void
-led_channel_vince_close(led_channel_vince_t *self)
-{
- sysfsval_delete(self->cached_max_brightness),
- self->cached_max_brightness = 0;
-
- sysfsval_delete(self->cached_brightness),
- self->cached_brightness = 0;
-
- sysfsval_delete(self->cached_blink),
- self->cached_blink = 0;
-}
-
-static bool
-led_channel_vince_probe(led_channel_vince_t *self,
- const led_paths_vince_t *path)
-{
- bool ack = false;
-
- /* Probe control files in reverse existance likelihood order.
- * Practically all led control directories have 'brightness'
- * file, most have 'max_brightness' while only some have 'blink'.
- */
- if( !sysfsval_open_rw(self->cached_blink, path->blink) )
- goto cleanup;
-
- if( !sysfsval_open_ro(self->cached_max_brightness, path->max_brightness) )
- goto cleanup;
-
- /* The 'max_brightness' seems to be dynamic. Make an attempt
- * to set it to an artificially high value and assume that kernel
- * side will cap the value to the true maximum... */
-#if 1 // TODO: make a QUIRK out of this
- sysfsval_set(self->cached_max_brightness, 255);
-#endif
- sysfsval_refresh(self->cached_max_brightness);
-
- if( sysfsval_get(self->cached_max_brightness) <= 0 )
- goto cleanup;
-
- if( !sysfsval_open_rw(self->cached_brightness, path->brightness) )
- goto cleanup;
-
- ack = true;
-
-cleanup:
-
- /* Always close the max_brightness file */
- sysfsval_close(self->cached_max_brightness);
-
- /* On failure close the other files too */
- if( !ack ) {
- sysfsval_close(self->cached_brightness);
- sysfsval_close(self->cached_blink);
- }
-
- return ack;
-}
-
-static void
-led_channel_vince_set_value(led_channel_vince_t *self,
- int value)
-{
- /*
- * Since Xiaomi implemented 4095 level brightness in panel dtsi
- * while caf only have 255 level, we multiply 16 to brightness by default.
- */
-
- value *= 16;
- value = (value < 0) ? 0 : (value < 255) ? value : 255;
- // value = led_util_scale_value(value,
- // sysfsval_get(self->cached_max_brightness));
-
- /* Ignore blinking requests while brightness is zero. */
- if( value <= 0 )
- self->control_blink = false;
-
- /* Logically it probably should be that:
- * - writing blink=1 implies brightness=255
- * - writing blink=0 implies brightness=0
- * - writing brightness=n implies blink=0
- *
- * However it seems swithing between blinking and non-blinking
- * modes can cause hiccups that vary from one device to another
- * (stale sysfs values left behind, led stays off when it should
- * be lit, ...)
- *
- * So the logic is arranged that before switching from static
- * color to blinking, a brightness=0 is done before writing
- * blink=0, and when swithing from blinking to static color, a
- * blink=0 is done before writing brightness=0.
- *
- * Note that upper level state machine logic + caching of the
- * assumed sysfs values means that these transitions are done in
- * 3 steps (cancel previous mode, reset to black, switch to new
- * mode) with pproximately SYSFS_LED_KERNEL_DELAY ms in between
|
[-]
[+]
|
Deleted |
_service:tar_git:mce-plugin-libhybris-1.14.1+vince_backend.20210816085812.8.g1d10500.tar.bz2/sysfs-led-vince.h
^
|
@@ -1,31 +0,0 @@
-/** @file sysfs-led-vince.h
- *
- * mce-plugin-libhybris - Libhybris plugin for Mode Control Entity
- * <p>
- * Copyright (C) 2017 Jolla Ltd.
- * <p>
- * @author Simo Piiroinen <simo.piiroinen@jollamobile.com>
- *
- * mce-plugin-libhybris is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * mce-plugin-libhybris is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with mce-plugin-libhybris; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SYSFS_LED_VINCE_H_
-# define SYSFS_LED_VINCE_H_
-
-# include "sysfs-led-main.h"
-
-bool led_control_vince_probe(led_control_t *self);
-
-#endif /* SYSFS_LED_VINCE_H_ */
|
[-]
[+]
|
Changed |
_service:tar_git:mce-plugin-libhybris-1.14.4.tar.bz2/.depend
^
|
@@ -182,24 +182,6 @@
sysfs-led-util.h\
sysfs-val.h\
-sysfs-led-vince.o:\
- sysfs-led-vince.c\
- plugin-config.h\
- plugin-logging.h\
- sysfs-led-vince.h\
- sysfs-led-main.h\
- sysfs-led-util.h\
- sysfs-val.h\
-
-sysfs-led-vince.pic.o:\
- sysfs-led-vince.c\
- plugin-config.h\
- plugin-logging.h\
- sysfs-led-vince.h\
- sysfs-led-main.h\
- sysfs-led-util.h\
- sysfs-val.h\
-
sysfs-led-main.o:\
sysfs-led-main.c\
plugin-config.h\
@@ -210,7 +192,6 @@
sysfs-led-f5121.h\
sysfs-led-hammerhead.h\
sysfs-led-htcvision.h\
- sysfs-led-vince.h\
sysfs-led-main.h\
sysfs-led-redgreen.h\
sysfs-led-util.h\
@@ -227,7 +208,6 @@
sysfs-led-f5121.h\
sysfs-led-hammerhead.h\
sysfs-led-htcvision.h\
- sysfs-led-vince.h\
sysfs-led-main.h\
sysfs-led-redgreen.h\
sysfs-led-util.h\
@@ -307,3 +287,4 @@
sysfs-val.c\
plugin-logging.h\
sysfs-val.h\
+
|
[-]
[+]
|
Changed |
_service:tar_git:mce-plugin-libhybris-1.14.4.tar.bz2/Makefile
^
|
@@ -132,7 +132,6 @@
hybris_OBJS += sysfs-led-util.pic.o
hybris_OBJS += sysfs-led-vanilla.pic.o
hybris_OBJS += sysfs-led-white.pic.o
-hybris_OBJS += sysfs-led-vince.pic.o
hybris_OBJS += sysfs-val.pic.o
hybris.so : LDLIBS += -lhardware -lm
|
[-]
[+]
|
Changed |
_service:tar_git:mce-plugin-libhybris-1.14.4.tar.bz2/hybris-fb.c
^
|
@@ -26,6 +26,7 @@
#include "plugin-api.h"
+#include <android-config.h>
#include <system/window.h>
#include <hardware/gralloc.h>
#include <hardware/fb.h>
|
[-]
[+]
|
Changed |
_service:tar_git:mce-plugin-libhybris-1.14.4.tar.bz2/hybris-lights.c
^
|
@@ -26,6 +26,7 @@
#include "plugin-api.h"
+#include <android-config.h>
#include <system/window.h>
#include <hardware/lights.h>
|
[-]
[+]
|
Changed |
_service:tar_git:mce-plugin-libhybris-1.14.4.tar.bz2/hybris-sensors.c
^
|
@@ -25,6 +25,7 @@
#include "plugin-logging.h"
#include "hybris-thread.h"
+#include <android-config.h>
#include <hardware/sensors.h>
#include <glib.h>
|
[-]
[+]
|
Changed |
_service:tar_git:mce-plugin-libhybris-1.14.4.tar.bz2/sysfs-led-main.c
^
|
@@ -32,7 +32,6 @@
#include "sysfs-led-binary.h"
#include "sysfs-led-redgreen.h"
#include "sysfs-led-white.h"
-#include "sysfs-led-vince.h"
#include "plugin-logging.h"
#include "plugin-config.h"
@@ -301,10 +300,6 @@
/* The binary backend needs just one directory
* that has 'brightness' control file. */
{ "binary", led_control_binary_probe },
-
- /* The vince requires 'brightness', 'max_brightness' and 'blink'
- * control files to be present for red, green and blue channels. */
- { "vince", led_control_vince_probe },
};
bool ack = false;
|