audio: remove useless code. [1/1]
PD#SWPL-61300
Problem:
remove useless code.
Solution:
remove useless code.
Verify:
locally passed.
Change-Id: Ie615235407ae7f2e4e2c4e0e4fa9f73de7211bb1
Signed-off-by: Xiushan Lu <xiushan.lu@amlogic.com>
diff --git a/aml_plugins/aml_plugins.mk b/aml_plugins/aml_plugins.mk
deleted file mode 100644
index e9610fb..0000000
--- a/aml_plugins/aml_plugins.mk
+++ /dev/null
@@ -1 +0,0 @@
-include ../multimedia/aml_plugins/*/*.mk
diff --git a/aml_plugins/trumpet/dolby_daws_plugin/Config.in b/aml_plugins/trumpet/dolby_daws_plugin/Config.in
deleted file mode 100755
index c0c2515..0000000
--- a/aml_plugins/trumpet/dolby_daws_plugin/Config.in
+++ /dev/null
@@ -1,8 +0,0 @@
-config BR2_PACKAGE_DOLBY_DAWS_PLUGIN
- bool "dolby_daws_plugin"
- depends on BR2_PACKAGE_ALSA_LIB
- help
- Advanced Linux Sound Architecture Plugins
-
- http://www.alsa-project.org/
-
diff --git a/aml_plugins/trumpet/dolby_daws_plugin/dolby_daws_plugin.mk b/aml_plugins/trumpet/dolby_daws_plugin/dolby_daws_plugin.mk
deleted file mode 100644
index ced33ea..0000000
--- a/aml_plugins/trumpet/dolby_daws_plugin/dolby_daws_plugin.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#############################################################
-#
-# Dolby Audio for Wireless Speakers
-#
-#############################################################
-DOLBY_DAWS_PLUGIN_VERSION:=1.0.0
-DOLBY_DAWS_PLUGIN_SITE=$(TOPDIR)/../multimedia/aml_plugins/trumpet/dolby_daws_plugin/src
-DOLBY_DAWS_PLUGIN_SITE_METHOD=local
-
-define DOLBY_DAWS_PLUGIN_BUILD_CMDS
- $(MAKE) CC=$(TARGET_CC) CXX=$(TARGET_CXX) -C $(@D)
-endef
-
-define DOLBY_DAWS_PLUGIN_CLEAN_CMDS
- $(MAKE) -C $(@D) clean
-endef
-
-define DOLBY_DAWS_PLUGIN_INSTALL_TARGET_CMDS
- $(MAKE) -C $(@D) install
-endef
-
-define DOLBY_DAWS_PLUGIN_UNINSTALL_TARGET_CMDS
- $(MAKE) -C $(@D) uninstall
-endef
-
-$(eval $(generic-package))
\ No newline at end of file
diff --git a/aml_plugins/trumpet/dolby_daws_plugin/src/Makefile b/aml_plugins/trumpet/dolby_daws_plugin/src/Makefile
deleted file mode 100644
index 99c6ffc..0000000
--- a/aml_plugins/trumpet/dolby_daws_plugin/src/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#CC := gcc
-CC := arm-linux-gnueabihf-gcc
-CFLAGS := -I. -O2 -Wall -funroll-loops -ffast-math -fPIC -DPIC
-#LD := gcc
-LD = $(CC)
-LDFLAGS := -O2 -Wall -shared
-#LDLIBS_release := -lasound
-
-SND_PCM_OBJECTS = daws_alsa_plugin.o snd_convert.o aml_ringbuffer.o
-SND_PCM_LIBS = -lasound
-SND_PCM_BIN = libasound_module_pcm_daws.so
-
-.PHONY: all clean install uninstall
-
-all: $(SND_PCM_BIN)
-
-$(SND_PCM_BIN): $(SND_PCM_OBJECTS)
- @echo LD $@
- $(LD) $(LDFLAGS) $(SND_PCM_LIBS) $(SND_PCM_OBJECTS) -o $(SND_PCM_BIN)
-
-%.o: %.c
- @echo GCC $<
- $(CC) -c $(CFLAGS) $<
-
-clean:
- @echo Cleaning...
- $(Q)rm -vf *.o *.so
- $(RM) libasound_module_pcm_daws.so
-
-install: all
- @echo Installing...
- install -m 755 $(SND_PCM_BIN) $(TARGET_DIR)/usr/lib/alsa-lib/
-
-uninstall:
- @echo Un-installing...
- rm $(TARGET_DIR)/usr/lib/alsa-lib/$(SND_PCM_BIN)
diff --git a/aml_plugins/trumpet/dolby_daws_plugin/src/aml_ringbuffer.c b/aml_plugins/trumpet/dolby_daws_plugin/src/aml_ringbuffer.c
deleted file mode 100644
index 5e453a5..0000000
--- a/aml_plugins/trumpet/dolby_daws_plugin/src/aml_ringbuffer.c
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
- * aml_ringbuffer.c
- *
- * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
- *
- * This source code is subject to the terms and conditions defined in the
- * file 'LICENSE' which is part of this source code package.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <errno.h>
-#include <string.h>
-#include "aml_ringbuffer.h"
-
-/*************************************************
-Function: get_write_space
-Description: get the space can be written
-Input: write_point: write pointer
- read_point: read pointer
- buffer_size: total buffer size
-Output:
-Return: the space can be written in byte
-*************************************************/
-static int get_write_space(unsigned char *write_point, unsigned char *read_point,
- int buffer_size, int last_is_write)
-{
- int bytes = 0;
-
- if (write_point > read_point) {
- bytes = buffer_size + read_point - write_point;
- } else if (write_point < read_point) {
- bytes = read_point - write_point;
- } else if (!last_is_write) {
- bytes = buffer_size;
- }
-
- return bytes;
-}
-
-/*************************************************
-Function: get_read_space
-Description: get the date space can be read
-Input: write_point: write pointer
- read_point: read pointer
- buffer_size: total buffer size
-Output:
-Return: the data space can be read in byte
-*************************************************/
-static size_t get_read_space(unsigned char *write_point, unsigned char *read_point,
- int buffer_size, int last_is_write)
-{
- int bytes = 0;
-
- if (write_point > read_point) {
- bytes = write_point - read_point;
- } else if (write_point < read_point) {
- bytes = buffer_size + write_point - read_point;
- } else if (last_is_write) {
- bytes = buffer_size;
- }
-
- return bytes;
-}
-
-/*************************************************
-Function: write_to_buffer
-Description: write data to ring buffer
-Input: current_pointer: the current write pointer
- data: data to be written
- bytes: the space of data to be written
- start_addr: dest buffer
- total_size: dest buffer size
-Output:
-Return: 0 for success
-*************************************************/
-static int write_to_buffer(unsigned char *current_pointer, unsigned char *data, int bytes,
- unsigned char *start_addr, int total_size)
-{
- int left_bytes = start_addr + total_size - current_pointer;
-
- if (left_bytes >= bytes) {
- memcpy(current_pointer, data, bytes);
- } else {
- memcpy(current_pointer, data, left_bytes);
- memcpy(start_addr, data + left_bytes, bytes - left_bytes);
- }
-
- return 0;
-}
-
-/*************************************************
-Function: read_from_buffer
-Description: read data to ring buffer
-Input: current_pointer: the current read pointer
- buffer: buffer for the data to be read
- bytes: the space of data to be read
- start_addr: dest buffer
- total_size: dest buffer size
-Output: read data
-Return: 0 for success
-*************************************************/
-static int read_from_buffer(unsigned char *current_pointer, unsigned char *buffer, int bytes,
- unsigned char *start_addr, int total_size)
-{
- int left_bytes = start_addr + total_size - current_pointer;
-
- if (left_bytes >= bytes) {
- memcpy(buffer, current_pointer, bytes);
- } else {
- memcpy(buffer, current_pointer, left_bytes);
- memcpy(buffer + left_bytes, start_addr, bytes - left_bytes);
- }
-
- return 0;
-}
-
-/*************************************************
-Function: update_pointer
-Description: update read/write pointer of ring buffer
-Input: current_pointer: the current read/write pointer
- bytes: data space has been written/read
- start_addr: ring buffer
- total_size: ring buffer size
-Output:
-Return: the updated pointer
-*************************************************/
-static inline void* update_pointer(unsigned char *current_pointer, int bytes,
- unsigned char *start_addr, int total_size)
-{
- current_pointer += bytes;
-
- if (current_pointer >= start_addr + total_size) {
- current_pointer -= total_size;
- }
-
- return current_pointer;
-}
-
-/*************************************************
-Function: ring_buffer_write
-Description: write data to ring buffer
-Input: rbuffer: the dest ring buffer
- data: data to be written
- bytes: data space in byte
- cover: whether or not to cover the data if over run
-Output:
-Return: data space has been written
-*************************************************/
-size_t ring_buffer_write(struct ring_buffer *rbuffer, unsigned char* data, size_t bytes, int cover)
-{
- struct ring_buffer *buf = rbuffer;
- size_t write_space, written_bytes;
-
- pthread_mutex_lock(&buf->lock);
-
- if (buf->start_addr == NULL || buf->rd == NULL || buf->wr == NULL || buf->size == 0) {
- printf("Buffer malloc fail!\n");
- pthread_mutex_unlock(&buf->lock);
- return 0;
- }
-
- write_space = get_write_space(buf->wr, buf->rd, buf->size, buf->last_is_write);
- if (write_space < bytes) {
- if (UNCOVER_WRITE == cover) {
- written_bytes = write_space;
- } else {
- written_bytes = bytes;
- }
- } else {
- written_bytes = bytes;
- }
-
- write_to_buffer(buf->wr, data, written_bytes, buf->start_addr, buf->size);
- buf->wr = update_pointer(buf->wr, written_bytes, buf->start_addr, buf->size);
- if (written_bytes)
- buf->last_is_write = 1;
-
- pthread_mutex_unlock(&buf->lock);
-
- return written_bytes;
-}
-
-/*************************************************
-Function: ring_buffer_read
-Description: read data from ring buffer
-Input: rbuffer: the source ring buffer
- buffer: buffer for the read data
- bytes: data space in byte
-Output: data has been read
-Return: data space has been read
-*************************************************/
-size_t ring_buffer_read(struct ring_buffer *rbuffer, unsigned char* buffer, size_t bytes)
-{
- struct ring_buffer *buf = rbuffer;
- size_t readable_space, read_bytes;
-
- pthread_mutex_lock(&buf->lock);
-
- if (buf->start_addr == NULL || buf->rd == NULL || buf->wr == NULL
- || buf->size == 0) {
- printf("Buffer malloc fail!\n");
- pthread_mutex_unlock(&buf->lock);
- return 0;
- }
-
- readable_space = get_read_space(buf->wr, buf->rd, buf->size, buf->last_is_write);
- if (readable_space < bytes) {
- read_bytes = readable_space;
- } else {
- read_bytes = bytes;
- }
-
- read_from_buffer(buf->rd, buffer, read_bytes, buf->start_addr, buf->size);
- buf->rd = update_pointer(buf->rd, read_bytes, buf->start_addr, buf->size);
- if (read_bytes)
- buf->last_is_write = 0;
- pthread_mutex_unlock(&buf->lock);
-
- return read_bytes;
-}
-
-/*************************************************
-Function: ring_buffer_init
-Description: initialize ring buffer
-Input: rbuffer: the ring buffer to be initialized
- buffer_size: total size of ring buffer
-Output:
-Return: 0 for success, otherwise fail
-*************************************************/
-int ring_buffer_init(struct ring_buffer *rbuffer, int buffer_size)
-{
- struct ring_buffer *buf = rbuffer;
-
- pthread_mutex_lock(&buf->lock);
-
- buf->size = buffer_size;
- buf->start_addr = malloc(buffer_size * sizeof(unsigned char));
- if (buf->start_addr == NULL) {
- printf("Malloc android out buffer error!\n");
- pthread_mutex_unlock(&buf->lock);
- return -1;
- }
-
- memset(buf->start_addr, 0, buffer_size);
- buf->rd = buf->start_addr;
- buf->wr = buf->start_addr;
- buf->last_is_write = 0;
- pthread_mutex_unlock(&buf->lock);
-
- return 0;
-}
-
-/*************************************************
-Function: ring_buffer_release
-Description: release ring buffer
-Input: rbuffer: the ring buffer to be released
-Output:
-Return: 0 for success, otherwise fail
-*************************************************/
-int ring_buffer_release(struct ring_buffer *rbuffer)
-{
- struct ring_buffer *buf = rbuffer;
-
- pthread_mutex_lock(&buf->lock);
-
- if (buf->start_addr != NULL) {
- free(buf->start_addr);
- buf->start_addr = NULL;
- }
-
- buf->rd = NULL;
- buf->wr = NULL;
- buf->size = 0;
- buf->last_is_write = 0;
-
- pthread_mutex_unlock(&buf->lock);
-
- return 0;
-}
-
-/*************************************************
-Function: ring_buffer_reset
-Description: reset ring buffer
-Input: rbuffer: the ring buffer to be reset
-Output:
-Return: 0 for success, otherwise fail
-*************************************************/
-int ring_buffer_reset(struct ring_buffer *rbuffer)
-{
- struct ring_buffer *buf = rbuffer;
-
- pthread_mutex_lock(&buf->lock);
- memset(buf->start_addr, 0, buf->size);
- buf->rd = buf->wr = buf->start_addr;
- buf->last_is_write = 0;
- /*
- * if (buf->rd >= (buf->start_addr + buf->size))
- * buf->rd -= buf->size;
- */
- pthread_mutex_unlock(&buf->lock);
-
- return 0;
-}
-
-/*************************************************
-Function: ring_buffer_reset_size
-Description: reset ring buffer and change the size
-Input: rbuffer: the ring buffer to be reset
- buffer_size: new size for ring buffer
-Output:
-Return: 0 for success, otherwise fail
-*************************************************/
-int ring_buffer_reset_size(struct ring_buffer *rbuffer, int buffer_size)
-{
- if (buffer_size > rbuffer->size) {
- printf("resized buffer size exceed largest buffer size, max %d, cur %d\n", \
- rbuffer->size, buffer_size);
- ring_buffer_release(rbuffer);
- rbuffer->size = buffer_size;
- return ring_buffer_init(rbuffer, buffer_size);
- }
-
- printf("reset buffer size from %d to %d\n", rbuffer->size, buffer_size);
-
- pthread_mutex_lock(&rbuffer->lock);
-
- rbuffer->size = buffer_size;
- memset(rbuffer->start_addr, 0, buffer_size);
- rbuffer->rd = rbuffer->start_addr;
- rbuffer->wr = rbuffer->start_addr;
-
- pthread_mutex_unlock(&rbuffer->lock);
-
- return 0;
-}
-
-/*************************************************
-Function: get_buffer_read_space
-Description: get the data space for reading in the buffer
-Input: rbuffer: the ring buffer with data
-Output:
-Return: data space for success, otherwise < 0
-*************************************************/
-int get_buffer_read_space(struct ring_buffer *rbuffer)
-{
- size_t read_space = 0;
-
- pthread_mutex_lock(&rbuffer->lock);
- if (rbuffer->start_addr == NULL || rbuffer->wr == NULL || rbuffer->rd == NULL
- || rbuffer->size == 0) {
- printf("Buffer malloc fail!\n");
- pthread_mutex_unlock(&rbuffer->lock);
- return -1;
- }
-
- read_space = get_read_space(rbuffer->wr, rbuffer->rd, rbuffer->size, rbuffer->last_is_write);
- pthread_mutex_unlock(&rbuffer->lock);
-
- return read_space;
-}
-
-/*************************************************
-Function: get_buffer_write_space
-Description: get the space for writing in the buffer
-Input: rbuffer: the ring buffer to be written
-Output:
-Return: data space for success, otherwise < 0
-*************************************************/
-int get_buffer_write_space(struct ring_buffer *rbuffer)
-{
- size_t write_space = 0;
-
- pthread_mutex_lock(&rbuffer->lock);
- if (rbuffer->start_addr == NULL || rbuffer->wr == NULL || rbuffer->wr == NULL
- || rbuffer->size == 0) {
- printf("Buffer malloc fail!\n");
- pthread_mutex_unlock(&rbuffer->lock);
- return -1;
- }
-
- write_space = get_write_space(rbuffer->wr, rbuffer->rd, rbuffer->size, rbuffer->last_is_write);
- pthread_mutex_unlock(&rbuffer->lock);
-
- return write_space;
-}
-
-/*************************************************
-Function: ring_buffer_dump
-Description: dump the ringbuffer status
-Input: rbuffer: the ring buffer to be dumped
-Output:
-Return: NULL
-*************************************************/
-void ring_buffer_dump(struct ring_buffer *rbuffer)
-{
- printf("-buffer_size:%d", rbuffer->size);
- printf("-buffer_avail:%d, buffer_space:%d", get_buffer_read_space(rbuffer), get_buffer_write_space(rbuffer));
-}
-
diff --git a/aml_plugins/trumpet/dolby_daws_plugin/src/aml_ringbuffer.h b/aml_plugins/trumpet/dolby_daws_plugin/src/aml_ringbuffer.h
deleted file mode 100644
index 0a26d0d..0000000
--- a/aml_plugins/trumpet/dolby_daws_plugin/src/aml_ringbuffer.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2017 Amlogic Corporation.
- *
- * 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 _RINGBUFFER_H
-#define _RINGBUFFER_H
-
-#include <pthread.h>
-
-typedef struct ring_buffer {
- pthread_mutex_t lock;
- unsigned char *start_addr;
- unsigned char *rd;
- unsigned char *wr;
- int size;
- int last_is_write;
-} ring_buffer_t;
-
-#define UNCOVER_WRITE 0
-#define COVER_WRITE 1
-
-size_t ring_buffer_write(struct ring_buffer *rbuffer, unsigned char* data, size_t bytes, int cover);
-size_t ring_buffer_read(struct ring_buffer *rbuffer, unsigned char* buffer, size_t bytes);
-int ring_buffer_init(struct ring_buffer *rbuffer, int buffer_size);
-int ring_buffer_release(struct ring_buffer *rbuffer);
-int ring_buffer_reset(struct ring_buffer *rbuffer);
-int ring_buffer_reset_size(struct ring_buffer *rbuffer, int buffer_size);
-int get_buffer_read_space(struct ring_buffer *rbuffer);
-int get_buffer_write_space(struct ring_buffer *rbuffer);
-void ring_buffer_dump(struct ring_buffer *rbuffer);
-
-#endif
diff --git a/aml_plugins/trumpet/dolby_daws_plugin/src/daws_alsa_plugin.c b/aml_plugins/trumpet/dolby_daws_plugin/src/daws_alsa_plugin.c
deleted file mode 100644
index 5bf276a..0000000
--- a/aml_plugins/trumpet/dolby_daws_plugin/src/daws_alsa_plugin.c
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- * Sample Dolby Audio for Wireless Speakers (DAWS) ALSA external plugin
- *
- * Copyright (c) 2018 by Amlogic
- */
-
-#include <alsa/asoundlib.h>
-#include <alsa/pcm_external.h>
-#include <stdio.h>
-#include <dlfcn.h>
-#include "snd_convert.h"
-#include "aml_ringbuffer.h"
-
-/*enable dump data for debug*/
-#define DUMP_ENABLE 1
-
-#define PLUG_OUTPUT_DEFAULT_CH 2
-#define MAX_DAWS_SUPPORTED_OUT_CHANNELS 8
-#define MAX_DAWS_SUPPORTED_IN_CHANNELS 2
-#define MAX_DAWS_SUPPORTED_FORMATS 3
-#define MAX_DAWS_SUPPORTED_SAMPLE_SIZE 512
-
-typedef struct {
- snd_pcm_extplug_t ext;
- unsigned short output_channels;
- int init_enabled;
- int passthrough_enable;
- int16_t *pcm_in_buffer;
- int16_t *pcm_out_buffer;
- snd_pcm_uframes_t bufread;
- ring_buffer_t in_ringbuffer;
- ring_buffer_t out_ringbuffer;
-
- /*daws lib interface */
- int (*daws_effect_init)(unsigned, unsigned int, unsigned int);
- void (*daws_effect_close)();
- int (*daws_effect_process)(void *, snd_pcm_uframes_t, void *, snd_pcm_uframes_t *);
- void *fd ;
-#ifdef DUMP_ENABLE
- int dump_enable;
- FILE* input_fp;
- FILE* output_fp;
- const char* input_fn;
- const char* output_fn;
-#endif
-} daws_plug_info;
-
-static inline void *area_addr(const snd_pcm_channel_area_t *area,
- snd_pcm_uframes_t offset)
-{
- unsigned int bitofs = area->first + area->step * offset;
- return (char *) area->addr + bitofs / 8;
-}
-
-static int daws_plugin_init(snd_pcm_extplug_t *ext)
-{
- daws_plug_info *daws = (daws_plug_info *)ext;
- int ret;
-
- if (daws->init_enabled == 1)
- return 0;
-
- daws->fd = dlopen("/tmp/ds/0x21_0x1234_0x1d.so", RTLD_LAZY);
- if (daws->fd != NULL) {
- daws->daws_effect_init = dlsym(daws->fd, "dolby_audio_wireless_speakers_init");
- if (daws->daws_effect_init == NULL) {
- SNDERR("cant find lib interface %s\n", dlerror());
- daws->passthrough_enable = 1;
- }
- daws->daws_effect_process = dlsym(daws->fd, "dolby_audio_wireless_speakers_process");
- if (daws->daws_effect_process == NULL) {
- SNDERR("cant find lib interface %s\n", dlerror());
- daws->passthrough_enable = 1;
- }
- daws->daws_effect_close = dlsym(daws->fd, "dolby_audio_wireless_speakers_close");
- if (daws->daws_effect_close == NULL) {
- SNDERR("cant find lib interface %s\n", dlerror());
- daws->passthrough_enable = 1;
- }
- daws->passthrough_enable = 0;
- } else {
- printf("cant find decoder lib %s\n", dlerror());
- daws->passthrough_enable = 1;
- }
-
- if (daws->passthrough_enable == 0) {
- ret = daws->daws_effect_init(ext->rate, ext->channels, daws->output_channels);
- if (ret < 0) {
- SNDERR("daws effect init failed! passthrough enabled\n");
- daws->passthrough_enable = 1;
- }
- }
- if (daws->passthrough_enable == 1) {
- if (daws->fd != NULL) {
- dlclose(daws->fd);
- daws->fd = NULL;
- }
- }
-
- daws->pcm_in_buffer = (int16_t *)malloc(sizeof(int16_t) * MAX_DAWS_SUPPORTED_IN_CHANNELS * MAX_DAWS_SUPPORTED_SAMPLE_SIZE * 2);
- if (daws->pcm_in_buffer == NULL) {
- SNDERR("malloc failed for input buffer");
- return -ENOENT;
- }
- daws->pcm_out_buffer = (int16_t *)malloc(sizeof(int16_t) * MAX_DAWS_SUPPORTED_OUT_CHANNELS * MAX_DAWS_SUPPORTED_SAMPLE_SIZE);
- if (daws->pcm_out_buffer == NULL) {
- SNDERR("malloc failed for output buffer");
- return -ENOENT;
- }
- memset(daws->pcm_in_buffer, 0, sizeof(int16_t) * MAX_DAWS_SUPPORTED_IN_CHANNELS * MAX_DAWS_SUPPORTED_SAMPLE_SIZE);
- memset(daws->pcm_out_buffer, 0, sizeof(int16_t) * MAX_DAWS_SUPPORTED_OUT_CHANNELS * MAX_DAWS_SUPPORTED_SAMPLE_SIZE);
- ring_buffer_init(&(daws->in_ringbuffer), sizeof(int16_t) * MAX_DAWS_SUPPORTED_IN_CHANNELS * MAX_DAWS_SUPPORTED_SAMPLE_SIZE * 2);
- ring_buffer_init(&(daws->out_ringbuffer), sizeof(int16_t) * MAX_DAWS_SUPPORTED_OUT_CHANNELS * MAX_DAWS_SUPPORTED_SAMPLE_SIZE * 2);
-
- daws->bufread = 0;
- /*write 512 samples in case the first transfer samples < 512*/
- ring_buffer_write(&(daws->out_ringbuffer), daws->pcm_out_buffer, MAX_DAWS_SUPPORTED_SAMPLE_SIZE * daws->output_channels * 2, UNCOVER_WRITE);
-
-#ifdef DUMP_ENABLE
- if (daws->dump_enable ) {
- if (daws->input_fn == NULL || daws->output_fn == NULL ) {
- SNDERR("Use proper Input-Output file name");
- return -EINVAL;
- }
- daws->input_fp = fopen(daws->input_fn, "wb");
- if (daws->input_fp == NULL) {
- SNDERR("File open failed for Input File");
- free(( char*)daws->input_fn);
- return -ENOENT;
- }
- daws->output_fp = fopen(daws->output_fn, "wb");
- if (daws->output_fp == NULL) {
- SNDERR("File open failed for output File");
- free(( char*)daws->output_fn);
- return -ENOENT;
- }
- }
-#endif
-
- daws->init_enabled = 1;
- printf("plug input channels = %d, output channels = %d\n",ext->channels, daws->output_channels);
- printf("plugin init success!\n");
- return 0;
-}
-
-static int daws_plugin_close(snd_pcm_extplug_t *ext)
-{
- daws_plug_info *daws = (daws_plug_info *)ext;
-
- if (daws->pcm_in_buffer != NULL ) {
- free(daws->pcm_in_buffer);
- daws->pcm_in_buffer = NULL;
- }
- if (daws->pcm_out_buffer != NULL ) {
- free(daws->pcm_out_buffer);
- daws->pcm_out_buffer = NULL;
- }
-
- if (daws->passthrough_enable == 0) {
- daws->daws_effect_close();
- if (daws->fd != NULL) {
- dlclose(daws->fd);
- daws->fd = NULL;
- }
- }
-
- if (daws->in_ringbuffer.start_addr != NULL) {
- ring_buffer_release(&(daws->in_ringbuffer));
- }
- if (daws->in_ringbuffer.start_addr != NULL) {
- ring_buffer_release(&(daws->out_ringbuffer));
- }
-
-#ifdef DUMP_ENABLE
- if (daws->dump_enable) {
- if ( (daws->input_fn != NULL && daws->output_fn != NULL)) {
- printf("dump plug input data to : %s \n", daws->input_fn);
- printf("dump plug output data to : %s \n", daws->output_fn);
- }
- if (daws->input_fp != NULL) {
- fclose(daws->input_fp);
- daws->input_fp = NULL;
- }
- if (daws->output_fp != NULL) {
- fclose(daws->output_fp);
- daws->output_fp = NULL;
- }
- }
-#endif
- daws->bufread = 0;
- daws->init_enabled = 0;
- printf("daws plugin closed\n");
- return 0;
-}
-
-static snd_pcm_sframes_t
-daws_plugin_transfer(snd_pcm_extplug_t *ext,
- const snd_pcm_channel_area_t *dst_areas,
- snd_pcm_uframes_t dst_offset,
- const snd_pcm_channel_area_t *src_areas,
- snd_pcm_uframes_t src_offset,
- snd_pcm_uframes_t size)
-{
- daws_plug_info *daws = (daws_plug_info *)ext;
-
- int size_bytes = snd_pcm_frames_to_bytes (ext->pcm, size);
- short *src = area_addr(src_areas, src_offset);
- short *dst = area_addr(dst_areas, dst_offset);
-
-#ifdef DUMP_ENABLE
- if (daws->dump_enable) {
- fwrite(src, 1, size_bytes, daws->input_fp);
- }
-#endif
-
- if (daws->passthrough_enable == 0) {
- /*convert to 16bit pcm buffer*/
- convert_to_s16(src_areas, src_offset, ext->channels, size, ext->format, daws->pcm_in_buffer);
-
- ring_buffer_write(&(daws->in_ringbuffer), daws->pcm_in_buffer, size * ext->channels * 2, UNCOVER_WRITE);
- daws->bufread += size;
-
- /* Load two frames of 256 bytes each totalling about 512 samples */
- while (daws->bufread >= MAX_DAWS_SUPPORTED_SAMPLE_SIZE) {
-
- /*read 16bit 512 samples*/
- ring_buffer_read(&(daws->in_ringbuffer), daws->pcm_in_buffer, MAX_DAWS_SUPPORTED_SAMPLE_SIZE * ext->channels * 2);
-
- /*daws process: pcm_in_buffer -> pcm_out_buffer, size = 512 */
- snd_pcm_uframes_t out_size;
- daws->daws_effect_process(daws->pcm_in_buffer, MAX_DAWS_SUPPORTED_SAMPLE_SIZE, daws->pcm_out_buffer, &out_size);
-
- ring_buffer_write(&(daws->out_ringbuffer), daws->pcm_out_buffer, MAX_DAWS_SUPPORTED_SAMPLE_SIZE * daws->output_channels * 2, UNCOVER_WRITE);
-
- daws->bufread -= MAX_DAWS_SUPPORTED_SAMPLE_SIZE;
- }
-
- ring_buffer_read(&(daws->out_ringbuffer), daws->pcm_out_buffer, size * daws->output_channels * 2);
- /*convert to 16bit dst areas*/
- convert_to_area(dst_areas, dst_offset, daws->output_channels, size, SND_PCM_FORMAT_S16, daws->pcm_out_buffer);
-
- } else {
- /*passthrough data from in to out*/
- convert_process(src_areas, src_offset,
- dst_areas, dst_offset,
- ext->channels,
- ext->channels,
- size, ext->format);
- }
-
-#ifdef DUMP_ENABLE
- if (daws->dump_enable) {
- short *dst = area_addr(dst_areas, dst_offset);
- int size_bytes = size * daws->output_channels * 2;
- fwrite(dst, 1, size_bytes , daws->output_fp);
- }
-#endif
-
- return size;
-}
-
-static const snd_pcm_extplug_callback_t daws_plugin_callback = {
- .init = daws_plugin_init,
- .close = daws_plugin_close,
- .transfer = daws_plugin_transfer,
-};
-
-SND_PCM_PLUGIN_DEFINE_FUNC(daws)
-{
-
- snd_config_iterator_t i, next;
- int err;
- daws_plug_info *daws_info;
- snd_config_t *slave = NULL;
- unsigned int out_channels = PLUG_OUTPUT_DEFAULT_CH;
- char *ifname = NULL, *ofname = NULL;
- int dump_enable = 0;
-
- static const unsigned int in_channels[MAX_DAWS_SUPPORTED_IN_CHANNELS] = {
- 1
- , 2
- };
- static const unsigned int in_formats[MAX_DAWS_SUPPORTED_FORMATS] = {
- SND_PCM_FORMAT_S32
- , SND_PCM_FORMAT_S24
- , SND_PCM_FORMAT_S16
- };
-
- snd_config_for_each(i, next, conf) {
- snd_config_t *n = snd_config_iterator_entry(i);
- const char *id;
- if (snd_config_get_id(n, &id) < 0)
- continue;
- if (strcmp(id, "comment") == 0 || strcmp(id, "type") == 0)
- continue;
- if (strcmp(id, "slave") == 0) {
- slave = n;
- continue;
- }
- if (strcmp(id, "channels") == 0) {
- unsigned int val;
- err = snd_config_get_integer(n, &val);
- if (err < 0) {
- SNDERR("Invalid value for %s", id);
- return err;
- }
- if (val == 0 || val > 8) {
- SNDERR("out put channels[%d] is out of range", val);
- }
- out_channels = val;
- continue;
- }
- if (strcmp(id, "dump_enable") == 0) {
- int val;
- val = snd_config_get_bool(n);
- if (val < 0) {
- SNDERR("Invalid value for %s", id);
- return val;
- }
- dump_enable = val;
- continue;
- }
- if (strcmp(id, "dumpin_name") == 0) {
- err = snd_config_get_string(n, &ifname);
- if (err < 0) {
- SNDERR("Invalid value for %s", id);
- return err;
- }
- continue;
- }
- if (strcmp(id, "dumpout_name") == 0) {
- err = snd_config_get_string(n, &ofname);
- if (err < 0) {
- SNDERR("Invalid value for %s", id);
- return err;
- }
- continue;
- }
- SNDERR("Unknown field %s", id);
- return -EINVAL;
- }
- if (! slave) {
- SNDERR("No slave defined for daws plugin");
- return -EINVAL;
- }
- daws_info = calloc(1, sizeof(*daws_info));
- if (daws_info == NULL)
- return -ENOMEM;
- daws_info->ext.version = SND_PCM_EXTPLUG_VERSION;
- daws_info->ext.name = "Dolby Audio for Wireless Speakers Plugin";
- daws_info->ext.callback = &daws_plugin_callback;
- daws_info->ext.private_data = daws_info;
-
- /*create plugin, must get slave name*/
- err = snd_pcm_extplug_create(&daws_info->ext, name, root, slave, stream, mode);
- if (err < 0) {
- free(daws_info);
- return err;
- }
-
- /*set slave out put channels*/
- err = snd_pcm_extplug_set_slave_param_minmax (&daws_info->ext
- , SND_PCM_EXTPLUG_HW_CHANNELS
- , out_channels
- , out_channels
- );
- if (err < 0) {
- free(daws_info);
- return err;
- }
- daws_info->output_channels = (unsigned short )out_channels;
-
- /*set in put channels : 1 or 2*/
- err = snd_pcm_extplug_set_param_list (&daws_info->ext
- , SND_PCM_EXTPLUG_HW_CHANNELS
- , MAX_DAWS_SUPPORTED_IN_CHANNELS
- , in_channels
- );
- if (err < 0) {
- free(daws_info);
- return err;
- }
-
- /*set in put format: 16/24/32bit */
- err = snd_pcm_extplug_set_param_list (&daws_info->ext
- , SND_PCM_EXTPLUG_HW_FORMAT
- , MAX_DAWS_SUPPORTED_FORMATS
- , in_formats
- );
- if (err < 0) {
- free(daws_info);
- return err;
- }
-
- /*set out put format: 16bit only*/
- err = snd_pcm_extplug_set_slave_param (&daws_info->ext
- , SND_PCM_EXTPLUG_HW_FORMAT
- , SND_PCM_FORMAT_S16
- );
- if (err < 0) {
- free(daws_info);
- return err;
- }
-
-#ifdef DUMP_ENABLE
- daws_info->dump_enable = dump_enable;
- if (daws_info->dump_enable) {
- if (!ifname || strlen (ifname) == 0 ) {
- SNDERR("Input file name is not defined");
- return -EINVAL;
- }
- if (!ofname || strlen (ofname) == 0 ) {
- SNDERR("Output file name is not defined");
- return -EINVAL;
- }
- if (!strcmp(ifname, ofname) ) {
- SNDERR("Input and Output Dump File names are same");
- return -EINVAL;
- }
- daws_info->input_fn = strdup (ifname);
- daws_info->output_fn = strdup (ofname);
- }
- daws_info->input_fp = NULL;
- daws_info->output_fp = NULL;
-#endif
-
- *pcmp = daws_info->ext.pcm;
- return 0;
-}
-
-
-SND_PCM_PLUGIN_SYMBOL(daws);
diff --git a/aml_plugins/trumpet/dolby_daws_plugin/src/snd_convert.c b/aml_plugins/trumpet/dolby_daws_plugin/src/snd_convert.c
deleted file mode 100644
index 11fecf1..0000000
--- a/aml_plugins/trumpet/dolby_daws_plugin/src/snd_convert.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- * @file "snd_convert.c"
- *
- * @brief convert 16/24/32bit, 1/2 channels to 16bit desgnated channels.
- */
-
-#include<string.h>
-/* Alsa Filter Type Plugin Header */
-#include <alsa/asoundlib.h>
-#include <alsa/pcm_external.h>
-
-
-
-static inline void *snd_pcm_channel_area_addr(const snd_pcm_channel_area_t *area, snd_pcm_uframes_t offset)
-{
- unsigned int bitofs = area->first + area->step * offset;
- assert(bitofs % 8 == 0);
- return (char *) area->addr + bitofs / 8;
-}
-
-int snd_pcm_area_convert(const snd_pcm_channel_area_t *dst_area, snd_pcm_uframes_t dst_offset,
- const snd_pcm_channel_area_t *src_area, snd_pcm_uframes_t src_offset,
- unsigned int samples, snd_pcm_format_t format)
-{
- char *dst;
- char *src;
- int src_step, dst_step;
- src_step = src_area->step / 8;
- dst_step = dst_area->step / 8;
-
- if (src_area->step == 16 && dst_area->step == 16) {
- size_t bytes = samples * 16 / 8;
- samples -= bytes * 8 / 16;
- memcpy(dst, src, bytes);
- if (samples == 0)
- return 0;
- }
- src = snd_pcm_channel_area_addr(src_area, src_offset);
- dst = snd_pcm_channel_area_addr(dst_area, dst_offset);
-
- if (format == SND_PCM_FORMAT_S16) {
- while (samples-- > 0) {
- *(int16_t*)dst = *(int16_t*)src;
- src += src_step;
- dst += dst_step;
- }
- } else if (format == SND_PCM_FORMAT_S32) {
- src += 2;
- while (samples-- > 0) {
- *(int16_t*)dst = *(int16_t*)src;
- src += src_step;
- dst += dst_step;
- }
- } else if (format == SND_PCM_FORMAT_S24) {
- src += 1;
- while (samples-- > 0) {
- *(int16_t*)dst = *(int16_t*)src;
- src += src_step;
- dst += dst_step;
- }
- }
- return 0;
-}
-
-int snd_pcm_convert_to_s16(const int16_t *dst_buffer, int dst_step,
- const snd_pcm_channel_area_t *src_area, snd_pcm_uframes_t src_offset,
- unsigned int samples, snd_pcm_format_t format)
-{
- char *dst;
- char *src;
- int src_step;
- src_step = src_area->step / 8;
-
- src = snd_pcm_channel_area_addr(src_area, src_offset);
- dst = dst_buffer;
-
- if (format == SND_PCM_FORMAT_S16) {
- while (samples-- > 0) {
- *(int16_t*)dst = *(int16_t*)src;
- src += src_step;
- dst += dst_step;
- }
- } else if (format == SND_PCM_FORMAT_S32) {
- src += 2;
- while (samples-- > 0) {
- *(int16_t*)dst = *(int16_t*)src;
- src += src_step;
- dst += dst_step;
- }
- } else if (format == SND_PCM_FORMAT_S24) {
- src += 1;
- while (samples-- > 0) {
- *(int16_t*)dst = *(int16_t*)src;
- src += src_step;
- dst += dst_step;
- }
- }
- return 0;
-}
-
-int snd_pcm_convert_to_area(const int16_t *src_buffer, int src_step,
- const snd_pcm_channel_area_t *dst_area, snd_pcm_uframes_t dst_offset,
- unsigned int samples, snd_pcm_format_t format)
-{
- char *dst;
- char *src;
- int dst_step;
- dst_step = dst_area->step / 8;
-
- dst = snd_pcm_channel_area_addr(dst_area, dst_offset);
- src = src_buffer;
-
- if (format == SND_PCM_FORMAT_S16) {
- while (samples-- > 0) {
- *(int16_t*)dst = *(int16_t*)src;
- src += src_step;
- dst += dst_step;
- }
- } else if (format == SND_PCM_FORMAT_S32) {
- src += 2;
- while (samples-- > 0) {
- *(int16_t*)dst = *(int16_t*)src;
- src += src_step;
- dst += dst_step;
- }
- } else if (format == SND_PCM_FORMAT_S24) {
- src += 1;
- while (samples-- > 0) {
- *(int16_t*)dst = *(int16_t*)src;
- src += src_step;
- dst += dst_step;
- }
- }
- return 0;
-}
-
-snd_pcm_uframes_t
-convert_process(const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset,
- const snd_pcm_channel_area_t *slave_areas, snd_pcm_uframes_t slave_offset,
- int in_channels,
- int out_channels,
- snd_pcm_uframes_t size,
- snd_pcm_format_t format)
-{
- unsigned int dst_channel;
- const snd_pcm_channel_area_t *dst_area;
- const snd_pcm_channel_area_t *src_area;
- dst_area = slave_areas;
- src_area = areas;
-
- for (dst_channel = 0; dst_channel < out_channels; dst_channel++) {
- if (dst_channel >= in_channels) {
- snd_pcm_area_silence(&dst_area[dst_channel], slave_offset, size, SND_PCM_FORMAT_S16);
- } else {
- snd_pcm_area_convert(&dst_area[dst_channel], slave_offset, &src_area[dst_channel], offset, size, format);
- }
- }
- return size;
-}
-
-
-
-snd_pcm_uframes_t
-convert_to_s16(const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset,
- int in_channels,
- snd_pcm_uframes_t size,
- snd_pcm_format_t format,
- int16_t *buffer)
-{
- unsigned int dst_channel, dst_step;
- const snd_pcm_channel_area_t *src_area;
- src_area = areas;
- dst_step = 16 * in_channels / 8;
-
- for (dst_channel = 0; dst_channel < in_channels; dst_channel++) {
- snd_pcm_convert_to_s16(&buffer[dst_channel], dst_step, &src_area[dst_channel], offset, size, format);
- }
- return size;
-}
-
-snd_pcm_uframes_t
-convert_to_area(const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset,
- int out_channels,
- snd_pcm_uframes_t size,
- snd_pcm_format_t format,
- int16_t *buffer)
-{
- unsigned int dst_channel, src_step;
- const snd_pcm_channel_area_t *dst_area;
- dst_area = areas;
- src_step = 16 * out_channels / 8;
-
- for (dst_channel = 0; dst_channel < out_channels; dst_channel++) {
- snd_pcm_convert_to_area(&buffer[dst_channel], src_step, &dst_area[dst_channel], offset, size, format);
- }
- return size;
-}
-
diff --git a/aml_plugins/trumpet/dolby_daws_plugin/src/snd_convert.h b/aml_plugins/trumpet/dolby_daws_plugin/src/snd_convert.h
deleted file mode 100644
index 02a32f2..0000000
--- a/aml_plugins/trumpet/dolby_daws_plugin/src/snd_convert.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @file "snd_convert.c"
- *
- * @brief convert 16/24/32bit, 1/2 channels to 16bit desgnated channels.
- */
-
-
-
-snd_pcm_uframes_t
-convert_process(const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset,
- const snd_pcm_channel_area_t *slave_areas, snd_pcm_uframes_t slave_offset,
- int channels,
- int slave_channels,
- snd_pcm_uframes_t size,
- snd_pcm_format_t format);
-
-snd_pcm_uframes_t
-convert_to_s16(const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset,
- int in_channels,
- snd_pcm_uframes_t size,
- snd_pcm_format_t format,
- int16_t *buffer);
-
-snd_pcm_uframes_t
-convert_to_area(const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset,
- int out_channels,
- snd_pcm_uframes_t size,
- snd_pcm_format_t format,
- int16_t *buffer);
diff --git a/aml_plugins/trumpet/dolby_daws_security/Config.in b/aml_plugins/trumpet/dolby_daws_security/Config.in
deleted file mode 100755
index df16b80..0000000
--- a/aml_plugins/trumpet/dolby_daws_security/Config.in
+++ /dev/null
@@ -1,8 +0,0 @@
-config BR2_PACKAGE_DOLBY_DAWS_SECURITY
- bool "dolby_daws_security"
- depends on BR2_PACKAGE_ALSA_LIB
- help
- Advanced Linux Sound Architecture Plugins
-
- http://www.alsa-project.org/
-
diff --git a/aml_plugins/trumpet/dolby_daws_security/dolby_daws_security.mk b/aml_plugins/trumpet/dolby_daws_security/dolby_daws_security.mk
deleted file mode 100644
index 2978360..0000000
--- a/aml_plugins/trumpet/dolby_daws_security/dolby_daws_security.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#############################################################
-#
-# Dolby Audio for Wireless Speakers
-#
-#############################################################
-DOLBY_DAWS_SECURITY_VERSION:=1.0.0
-DOLBY_DAWS_SECURITY_SITE=$(TOPDIR)/../multimedia/aml_plugins/trumpet/dolby_daws_security/src
-DOLBY_DAWS_SECURITY_SITE_METHOD=local
-
-define DOLBY_DAWS_SECURITY_BUILD_CMDS
- $(MAKE) CC=$(TARGET_CC) CXX=$(TARGET_CXX) -C $(@D)
-endef
-
-define DOLBY_DAWS_SECURITY_CLEAN_CMDS
- $(MAKE) -C $(@D) clean
-endef
-
-define DOLBY_DAWS_SECURITY_INSTALL_TARGET_CMDS
- $(MAKE) -C $(@D) install
-endef
-
-define DOLBY_DAWS_SECURITY_UNINSTALL_TARGET_CMDS
- $(MAKE) -C $(@D) uninstall
-endef
-
-$(eval $(generic-package))
\ No newline at end of file
diff --git a/aml_plugins/trumpet/dolby_daws_security/src/Makefile b/aml_plugins/trumpet/dolby_daws_security/src/Makefile
deleted file mode 100644
index ce24955..0000000
--- a/aml_plugins/trumpet/dolby_daws_security/src/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-TAR=dolby_fw
-SCRIPT=S91dsd
-CC = arm-linux-gnueabihf-gcc
-
-
-all: $(TAR)
-
-clean:
- rm -f $(TARGET_OUTPUT_DIR)/target/sbin/$(TAR)
- rm -f $(TARGET_OUTPUT_DIR)/target/etc/init.d/$(SCRIPT)
-install:
- install -m 0755 ./$(TAR) $(TARGET_OUTPUT_DIR)/target/sbin/
- install -m 0755 ./$(SCRIPT) $(TARGET_OUTPUT_DIR)/target/etc/init.d/
-uninstall:
- rm -f $(TARGET_OUTPUT_DIR)/target/sbin/$(TAR)
- rm -f $(TARGET_OUTPUT_DIR)/target/etc/init.d/$(SCRIPT)
diff --git a/aml_plugins/trumpet/dolby_daws_security/src/S91dsd b/aml_plugins/trumpet/dolby_daws_security/src/S91dsd
deleted file mode 100755
index 4e8e29f..0000000
--- a/aml_plugins/trumpet/dolby_daws_security/src/S91dsd
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# Dolby security firmware decryption
-
-DSD=/sbin/dolby_fw
-case "$1" in
- start)
- if [ ! -d "/tmp/ds/" ]; then
- mkdir -p /tmp/ds/
- fi
- $DSD /usr/lib/alsa-lib/libdaws.so /tmp/ds/0x21_0x1234_0x1d.so
- ;;
- *)
- echo "Usage: S91dsd {start}" >&2
- exit 1
- ;;
-esac
diff --git a/aml_plugins/trumpet/dolby_daws_security/src/dolby_fw b/aml_plugins/trumpet/dolby_daws_security/src/dolby_fw
deleted file mode 100755
index 96deeb9..0000000
--- a/aml_plugins/trumpet/dolby_daws_security/src/dolby_fw
+++ /dev/null
Binary files differ
diff --git a/aml_plugins/trumpet/dolby_daws_service/Config.in b/aml_plugins/trumpet/dolby_daws_service/Config.in
deleted file mode 100755
index bbac5dc..0000000
--- a/aml_plugins/trumpet/dolby_daws_service/Config.in
+++ /dev/null
@@ -1,8 +0,0 @@
-config BR2_PACKAGE_DOLBY_DAWS_SERVICE
- bool "dolby_daws_servicce"
- depends on BR2_PACKAGE_ALSA_LIB
- help
- Advanced Linux Sound Architecture Plugins
-
- http://www.alsa-project.org/
-
diff --git a/aml_plugins/trumpet/dolby_daws_service/dolby_daws_service.mk b/aml_plugins/trumpet/dolby_daws_service/dolby_daws_service.mk
deleted file mode 100644
index e7a87ec..0000000
--- a/aml_plugins/trumpet/dolby_daws_service/dolby_daws_service.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#############################################################
-#
-# Dolby Audio for Wireless Speakers
-#
-#############################################################
-DOLBY_DAWS_SERVICE_VERSION:=1.0.0
-DOLBY_DAWS_SERVICE_SITE=$(TOPDIR)/../multimedia/aml_plugins/trumpet/dolby_daws_service/src
-DOLBY_DAWS_SERVICE_SITE_METHOD=local
-
-define DOLBY_DAWS_SERVICE_BUILD_CMDS
- $(MAKE) CC=$(TARGET_CC) CXX=$(TARGET_CXX) -C $(@D)
-endef
-
-define DOLBY_DAWS_SERVICE_CLEAN_CMDS
- $(MAKE) -C $(@D) clean
-endef
-
-define DOLBY_DAWS_SERVICE_INSTALL_TARGET_CMDS
- $(MAKE) -C $(@D) install
-endef
-
-define DOLBY_DAWS_SERVICE_UNINSTALL_TARGET_CMDS
- $(MAKE) -C $(@D) uninstall
-endef
-
-$(eval $(generic-package))
\ No newline at end of file
diff --git a/aml_plugins/trumpet/dolby_daws_service/src/Audio_Effect.xml b/aml_plugins/trumpet/dolby_daws_service/src/Audio_Effect.xml
deleted file mode 100755
index e16c876..0000000
--- a/aml_plugins/trumpet/dolby_daws_service/src/Audio_Effect.xml
+++ /dev/null
@@ -1,1053 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<device_data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xml_version value="3.2.0"/>
- <dtt_version value="3.2.0"/>
- <constant>
- <band_20_freq fs_44100="65,136,223,332,467,634,841,1098,1416,1812,2302,2909,3663,4598,5756,7194,8976,11186,13927,17326" fs_48000="47,141,234,328,469,656,844,1031,1313,1688,2250,3000,3750,4688,5813,7125,9000,11250,13875,19688"/>
- <ieq_open target="117,133,188,176,141,149,175,185,185,200,236,242,228,213,182,132,110,68,-27,-240"/>
- <ieq_rich target="67,95,172,163,168,201,189,242,196,221,192,186,168,139,102,57,35,9,-55,-235"/>
- <ieq_focus target="-419,-112,75,116,113,160,165,80,61,79,98,121,64,70,44,-71,-33,-100,-238,-411"/>
- <array_20_n192 target="-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192"/>
- <array_20_zero target="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- </constant>
- <setting>
- <product value="Trumpet"/>
- <sku value="hdac"/>
- </setting>
- <speaker type="internal_speaker" sample_rate="48000" brand="Audio_Effect" model="3.1" front_count="3" side_count="0" height_count="0" has_subwoofer="1" bass_managed_by_dolby="1">
- <profile type="dynamic">
- <tuning>
- <audio-optimizer-enable value="1"/>
- <audio-optimizer-bands>
- <ch_00 value="192,192,81,13,-22,-16,-8,-3,-10,-28,-29,-48,-45,-37,-20,-8,-36,-82,-38,79"/>
- <ch_01 value="192,192,125,69,39,39,45,41,39,11,11,-4,-9,12,38,43,10,-38,5,113"/>
- <ch_02 value="192,192,15,-22,-30,-29,-8,13,-7,-24,-51,-66,-64,-56,-43,-20,-9,-37,-57,-61"/>
- <ch_03 value="-180,-363,-324,-300,-246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 preset="array_20_zero"/>
- <ch_05 preset="array_20_zero"/>
- <ch_06 preset="array_20_zero"/>
- <ch_07 preset="array_20_zero"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </audio-optimizer-bands>
- <bass-enhancer-enable value="0"/>
- <bass-enhancer-boost value="0"/>
- <bass-enhancer-cutoff-frequency value="200"/>
- <bass-enhancer-width value="16"/>
- <bass-extraction-enable value="1"/>
- <bass-extraction-cutoff-frequency value="276"/>
- <calibration-boost value="0"/>
- <dialog-enhancer-enable value="1"/>
- <dialog-enhancer-amount value="12"/>
- <dialog-enhancer-ducking value="0"/>
- <graphic-equalizer-enable value="0"/>
- <graphic-equalizer-bands preset="array_20_zero"/>
- <height-filter-mode value="0"/>
- <ieq-enable value="1"/>
- <ieq-amount value="10"/>
- <ieq-bands preset="ieq_open"/>
- <mi-dialog-enhancer-steering-enable value="1"/>
- <mi-dv-leveler-steering-enable value="1"/>
- <mi-ieq-steering-enable value="1"/>
- <mi-surround-compressor-steering-enable value="1"/>
- <postgain value="0"/>
- <pregain value="0"/>
- <process-optimizer-enable value="1"/>
- <process-optimizer-bands>
- <ch_00 value="55,3,-7,-14,-19,-7,-7,-7,-10,-3,-18,-4,-1,32,73,90,107,144,176,182"/>
- <ch_01 value="24,58,0,-10,-22,-5,-10,-23,-18,-5,-9,3,14,43,77,100,124,156,191,191"/>
- <ch_02 value="58,32,38,2,-22,-5,-13,-25,-30,-35,-37,-25,-18,-15,-15,-15,-2,16,26,-8"/>
- <ch_03 value="42,6,112,96,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 value="-14,14,-6,-8,-17,-5,-4,-8,-6,-5,-14,-3,1,32,69,86,106,143,177,181"/>
- <ch_05 value="25,77,6,-10,-22,-8,-10,-28,-15,-8,-10,2,13,45,78,99,125,156,190,189"/>
- <ch_06 value="-30,1,-8,-14,-22,-15,-17,-21,-18,-8,-14,-4,1,33,72,91,108,145,178,187"/>
- <ch_07 value="-26,60,8,-11,-29,-6,-5,-10,-16,-9,-11,2,9,39,74,97,124,156,192,192"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </process-optimizer-bands>
- <rear-height-filter-mode value="0"/>
- <regulator-enable value="1"/>
- <regulator-overdrive value="0"/>
- <regulator-relaxation-amount value="0"/>
- <regulator-speaker-dist-enable value="1"/>
- <regulator-timbre-preservation value="12"/>
- <regulator-tuning>
- <threshold_high preset="array_20_zero"/>
- <threshold_low preset="array_20_n192"/>
- <isolated_band preset="array_20_zero"/>
- </regulator-tuning>
- <surround-boost value="96"/>
- <surround-decoder-center-spreading-enable value="0"/>
- <surround-decoder-enable value="1"/>
- <system-gain value="0"/>
- <virtualizer-front-speaker-angle value="10"/>
- <virtualizer-height-speaker-angle value="10"/>
- <virtualizer-rear-surround-speaker-angle value="5"/>
- <virtualizer-rear-height-speaker-angle value="5"/>
- <virtualizer-surround-speaker-angle value="10"/>
- <virtual-bass-mix-freqs value="94,469"/>
- <virtual-bass-mode value="0"/>
- <virtual-bass-overall-gain value="0"/>
- <virtual-bass-subgains value="-32,-144,-192"/>
- <virtual-bass-slope-gain value="0"/>
- <virtual-bass-src-freqs value="35,160"/>
- <volmax-boost value="0"/>
- <volume-leveler-enable value="1"/>
- <volume-leveler-amount value="7"/>
- <volume-leveler-in-target value="-320"/>
- <volume-leveler-out-target value="-320"/>
- <volume-modeler-enable value="0"/>
- <volume-modeler-calibration value="0"/>
- <output-mode>
- <processing_mode value="11"/>
- <nb_output_channels value="4"/>
- <mix_matrix value="16384,0,0,0,0,16384,0,0,0,0,16384,0,0,0,0,16384,16384,0,0,0,0,16384,0,0,16384,0,0,0,0,16384,0,0"/>
- </output-mode>
- </tuning>
- </profile>
- <profile type="movie">
- <tuning>
- <audio-optimizer-enable value="1"/>
- <audio-optimizer-bands>
- <ch_00 value="192,192,81,13,-22,-16,-8,-3,-10,-28,-29,-48,-45,-37,-20,-8,-36,-82,-38,79"/>
- <ch_01 value="192,192,125,69,39,39,45,41,39,11,11,-4,-9,12,38,43,10,-38,5,113"/>
- <ch_02 value="192,192,15,-22,-30,-29,-8,13,-7,-24,-51,-66,-64,-56,-43,-20,-9,-37,-57,-61"/>
- <ch_03 value="-180,-363,-324,-300,-246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 preset="array_20_zero"/>
- <ch_05 preset="array_20_zero"/>
- <ch_06 preset="array_20_zero"/>
- <ch_07 preset="array_20_zero"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </audio-optimizer-bands>
- <bass-enhancer-enable value="0"/>
- <bass-enhancer-boost value="0"/>
- <bass-enhancer-cutoff-frequency value="200"/>
- <bass-enhancer-width value="16"/>
- <bass-extraction-enable value="1"/>
- <bass-extraction-cutoff-frequency value="276"/>
- <calibration-boost value="0"/>
- <dialog-enhancer-enable value="1"/>
- <dialog-enhancer-amount value="12"/>
- <dialog-enhancer-ducking value="0"/>
- <graphic-equalizer-enable value="0"/>
- <graphic-equalizer-bands preset="array_20_zero"/>
- <height-filter-mode value="0"/>
- <ieq-enable value="0"/>
- <ieq-amount value="10"/>
- <ieq-bands preset="ieq_open"/>
- <mi-dialog-enhancer-steering-enable value="0"/>
- <mi-dv-leveler-steering-enable value="0"/>
- <mi-ieq-steering-enable value="0"/>
- <mi-surround-compressor-steering-enable value="0"/>
- <postgain value="0"/>
- <pregain value="0"/>
- <process-optimizer-enable value="1"/>
- <process-optimizer-bands>
- <ch_00 value="55,3,-7,-14,-19,-7,-7,-7,-10,-3,-18,-4,-1,32,73,90,107,144,176,182"/>
- <ch_01 value="24,58,0,-10,-22,-5,-10,-23,-18,-5,-9,3,14,43,77,100,124,156,191,191"/>
- <ch_02 value="58,32,38,2,-22,-5,-13,-25,-30,-35,-37,-25,-18,-15,-15,-15,-2,16,26,-8"/>
- <ch_03 value="42,6,112,96,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 value="-14,14,-6,-8,-17,-5,-4,-8,-6,-5,-14,-3,1,32,69,86,106,143,177,181"/>
- <ch_05 value="25,77,6,-10,-22,-8,-10,-28,-15,-8,-10,2,13,45,78,99,125,156,190,189"/>
- <ch_06 value="-30,1,-8,-14,-22,-15,-17,-21,-18,-8,-14,-4,1,33,72,91,108,145,178,187"/>
- <ch_07 value="-26,60,8,-11,-29,-6,-5,-10,-16,-9,-11,2,9,39,74,97,124,156,192,192"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </process-optimizer-bands>
- <rear-height-filter-mode value="0"/>
- <regulator-enable value="1"/>
- <regulator-overdrive value="0"/>
- <regulator-relaxation-amount value="0"/>
- <regulator-speaker-dist-enable value="1"/>
- <regulator-timbre-preservation value="12"/>
- <regulator-tuning>
- <threshold_high preset="array_20_zero"/>
- <threshold_low preset="array_20_n192"/>
- <isolated_band preset="array_20_zero"/>
- </regulator-tuning>
- <surround-boost value="96"/>
- <surround-decoder-center-spreading-enable value="0"/>
- <surround-decoder-enable value="1"/>
- <system-gain value="0"/>
- <virtualizer-front-speaker-angle value="10"/>
- <virtualizer-height-speaker-angle value="10"/>
- <virtualizer-rear-surround-speaker-angle value="5"/>
- <virtualizer-rear-height-speaker-angle value="5"/>
- <virtualizer-surround-speaker-angle value="10"/>
- <virtual-bass-mix-freqs value="94,469"/>
- <virtual-bass-mode value="0"/>
- <virtual-bass-overall-gain value="0"/>
- <virtual-bass-subgains value="-32,-144,-192"/>
- <virtual-bass-slope-gain value="0"/>
- <virtual-bass-src-freqs value="35,160"/>
- <volmax-boost value="0"/>
- <volume-leveler-enable value="1"/>
- <volume-leveler-amount value="7"/>
- <volume-leveler-in-target value="-320"/>
- <volume-leveler-out-target value="-320"/>
- <volume-modeler-enable value="0"/>
- <volume-modeler-calibration value="0"/>
- <output-mode>
- <processing_mode value="11"/>
- <nb_output_channels value="4"/>
- <mix_matrix value="16384,0,0,0,0,16384,0,0,0,0,16384,0,0,0,0,16384,16384,0,0,0,0,16384,0,0,16384,0,0,0,0,16384,0,0"/>
- </output-mode>
- </tuning>
- </profile>
- <profile type="music">
- <tuning>
- <audio-optimizer-enable value="1"/>
- <audio-optimizer-bands>
- <ch_00 value="192,192,81,13,-22,-16,-8,-3,-10,-28,-29,-48,-45,-37,-20,-8,-36,-82,-38,79"/>
- <ch_01 value="192,192,125,69,39,39,45,41,39,11,11,-4,-9,12,38,43,10,-38,5,113"/>
- <ch_02 value="192,192,15,-22,-30,-29,-8,13,-7,-24,-51,-66,-64,-56,-43,-20,-9,-37,-57,-61"/>
- <ch_03 value="-180,-363,-324,-300,-246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 preset="array_20_zero"/>
- <ch_05 preset="array_20_zero"/>
- <ch_06 preset="array_20_zero"/>
- <ch_07 preset="array_20_zero"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </audio-optimizer-bands>
- <bass-enhancer-enable value="0"/>
- <bass-enhancer-boost value="0"/>
- <bass-enhancer-cutoff-frequency value="200"/>
- <bass-enhancer-width value="16"/>
- <bass-extraction-enable value="1"/>
- <bass-extraction-cutoff-frequency value="276"/>
- <calibration-boost value="0"/>
- <dialog-enhancer-enable value="0"/>
- <dialog-enhancer-amount value="7"/>
- <dialog-enhancer-ducking value="0"/>
- <graphic-equalizer-enable value="0"/>
- <graphic-equalizer-bands preset="array_20_zero"/>
- <height-filter-mode value="0"/>
- <ieq-enable value="1"/>
- <ieq-amount value="10"/>
- <ieq-bands preset="ieq_open"/>
- <mi-dialog-enhancer-steering-enable value="0"/>
- <mi-dv-leveler-steering-enable value="0"/>
- <mi-ieq-steering-enable value="0"/>
- <mi-surround-compressor-steering-enable value="0"/>
- <postgain value="0"/>
- <pregain value="0"/>
- <process-optimizer-enable value="1"/>
- <process-optimizer-bands>
- <ch_00 value="55,3,-7,-14,-19,-7,-7,-7,-10,-3,-18,-4,-1,32,73,90,107,144,176,182"/>
- <ch_01 value="24,58,0,-10,-22,-5,-10,-23,-18,-5,-9,3,14,43,77,100,124,156,191,191"/>
- <ch_02 value="58,32,38,2,-22,-5,-13,-25,-30,-35,-37,-25,-18,-15,-15,-15,-2,16,26,-8"/>
- <ch_03 value="42,6,112,96,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 value="-14,14,-6,-8,-17,-5,-4,-8,-6,-5,-14,-3,1,32,69,86,106,143,177,181"/>
- <ch_05 value="25,77,6,-10,-22,-8,-10,-28,-15,-8,-10,2,13,45,78,99,125,156,190,189"/>
- <ch_06 value="-30,1,-8,-14,-22,-15,-17,-21,-18,-8,-14,-4,1,33,72,91,108,145,178,187"/>
- <ch_07 value="-26,60,8,-11,-29,-6,-5,-10,-16,-9,-11,2,9,39,74,97,124,156,192,192"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </process-optimizer-bands>
- <rear-height-filter-mode value="0"/>
- <regulator-enable value="1"/>
- <regulator-overdrive value="0"/>
- <regulator-relaxation-amount value="0"/>
- <regulator-speaker-dist-enable value="1"/>
- <regulator-timbre-preservation value="12"/>
- <regulator-tuning>
- <threshold_high preset="array_20_zero"/>
- <threshold_low preset="array_20_n192"/>
- <isolated_band preset="array_20_zero"/>
- </regulator-tuning>
- <surround-boost value="0"/>
- <surround-decoder-center-spreading-enable value="0"/>
- <surround-decoder-enable value="1"/>
- <system-gain value="0"/>
- <virtualizer-front-speaker-angle value="10"/>
- <virtualizer-height-speaker-angle value="10"/>
- <virtualizer-rear-surround-speaker-angle value="5"/>
- <virtualizer-rear-height-speaker-angle value="5"/>
- <virtualizer-surround-speaker-angle value="10"/>
- <virtual-bass-mix-freqs value="94,469"/>
- <virtual-bass-mode value="0"/>
- <virtual-bass-overall-gain value="0"/>
- <virtual-bass-subgains value="-32,-144,-192"/>
- <virtual-bass-slope-gain value="0"/>
- <virtual-bass-src-freqs value="35,160"/>
- <volmax-boost value="0"/>
- <volume-leveler-enable value="1"/>
- <volume-leveler-amount value="4"/>
- <volume-leveler-in-target value="-320"/>
- <volume-leveler-out-target value="-320"/>
- <volume-modeler-enable value="0"/>
- <volume-modeler-calibration value="0"/>
- <output-mode>
- <processing_mode value="11"/>
- <nb_output_channels value="4"/>
- <mix_matrix value="16384,0,0,0,0,16384,0,0,0,0,16384,0,0,0,0,16384,16384,0,0,0,0,16384,0,0,16384,0,0,0,0,16384,0,0"/>
- </output-mode>
- </tuning>
- </profile>
- <profile type="game">
- <tuning>
- <audio-optimizer-enable value="1"/>
- <audio-optimizer-bands>
- <ch_00 value="192,192,81,13,-22,-16,-8,-3,-10,-28,-29,-48,-45,-37,-20,-8,-36,-82,-38,79"/>
- <ch_01 value="192,192,125,69,39,39,45,41,39,11,11,-4,-9,12,38,43,10,-38,5,113"/>
- <ch_02 value="192,192,15,-22,-30,-29,-8,13,-7,-24,-51,-66,-64,-56,-43,-20,-9,-37,-57,-61"/>
- <ch_03 value="-180,-363,-324,-300,-246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 preset="array_20_zero"/>
- <ch_05 preset="array_20_zero"/>
- <ch_06 preset="array_20_zero"/>
- <ch_07 preset="array_20_zero"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </audio-optimizer-bands>
- <bass-enhancer-enable value="0"/>
- <bass-enhancer-boost value="0"/>
- <bass-enhancer-cutoff-frequency value="200"/>
- <bass-enhancer-width value="16"/>
- <bass-extraction-enable value="1"/>
- <bass-extraction-cutoff-frequency value="276"/>
- <calibration-boost value="0"/>
- <dialog-enhancer-enable value="0"/>
- <dialog-enhancer-amount value="7"/>
- <dialog-enhancer-ducking value="0"/>
- <graphic-equalizer-enable value="0"/>
- <graphic-equalizer-bands preset="array_20_zero"/>
- <height-filter-mode value="0"/>
- <ieq-enable value="0"/>
- <ieq-amount value="10"/>
- <ieq-bands preset="ieq_open"/>
- <mi-dialog-enhancer-steering-enable value="0"/>
- <mi-dv-leveler-steering-enable value="0"/>
- <mi-ieq-steering-enable value="0"/>
- <mi-surround-compressor-steering-enable value="0"/>
- <postgain value="0"/>
- <pregain value="0"/>
- <process-optimizer-enable value="1"/>
- <process-optimizer-bands>
- <ch_00 value="55,3,-7,-14,-19,-7,-7,-7,-10,-3,-18,-4,-1,32,73,90,107,144,176,182"/>
- <ch_01 value="24,58,0,-10,-22,-5,-10,-23,-18,-5,-9,3,14,43,77,100,124,156,191,191"/>
- <ch_02 value="58,32,38,2,-22,-5,-13,-25,-30,-35,-37,-25,-18,-15,-15,-15,-2,16,26,-8"/>
- <ch_03 value="42,6,112,96,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 value="-14,14,-6,-8,-17,-5,-4,-8,-6,-5,-14,-3,1,32,69,86,106,143,177,181"/>
- <ch_05 value="25,77,6,-10,-22,-8,-10,-28,-15,-8,-10,2,13,45,78,99,125,156,190,189"/>
- <ch_06 value="-30,1,-8,-14,-22,-15,-17,-21,-18,-8,-14,-4,1,33,72,91,108,145,178,187"/>
- <ch_07 value="-26,60,8,-11,-29,-6,-5,-10,-16,-9,-11,2,9,39,74,97,124,156,192,192"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </process-optimizer-bands>
- <rear-height-filter-mode value="0"/>
- <regulator-enable value="1"/>
- <regulator-overdrive value="0"/>
- <regulator-relaxation-amount value="0"/>
- <regulator-speaker-dist-enable value="1"/>
- <regulator-timbre-preservation value="12"/>
- <regulator-tuning>
- <threshold_high preset="array_20_zero"/>
- <threshold_low preset="array_20_n192"/>
- <isolated_band preset="array_20_zero"/>
- </regulator-tuning>
- <surround-boost value="0"/>
- <surround-decoder-center-spreading-enable value="0"/>
- <surround-decoder-enable value="1"/>
- <system-gain value="0"/>
- <virtualizer-front-speaker-angle value="10"/>
- <virtualizer-height-speaker-angle value="10"/>
- <virtualizer-rear-surround-speaker-angle value="5"/>
- <virtualizer-rear-height-speaker-angle value="5"/>
- <virtualizer-surround-speaker-angle value="10"/>
- <virtual-bass-mix-freqs value="94,469"/>
- <virtual-bass-mode value="0"/>
- <virtual-bass-overall-gain value="0"/>
- <virtual-bass-subgains value="-32,-144,-192"/>
- <virtual-bass-slope-gain value="0"/>
- <virtual-bass-src-freqs value="35,160"/>
- <volmax-boost value="0"/>
- <volume-leveler-enable value="1"/>
- <volume-leveler-amount value="0"/>
- <volume-leveler-in-target value="-320"/>
- <volume-leveler-out-target value="-320"/>
- <volume-modeler-enable value="0"/>
- <volume-modeler-calibration value="0"/>
- <output-mode>
- <processing_mode value="11"/>
- <nb_output_channels value="4"/>
- <mix_matrix value="16384,0,0,0,0,16384,0,0,0,0,16384,0,0,0,0,16384,16384,0,0,0,0,16384,0,0,16384,0,0,0,0,16384,0,0"/>
- </output-mode>
- </tuning>
- </profile>
- <profile type="voice">
- <tuning>
- <audio-optimizer-enable value="1"/>
- <audio-optimizer-bands>
- <ch_00 value="192,192,81,13,-22,-16,-8,-3,-10,-28,-29,-48,-45,-37,-20,-8,-36,-82,-38,79"/>
- <ch_01 value="192,192,125,69,39,39,45,41,39,11,11,-4,-9,12,38,43,10,-38,5,113"/>
- <ch_02 value="192,192,15,-22,-30,-29,-8,13,-7,-24,-51,-66,-64,-56,-43,-20,-9,-37,-57,-61"/>
- <ch_03 value="-180,-363,-324,-300,-246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 preset="array_20_zero"/>
- <ch_05 preset="array_20_zero"/>
- <ch_06 preset="array_20_zero"/>
- <ch_07 preset="array_20_zero"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </audio-optimizer-bands>
- <bass-enhancer-enable value="0"/>
- <bass-enhancer-boost value="0"/>
- <bass-enhancer-cutoff-frequency value="200"/>
- <bass-enhancer-width value="16"/>
- <bass-extraction-enable value="1"/>
- <bass-extraction-cutoff-frequency value="276"/>
- <calibration-boost value="0"/>
- <dialog-enhancer-enable value="1"/>
- <dialog-enhancer-amount value="16"/>
- <dialog-enhancer-ducking value="0"/>
- <graphic-equalizer-enable value="0"/>
- <graphic-equalizer-bands preset="array_20_zero"/>
- <height-filter-mode value="0"/>
- <ieq-enable value="0"/>
- <ieq-amount value="10"/>
- <ieq-bands preset="ieq_rich"/>
- <mi-dialog-enhancer-steering-enable value="0"/>
- <mi-dv-leveler-steering-enable value="0"/>
- <mi-ieq-steering-enable value="0"/>
- <mi-surround-compressor-steering-enable value="0"/>
- <postgain value="0"/>
- <pregain value="0"/>
- <process-optimizer-enable value="1"/>
- <process-optimizer-bands>
- <ch_00 value="55,3,-7,-14,-19,-7,-7,-7,-10,-3,-18,-4,-1,32,73,90,107,144,176,182"/>
- <ch_01 value="24,58,0,-10,-22,-5,-10,-23,-18,-5,-9,3,14,43,77,100,124,156,191,191"/>
- <ch_02 value="58,32,38,2,-22,-5,-13,-25,-30,-35,-37,-25,-18,-15,-15,-15,-2,16,26,-8"/>
- <ch_03 value="42,6,112,96,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 value="-14,14,-6,-8,-17,-5,-4,-8,-6,-5,-14,-3,1,32,69,86,106,143,177,181"/>
- <ch_05 value="25,77,6,-10,-22,-8,-10,-28,-15,-8,-10,2,13,45,78,99,125,156,190,189"/>
- <ch_06 value="-30,1,-8,-14,-22,-15,-17,-21,-18,-8,-14,-4,1,33,72,91,108,145,178,187"/>
- <ch_07 value="-26,60,8,-11,-29,-6,-5,-10,-16,-9,-11,2,9,39,74,97,124,156,192,192"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </process-optimizer-bands>
- <rear-height-filter-mode value="0"/>
- <regulator-enable value="1"/>
- <regulator-overdrive value="0"/>
- <regulator-relaxation-amount value="0"/>
- <regulator-speaker-dist-enable value="1"/>
- <regulator-timbre-preservation value="12"/>
- <regulator-tuning>
- <threshold_high preset="array_20_zero"/>
- <threshold_low preset="array_20_n192"/>
- <isolated_band preset="array_20_zero"/>
- </regulator-tuning>
- <surround-boost value="0"/>
- <surround-decoder-center-spreading-enable value="0"/>
- <surround-decoder-enable value="1"/>
- <system-gain value="0"/>
- <virtualizer-front-speaker-angle value="10"/>
- <virtualizer-height-speaker-angle value="10"/>
- <virtualizer-rear-surround-speaker-angle value="5"/>
- <virtualizer-rear-height-speaker-angle value="5"/>
- <virtualizer-surround-speaker-angle value="10"/>
- <virtual-bass-mix-freqs value="94,469"/>
- <virtual-bass-mode value="0"/>
- <virtual-bass-overall-gain value="0"/>
- <virtual-bass-subgains value="-32,-144,-192"/>
- <virtual-bass-slope-gain value="0"/>
- <virtual-bass-src-freqs value="35,160"/>
- <volmax-boost value="0"/>
- <volume-leveler-enable value="0"/>
- <volume-leveler-amount value="0"/>
- <volume-leveler-in-target value="-320"/>
- <volume-leveler-out-target value="-320"/>
- <volume-modeler-enable value="0"/>
- <volume-modeler-calibration value="0"/>
- <output-mode>
- <processing_mode value="11"/>
- <nb_output_channels value="4"/>
- <mix_matrix value="16384,0,0,0,0,16384,0,0,0,0,16384,0,0,0,0,16384,16384,0,0,0,0,16384,0,0,16384,0,0,0,0,16384,0,0"/>
- </output-mode>
- </tuning>
- </profile>
- <profile type="personalize">
- <tuning>
- <audio-optimizer-enable value="1"/>
- <audio-optimizer-bands>
- <ch_00 value="192,192,81,13,-22,-16,-8,-3,-10,-28,-29,-48,-45,-37,-20,-8,-36,-82,-38,79"/>
- <ch_01 value="192,192,125,69,39,39,45,41,39,11,11,-4,-9,12,38,43,10,-38,5,113"/>
- <ch_02 value="192,192,15,-22,-30,-29,-8,13,-7,-24,-51,-66,-64,-56,-43,-20,-9,-37,-57,-61"/>
- <ch_03 value="-180,-363,-324,-300,-246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 preset="array_20_zero"/>
- <ch_05 preset="array_20_zero"/>
- <ch_06 preset="array_20_zero"/>
- <ch_07 preset="array_20_zero"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </audio-optimizer-bands>
- <bass-enhancer-enable value="0"/>
- <bass-enhancer-boost value="0"/>
- <bass-enhancer-cutoff-frequency value="200"/>
- <bass-enhancer-width value="16"/>
- <bass-extraction-enable value="1"/>
- <bass-extraction-cutoff-frequency value="276"/>
- <calibration-boost value="0"/>
- <dialog-enhancer-enable value="1"/>
- <dialog-enhancer-amount value="14"/>
- <dialog-enhancer-ducking value="0"/>
- <graphic-equalizer-enable value="0"/>
- <graphic-equalizer-bands preset="array_20_zero"/>
- <height-filter-mode value="0"/>
- <ieq-enable value="0"/>
- <ieq-amount value="10"/>
- <ieq-bands preset="ieq_open"/>
- <mi-dialog-enhancer-steering-enable value="1"/>
- <mi-dv-leveler-steering-enable value="1"/>
- <mi-ieq-steering-enable value="1"/>
- <mi-surround-compressor-steering-enable value="1"/>
- <postgain value="0"/>
- <pregain value="0"/>
- <process-optimizer-enable value="0"/>
- <process-optimizer-bands>
- <ch_00 value="55,3,-7,-14,-19,-7,-7,-7,-10,-3,-18,-4,-1,32,73,90,107,144,176,182"/>
- <ch_01 value="24,58,0,-10,-22,-5,-10,-23,-18,-5,-9,3,14,43,77,100,124,156,191,191"/>
- <ch_02 value="58,32,38,2,-22,-5,-13,-25,-30,-35,-37,-25,-18,-15,-15,-15,-2,16,26,-8"/>
- <ch_03 value="42,6,112,96,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 value="-14,14,-6,-8,-17,-5,-4,-8,-6,-5,-14,-3,1,32,69,86,106,143,177,181"/>
- <ch_05 value="25,77,6,-10,-22,-8,-10,-28,-15,-8,-10,2,13,45,78,99,125,156,190,189"/>
- <ch_06 value="-30,1,-8,-14,-22,-15,-17,-21,-18,-8,-14,-4,1,33,72,91,108,145,178,187"/>
- <ch_07 value="-26,60,8,-11,-29,-6,-5,-10,-16,-9,-11,2,9,39,74,97,124,156,192,192"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </process-optimizer-bands>
- <rear-height-filter-mode value="0"/>
- <regulator-enable value="1"/>
- <regulator-overdrive value="0"/>
- <regulator-relaxation-amount value="0"/>
- <regulator-speaker-dist-enable value="1"/>
- <regulator-timbre-preservation value="12"/>
- <regulator-tuning>
- <threshold_high preset="array_20_zero"/>
- <threshold_low preset="array_20_n192"/>
- <isolated_band preset="array_20_zero"/>
- </regulator-tuning>
- <surround-boost value="48"/>
- <surround-decoder-center-spreading-enable value="0"/>
- <surround-decoder-enable value="1"/>
- <system-gain value="0"/>
- <virtualizer-front-speaker-angle value="10"/>
- <virtualizer-height-speaker-angle value="10"/>
- <virtualizer-rear-surround-speaker-angle value="5"/>
- <virtualizer-rear-height-speaker-angle value="5"/>
- <virtualizer-surround-speaker-angle value="10"/>
- <virtual-bass-mix-freqs value="94,469"/>
- <virtual-bass-mode value="0"/>
- <virtual-bass-overall-gain value="0"/>
- <virtual-bass-subgains value="-32,-144,-192"/>
- <virtual-bass-slope-gain value="0"/>
- <virtual-bass-src-freqs value="35,160"/>
- <volmax-boost value="0"/>
- <volume-leveler-enable value="1"/>
- <volume-leveler-amount value="5"/>
- <volume-leveler-in-target value="-320"/>
- <volume-leveler-out-target value="-320"/>
- <volume-modeler-enable value="0"/>
- <volume-modeler-calibration value="0"/>
- <output-mode>
- <processing_mode value="11"/>
- <nb_output_channels value="4"/>
- <mix_matrix value="16384,0,0,0,0,16384,0,0,0,0,16384,0,0,0,0,16384,16384,0,0,0,0,16384,0,0,16384,0,0,0,0,16384,0,0"/>
- </output-mode>
- </tuning>
- </profile>
- <profile type="off">
- <tuning>
- <audio-optimizer-enable value="0"/>
- <audio-optimizer-bands>
- <ch_00 value="192,192,81,13,-22,-16,-8,-3,-10,-28,-29,-48,-45,-37,-20,-8,-36,-82,-38,79"/>
- <ch_01 value="192,192,125,69,39,39,45,41,39,11,11,-4,-9,12,38,43,10,-38,5,113"/>
- <ch_02 preset="array_20_zero"/>
- <ch_03 preset="array_20_zero"/>
- <ch_04 preset="array_20_zero"/>
- <ch_05 preset="array_20_zero"/>
- <ch_06 preset="array_20_zero"/>
- <ch_07 preset="array_20_zero"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </audio-optimizer-bands>
- <bass-enhancer-enable value="0"/>
- <bass-enhancer-boost value="0"/>
- <bass-enhancer-cutoff-frequency value="200"/>
- <bass-enhancer-width value="16"/>
- <bass-extraction-enable value="0"/>
- <bass-extraction-cutoff-frequency value="276"/>
- <calibration-boost value="0"/>
- <dialog-enhancer-enable value="0"/>
- <dialog-enhancer-amount value="0"/>
- <dialog-enhancer-ducking value="0"/>
- <graphic-equalizer-enable value="0"/>
- <graphic-equalizer-bands preset="array_20_zero"/>
- <height-filter-mode value="0"/>
- <ieq-enable value="0"/>
- <ieq-amount value="10"/>
- <ieq-bands preset="ieq_open"/>
- <mi-dialog-enhancer-steering-enable value="0"/>
- <mi-dv-leveler-steering-enable value="0"/>
- <mi-ieq-steering-enable value="0"/>
- <mi-surround-compressor-steering-enable value="0"/>
- <postgain value="0"/>
- <pregain value="0"/>
- <process-optimizer-enable value="0"/>
- <process-optimizer-bands>
- <ch_00 value="55,3,-7,-14,-19,-7,-7,-7,-10,-3,-18,-4,-1,32,73,90,107,144,176,182"/>
- <ch_01 value="24,58,0,-10,-22,-5,-10,-23,-18,-5,-9,3,14,43,77,100,124,156,191,191"/>
- <ch_02 value="58,32,38,2,-22,-5,-13,-25,-30,-35,-37,-25,-18,-15,-15,-15,-2,16,26,-8"/>
- <ch_03 value="42,6,112,96,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 value="-14,14,-6,-8,-17,-5,-4,-8,-6,-5,-14,-3,1,32,69,86,106,143,177,181"/>
- <ch_05 value="25,77,6,-10,-22,-8,-10,-28,-15,-8,-10,2,13,45,78,99,125,156,190,189"/>
- <ch_06 value="-30,1,-8,-14,-22,-15,-17,-21,-18,-8,-14,-4,1,33,72,91,108,145,178,187"/>
- <ch_07 value="-26,60,8,-11,-29,-6,-5,-10,-16,-9,-11,2,9,39,74,97,124,156,192,192"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </process-optimizer-bands>
- <rear-height-filter-mode value="0"/>
- <regulator-enable value="0"/>
- <regulator-overdrive value="0"/>
- <regulator-relaxation-amount value="0"/>
- <regulator-speaker-dist-enable value="0"/>
- <regulator-timbre-preservation value="12"/>
- <regulator-tuning>
- <threshold_high preset="array_20_zero"/>
- <threshold_low preset="array_20_n192"/>
- <isolated_band preset="array_20_zero"/>
- </regulator-tuning>
- <surround-boost value="0"/>
- <surround-decoder-center-spreading-enable value="0"/>
- <surround-decoder-enable value="0"/>
- <system-gain value="0"/>
- <virtualizer-front-speaker-angle value="10"/>
- <virtualizer-height-speaker-angle value="10"/>
- <virtualizer-rear-surround-speaker-angle value="5"/>
- <virtualizer-rear-height-speaker-angle value="5"/>
- <virtualizer-surround-speaker-angle value="10"/>
- <virtual-bass-mix-freqs value="94,469"/>
- <virtual-bass-mode value="0"/>
- <virtual-bass-overall-gain value="0"/>
- <virtual-bass-subgains value="-32,-144,-192"/>
- <virtual-bass-slope-gain value="0"/>
- <virtual-bass-src-freqs value="35,160"/>
- <volmax-boost value="0"/>
- <volume-leveler-enable value="0"/>
- <volume-leveler-amount value="0"/>
- <volume-leveler-in-target value="-320"/>
- <volume-leveler-out-target value="-320"/>
- <volume-modeler-enable value="0"/>
- <volume-modeler-calibration value="0"/>
- <output-mode>
- <processing_mode value="1"/>
- <nb_output_channels value="2"/>
- <mix_matrix value="16384,0,0,16384,11583,11583,8192,8192,16384,0,0,16384,16384,0,0,16384"/>
- </output-mode>
- </tuning>
- </profile>
- <profile type="custom_profile_a">
- <tuning>
- <audio-optimizer-enable value="1"/>
- <audio-optimizer-bands>
- <ch_00 value="192,192,81,13,-22,-16,-8,-3,-10,-28,-29,-48,-45,-37,-20,-8,-36,-82,-38,79"/>
- <ch_01 value="192,192,125,69,39,39,45,41,39,11,11,-4,-9,12,38,43,10,-38,5,113"/>
- <ch_02 value="192,192,15,-22,-30,-29,-8,13,-7,-24,-51,-66,-64,-56,-43,-20,-9,-37,-57,-61"/>
- <ch_03 value="-180,-363,-324,-300,-246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 preset="array_20_zero"/>
- <ch_05 preset="array_20_zero"/>
- <ch_06 preset="array_20_zero"/>
- <ch_07 preset="array_20_zero"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </audio-optimizer-bands>
- <bass-enhancer-enable value="0"/>
- <bass-enhancer-boost value="0"/>
- <bass-enhancer-cutoff-frequency value="200"/>
- <bass-enhancer-width value="16"/>
- <bass-extraction-enable value="1"/>
- <bass-extraction-cutoff-frequency value="276"/>
- <calibration-boost value="0"/>
- <dialog-enhancer-enable value="1"/>
- <dialog-enhancer-amount value="14"/>
- <dialog-enhancer-ducking value="0"/>
- <graphic-equalizer-enable value="0"/>
- <graphic-equalizer-bands preset="array_20_zero"/>
- <height-filter-mode value="0"/>
- <ieq-enable value="0"/>
- <ieq-amount value="10"/>
- <ieq-bands preset="ieq_open"/>
- <mi-dialog-enhancer-steering-enable value="1"/>
- <mi-dv-leveler-steering-enable value="1"/>
- <mi-ieq-steering-enable value="1"/>
- <mi-surround-compressor-steering-enable value="1"/>
- <postgain value="0"/>
- <pregain value="0"/>
- <process-optimizer-enable value="0"/>
- <process-optimizer-bands>
- <ch_00 value="55,3,-7,-14,-19,-7,-7,-7,-10,-3,-18,-4,-1,32,73,90,107,144,176,182"/>
- <ch_01 value="24,58,0,-10,-22,-5,-10,-23,-18,-5,-9,3,14,43,77,100,124,156,191,191"/>
- <ch_02 value="58,32,38,2,-22,-5,-13,-25,-30,-35,-37,-25,-18,-15,-15,-15,-2,16,26,-8"/>
- <ch_03 value="42,6,112,96,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 value="-14,14,-6,-8,-17,-5,-4,-8,-6,-5,-14,-3,1,32,69,86,106,143,177,181"/>
- <ch_05 value="25,77,6,-10,-22,-8,-10,-28,-15,-8,-10,2,13,45,78,99,125,156,190,189"/>
- <ch_06 value="-30,1,-8,-14,-22,-15,-17,-21,-18,-8,-14,-4,1,33,72,91,108,145,178,187"/>
- <ch_07 value="-26,60,8,-11,-29,-6,-5,-10,-16,-9,-11,2,9,39,74,97,124,156,192,192"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </process-optimizer-bands>
- <rear-height-filter-mode value="0"/>
- <regulator-enable value="1"/>
- <regulator-overdrive value="0"/>
- <regulator-relaxation-amount value="0"/>
- <regulator-speaker-dist-enable value="1"/>
- <regulator-timbre-preservation value="12"/>
- <regulator-tuning>
- <threshold_high preset="array_20_zero"/>
- <threshold_low preset="array_20_n192"/>
- <isolated_band preset="array_20_zero"/>
- </regulator-tuning>
- <surround-boost value="48"/>
- <surround-decoder-center-spreading-enable value="0"/>
- <surround-decoder-enable value="1"/>
- <system-gain value="0"/>
- <virtualizer-front-speaker-angle value="10"/>
- <virtualizer-height-speaker-angle value="10"/>
- <virtualizer-rear-surround-speaker-angle value="5"/>
- <virtualizer-rear-height-speaker-angle value="5"/>
- <virtualizer-surround-speaker-angle value="10"/>
- <virtual-bass-mix-freqs value="94,469"/>
- <virtual-bass-mode value="0"/>
- <virtual-bass-overall-gain value="0"/>
- <virtual-bass-subgains value="-32,-144,-192"/>
- <virtual-bass-slope-gain value="0"/>
- <virtual-bass-src-freqs value="35,160"/>
- <volmax-boost value="0"/>
- <volume-leveler-enable value="1"/>
- <volume-leveler-amount value="5"/>
- <volume-leveler-in-target value="-320"/>
- <volume-leveler-out-target value="-320"/>
- <volume-modeler-enable value="0"/>
- <volume-modeler-calibration value="0"/>
- <output-mode>
- <processing_mode value="11"/>
- <nb_output_channels value="4"/>
- <mix_matrix value="16384,0,0,0,0,16384,0,0,0,0,16384,0,0,0,0,16384,16384,0,0,0,0,16384,0,0,16384,0,0,0,0,16384,0,0"/>
- </output-mode>
- </tuning>
- </profile>
- <profile type="custom_profile_b">
- <tuning>
- <audio-optimizer-enable value="1"/>
- <audio-optimizer-bands>
- <ch_00 value="192,192,81,13,-22,-16,-8,-3,-10,-28,-29,-48,-45,-37,-20,-8,-36,-82,-38,79"/>
- <ch_01 value="192,192,125,69,39,39,45,41,39,11,11,-4,-9,12,38,43,10,-38,5,113"/>
- <ch_02 value="192,192,15,-22,-30,-29,-8,13,-7,-24,-51,-66,-64,-56,-43,-20,-9,-37,-57,-61"/>
- <ch_03 value="-180,-363,-324,-300,-246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 preset="array_20_zero"/>
- <ch_05 preset="array_20_zero"/>
- <ch_06 preset="array_20_zero"/>
- <ch_07 preset="array_20_zero"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </audio-optimizer-bands>
- <bass-enhancer-enable value="0"/>
- <bass-enhancer-boost value="0"/>
- <bass-enhancer-cutoff-frequency value="200"/>
- <bass-enhancer-width value="16"/>
- <bass-extraction-enable value="1"/>
- <bass-extraction-cutoff-frequency value="276"/>
- <calibration-boost value="0"/>
- <dialog-enhancer-enable value="1"/>
- <dialog-enhancer-amount value="14"/>
- <dialog-enhancer-ducking value="0"/>
- <graphic-equalizer-enable value="0"/>
- <graphic-equalizer-bands preset="array_20_zero"/>
- <height-filter-mode value="0"/>
- <ieq-enable value="0"/>
- <ieq-amount value="10"/>
- <ieq-bands preset="ieq_open"/>
- <mi-dialog-enhancer-steering-enable value="1"/>
- <mi-dv-leveler-steering-enable value="1"/>
- <mi-ieq-steering-enable value="1"/>
- <mi-surround-compressor-steering-enable value="1"/>
- <postgain value="0"/>
- <pregain value="0"/>
- <process-optimizer-enable value="0"/>
- <process-optimizer-bands>
- <ch_00 value="55,3,-7,-14,-19,-7,-7,-7,-10,-3,-18,-4,-1,32,73,90,107,144,176,182"/>
- <ch_01 value="24,58,0,-10,-22,-5,-10,-23,-18,-5,-9,3,14,43,77,100,124,156,191,191"/>
- <ch_02 value="58,32,38,2,-22,-5,-13,-25,-30,-35,-37,-25,-18,-15,-15,-15,-2,16,26,-8"/>
- <ch_03 value="42,6,112,96,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 value="-14,14,-6,-8,-17,-5,-4,-8,-6,-5,-14,-3,1,32,69,86,106,143,177,181"/>
- <ch_05 value="25,77,6,-10,-22,-8,-10,-28,-15,-8,-10,2,13,45,78,99,125,156,190,189"/>
- <ch_06 value="-30,1,-8,-14,-22,-15,-17,-21,-18,-8,-14,-4,1,33,72,91,108,145,178,187"/>
- <ch_07 value="-26,60,8,-11,-29,-6,-5,-10,-16,-9,-11,2,9,39,74,97,124,156,192,192"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </process-optimizer-bands>
- <rear-height-filter-mode value="0"/>
- <regulator-enable value="1"/>
- <regulator-overdrive value="0"/>
- <regulator-relaxation-amount value="0"/>
- <regulator-speaker-dist-enable value="1"/>
- <regulator-timbre-preservation value="12"/>
- <regulator-tuning>
- <threshold_high preset="array_20_zero"/>
- <threshold_low preset="array_20_n192"/>
- <isolated_band preset="array_20_zero"/>
- </regulator-tuning>
- <surround-boost value="48"/>
- <surround-decoder-center-spreading-enable value="0"/>
- <surround-decoder-enable value="1"/>
- <system-gain value="0"/>
- <virtualizer-front-speaker-angle value="10"/>
- <virtualizer-height-speaker-angle value="10"/>
- <virtualizer-rear-surround-speaker-angle value="5"/>
- <virtualizer-rear-height-speaker-angle value="5"/>
- <virtualizer-surround-speaker-angle value="10"/>
- <virtual-bass-mix-freqs value="94,469"/>
- <virtual-bass-mode value="0"/>
- <virtual-bass-overall-gain value="0"/>
- <virtual-bass-subgains value="-32,-144,-192"/>
- <virtual-bass-slope-gain value="0"/>
- <virtual-bass-src-freqs value="35,160"/>
- <volmax-boost value="0"/>
- <volume-leveler-enable value="1"/>
- <volume-leveler-amount value="5"/>
- <volume-leveler-in-target value="-320"/>
- <volume-leveler-out-target value="-320"/>
- <volume-modeler-enable value="0"/>
- <volume-modeler-calibration value="0"/>
- <output-mode>
- <processing_mode value="11"/>
- <nb_output_channels value="4"/>
- <mix_matrix value="16384,0,0,0,0,16384,0,0,0,0,16384,0,0,0,0,16384,16384,0,0,0,0,16384,0,0,16384,0,0,0,0,16384,0,0"/>
- </output-mode>
- </tuning>
- </profile>
- <profile type="custom_profile_c">
- <tuning>
- <audio-optimizer-enable value="1"/>
- <audio-optimizer-bands>
- <ch_00 value="192,192,81,13,-22,-16,-8,-3,-10,-28,-29,-48,-45,-37,-20,-8,-36,-82,-38,79"/>
- <ch_01 value="192,192,125,69,39,39,45,41,39,11,11,-4,-9,12,38,43,10,-38,5,113"/>
- <ch_02 value="192,192,15,-22,-30,-29,-8,13,-7,-24,-51,-66,-64,-56,-43,-20,-9,-37,-57,-61"/>
- <ch_03 value="-180,-363,-324,-300,-246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 preset="array_20_zero"/>
- <ch_05 preset="array_20_zero"/>
- <ch_06 preset="array_20_zero"/>
- <ch_07 preset="array_20_zero"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </audio-optimizer-bands>
- <bass-enhancer-enable value="0"/>
- <bass-enhancer-boost value="0"/>
- <bass-enhancer-cutoff-frequency value="200"/>
- <bass-enhancer-width value="16"/>
- <bass-extraction-enable value="1"/>
- <bass-extraction-cutoff-frequency value="276"/>
- <calibration-boost value="0"/>
- <dialog-enhancer-enable value="1"/>
- <dialog-enhancer-amount value="14"/>
- <dialog-enhancer-ducking value="0"/>
- <graphic-equalizer-enable value="0"/>
- <graphic-equalizer-bands preset="array_20_zero"/>
- <height-filter-mode value="0"/>
- <ieq-enable value="0"/>
- <ieq-amount value="10"/>
- <ieq-bands preset="ieq_open"/>
- <mi-dialog-enhancer-steering-enable value="1"/>
- <mi-dv-leveler-steering-enable value="1"/>
- <mi-ieq-steering-enable value="1"/>
- <mi-surround-compressor-steering-enable value="1"/>
- <postgain value="0"/>
- <pregain value="0"/>
- <process-optimizer-enable value="0"/>
- <process-optimizer-bands>
- <ch_00 value="55,3,-7,-14,-19,-7,-7,-7,-10,-3,-18,-4,-1,32,73,90,107,144,176,182"/>
- <ch_01 value="24,58,0,-10,-22,-5,-10,-23,-18,-5,-9,3,14,43,77,100,124,156,191,191"/>
- <ch_02 value="58,32,38,2,-22,-5,-13,-25,-30,-35,-37,-25,-18,-15,-15,-15,-2,16,26,-8"/>
- <ch_03 value="42,6,112,96,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 value="-14,14,-6,-8,-17,-5,-4,-8,-6,-5,-14,-3,1,32,69,86,106,143,177,181"/>
- <ch_05 value="25,77,6,-10,-22,-8,-10,-28,-15,-8,-10,2,13,45,78,99,125,156,190,189"/>
- <ch_06 value="-30,1,-8,-14,-22,-15,-17,-21,-18,-8,-14,-4,1,33,72,91,108,145,178,187"/>
- <ch_07 value="-26,60,8,-11,-29,-6,-5,-10,-16,-9,-11,2,9,39,74,97,124,156,192,192"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </process-optimizer-bands>
- <rear-height-filter-mode value="0"/>
- <regulator-enable value="1"/>
- <regulator-overdrive value="0"/>
- <regulator-relaxation-amount value="0"/>
- <regulator-speaker-dist-enable value="1"/>
- <regulator-timbre-preservation value="12"/>
- <regulator-tuning>
- <threshold_high preset="array_20_zero"/>
- <threshold_low preset="array_20_n192"/>
- <isolated_band preset="array_20_zero"/>
- </regulator-tuning>
- <surround-boost value="48"/>
- <surround-decoder-center-spreading-enable value="0"/>
- <surround-decoder-enable value="1"/>
- <system-gain value="0"/>
- <virtualizer-front-speaker-angle value="10"/>
- <virtualizer-height-speaker-angle value="10"/>
- <virtualizer-rear-surround-speaker-angle value="5"/>
- <virtualizer-rear-height-speaker-angle value="5"/>
- <virtualizer-surround-speaker-angle value="10"/>
- <virtual-bass-mix-freqs value="94,469"/>
- <virtual-bass-mode value="0"/>
- <virtual-bass-overall-gain value="0"/>
- <virtual-bass-subgains value="-32,-144,-192"/>
- <virtual-bass-slope-gain value="0"/>
- <virtual-bass-src-freqs value="35,160"/>
- <volmax-boost value="0"/>
- <volume-leveler-enable value="1"/>
- <volume-leveler-amount value="5"/>
- <volume-leveler-in-target value="-320"/>
- <volume-leveler-out-target value="-320"/>
- <volume-modeler-enable value="0"/>
- <volume-modeler-calibration value="0"/>
- <output-mode>
- <processing_mode value="11"/>
- <nb_output_channels value="4"/>
- <mix_matrix value="16384,0,0,0,0,16384,0,0,0,0,16384,0,0,0,0,16384,16384,0,0,0,0,16384,0,0,16384,0,0,0,0,16384,0,0"/>
- </output-mode>
- </tuning>
- </profile>
- <profile type="custom_profile_d">
- <tuning>
- <audio-optimizer-enable value="1"/>
- <audio-optimizer-bands>
- <ch_00 value="192,192,81,13,-22,-16,-8,-3,-10,-28,-29,-48,-45,-37,-20,-8,-36,-82,-38,79"/>
- <ch_01 value="192,192,125,69,39,39,45,41,39,11,11,-4,-9,12,38,43,10,-38,5,113"/>
- <ch_02 value="192,192,15,-22,-30,-29,-8,13,-7,-24,-51,-66,-64,-56,-43,-20,-9,-37,-57,-61"/>
- <ch_03 value="-19,-33,-48,25,-3,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 preset="array_20_zero"/>
- <ch_05 preset="array_20_zero"/>
- <ch_06 preset="array_20_zero"/>
- <ch_07 preset="array_20_zero"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </audio-optimizer-bands>
- <bass-enhancer-enable value="0"/>
- <bass-enhancer-boost value="0"/>
- <bass-enhancer-cutoff-frequency value="200"/>
- <bass-enhancer-width value="16"/>
- <bass-extraction-enable value="1"/>
- <bass-extraction-cutoff-frequency value="276"/>
- <calibration-boost value="0"/>
- <dialog-enhancer-enable value="0"/>
- <dialog-enhancer-amount value="14"/>
- <dialog-enhancer-ducking value="0"/>
- <graphic-equalizer-enable value="0"/>
- <graphic-equalizer-bands preset="array_20_zero"/>
- <height-filter-mode value="0"/>
- <ieq-enable value="1"/>
- <ieq-amount value="8"/>
- <ieq-bands preset="ieq_open"/>
- <mi-dialog-enhancer-steering-enable value="0"/>
- <mi-dv-leveler-steering-enable value="0"/>
- <mi-ieq-steering-enable value="0"/>
- <mi-surround-compressor-steering-enable value="0"/>
- <postgain value="0"/>
- <pregain value="0"/>
- <process-optimizer-enable value="1"/>
- <process-optimizer-bands>
- <ch_00 value="55,3,-7,-14,-19,-7,-7,-7,-10,-3,-18,-4,-1,32,73,90,107,144,176,182"/>
- <ch_01 value="24,58,0,-10,-22,-5,-10,-23,-18,-5,-9,3,14,43,77,100,124,156,191,191"/>
- <ch_02 value="58,32,38,2,-22,-5,-13,-25,-30,-35,-37,-25,-18,-15,-15,-15,-2,16,26,-8"/>
- <ch_03 value="42,6,112,96,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <ch_04 value="-14,14,-6,-8,-17,-5,-4,-8,-6,-5,-14,-3,1,32,69,86,106,143,177,181"/>
- <ch_05 value="25,77,6,-10,-22,-8,-10,-28,-15,-8,-10,2,13,45,78,99,125,156,190,189"/>
- <ch_06 value="-30,1,-8,-14,-22,-15,-17,-21,-18,-8,-14,-4,1,33,72,91,108,145,178,187"/>
- <ch_07 value="-26,60,8,-11,-29,-6,-5,-10,-16,-9,-11,2,9,39,74,97,124,156,192,192"/>
- <ch_08 preset="array_20_zero"/>
- <ch_09 preset="array_20_zero"/>
- <ch_10 preset="array_20_zero"/>
- <ch_11 preset="array_20_zero"/>
- </process-optimizer-bands>
- <rear-height-filter-mode value="0"/>
- <regulator-enable value="1"/>
- <regulator-overdrive value="0"/>
- <regulator-relaxation-amount value="0"/>
- <regulator-speaker-dist-enable value="1"/>
- <regulator-timbre-preservation value="12"/>
- <regulator-tuning>
- <threshold_high value="-129,-140,-107,-248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- <threshold_low value="-321,-332,-299,-440,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192,-192"/>
- <isolated_band value="1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
- </regulator-tuning>
- <surround-boost value="48"/>
- <surround-decoder-center-spreading-enable value="0"/>
- <surround-decoder-enable value="1"/>
- <system-gain value="0"/>
- <virtualizer-front-speaker-angle value="10"/>
- <virtualizer-height-speaker-angle value="10"/>
- <virtualizer-rear-surround-speaker-angle value="5"/>
- <virtualizer-rear-height-speaker-angle value="5"/>
- <virtualizer-surround-speaker-angle value="10"/>
- <virtual-bass-mix-freqs value="94,469"/>
- <virtual-bass-mode value="0"/>
- <virtual-bass-overall-gain value="0"/>
- <virtual-bass-subgains value="-32,-144,-192"/>
- <virtual-bass-slope-gain value="0"/>
- <virtual-bass-src-freqs value="35,160"/>
- <volmax-boost value="144"/>
- <volume-leveler-enable value="1"/>
- <volume-leveler-amount value="0"/>
- <volume-leveler-in-target value="-320"/>
- <volume-leveler-out-target value="-320"/>
- <volume-modeler-enable value="1"/>
- <volume-modeler-calibration value="48"/>
- <output-mode>
- <processing_mode value="11"/>
- <nb_output_channels value="4"/>
- <mix_matrix value="16384,0,0,0,0,16384,0,0,0,0,16384,0,0,0,0,16384,16384,0,0,0,0,16384,0,0,16384,0,0,0,0,16384,0,0"/>
- </output-mode>
- </tuning>
- </profile>
- </speaker>
-</device_data>
diff --git a/aml_plugins/trumpet/dolby_daws_service/src/Makefile b/aml_plugins/trumpet/dolby_daws_service/src/Makefile
deleted file mode 100644
index 87a6365..0000000
--- a/aml_plugins/trumpet/dolby_daws_service/src/Makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-##############################################################################
-# This program is protected under international and U.S. copyright laws as
-# an unpublished work. This program is confidential and proprietary to the
-# copyright owners. Reproduction or disclosure, in whole or in part, or the
-# production of derivative works therefrom without the express permission of
-# the copyright owners is prohibited.
-#
-# Copyright (C) 2017 by Dolby Laboratories
-# All rights reserved.
-##############################################################################
-
-OBJDIR = obj
-SCRIPT=S92daws_service
-CONFIGXML=Audio_Effect.xml
-
-CC = arm-linux-gnueabihf-gcc
-CCDEP = arm-linux-gnueabihf-gcc
-
-CFLAGS_release = -O3 -ftree-vectorize -fPIC -c -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -pedantic -std=gnu99 -Wdeclaration-after-statement -Wvla -DPIC
-
-DEFINES_release = -DDLB_BACKEND_GENERIC_FLOAT32=1 -DDLB_INTRINSICS_NEW_NAMES=1 -DNDEBUG=1
-
-INCLUDES = -I. \
- -Iinclude
-LD = $(CC)
-LDFLAGS_release = -O2
-
-LDLIBS_release = -lc -lm -lpthread \
- -lasound \
- -lrt -levdev -ldl
-
-SRC_FILES_SERVICE = daws_service.c
-
-INPUTS_COMMON_LINK__SERVICE_release = $(foreach file,$(SRC_FILES_SERVICE),$(OBJDIR)_release/$(strip $(basename $(notdir $(file)))).o)
-
-default: daws_service
-
-daws_service: $(INPUTS_COMMON_LINK__SERVICE_release)
- @echo 'Creating "$@" ...'
- @$(CC) $(LDFLAGS_release) -o $@ $+ $(LDLIBS_release)
-$(OBJDIR)_release/%.o:%.c
- @echo 'Compiling "$@" ...'
- @mkdir -p $(OBJDIR)_release
- @$(CCDEP) -MM $(DEFINES_release) $(INCLUDES) -MT $@ -o $(OBJDIR)_release/$*.d $<
- @$(CC) $(CFLAGS_release) $(DEFINES_release) $(INCLUDES) -o $@ $<
-
-cleandeps:
- $(RM) $(OBJDIR)_release/*.d
-
-clean:
- $(RM) -rf $(OBJDIR)_release
- $(RM) daws_service
-
-.PHONY: default FORCE clean cleandeps cleanself help install
-
-install:
- install -m 0755 daws_service $(TARGET_DIR)/sbin/
- install -m 0755 ./$(SCRIPT) $(TARGET_DIR)/etc/init.d/
- install -m 0644 ./$(CONFIGXML) $(TARGET_DIR)/etc/
-
-FORCE:
-
-help:
- @echo "This makefile has the following targets:"
- @echo " daws_service"
- @echo " default"
- @echo " clean"
- @echo " cleandeps"
- @echo " help"
-
diff --git a/aml_plugins/trumpet/dolby_daws_service/src/S92daws_service b/aml_plugins/trumpet/dolby_daws_service/src/S92daws_service
deleted file mode 100644
index 1fcc504..0000000
--- a/aml_plugins/trumpet/dolby_daws_service/src/S92daws_service
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh
-#
-# audio effect (Dolby Audio for Wireless Speakers) service
-#
-case "$1" in
- start)
- /sbin/daws_service /etc/Audio_Effect.xml &
- ;;
- *)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
- ;;
-esac
diff --git a/aml_plugins/trumpet/dolby_daws_service/src/daws_service.c b/aml_plugins/trumpet/dolby_daws_service/src/daws_service.c
deleted file mode 100644
index f318595..0000000
--- a/aml_plugins/trumpet/dolby_daws_service/src/daws_service.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/**
- * @file "daws_service.c"
- *
- * @brief Dolby Audio for Wireless Speakers ALSA Plugin Service
- *
- * EXPERIMENTAL/REFERENCE CODE ONLY. FOR DEMO PURPOSES ONLY
- *
- * @ingroup daws_solns_alsa
- */
-
-
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <termios.h>
-#include <stdio.h>
-#include <linux/input.h>
-#include <dlfcn.h>
-
-#include "daws_xml_parser.h"
-#include "daws_service.h"
-#include "libevdev.h"
-
-#define SHM_KEY "//daws_dolby"
-static int use_key = 1;
-
-typedef int
-(*daws_dap_xml_parser_p)
-( const char *filename /**< [in] Config XML file that needs to be parsed */
- , int b_dump_xml /**< [in] If a verbose XML parsing is desired. */
- , unsigned sample_rate /**< [in] DAP Supported Sample Rate */
- , void *p_dap_config /**< [out] Once the XML is parsed, the values are stored in this structure */
-);
-daws_dap_xml_parser_p daws_dap_xml_parser;
-void *fd;
-
-void get_profile_name
-( daws_preset_mode mode /**< [in] The DAP Preset Mode specifier enum */
- , char *name /**< [out] The DAP Preset Mode in String format */
-);
-
-char getKey(void);
-int libevdev_create(struct libevdev **evdev);
-char libevdev_getKey(struct libevdev *dev);
-
-int main(int argc, char** argv)
-{
- char key;
- void * pShmAddr;
- int ret;
- int shmId;
- char profile_name_from[MAX_NAME_SIZE];
- char profile_name_to[MAX_NAME_SIZE];
- int fd;
- int parser_fd;
- struct libevdev *dev = NULL;
- daws_dap_config * pDawCfg;
- char input[5];
- if (argc < 2) {
- printf("\nTuning XML is missing ...\n");
- printf("Usage: %s tuning_file.xml\n", argv[0]);
- return 0;
- }
- int id;
- static int use_key = 1;
- unsigned int channels = 2;
-
- shmId = shm_open(SHM_KEY, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR | S_IROTH);
- if (shmId < 0) {
- printf("Failed to create Shared Memory\n");
- exit(0);
- }
- ret = ftruncate(shmId, sizeof(daws_dap_config));
- pShmAddr = mmap(0, sizeof(daws_dap_config), PROT_READ | PROT_WRITE, MAP_SHARED, shmId, 0);
- if (pShmAddr == (void *) - 1) {
- printf("Shared Memory attach Failed\n");
- exit(0);
- }
- pDawCfg = (daws_dap_config *) pShmAddr;
- parser_fd= dlopen("/tmp/ds/0x21_0x1234_0x1d.so", RTLD_LAZY);
- if (parser_fd != NULL) {
- daws_dap_xml_parser = dlsym(parser_fd, "daws_dap_xml_parser");
- } else {
- printf("cant find decoder lib %s\n", dlerror());
- daws_dap_xml_parser = NULL;
- }
- ret = daws_dap_xml_parser(argv[1], 0, 48000, pDawCfg);
- if (ret < 0) {
- printf("Failed to read configuration %d\n", ret);
- goto done;
- }
- if (channels == 1 )
- pDawCfg->input_format = DAP_CPDP_FORMAT_1;
- else if (channels == 2 )
- pDawCfg->input_format = DAP_CPDP_FORMAT_2;
-
- if (use_key) {
- fd = libevdev_create(&dev);
- if (fd < 0 || dev == NULL) {
- printf("libevdev_create failed\n");
- exit(0);;
- }
- }
-
- while ( 1) {
- if (!use_key) {
- //printf("Press p to toggle through preset modes\n");
- //printf("Press Esc to Exit\n");
- key = getKey();
- } else {
- //printf("Press KEY_LEFT to toggle through preset modes\n");
- //printf("Press KEY_VOLUMEUP to Exit\n");
- key = libevdev_getKey(dev);
- }
- switch (key) {
- case 'p': {
- int id = pDawCfg->preset_idx + 1;
- if (id >= PRESET_MAX_MODES) {
- id = PRESET_DYNAMIC_MODE;
- }
- get_profile_name (pDawCfg->preset_idx, profile_name_from);
- get_profile_name (id, profile_name_to);
- printf("Changing Preset %d (%s) to %d (%s)\n", pDawCfg->preset_idx, profile_name_from, id, profile_name_to);
- __atomic_store_n(&pDawCfg->preset_idx, id, __ATOMIC_SEQ_CST);
- pDawCfg->preset_idx = id;
- }
- break;
- case 'o': {
- int id = PRESET_OFF_MODE;
- get_profile_name (pDawCfg->preset_idx, profile_name_from);
- get_profile_name (id, profile_name_to);
- printf("\nChanging Preset %d (%s) to %d (%s)\n", pDawCfg->preset_idx, profile_name_from, id, profile_name_to);
- __atomic_store_n(&pDawCfg->preset_idx, id, __ATOMIC_SEQ_CST);
- pDawCfg->preset_idx = id;
- }
- break;
- case 'm': {
- int id = PRESET_MUSIC_MODE;
- get_profile_name (pDawCfg->preset_idx, profile_name_from);
- get_profile_name (id, profile_name_to);
- printf("\nChanging Preset %d (%s) to %d (%s)\n", pDawCfg->preset_idx, profile_name_from, id, profile_name_to);
- __atomic_store_n(&pDawCfg->preset_idx, id, __ATOMIC_SEQ_CST);
- pDawCfg->preset_idx = id;
- }
- break;
- }
- if (key == 27) break;
- }
-
-done:
- libevdev_free(dev);
- close(fd);
- close(parser_fd);
- ret = munmap(pShmAddr, sizeof(int));
- if (ret != 0) {
- printf("munmap failed\n");
- }
- pShmAddr = 0;
- pDawCfg = 0;
- ret = shm_unlink(SHM_KEY);
- if (ret != 0) {
- printf("shm_unlink failed\n");
- }
- printf("daws service exit\n");
- return 0;
-}
-
-void get_profile_name(daws_preset_mode mode, char *name)
-{
- switch (mode) {
- case PRESET_DYNAMIC_MODE:
- strcpy(name, "dynamic");
- break;
- case PRESET_MOVIE_MODE:
- strcpy(name, "movie");
- break;
- case PRESET_MUSIC_MODE:
- strcpy(name, "music");
- break;
- case PRESET_VOICE_MODE:
- strcpy(name, "voice");
- break;
- case PRESET_GAME_MODE:
- strcpy(name, "game");
- break;
- case PRESET_CUSTOM_MODE:
- strcpy(name, "Personalize");
- break;
- case PRESET_CUSTOM_A_MODE:
- strcpy(name, "Custom A");
- break;
- case PRESET_CUSTOM_B_MODE:
- strcpy(name, "Custom B");
- break;
- case PRESET_CUSTOM_C_MODE:
- strcpy(name, "Custom C");
- break;
- case PRESET_CUSTOM_D_MODE:
- strcpy(name, "Custom D");
- break;
- default:
- case PRESET_OFF_MODE:
- strcpy(name, "off");
- break;
- }
- return;
-}
-
-char getKey(void)
-{
- char key;
- struct termios oldattr, newattr;
- tcgetattr(STDIN_FILENO, &oldattr);
- newattr = oldattr;
- newattr.c_lflag &= ~(ICANON);
- tcsetattr(STDIN_FILENO, TCSANOW, &newattr);
- key = getchar();
- tcsetattr(STDIN_FILENO, TCSANOW, &oldattr);
- return key;
-}
-
-int libevdev_create(struct libevdev **evdev)
-{
- struct libevdev *dev = NULL;
- int fd, rc;
- fd = open("/dev/input/event2", O_RDONLY);
- if (fd < 0) {
- printf ("open /dev/input/event1 device error!\n");
- return fd;
- }
- rc = libevdev_new_from_fd(fd, &dev);
- if (rc < 0) {
- printf(stderr, "Failed to init libevdev (%s)\n", strerror(-rc));
- goto out;
- }
- printf("Input device name: \"%s\"\n", libevdev_get_name(dev));
- printf("Input device ID: bus %#x vendor %#x product %#x\n",
- libevdev_get_id_bustype(dev),
- libevdev_get_id_vendor(dev),
- libevdev_get_id_product(dev));
- if (!libevdev_has_event_type(dev, EV_KEY) ||
- !libevdev_has_event_code(dev, EV_KEY, KEY_LEFT) ||
- !libevdev_has_event_code(dev, EV_KEY, KEY_RIGHT) ||
- !libevdev_has_event_code(dev, EV_KEY, KEY_VOLUMEDOWN) ||
- !libevdev_has_event_code(dev, EV_KEY, KEY_VOLUMEUP)) {
- printf("This device does not look like a KEY\n");
- goto out;
- }
- *evdev = dev;
- return fd;
-out:
- libevdev_free(dev);
- close(fd);
- *evdev = NULL;
- return -1;
-}
-
-char libevdev_getKey(struct libevdev *dev)
-{
- int rc;
- char key = 0;
- struct input_event ev;
- while (1) {
- rc = libevdev_next_event(dev, LIBEVDEV_READ_FLAG_NORMAL | LIBEVDEV_READ_FLAG_BLOCKING, &ev);
- if (rc == LIBEVDEV_READ_STATUS_SUCCESS) {
- if (ev.type != EV_KEY || ev.value)
- continue;
- printf("Event: %s %s %d\n",
- libevdev_event_type_get_name(ev.type),
- libevdev_event_code_get_name(ev.type, ev.code), ev.value);
- if (ev.code == KEY_LEFT)
- key = 'p';
- else if (ev.code == KEY_RIGHT)
- key = 'o';
- else if (ev.code == KEY_VOLUMEDOWN)
- key = 'm';
- else if (ev.code == KEY_VOLUMEUP)
- key = 27;
- break;
- } else {
- printf("error: rc = %d\n", rc);
- break;
- }
- }
- return key;
-}
diff --git a/aml_plugins/trumpet/dolby_daws_service/src/daws_service.h b/aml_plugins/trumpet/dolby_daws_service/src/daws_service.h
deleted file mode 100644
index 944f4a5..0000000
--- a/aml_plugins/trumpet/dolby_daws_service/src/daws_service.h
+++ /dev/null
@@ -1,252 +0,0 @@
-
-
-
-
-
-#define DAP_CPDP_CHANNEL_FORMAT(ground, lfe, heights) (((ground)+(lfe)+(heights)) | ((ground) << 4) | ((lfe) << 8) | ((heights) << 12))
-
-#define DAP_CPDP_FORMAT_OBJECT (0)
-#define DAP_CPDP_FORMAT_1 DAP_CPDP_CHANNEL_FORMAT(1u, 0u, 0u)
-#define DAP_CPDP_FORMAT_2 DAP_CPDP_CHANNEL_FORMAT(2u, 0u, 0u)
-#define DAP_CPDP_FORMAT_5_1 DAP_CPDP_CHANNEL_FORMAT(5u, 1u, 0u)
-#define DAP_CPDP_FORMAT_7_1 DAP_CPDP_CHANNEL_FORMAT(7u, 1u, 0u)
-#define DAP_CPDP_FORMAT_5_1_2 DAP_CPDP_CHANNEL_FORMAT(5u, 1u, 2u)
-#define DAP_CPDP_FORMAT_5_1_4 DAP_CPDP_CHANNEL_FORMAT(5u, 1u, 4u)
-#define DAP_CPDP_FORMAT_7_1_2 DAP_CPDP_CHANNEL_FORMAT(7u, 1u, 2u)
-#define DAP_CPDP_FORMAT_7_1_4 DAP_CPDP_CHANNEL_FORMAT(7u, 1u, 4u)
-
-#define DAP_CPDP_PROCESS_OPTIMIZER_NB_BANDS_MAX (20u)
-#define DAP_CPDP_MAX_NUM_OUTPUT_CHANNELS (12)
-#define DAP_CPDP_AUDIO_OPTIMIZER_BANDS_MAX (20u)
-#define DAP_CPDP_GRAPHIC_EQUALIZER_BANDS_MAX (20u)
-#define DAP_CPDP_IEQ_MAX_BANDS_NUM (20u)
-#define VIRTUALIZER_7_1_2_CHANNEL_COUNT (10)
-#define DAP_CPDP_REGULATOR_TUNING_BANDS_MAX (20u)
-#define DAP_CPDP_VIRTUAL_BASS_SUBGAINS_NUM (3)
-#define MAX_DAWS_SUPPORTED_OUT_CHANNELS (8)
-#define MAX_DAWS_SUPPORTED_IN_CHANNELS (2)
-#define MAX_DAP_PRESET_PROFILES (15)
-#define MAX_NAME_SIZE (32)
-#define MAX_BRAND_SIZE (MAX_NAME_SIZE)
-
-/**
- * @brief Dolby Audio Processing Supported Sample Rates
- */
-typedef enum {
- DAP_SUPPORTED_SAMPLE_RATE_32_KHZ /**< 32KHz */
- , DAP_SUPPORTED_SAMPLE_RATE_44_1_KHZ /**< 44.1KHz */
- , DAP_SUPPORTED_SAMPLE_RATE_48_KHZ /**< 48KHz */
- , DAP_SUPPORTED_SAMPLE_RATE_MAX /**< Max Modes supported */
-} daws_dap_sample_rates;
-
-/**
- * @brief Dolby Audio Processing Supported IEQ Profiles
- */
-typedef enum {
- IEQ_PROFILE_OPEN /**< IEQ Profile Open */
- , IEQ_PROFILE_RICH /**< IEQ Profile Rich */
- , IEQ_PROFILE_FOCUSSED /**< IEQ Profile Focus*/
- , IEQ_PROFILE_CUSTOM /**< IEQ Profile Custom*/
- , IEQ_PROFILES_MAX /**< Max IEQ Profiles */
-} daws_dap_ieq_profiles;
-
-/**
- * @brief Dolby Audio Processing Regulator Info Structure
- */
-struct daws_dap_regulator {
- unsigned bands_num;
- int relaxation_amount;
- int overdrive;
- int timbre_preservation;
- int speaker_dist_enable;
- int thresh_low[DAP_CPDP_REGULATOR_TUNING_BANDS_MAX];
- int thresh_high[DAP_CPDP_REGULATOR_TUNING_BANDS_MAX];
- int isolated_bands[DAP_CPDP_REGULATOR_TUNING_BANDS_MAX];
- unsigned int freqs[DAP_CPDP_REGULATOR_TUNING_BANDS_MAX];
-};
-
-/**
- * @brief Dolby Audio Processing Virtual Bass Info Structure
- */
-struct virtual_bass {
- int mode;
- int overall_gain;
- int slope_gain;
- unsigned low_src_freq;
- unsigned high_src_freq;
- int subgains[DAP_CPDP_VIRTUAL_BASS_SUBGAINS_NUM];
- unsigned low_mix_freq;
- unsigned high_mix_freq;
-};
-
-/**
- * @brief Dolby Audio Processing Content Processing Info Structure
- */
-struct daws_profile_content_processing {
- int audio_optimizer_enable;
- unsigned int audio_optimizer_bands_num;
- int audio_optimizer_gains[DAP_CPDP_MAX_NUM_OUTPUT_CHANNELS][DAP_CPDP_AUDIO_OPTIMIZER_BANDS_MAX];
- unsigned int audio_optimizer_freq[DAP_CPDP_AUDIO_OPTIMIZER_BANDS_MAX];
-
- int be_enable;
- int bex_enable;
- int be_boost;
- int be_cutoff_freq;
- int be_width;
- int bex_cutoff_freq;
-
- int calibration_boost;
-
- int dialog_enhancer_enable;
- int dialog_enhancer_amount;
- int dialog_enhancer_ducking;
-
- int graphic_equalizer_enable;
- unsigned int graphic_equalizer_num;
- unsigned int graphic_equalizer_freqs[DAP_CPDP_GRAPHIC_EQUALIZER_BANDS_MAX];
- int graphic_equalizer_gains[DAP_CPDP_GRAPHIC_EQUALIZER_BANDS_MAX];
-
- int height_filter_mode;
-
- /* Intelligent Equalizer */
- int ieq_enable;
- unsigned int ieq_num;
- int ieq_amount;
- int ieq_bands_set;
- unsigned int ieq_freqs[DAP_CPDP_IEQ_MAX_BANDS_NUM];
- int ieq_gains[DAP_CPDP_IEQ_MAX_BANDS_NUM];
-
- /* Media Intelligence Steering Controls */
- int mi_dialog_enhancer_steering_enable;
- int mi_dv_leveler_steering_enable;
- int mi_ieq_steering_enable;
- int mi_surround_compressor_steering_enable;
- int mi_virtualizer_steering_enable;
-
- /* Gains */
- int postgain;
- int pregain;
- int systemgain;
-
- /* Process Optimizer Variables */
- int proc_optimizer_enable;
- int proc_optimizer_gain[VIRTUALIZER_7_1_2_CHANNEL_COUNT][DAP_CPDP_PROCESS_OPTIMIZER_NB_BANDS_MAX];
- unsigned int proc_optimizer_freq[DAP_CPDP_PROCESS_OPTIMIZER_NB_BANDS_MAX];
- unsigned int proc_optimizer_bands_num;
-
- int regulator_enable;
- struct daws_dap_regulator regulator;
-
- int surround_boost;
- int surround_decoder_enable;
-
- unsigned virtualizer_front_speaker_angle;
- unsigned virtualizer_height_speaker_angle;
- unsigned virtualizer_surround_speaker_angle ;
-
- struct virtual_bass vb;
-
- int volmax_boost;
- int volume_leveler_enable;
- int volume_leveler_amount;
- int volume_leveler_in_target;
- int volume_leveler_out_target;
- int volume_modeler_calibration;
- int volume_modeler_enable;
-
- int out_mode_pht_virt_enable;
- int out_mode_psurround_virt_enable;
-
- int spkr_virt_mode; /**< Speaker Virtualization Mode: DAWS uses DAP_CPDP_PROCESS_5_1_2_SPEAKER */
- int nb_output_channels; /**< Number of output channels for which Tuning XML file is configured for */
- int mix_matrix[MAX_DAWS_SUPPORTED_OUT_CHANNELS * MAX_DAWS_SUPPORTED_IN_CHANNELS]; /**< Pointer to the channel mix matrix */
-
- int partial_height_virtualizer_enable;
- int partial_surround_virtualizer_enable;
-};
-
-/**
- * @brief Dolby Audio Processing Profile Structures
- */
-struct daws_dap_profiles {
- struct daws_profile_content_processing cp; /**< Content Processing Struct */
-};
-
-/**
- * @brief Dolby Audio Processing Profile Structures
- */
-struct daws_dap_constants {
-
- int _dap_freq_bands[DAP_SUPPORTED_SAMPLE_RATE_MAX][DAP_CPDP_PROCESS_OPTIMIZER_NB_BANDS_MAX];
- int _ieq_profile[IEQ_PROFILES_MAX][DAP_CPDP_PROCESS_OPTIMIZER_NB_BANDS_MAX];
- int _negative_max[DAP_CPDP_PROCESS_OPTIMIZER_NB_BANDS_MAX];
- int _empty_freq_bands[DAP_CPDP_PROCESS_OPTIMIZER_NB_BANDS_MAX];
-};
-
-struct xml_version {
- int major;
- int minor;
- int update;
-};
-
-struct dtt_version {
- int major;
- int minor;
- int update;
-};
-
-/**
- * @brief Wireless Speaker processing modes
- */
-typedef enum {
- PRESET_DYNAMIC_MODE = 0/**< Processing optimized for dynamic content */
- , PRESET_MOVIE_MODE /**< Processing optimized for movie content */
- , PRESET_MUSIC_MODE /**< Processing optimized for music content */
- , PRESET_GAME_MODE /**< Processing optimized for game content */
- , PRESET_VOICE_MODE /**< Processing optimized for voice content */
- , PRESET_CUSTOM_MODE /**< Processing optimized for Custom E content */
- , PRESET_OFF_MODE /**< No optimization for processing content */
- , PRESET_CUSTOM_A_MODE /**< Processing optimized for Custom A content */
- , PRESET_CUSTOM_B_MODE /**< Processing optimized for Custom B content */
- , PRESET_CUSTOM_C_MODE /**< Processing optimized for Custom C content */
- , PRESET_CUSTOM_D_MODE /**< Processing optimized for Custom D content */
- , PRESET_MAX_MODES /**< Maximum Preset Modes Supported */
-} daws_preset_mode;
-
-typedef struct daws_dap_config_t {
- struct xml_version _xml_version;
- struct dtt_version _dtt_version;
- char speaker_name[MAX_NAME_SIZE];
- char speaker_brand[MAX_BRAND_SIZE];
- struct daws_dap_constants constants;
- struct daws_dap_profiles profiles[MAX_DAP_PRESET_PROFILES];
- daws_preset_mode use_profile;
- daws_preset_mode preset_idx;
-
- int spkr_virt_mode;
- int spkr_out_mode;
- int height_channels;
- int enable_sub;
- int daws_bass_management;
- int side_spkr_enabled;
-
- unsigned input_format;
- int disable_plugin;
-} daws_dap_config;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/aml_plugins/trumpet/dolby_daws_service/src/include/daws_xml_parser.h b/aml_plugins/trumpet/dolby_daws_service/src/include/daws_xml_parser.h
deleted file mode 100644
index 95ece06..0000000
--- a/aml_plugins/trumpet/dolby_daws_service/src/include/daws_xml_parser.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/******************************************************************************
- * This program is protected under international and U.S. copyright laws as
- * an unpublished work. This program is confidential and proprietary to the
- * copyright owners. Reproduction or disclosure, in whole or in part, or the
- * production of derivative works therefrom without the express permission of
- * the copyright owners is prohibited.
- *
- * Copyright (C) 2017 by Dolby Laboratories.
- * All rights reserved.
- ******************************************************************************/
-
-/**
- * @file "daws_xml_parser.h"
- *
- * @brief Interface for DAP Parameter Tuning parsing functionality
- *
- * @ingroup daws_solns_sic
- */
-
-#ifndef DAWS_XML_PARSER_H
-#define DAWS_XML_PARSER_H
-
-#define TOTAL_SPEAKER_TYPE_COUNT 4
-
-/* Context structure for local callback functions */
-#define MAXLINE 4096
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**
- * @brief XML Parser Virtual Bass Tags
- */
-struct virtual_bass_tags {
- int mode;
- int mix_freqs;
- int overall_gain;
- int subgains;
- int slope_gain;
- int src_freqs;
-};
-
-
-/**
- * @brief XML Parser Profile Tags
- */
-struct profiles_tags {
- int b_device_data;
- int b_audio_optimizer_enable;
- int b_audio_optimizer_bands;
- int b_be_enable;
- int b_be_boost;
- int b_be_cutoff_freq;
- int b_be_width;
- int b_bex_enable;
- int b_bex_cutoff_freq;
- int b_calibration_boost;
- int b_de_enable;
- int b_de_amount;
- int b_de_ducking;
- int b_geq_enable;
- int b_geq_bands;
- int b_ieq_enable;
- int ieq_amount;
- int ieq_bands_set;
- int height_filter_mode;
- int b_mi_de_se;
- int b_mi_dv_se;
- int b_mi_ieq_se;
- int b_mi_sc_se;
- int b_mi_virt_se;
- int postgain;
- int pregain;
- int systemgain;
- int b_proc_opt_enable;
- int proc_opt_bands;
- int b_regulator_enable;
- int regulator_overdrive;
- int regulator_relaxation;
- int b_regulator_sd_enable;
- int regulator_timbre_preservation;
- int b_regulator_tuning;
- int b_regulator_thresh_high;
- int b_regulator_thresh_low;
- int b_regulator_isolated_band;
- int surround_boost;
- int b_surround_decoder_enable;
- int virt_ft_spkr_angle;
- int virt_ht_spkr_angle;
- int virt_surround_spkr_angle;
- int volmax_boost;
- int volume_leveler_enable;
- int volume_leveler_amount;
- int volume_leveler_in_target;
- int volume_leveler_out_target;
- int volume_modeler_enable;
- int volume_modeler_calibration;
- int output_mode;
- int processing_mode;
- int nb_output_channels;
- int mix_matrix;
-
- int tuning;
- struct virtual_bass_tags vb;
-};
-
-
-/**
- * @brief XML Parser Configuration Tags
- */
-typedef struct config_xml_t {
- int b_setting;
- int b_endpoint;
- int b_profile;
- int b_xml_version;
- int b_dtt_version;
- int b_constant;
- struct profiles_tags profiles;
-} config_xml_tags;
-
-
-/**
- * @brief Read and parse .xml parameter tuning file
- * @return Initialized DAP Configuration Structure
- */
-
-//int
-//daws_dap_xml_parser
-// ( const char *filename /**< [in] Config XML file that needs to be parsed */
-// ,int b_dump_xml /**< [in] If a verbose XML parsing is desired. */
-// ,unsigned sample_rate /**< [in] DAP Supported Sample Rate */
-// ,void *p_dap_config /**< [out] Once the XML is parsed, the values are stored in this structure */
-// );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* DAWS_XML_PARSER_H */
-
diff --git a/aml_plugins/trumpet/dolby_daws_service/src/include/libevdev.h b/aml_plugins/trumpet/dolby_daws_service/src/include/libevdev.h
deleted file mode 100644
index 095336e..0000000
--- a/aml_plugins/trumpet/dolby_daws_service/src/include/libevdev.h
+++ /dev/null
@@ -1,2177 +0,0 @@
-/*
- * Copyright © 2013 Red Hat, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#ifndef LIBEVDEV_H
-#define LIBEVDEV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <linux/input.h>
-#include <stdarg.h>
-
-#define LIBEVDEV_ATTRIBUTE_PRINTF(_format, _args) __attribute__ ((format (printf, _format, _args)))
-
-/**
- * @mainpage
- *
- * **libevdev** is a library for handling evdev kernel devices. It abstracts
- * the \ref ioctls through type-safe interfaces and provides functions to change
- * the appearance of the device.
- *
- * Development of libevdev is discussed on
- * [input-tools@lists.freedesktop.org](http://lists.freedesktop.org/mailman/listinfo/input-tools)
- * Please submit patches, questions or general comments there.
- *
- * Handling events and SYN_DROPPED
- * ===============================
- *
- * libevdev provides an interface for handling events, including most notably
- * SYN_DROPPED events. SYN_DROPPED events are sent by the kernel when the
- * process does not read events fast enough and the kernel is forced to drop
- * some events. This causes the device to get out of sync with the process'
- * view of it. libevdev handles this by telling the caller that a SYN_DROPPED
- * has been received and that the state of the device is different to what is
- * to be expected. It then provides the delta between the previous state and
- * the actual state of the device as a set of events. See
- * libevdev_next_event() and @ref syn_dropped for more information on how
- * SYN_DROPPED is handled.
- *
- * Signal safety
- * =============
- *
- * libevdev is signal-safe for the majority of its operations, i.e. many of
- * its functions are safe to be called from within a signal handler.
- * Check the API documentation to make sure, unless explicitly stated a call
- * is <b>not</b> signal safe.
- *
- * Device handling
- * ===============
- *
- * A libevdev context is valid for a given file descriptor and its
- * duration. Closing the file descriptor will not destroy the libevdev device
- * but libevdev will not be able to read further events.
- *
- * libevdev does not attempt duplicate detection. Initializing two libevdev
- * devices for the same fd is valid and behaves the same as for two different
- * devices.
- *
- * libevdev does not handle the file descriptors directly, it merely uses
- * them. The caller is responsible for opening the file descriptors, setting
- * them to O_NONBLOCK and handling permissions. A caller should drain any
- * events pending on the file descriptor before passing it to libevdev.
- *
- * Where does libevdev sit?
- * ========================
- *
- * libevdev is essentially a `read(2)` on steroids for `/dev/input/eventX`
- * devices. It sits below the process that handles input events, in between
- * the kernel and that process. In the simplest case, e.g. an evtest-like tool
- * the stack would look like this:
- *
- * kernel → libevdev → evtest
- *
- * For X.Org input modules, the stack would look like this:
- *
- * kernel → libevdev → xf86-input-evdev → X server → X client
- *
- * For Weston/Wayland, the stack would look like this:
- *
- * kernel → libevdev → Weston → Wayland client
- *
- * libevdev does **not** have knowledge of X clients or Wayland clients, it is
- * too low in the stack.
- *
- * Example
- * =======
- * Below is a simple example that shows how libevdev could be used. This example
- * opens a device, checks for relative axes and a left mouse button and if it
- * finds them monitors the device to print the event.
- *
- * @code
- * struct libevdev *dev = NULL;
- * int fd;
- * int rc = 1;
- *
- * fd = open("/dev/input/event0", O_RDONLY|O_NONBLOCK);
- * rc = libevdev_new_from_fd(fd, &dev);
- * if (rc < 0) {
- * fprintf(stderr, "Failed to init libevdev (%s)\n", strerror(-rc));
- * exit(1);
- * }
- * printf("Input device name: \"%s\"\n", libevdev_get_name(dev));
- * printf("Input device ID: bus %#x vendor %#x product %#x\n",
- * libevdev_get_id_bustype(dev),
- * libevdev_get_id_vendor(dev),
- * libevdev_get_id_product(dev));
- * if (!libevdev_has_event_type(dev, EV_REL) ||
- * !libevdev_has_event_code(dev, EV_KEY, BTN_LEFT)) {
- * printf("This device does not look like a mouse\n");
- * exit(1);
- * }
- *
- * do {
- * struct input_event ev;
- * rc = libevdev_next_event(dev, LIBEVDEV_READ_FLAG_NORMAL, &ev);
- * if (rc == 0)
- * printf("Event: %s %s %d\n",
- * libevdev_get_event_type_name(ev.type),
- * libevdev_get_event_code_name(ev.type, ev.code),
- * ev.value);
- * } while (rc == 1 || rc == 0 || rc == -EAGAIN);
- * @endcode
- *
- * A more complete example is available with the libevdev-events tool here:
- * http://cgit.freedesktop.org/libevdev/tree/tools/libevdev-events.c
- *
- * Backwards compatibility with older kernel
- * =========================================
- * libevdev attempts to build and run correctly on a number of kernel versions.
- * If features required are not available, libevdev attempts to work around them
- * in the most reasonable way. For more details see \ref backwardscompatibility.
- *
- * License information
- * ===================
- * libevdev is licensed under the
- * [X11 license](http://cgit.freedesktop.org/libevdev/tree/COPYING).
- *
- * Reporting bugs
- * ==============
- * Please report bugs in the freedesktop.org bugzilla under the libevdev product:
- * https://bugs.freedesktop.org/enter_bug.cgi?product=libevdev
- */
-
-/**
- * @page syn_dropped SYN_DROPPED handling
- *
- * This page describes how libevdev handles SYN_DROPPED events.
- *
- * Receiving SYN_DROPPED events
- * ============================
- *
- * The kernel sends evdev events separated by an event of type EV_SYN and
- * code SYN_REPORT. Such an event marks the end of a frame of hardware
- * events. The number of events between SYN_REPORT events is arbitrary and
- * depends on the hardware. An example event sequence may look like this:
- * @code
- * EV_ABS ABS_X 9
- * EV_ABS ABS_Y 8
- * EV_SYN SYN_REPORT 0
- * ------------------------
- * EV_ABS ABS_X 10
- * EV_ABS ABS_Y 10
- * EV_KEY BTN_TOUCH 1
- * EV_SYN SYN_REPORT 0
- * ------------------------
- * EV_ABS ABS_X 11
- * EV_SYN SYN_REPORT 0
- * @endcode
- *
- * Events are handed to the client buffer as they appear, the kernel adjusts
- * the buffer size to handle at least one full event. In the normal case,
- * the client reads the event and the kernel can place the next event in the
- * buffer. If the client is not fast enough, the kernel places an event of
- * type EV_SYN and code SYN_DROPPED into the buffer, effectively notifying
- * the client that some events were lost. The above example event sequence
- * may look like this (note the missing/repeated events):
- * @code
- * EV_ABS ABS_X 9
- * EV_ABS ABS_Y 8
- * EV_SYN SYN_REPORT 0
- * ------------------------
- * EV_ABS ABS_X 10
- * EV_ABS ABS_Y 10
- * EV_SYN SYN_DROPPED 0
- * EV_ABS ABS_Y 15
- * EV_SYN SYN_REPORT 0
- * ------------------------
- * EV_ABS ABS_X 11
- * EV_KEY BTN_TOUCH 0
- * EV_SYN SYN_REPORT 0
- * @endcode
- *
- * A SYN_DROPPED event may be recieved at any time in the event sequence.
- * When a SYN_DROPPED event is received, the client must:
- * * discard all events since the last SYN_REPORT
- * * discard all events until including the next SYN_REPORT
- * These event are part of incomplete event frames.
- *
- * Synchronizing the state of the device
- * =====================================
- *
- * The handling of the device after a SYN_DROPPED depends on the available
- * event codes. For all event codes of type EV_REL, no handling is
- * necessary, there is no state attached. For all event codes of type
- * EV_KEY, EV_SW, EV_LED and EV_SND, the matching @ref ioctls retrieve the
- * current state. The caller must then compare the last-known state to the
- * retrieved state and handle the deltas accordingly.
- * libevdev simplifies this approach: if the state of the device has
- * changed, libevdev generates an event for each code with the new value and
- * passes it to the caller during libevdev_next_event() if
- * @ref LIBEVDEV_READ_FLAG_SYNC is set.
- *
- * For events of type EV_ABS and an event code less than ABS_MT_SLOT, the
- * handling of state changes is as described above. For events between
- * ABS_MT_SLOT and ABS_MAX, the event handling differs.
- * Slots are the vehicles to transport information for multiple simultaneous
- * touchpoints on a device. Slots are re-used once a touchpoint has ended.
- * The kernel sends an ABS_MT_SLOT event whenever the current slot
- * changes; any event in the above axis range applies only to the currently
- * active slot.
- * Thus, an event sequence from a slot-capable device may look like this:
- * @code
- * EV_ABS ABS_MT_POSITION_Y 10
- * EV_ABS ABS_MT_SLOT 1
- * EV_ABS ABS_MT_POSITION_X 100
- * EV_ABS ABS_MT_POSITION_Y 80
- * EV_SYN SYN_REPORT 0
- * @endcode
- * Note the lack of ABS_MT_SLOT: the first ABS_MT_POSITION_Y applies to
- * a slot opened previously, and is the only axis that changed for that
- * slot. The touchpoint in slot 1 now has position 100/80.
- * The kernel does not provide events if a value does not change, and does
- * not send ABS_MT_SLOT events if the slot does not change, or none of the
- * values within a slot changes. A client must thus keep the state for each
- * slot.
- *
- * If a SYN_DROPPED is received, the client must sync all slots
- * individually and update its internal state. libevdev simplifies this by
- * generating multiple events:
- * * for each slot on the device, libevdev generates an
- * ABS_MT_SLOT event with the value set to the slot number
- * * for each event code between ABS_MT_SLOT + 1 and ABS_MAX that changed
- * state for this slot, libevdev generates an event for the new state
- * * libevdev sends a final ABS_MT_SLOT event for the current slot as
- * seen by the kernel
- * * libevdev terminates this sequence with an EV_SYN SYN_REPORT event
- *
- * An example event sequence for such a sync may look like this:
- * @code
- * EV_ABS ABS_MT_SLOT 0
- * EV_ABS ABS_MT_POSITION_Y 10
- * EV_ABS ABS_MT_SLOT 1
- * EV_ABS ABS_MT_POSITION_X 100
- * EV_ABS ABS_MT_POSITION_Y 80
- * EV_ABS ABS_MT_SLOT 2
- * EV_ABS ABS_MT_POSITION_Y 8
- * EV_ABS ABS_MT_PRESSURE 12
- * EV_ABS ABS_MT_SLOT 1
- * EV_SYN SYN_REPORT 0
- * @endcode
- * Note the terminating ABS_MT_SLOT event, this indicates that the kernel
- * currently has slot 1 active.
- *
- * Synchronizing ABS_MT_TRACKING_ID
- * ================================
- *
- * The event code ABS_MT_TRACKING_ID is used to denote the start and end of
- * a touch point within a slot. An ABS_MT_TRACKING_ID of zero or greater
- * denotes the start of a touchpoint, an ABS_MT_TRACKING_ID of -1 denotes
- * the end of a touchpoint within this slot. During SYN_DROPPED, a touch
- * point may have ended and re-started within a slot - a client must check
- * the ABS_MT_TRACKING_ID. libevdev simplifies this by emulating extra
- * events if the ABS_MT_TRACKING_ID has changed:
- * * if the ABS_MT_TRACKING_ID was valid and is -1, libevdev enqueues an
- * ABS_MT_TRACKING_ID event with value -1.
- * * if the ABS_MT_TRACKING_ID was -1 and is now a valid ID, libevdev
- * enqueues an ABS_MT_TRACKING_ID event with the current value.
- * * if the ABS_MT_TRACKING_ID was a valid ID and is now a different valid
- * ID, libevev enqueues an ABS_MT_TRACKING_ID event with value -1 and
- * another ABS_MT_TRACKING_ID event with the new value.
- *
- * An example event sequence for such a sync may look like this:
- * @code
- * EV_ABS ABS_MT_SLOT 0
- * EV_ABS ABS_MT_TRACKING_ID -1
- * EV_ABS ABS_MT_SLOT 2
- * EV_ABS ABS_MT_TRACKING_ID -1
- * EV_SYN SYN_REPORT 0
- * ------------------------
- * EV_ABS ABS_MT_SLOT 1
- * EV_ABS ABS_MT_POSITION_X 100
- * EV_ABS ABS_MT_POSITION_Y 80
- * EV_ABS ABS_MT_SLOT 2
- * EV_ABS ABS_MT_TRACKING_ID 45
- * EV_ABS ABS_MT_POSITION_Y 8
- * EV_ABS ABS_MT_PRESSURE 12
- * EV_ABS ABS_MT_SLOT 1
- * EV_SYN SYN_REPORT 0
- * @endcode
- * Note how the touchpoint in slot 0 was terminated, the touchpoint in slot
- * 2 was terminated and then started with a new ABS_MT_TRACKING_ID. The touchpoint
- * in slot 1 maintained the same ABS_MT_TRACKING_ID and only updated the
- * coordinates. Slot 1 is the currently active slot.
- *
- * In the case of a SYN_DROPPED event, a touch point may be invisible to a
- * client if it started after SYN_DROPPED and finished before the client
- * handles events again. The below example shows an example event sequence
- * and what libevdev sees in the case of a SYN_DROPPED event:
- * @code
- *
- * kernel | userspace
- * |
- * EV_ABS ABS_MT_SLOT 0 | EV_ABS ABS_MT_SLOT 0
- * EV_ABS ABS_MT_TRACKING_ID -1 | EV_ABS ABS_MT_TRACKING_ID -1
- * EV_SYN SYN_REPORT 0 | EV_SYN SYN_REPORT 0
- * ------------------------ | ------------------------
- * EV_ABS ABS_MT_TRACKING_ID 30 |
- * EV_ABS ABS_MT_POSITION_X 100 |
- * EV_ABS ABS_MT_POSITION_Y 80 |
- * EV_SYN SYN_REPORT 0 | SYN_DROPPED
- * ------------------------ |
- * EV_ABS ABS_MT_TRACKING_ID -1 |
- * EV_SYN SYN_REPORT 0 |
- * ------------------------ | ------------------------
- * EV_ABS ABS_MT_SLOT 1 | EV_ABS ABS_MT_SLOT 1
- * EV_ABS ABS_MT_POSITION_X 90 | EV_ABS ABS_MT_POSITION_X 90
- * EV_ABS ABS_MT_POSITION_Y 10 | EV_ABS ABS_MT_POSITION_Y 10
- * EV_SYN SYN_REPORT 0 | EV_SYN SYN_REPORT 0
- * @endcode
- * If such an event sequence occurs, libevdev will send all updated axes
- * during the sync process. Axis events may thus be generated for devices
- * without a currently valid ABS_MT_TRACKING_ID. Specifically for the above
- * example, the client would receive the following event sequence:
- * @code
- * EV_ABS ABS_MT_SLOT 0 ← LIBEVDEV_READ_FLAG_NORMAL
- * EV_ABS ABS_MT_TRACKING_ID -1
- * EV_SYN SYN_REPORT 0
- * ------------------------
- * EV_SYN SYN_DROPPED 0 → LIBEVDEV_READ_STATUS_SYNC
- * ------------------------
- * EV_ABS ABS_MT_POSITION_X 100 ← LIBEVDEV_READ_FLAG_SYNC
- * EV_ABS ABS_MT_POSITION_Y 80
- * EV_SYN SYN_REPORT 0
- * ----------------------------- → -EGAIN
- * EV_ABS ABS_MT_SLOT 1 ← LIBEVDEV_READ_FLAG_NORMAL
- * EV_ABS ABS_MT_POSITION_X 90
- * EV_ABS ABS_MT_POSITION_Y 10
- * EV_SYN SYN_REPORT 0
- * -------------------
- * @endcode
- * The axis events do not reflect the position of a current touch point, a
- * client must take care not to generate a new touch point based on those
- * updates.
- *
- * Discarding events before synchronizing
- * =====================================
- *
- * The kernel implements the client buffer as a ring buffer. SYN_DROPPED
- * events are handled when the buffer is full and a new event is received
- * from a device. All existing events are discarded, a SYN_DROPPED is added
- * to the buffer followed by the actual device event. Further events will be
- * appended to the buffer until it is either read by the client, or filled
- * again, at which point the sequence repeats.
- *
- * When the client reads the buffer, the buffer will thus always consist of
- * exactly one SYN_DROPPED event followed by an unspecified number of real
- * events. The data the ioctls return is the current state of the device,
- * i.e. the state after all these events have been processed. For example,
- * assume the buffer contains the following sequence:
- *
- * @code
- * EV_SYN SYN_DROPPED
- * EV_ABS ABS_X 1
- * EV_SYN SYN_REPORT 0
- * EV_ABS ABS_X 2
- * EV_SYN SYN_REPORT 0
- * EV_ABS ABS_X 3
- * EV_SYN SYN_REPORT 0
- * EV_ABS ABS_X 4
- * EV_SYN SYN_REPORT 0
- * EV_ABS ABS_X 5
- * EV_SYN SYN_REPORT 0
- * EV_ABS ABS_X 6
- * EV_SYN SYN_REPORT 0
- * @endcode
- * An ioctl at any time in this sequence will return a value of 6 for ABS_X.
- *
- * libevdev discards all events after a SYN_DROPPED to ensure the events
- * during @ref LIBEVDEV_READ_FLAG_SYNC represent the last known state of the
- * device. This loses some granularity of the events especially as the time
- * between the SYN_DROPPED and the sync process increases. It does however
- * avoid spurious cursor movements. In the above example, the event sequence
- * by libevdev is:
- * @code
- * EV_SYN SYN_DROPPED
- * EV_ABS ABS_X 6
- * EV_SYN SYN_REPORT 0
- * @endcode
- */
-
-/**
- * @page backwardscompatibility Compatibility and Behavior across kernel versions
- *
- * This page describes libevdev's behavior when the build-time kernel and the
- * run-time kernel differ in their feature set.
- *
- * With the exception of event names, libevdev defines features that may be
- * missing on older kernels and building on such kernels will not disable
- * features. Running libevdev on a kernel that is missing some feature will
- * change libevdev's behavior. In most cases, the new behavior should be
- * obvious, but it is spelled out below in detail.
- *
- * Minimum requirements
- * ====================
- * libevdev requires a 2.6.36 kernel as minimum. Specifically, it requires
- * kernel-support for ABS_MT_SLOT.
- *
- * Event and input property names
- * ==============================
- * Event names and input property names are defined at build-time by the
- * linux/input.h shipped with libevdev.
- * The list of event names is compiled at build-time, any events not defined
- * at build time will not resolve. Specifically,
- * libevdev_event_code_get_name() for an undefined type or code will
- * always return NULL. Likewise, libevdev_property_get_name() will return NULL
- * for properties undefined at build-time.
- *
- * Input properties
- * ================
- * If the kernel does not support input properties, specifically the
- * EVIOCGPROPS ioctl, libevdev does not expose input properties to the caller.
- * Specifically, libevdev_has_property() will always return 0 unless the
- * property has been manually set with libevdev_enable_property().
- *
- * This also applies to the libevdev-uinput code. If uinput does not honor
- * UI_SET_PROPBIT, libevdev will continue without setting the properties on
- * the device.
- *
- * MT slot behavior
- * =================
- * If the kernel does not support the EVIOCGMTSLOTS ioctl, libevdev
- * assumes all values in all slots are 0 and continues without an error.
- *
- * SYN_DROPPED behavior
- * ====================
- * A kernel without SYN_DROPPED won't send such an event. libevdev_next_event()
- * will never require the switch to sync mode.
- */
-
-/**
- * @page ioctls evdev ioctls
- *
- * This page lists the status of the evdev-specific ioctls in libevdev.
- *
- * <dl>
- * <dt>EVIOCGVERSION:</dt>
- * <dd>supported, see libevdev_get_driver_version()</dd>
- * <dt>EVIOCGID:</dt>
- * <dd>supported, see libevdev_get_id_product(), libevdev_get_id_vendor(),
- * libevdev_get_id_bustype(), libevdev_get_id_version()</dd>
- * <dt>EVIOCGREP:</dt>
- * <dd>supported, see libevdev_get_event_value())</dd>
- * <dt>EVIOCSREP:</dt>
- * <dd>supported, see libevdev_enable_event_code()</dd>
- * <dt>EVIOCGKEYCODE:</dt>
- * <dd>currently not supported</dd>
- * <dt>EVIOCGKEYCODE:</dt>
- * <dd>currently not supported</dd>
- * <dt>EVIOCSKEYCODE:</dt>
- * <dd>currently not supported</dd>
- * <dt>EVIOCSKEYCODE:</dt>
- * <dd>currently not supported</dd>
- * <dt>EVIOCGNAME:</dt>
- * <dd>supported, see libevdev_get_name()</dd>
- * <dt>EVIOCGPHYS:</dt>
- * <dd>supported, see libevdev_get_phys()</dd>
- * <dt>EVIOCGUNIQ:</dt>
- * <dd>supported, see libevdev_get_uniq()</dd>
- * <dt>EVIOCGPROP:</dt>
- * <dd>supported, see libevdev_has_property()</dd>
- * <dt>EVIOCGMTSLOTS:</dt>
- * <dd>supported, see libevdev_get_num_slots(), libevdev_get_slot_value()</dd>
- * <dt>EVIOCGKEY:</dt>
- * <dd>supported, see libevdev_has_event_code(), libevdev_get_event_value()</dd>
- * <dt>EVIOCGLED:</dt>
- * <dd>supported, see libevdev_has_event_code(), libevdev_get_event_value()</dd>
- * <dt>EVIOCGSND:</dt>
- * <dd>currently not supported</dd>
- * <dt>EVIOCGSW:</dt>
- * <dd>supported, see libevdev_has_event_code(), libevdev_get_event_value()</dd>
- * <dt>EVIOCGBIT:</dt>
- * <dd>supported, see libevdev_has_event_code(), libevdev_get_event_value()</dd>
- * <dt>EVIOCGABS:</dt>
- * <dd>supported, see libevdev_has_event_code(), libevdev_get_event_value(),
- * libevdev_get_abs_info()</dd>
- * <dt>EVIOCSABS:</dt>
- * <dd>supported, see libevdev_kernel_set_abs_info()</dd>
- * <dt>EVIOCSFF:</dt>
- * <dd>currently not supported</dd>
- * <dt>EVIOCRMFF:</dt>
- * <dd>currently not supported</dd>
- * <dt>EVIOCGEFFECTS:</dt>
- * <dd>currently not supported</dd>
- * <dt>EVIOCGRAB:</dt>
- * <dd>supported, see libevdev_grab()</dd>
- * <dt>EVIOCSCLOCKID:</dt>
- * <dd>supported, see libevdev_set_clock_id()</dd>
- * <dt>EVIOCREVOKE:</dt>
- * <dd>currently not supported, see
- * http://lists.freedesktop.org/archives/input-tools/2014-January/000688.html</dd>
- * </dl>
- *
- */
-
-/**
- * @page kernel_header Kernel header
- *
- * libevdev provides its own copy of the Linux kernel header file and
- * compiles against the definitions define here. Event type and event code
- * names, etc. are taken from the file below:
- * @include linux/input.h
- */
-
-/**
- * @page static_linking Statically linking libevdev
- *
- * Statically linking libevdev.a is not recommended. Symbol visibility is
- * difficult to control in a static library, so extra care must be taken to
- * only use symbols that are explicitly exported. libevdev's API stability
- * guarantee only applies to those symbols.
- *
- * If you do link libevdev statically, note that in addition to the exported
- * symbols, libevdev reserves the <b>_libevdev_*</b> namespace. Do not use
- * or create symbols with that prefix, they are subject to change at any
- * time.
- */
-
-/**
- * @page testing libevdev-internal test suite
- *
- * libevdev's internal test suite uses the
- * [Check unit testing framework](http://check.sourceforge.net/). Tests are
- * divided into test suites and test cases. Most tests create a uinput device,
- * so you'll need to run as root, and your kernel must have
- * CONFIG_INPUT_UINPUT enabled.
- *
- * To run a specific suite only:
- *
- * export CK_RUN_SUITE="suite name"
- *
- * To run a specific test case only:
- *
- * export CK_RUN_TEST="test case name"
- *
- * To get a list of all suites or tests:
- *
- * git grep "suite_create"
- * git grep "tcase_create"
- *
- * By default, Check forks, making debugging harder. The test suite tries to detect
- * if it is running inside gdb and disable forking. If that doesn't work for
- * some reason, run gdb as below to avoid forking.
- *
- * sudo CK_FORK=no CK_RUN_TEST="test case name" gdb ./test/test-libevdev
- *
- * A special target `make gcov-report.txt` exists that runs gcov and leaves a
- * `libevdev.c.gcov` file. Check that for test coverage.
- *
- * `make check` is hooked up to run the test and gcov (again, needs root).
- *
- * The test suite creates a lot of devices, very quickly. Add the following
- * xorg.conf.d snippet to avoid the devices being added as X devices (at the
- * time of writing, mutter can't handle these devices and exits after getting
- * a BadDevice error).
- *
- * $ cat /etc/X11/xorg.conf.d/99-ignore-libevdev-devices.conf
- * Section "InputClass"
- * Identifier "Ignore libevdev test devices"
- * MatchProduct "libevdev test device"
- * Option "Ignore" "on"
- * EndSection
- *
- */
-
-/**
- * @defgroup init Initialization and setup
- *
- * Initialization, initial setup and file descriptor handling.
- * These functions are the main entry points for users of libevdev, usually a
- * caller will use this series of calls:
- *
- * @code
- * struct libevdev *dev;
- * int err;
- *
- * dev = libevdev_new();
- * if (!dev)
- * return ENOMEM;
- *
- * err = libevdev_set_fd(dev, fd);
- * if (err < 0) {
- * printf("Failed (errno %d): %s\n", -err, strerror(-err));
- *
- * libevdev_free(dev);
- * @endcode
- *
- * libevdev_set_fd() is the central call and initializes the internal structs
- * for the device at the given fd. libevdev functions will fail if called
- * before libevdev_set_fd() unless documented otherwise.
- */
-
-/**
- * @defgroup logging Library logging facilities
- *
- * libevdev provides two methods of logging library-internal messages. The
- * old method is to provide a global log handler in
- * libevdev_set_log_function(). The new method is to provide a per-context
- * log handler in libevdev_set_device_log_function(). Developers are encouraged
- * to use the per-context logging facilities over the global log handler as
- * it provides access to the libevdev instance that caused a message, and is
- * more flexible when libevdev is used from within a shared library.
- *
- * If a caller sets both the global log handler and a per-context log
- * handler, each device with a per-context log handler will only invoke that
- * log handler.
- *
- * @note To set a context-specific log handler, a context is needed.
- * Thus developers are discouraged from using libevdev_new_from_fd() as
- * important messages from the device initialization process may get lost.
- *
- * @note A context-specific handler cannot be used for libevdev's uinput
- * devices. @ref uinput must use the global log handler.
- */
-
-/**
- * @defgroup bits Querying device capabilities
- *
- * Abstraction functions to handle device capabilities, specifically
- * device properties such as the name of the device and the bits
- * representing the events supported by this device.
- *
- * The logical state returned may lag behind the physical state of the device.
- * libevdev queries the device state on libevdev_set_fd() and then relies on
- * the caller to parse events through libevdev_next_event(). If a caller does not
- * use libevdev_next_event(), libevdev will not update the internal state of the
- * device and thus returns outdated values.
- */
-
-/**
- * @defgroup mt Multi-touch related functions
- * Functions for querying multi-touch-related capabilities. MT devices
- * following the kernel protocol B (using ABS_MT_SLOT) provide multiple touch
- * points through so-called slots on the same axis. The slots are enumerated,
- * a client reading from the device will first get an ABS_MT_SLOT event, then
- * the values of axes changed in this slot. Multiple slots may be provided in
- * before an EV_SYN event.
- *
- * As with @ref bits, the logical state of the device as seen by the library
- * depends on the caller using libevdev_next_event().
- *
- * The Linux kernel requires all axes on a device to have a semantic
- * meaning, matching the axis names in linux/input.h. Some devices merely
- * export a number of axes beyond the available axis list. For those
- * devices, the multitouch information is invalid. Specifically, if a device
- * provides the ABS_MT_SLOT axis AND also the (ABS_MT_SLOT - 1) axis, the
- * device is not treated as multitouch device. No slot information is
- * available and the ABS_MT axis range for these devices is treated as all
- * other EV_ABS axes.
- *
- * Note that because of limitations in the kernel API, such fake multitouch
- * devices can not be reliably synced after a SYN_DROPPED event. libevdev
- * ignores all ABS_MT axis values during the sync process and instead
- * relies on the device to send the current axis value with the first event
- * after SYN_DROPPED.
- */
-
-/**
- * @defgroup kernel Modifying the appearance or capabilities of the device
- *
- * Modifying the set of events reported by this device. By default, the
- * libevdev device mirrors the kernel device, enabling only those bits
- * exported by the kernel. This set of functions enable or disable bits as
- * seen from the caller.
- *
- * Enabling an event type or code does not affect event reporting - a
- * software-enabled event will not be generated by the physical hardware.
- * Disabling an event will prevent libevdev from routing such events to the
- * caller. Enabling and disabling event types and codes is at the library
- * level and thus only affects the caller.
- *
- * If an event type or code is enabled at kernel-level, future users of this
- * device will see this event enabled. Currently there is no option of
- * disabling an event type or code at kernel-level.
- */
-
-/**
- * @defgroup misc Miscellaneous helper functions
- *
- * Functions for printing or querying event ranges. The list of names is
- * compiled into libevdev and is independent of the run-time kernel.
- * Likewise, the max for each event type is compiled in and does not check
- * the kernel at run-time.
- */
-
-/**
- * @defgroup events Event handling
- *
- * Functions to handle events and fetch the current state of the event.
- * libevdev updates its internal state as the event is processed and forwarded
- * to the caller. Thus, the libevdev state of the device should always be identical
- * to the caller's state. It may however lag behind the actual state of the device.
- */
-
-/**
- * @ingroup init
- *
- * Opaque struct representing an evdev device.
- */
-struct libevdev;
-
-/**
- * @ingroup events
- */
-enum libevdev_read_flag {
- LIBEVDEV_READ_FLAG_SYNC = 1, /**< Process data in sync mode */
- LIBEVDEV_READ_FLAG_NORMAL = 2, /**< Process data in normal mode */
- LIBEVDEV_READ_FLAG_FORCE_SYNC = 4, /**< Pretend the next event is a SYN_DROPPED and
- require the caller to sync */
- LIBEVDEV_READ_FLAG_BLOCKING = 8 /**< The fd is not in O_NONBLOCK and a read may block */
-};
-
-/**
- * @ingroup init
- *
- * Initialize a new libevdev device. This function only allocates the
- * required memory and initializes the struct to sane default values.
- * To actually hook up the device to a kernel device, use
- * libevdev_set_fd().
- *
- * Memory allocated through libevdev_new() must be released by the
- * caller with libevdev_free().
- *
- * @see libevdev_set_fd
- * @see libevdev_free
- */
-struct libevdev* libevdev_new(void);
-
-/**
- * @ingroup init
- *
- * Initialize a new libevdev device from the given fd.
- *
- * This is a shortcut for
- *
- * @code
- * int err;
- * struct libevdev *dev = libevdev_new();
- * err = libevdev_set_fd(dev, fd);
- * @endcode
- *
- * @param fd A file descriptor to the device in O_RDWR or O_RDONLY mode.
- * @param[out] dev The newly initialized evdev device.
- *
- * @return On success, 0 is returned and dev is set to the newly
- * allocated struct. On failure, a negative errno is returned and the value
- * of dev is undefined.
- *
- * @see libevdev_free
- */
-int libevdev_new_from_fd(int fd, struct libevdev **dev);
-
-/**
- * @ingroup init
- *
- * Clean up and free the libevdev struct. After completion, the <code>struct
- * libevdev</code> is invalid and must not be used.
- *
- * Note that calling libevdev_free() does not close the file descriptor
- * currently asssociated with this instance.
- *
- * @param dev The evdev device
- *
- * @note This function may be called before libevdev_set_fd().
- */
-void libevdev_free(struct libevdev *dev);
-
-/**
- * @ingroup logging
- */
-enum libevdev_log_priority {
- LIBEVDEV_LOG_ERROR = 10, /**< critical errors and application bugs */
- LIBEVDEV_LOG_INFO = 20, /**< informational messages */
- LIBEVDEV_LOG_DEBUG = 30 /**< debug information */
-};
-
-/**
- * @ingroup logging
- *
- * Logging function called by library-internal logging.
- * This function is expected to treat its input like printf would.
- *
- * @param priority Log priority of this message
- * @param data User-supplied data pointer (see libevdev_set_log_function())
- * @param file libevdev source code file generating this message
- * @param line libevdev source code line generating this message
- * @param func libevdev source code function generating this message
- * @param format printf-style format string
- * @param args List of arguments
- *
- * @see libevdev_set_log_function
- */
-typedef void (*libevdev_log_func_t)(enum libevdev_log_priority priority,
- void *data,
- const char *file, int line,
- const char *func,
- const char *format, va_list args)
-LIBEVDEV_ATTRIBUTE_PRINTF(6, 0);
-
-/**
- * @ingroup logging
- *
- * Set a printf-style logging handler for library-internal logging. The default
- * logging function is to stdout.
- *
- * @note The global log handler is only called if no context-specific log
- * handler has been set with libevdev_set_device_log_function().
- *
- * @param logfunc The logging function for this device. If NULL, the current
- * logging function is unset and no logging is performed.
- * @param data User-specific data passed to the log handler.
- *
- * @note This function may be called before libevdev_set_fd().
- *
- * @deprecated Use per-context logging instead, see
- * libevdev_set_device_log_function().
- */
-void libevdev_set_log_function(libevdev_log_func_t logfunc, void *data);
-
-/**
- * @ingroup logging
- *
- * Define the minimum level to be printed to the log handler.
- * Messages higher than this level are printed, others are discarded. This
- * is a global setting and applies to any future logging messages.
- *
- * @param priority Minimum priority to be printed to the log.
- *
- * @deprecated Use per-context logging instead, see
- * libevdev_set_device_log_function().
- */
-void libevdev_set_log_priority(enum libevdev_log_priority priority);
-
-/**
- * @ingroup logging
- *
- * Return the current log priority level. Messages higher than this level
- * are printed, others are discarded. This is a global setting.
- *
- * @return the current log level
- *
- * @deprecated Use per-context logging instead, see
- * libevdev_set_device_log_function().
- */
-enum libevdev_log_priority libevdev_get_log_priority(void);
-
-/**
- * @ingroup logging
- *
- * Logging function called by library-internal logging for a specific
- * libevdev context. This function is expected to treat its input like
- * printf would.
- *
- * @param dev The evdev device
- * @param priority Log priority of this message
- * @param data User-supplied data pointer (see libevdev_set_log_function())
- * @param file libevdev source code file generating this message
- * @param line libevdev source code line generating this message
- * @param func libevdev source code function generating this message
- * @param format printf-style format string
- * @param args List of arguments
- *
- * @see libevdev_set_log_function
- * @since 1.3
- */
-typedef void (*libevdev_device_log_func_t)(const struct libevdev *dev,
- enum libevdev_log_priority priority,
- void *data,
- const char *file, int line,
- const char *func,
- const char *format, va_list args)
-LIBEVDEV_ATTRIBUTE_PRINTF(7, 0);
-
-/**
- * @ingroup logging
- *
- * Set a printf-style logging handler for library-internal logging for this
- * device context. The default logging function is NULL, i.e. the global log
- * handler is invoked. If a context-specific log handler is set, the global
- * log handler is not invoked for this device.
- *
- * @note This log function applies for this device context only, even if
- * another context exists for the same fd.
- *
- * @param dev The evdev device
- * @param logfunc The logging function for this device. If NULL, the current
- * logging function is unset and logging falls back to the global log
- * handler, if any.
- * @param priority Minimum priority to be printed to the log.
- * @param data User-specific data passed to the log handler.
- *
- * @note This function may be called before libevdev_set_fd().
- * @since 1.3
- */
-void libevdev_set_device_log_function(struct libevdev *dev,
- libevdev_device_log_func_t logfunc,
- enum libevdev_log_priority priority,
- void *data);
-
-/**
- * @ingroup init
- */
-enum libevdev_grab_mode {
- LIBEVDEV_GRAB = 3, /**< Grab the device if not currently grabbed */
- LIBEVDEV_UNGRAB = 4 /**< Ungrab the device if currently grabbed */
-};
-
-/**
- * @ingroup init
- *
- * Grab or ungrab the device through a kernel EVIOCGRAB. This prevents other
- * clients (including kernel-internal ones such as rfkill) from receiving
- * events from this device.
- *
- * This is generally a bad idea. Don't do this.
- *
- * Grabbing an already grabbed device, or ungrabbing an ungrabbed device is
- * a noop and always succeeds.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param grab If true, grab the device. Otherwise ungrab the device.
- *
- * @return 0 if the device was successfully grabbed or ungrabbed, or a
- * negative errno in case of failure.
- */
-int libevdev_grab(struct libevdev *dev, enum libevdev_grab_mode grab);
-
-/**
- * @ingroup init
- *
- * Set the fd for this struct and initialize internal data.
- * The fd must be in O_RDONLY or O_RDWR mode.
- *
- * This function may only be called once per device. If the device changed and
- * you need to re-read a device, use libevdev_free() and libevdev_new(). If
- * you need to change the fd after closing and re-opening the same device, use
- * libevdev_change_fd().
- *
- * A caller should ensure that any events currently pending on the fd are
- * drained before the file descriptor is passed to libevdev for
- * initialization. Due to how the kernel's ioctl handling works, the initial
- * device state will reflect the current device state *after* applying all
- * events currently pending on the fd. Thus, if the fd is not drained, the
- * state visible to the caller will be inconsistent with the events
- * immediately available on the device. This does not affect state-less
- * events like EV_REL.
- *
- * Unless otherwise specified, libevdev function behavior is undefined until
- * a successful call to libevdev_set_fd().
- *
- * @param dev The evdev device
- * @param fd The file descriptor for the device
- *
- * @return 0 on success, or a negative errno on failure
- *
- * @see libevdev_change_fd
- * @see libevdev_new
- * @see libevdev_free
- */
-int libevdev_set_fd(struct libevdev* dev, int fd);
-
-/**
- * @ingroup init
- *
- * Change the fd for this device, without re-reading the actual device. If the fd
- * changes after initializing the device, for example after a VT-switch in the
- * X.org X server, this function updates the internal fd to the newly opened.
- * No check is made that new fd points to the same device. If the device has
- * changed, libevdev's behavior is undefined.
- *
- * libevdev does not sync itself after changing the fd and keeps the current
- * device state. Use libevdev_next_event with the
- * @ref LIBEVDEV_READ_FLAG_FORCE_SYNC flag to force a re-sync.
- *
- * The example code below illustrates how to force a re-sync of the
- * library-internal state. Note that this code doesn't handle the events in
- * the caller, it merely forces an update of the internal library state.
- * @code
- * struct input_event ev;
- * libevdev_change_fd(dev, new_fd);
- * libevdev_next_event(dev, LIBEVDEV_READ_FLAG_FORCE_SYNC, &ev);
- * while (libevdev_next_event(dev, LIBEVDEV_READ_FLAG_SYNC, &ev) == LIBEVDEV_READ_STATUS_SYNC)
- * ; // noop
- * @endcode
- *
- * The fd may be open in O_RDONLY or O_RDWR.
- *
- * It is an error to call this function before calling libevdev_set_fd().
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param fd The new fd
- *
- * @return 0 on success, or -1 on failure.
- *
- * @see libevdev_set_fd
- */
-int libevdev_change_fd(struct libevdev* dev, int fd);
-
-/**
- * @ingroup init
- *
- * @param dev The evdev device
- *
- * @return The previously set fd, or -1 if none had been set previously.
- * @note This function may be called before libevdev_set_fd().
- */
-int libevdev_get_fd(const struct libevdev* dev);
-
-/**
- * @ingroup events
- */
-enum libevdev_read_status {
- /**
- * libevdev_next_event() has finished without an error
- * and an event is available for processing.
- *
- * @see libevdev_next_event
- */
- LIBEVDEV_READ_STATUS_SUCCESS = 0,
- /**
- * Depending on the libevdev_next_event() read flag:
- * * libevdev received a SYN_DROPPED from the device, and the caller should
- * now resync the device, or,
- * * an event has been read in sync mode.
- *
- * @see libevdev_next_event
- */
- LIBEVDEV_READ_STATUS_SYNC = 1
-};
-
-/**
- * @ingroup events
- *
- * Get the next event from the device. This function operates in two different
- * modes: normal mode or sync mode.
- *
- * In normal mode (when flags has @ref LIBEVDEV_READ_FLAG_NORMAL set), this
- * function returns @ref LIBEVDEV_READ_STATUS_SUCCESS and returns the event
- * in the argument @p ev. If no events are available at this
- * time, it returns -EAGAIN and ev is undefined.
- *
- * If the current event is an EV_SYN SYN_DROPPED event, this function returns
- * @ref LIBEVDEV_READ_STATUS_SYNC and ev is set to the EV_SYN event.
- * The caller should now call this function with the
- * @ref LIBEVDEV_READ_FLAG_SYNC flag set, to get the set of events that make up the
- * device state delta. This function returns @ref LIBEVDEV_READ_STATUS_SYNC for
- * each event part of that delta, until it returns -EAGAIN once all events
- * have been synced. For more details on what libevdev does to sync after a
- * SYN_DROPPED event, see @ref syn_dropped.
- *
- * If a device needs to be synced by the caller but the caller does not call
- * with the @ref LIBEVDEV_READ_FLAG_SYNC flag set, all events from the diff are
- * dropped after libevdev updates its internal state and event processing
- * continues as normal. Note that the current slot and the state of touch
- * points may have updated during the SYN_DROPPED event, it is strongly
- * recommended that a caller ignoring all sync events calls
- * libevdev_get_current_slot() and checks the ABS_MT_TRACKING_ID values for
- * all slots.
- *
- * If a device has changed state without events being enqueued in libevdev,
- * e.g. after changing the file descriptor, use the @ref
- * LIBEVDEV_READ_FLAG_FORCE_SYNC flag. This triggers an internal sync of the
- * device and libevdev_next_event() returns @ref LIBEVDEV_READ_STATUS_SYNC.
- * Any state changes are available as events as described above. If
- * @ref LIBEVDEV_READ_FLAG_FORCE_SYNC is set, the value of ev is undefined.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param flags Set of flags to determine behaviour. If @ref LIBEVDEV_READ_FLAG_NORMAL
- * is set, the next event is read in normal mode. If @ref LIBEVDEV_READ_FLAG_SYNC is
- * set, the next event is read in sync mode.
- * @param ev On success, set to the current event.
- * @return On failure, a negative errno is returned.
- * @retval LIBEVDEV_READ_STATUS_SUCCESS One or more events were read of the
- * device and ev points to the next event in the queue
- * @retval -EAGAIN No events are currently available on the device
- * @retval LIBEVDEV_READ_STATUS_SYNC A SYN_DROPPED event was received, or a
- * synced event was returned and ev points to the SYN_DROPPED event
- *
- * @note This function is signal-safe.
- */
-int libevdev_next_event(struct libevdev *dev, unsigned int flags, struct input_event *ev);
-
-/**
- * @ingroup events
- *
- * Check if there are events waiting for us. This function does not read an
- * event off the fd and may not access the fd at all. If there are events
- * queued internally this function will return non-zero. If the internal
- * queue is empty, this function will poll the file descriptor for data.
- *
- * This is a convenience function for simple processes, most complex programs
- * are expected to use select(2) or poll(2) on the file descriptor. The kernel
- * guarantees that if data is available, it is a multiple of sizeof(struct
- * input_event), and thus calling libevdev_next_event() when select(2) or
- * poll(2) return is safe. You do not need libevdev_has_event_pending() if
- * you're using select(2) or poll(2).
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @return On failure, a negative errno is returned.
- * @retval 0 No event is currently available
- * @retval 1 One or more events are available on the fd
- *
- * @note This function is signal-safe.
- */
-int libevdev_has_event_pending(struct libevdev *dev);
-
-/**
- * @ingroup bits
- *
- * Retrieve the device's name, either as set by the caller or as read from
- * the kernel. The string returned is valid until libevdev_free() or until
- * libevdev_set_name(), whichever comes earlier.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- *
- * @return The device name as read off the kernel device. The name is never
- * NULL but it may be the empty string.
- *
- * @note This function is signal-safe.
- */
-const char* libevdev_get_name(const struct libevdev *dev);
-
-/**
- * @ingroup kernel
- *
- * Change the device's name as returned by libevdev_get_name(). This
- * function destroys the string previously returned by libevdev_get_name(),
- * a caller must take care that no references are kept.
- *
- * @param dev The evdev device
- * @param name The new, non-NULL, name to assign to this device.
- *
- * @note This function may be called before libevdev_set_fd(). A call to
- * libevdev_set_fd() will overwrite any previously set value.
- */
-void libevdev_set_name(struct libevdev *dev, const char *name);
-
-/**
- * @ingroup bits
- *
- * Retrieve the device's physical location, either as set by the caller or
- * as read from the kernel. The string returned is valid until
- * libevdev_free() or until libevdev_set_phys(), whichever comes earlier.
- *
- * Virtual devices such as uinput devices have no phys location.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- *
- * @return The physical location of this device, or NULL if there is none
- *
- * @note This function is signal safe.
- */
-const char * libevdev_get_phys(const struct libevdev *dev);
-
-/**
- * @ingroup kernel
- *
- * Change the device's physical location as returned by libevdev_get_phys().
- * This function destroys the string previously returned by
- * libevdev_get_phys(), a caller must take care that no references are kept.
- *
- * @param dev The evdev device
- * @param phys The new phys to assign to this device.
- *
- * @note This function may be called before libevdev_set_fd(). A call to
- * libevdev_set_fd() will overwrite any previously set value.
- */
-void libevdev_set_phys(struct libevdev *dev, const char *phys);
-
-/**
- * @ingroup bits
- *
- * Retrieve the device's unique identifier, either as set by the caller or
- * as read from the kernel. The string returned is valid until
- * libevdev_free() or until libevdev_set_uniq(), whichever comes earlier.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- *
- * @return The unique identifier for this device, or NULL if there is none
- *
- * @note This function is signal safe.
- */
-const char * libevdev_get_uniq(const struct libevdev *dev);
-
-/**
- * @ingroup kernel
- *
- * Change the device's unique identifier as returned by libevdev_get_uniq().
- * This function destroys the string previously returned by
- * libevdev_get_uniq(), a caller must take care that no references are kept.
- *
- * @param dev The evdev device
- * @param uniq The new uniq to assign to this device.
- *
- * @note This function may be called before libevdev_set_fd(). A call to
- * libevdev_set_fd() will overwrite any previously set value.
- */
-void libevdev_set_uniq(struct libevdev *dev, const char *uniq);
-
-/**
- * @ingroup bits
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- *
- * @return The device's product ID
- *
- * @note This function is signal-safe.
- */
-int libevdev_get_id_product(const struct libevdev *dev);
-
-/**
- * @ingroup kernel
- *
- * @param dev The evdev device
- * @param product_id The product ID to assign to this device
- *
- * @note This function may be called before libevdev_set_fd(). A call to
- * libevdev_set_fd() will overwrite any previously set value.
- */
-void libevdev_set_id_product(struct libevdev *dev, int product_id);
-
-/**
- * @ingroup bits
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- *
- * @return The device's vendor ID
- *
- * @note This function is signal-safe.
- */
-int libevdev_get_id_vendor(const struct libevdev *dev);
-
-/**
- * @ingroup kernel
- *
- * @param dev The evdev device
- * @param vendor_id The vendor ID to assign to this device
- *
- * @note This function may be called before libevdev_set_fd(). A call to
- * libevdev_set_fd() will overwrite any previously set value.
- */
-void libevdev_set_id_vendor(struct libevdev *dev, int vendor_id);
-
-/**
- * @ingroup bits
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- *
- * @return The device's bus type
- *
- * @note This function is signal-safe.
- */
-int libevdev_get_id_bustype(const struct libevdev *dev);
-
-/**
- * @ingroup kernel
- *
- * @param dev The evdev device
- * @param bustype The bustype to assign to this device
- *
- * @note This function may be called before libevdev_set_fd(). A call to
- * libevdev_set_fd() will overwrite any previously set value.
- */
-void libevdev_set_id_bustype(struct libevdev *dev, int bustype);
-
-/**
- * @ingroup bits
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- *
- * @return The device's firmware version
- *
- * @note This function is signal-safe.
- */
-int libevdev_get_id_version(const struct libevdev *dev);
-
-/**
- * @ingroup kernel
- *
- * @param dev The evdev device
- * @param version The version to assign to this device
- *
- * @note This function may be called before libevdev_set_fd(). A call to
- * libevdev_set_fd() will overwrite any previously set value.
- */
-void libevdev_set_id_version(struct libevdev *dev, int version);
-
-/**
- * @ingroup bits
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- *
- * @return The driver version for this device
- *
- * @note This function is signal-safe.
- */
-int libevdev_get_driver_version(const struct libevdev *dev);
-
-/**
- * @ingroup bits
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param prop The input property to query for, one of INPUT_PROP_...
- *
- * @return 1 if the device provides this input property, or 0 otherwise.
- *
- * @note This function is signal-safe
- */
-int libevdev_has_property(const struct libevdev *dev, unsigned int prop);
-
-/**
- * @ingroup kernel
- *
- * @param dev The evdev device
- * @param prop The input property to enable, one of INPUT_PROP_...
- *
- * @return 0 on success or -1 on failure
- *
- * @note This function may be called before libevdev_set_fd(). A call to
- * libevdev_set_fd() will overwrite any previously set value.
- */
-int libevdev_enable_property(struct libevdev *dev, unsigned int prop);
-
-/**
- * @ingroup bits
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param type The event type to query for, one of EV_SYN, EV_REL, etc.
- *
- * @return 1 if the device supports this event type, or 0 otherwise.
- *
- * @note This function is signal-safe.
- */
-int libevdev_has_event_type(const struct libevdev *dev, unsigned int type);
-
-/**
- * @ingroup bits
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param type The event type for the code to query (EV_SYN, EV_REL, etc.)
- * @param code The event code to query for, one of ABS_X, REL_X, etc.
- *
- * @return 1 if the device supports this event type and code, or 0 otherwise.
- *
- * @note This function is signal-safe.
- */
-int libevdev_has_event_code(const struct libevdev *dev, unsigned int type, unsigned int code);
-
-/**
- * @ingroup bits
- *
- * Get the minimum axis value for the given axis, as advertised by the kernel.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.
- *
- * @return axis minimum for the given axis or 0 if the axis is invalid
- *
- * @note This function is signal-safe.
- */
-int libevdev_get_abs_minimum(const struct libevdev *dev, unsigned int code);
-
-/**
- * @ingroup bits
- *
- * Get the maximum axis value for the given axis, as advertised by the kernel.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.
- *
- * @return axis maximum for the given axis or 0 if the axis is invalid
- *
- * @note This function is signal-safe.
- */
-int libevdev_get_abs_maximum(const struct libevdev *dev, unsigned int code);
-
-/**
- * @ingroup bits
- *
- * Get the axis fuzz for the given axis, as advertised by the kernel.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.
- *
- * @return axis fuzz for the given axis or 0 if the axis is invalid
- *
- * @note This function is signal-safe.
- */
-int libevdev_get_abs_fuzz(const struct libevdev *dev, unsigned int code);
-
-/**
- * @ingroup bits
- *
- * Get the axis flat for the given axis, as advertised by the kernel.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.
- *
- * @return axis flat for the given axis or 0 if the axis is invalid
- *
- * @note This function is signal-safe.
- */
-int libevdev_get_abs_flat(const struct libevdev *dev, unsigned int code);
-
-/**
- * @ingroup bits
- *
- * Get the axis resolution for the given axis, as advertised by the kernel.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.
- *
- * @return axis resolution for the given axis or 0 if the axis is invalid
- *
- * @note This function is signal-safe.
- */
-int libevdev_get_abs_resolution(const struct libevdev *dev, unsigned int code);
-
-/**
- * @ingroup bits
- *
- * Get the axis info for the given axis, as advertised by the kernel.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.
- *
- * @return The input_absinfo for the given code, or NULL if the device does
- * not support this event code.
- *
- * @note This function is signal-safe.
- */
-const struct input_absinfo* libevdev_get_abs_info(const struct libevdev *dev, unsigned int code);
-
-/**
- * @ingroup bits
- *
- * Behaviour of this function is undefined if the device does not provide
- * the event.
- *
- * If the device supports ABS_MT_SLOT, the value returned for any ABS_MT_*
- * event code is the value of the currently active slot. You should use
- * libevdev_get_slot_value() instead.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param type The event type for the code to query (EV_SYN, EV_REL, etc.)
- * @param code The event code to query for, one of ABS_X, REL_X, etc.
- *
- * @return The current value of the event.
- *
- * @note This function is signal-safe.
- * @note The value for ABS_MT_ events is undefined, use
- * libevdev_get_slot_value() instead
- *
- * @see libevdev_get_slot_value
- */
-int libevdev_get_event_value(const struct libevdev *dev, unsigned int type, unsigned int code);
-
-/**
- * @ingroup kernel
- *
- * Set the value for a given event type and code. This only makes sense for
- * some event types, e.g. setting the value for EV_REL is pointless.
- *
- * This is a local modification only affecting only this representation of
- * this device. A future call to libevdev_get_event_value() will return this
- * value, unless the value was overwritten by an event.
- *
- * If the device supports ABS_MT_SLOT, the value set for any ABS_MT_*
- * event code is the value of the currently active slot. You should use
- * libevdev_set_slot_value() instead.
- *
- * If the device supports ABS_MT_SLOT and the type is EV_ABS and the code is
- * ABS_MT_SLOT, the value must be a positive number less then the number of
- * slots on the device. Otherwise, libevdev_set_event_value() returns -1.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param type The event type for the code to query (EV_SYN, EV_REL, etc.)
- * @param code The event code to set the value for, one of ABS_X, LED_NUML, etc.
- * @param value The new value to set
- *
- * @return 0 on success, or -1 on failure.
- * @retval -1 the device does not have the event type or code enabled, or the code is outside the
- * allowed limits for the given type, or the type cannot be set, or the
- * value is not permitted for the given code.
- *
- * @see libevdev_set_slot_value
- * @see libevdev_get_event_value
- */
-int libevdev_set_event_value(struct libevdev *dev, unsigned int type, unsigned int code, int value);
-
-/**
- * @ingroup bits
- *
- * Fetch the current value of the event type. This is a shortcut for
- *
- * @code
- * if (libevdev_has_event_type(dev, t) && libevdev_has_event_code(dev, t, c))
- * val = libevdev_get_event_value(dev, t, c);
- * @endcode
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param type The event type for the code to query (EV_SYN, EV_REL, etc.)
- * @param code The event code to query for, one of ABS_X, REL_X, etc.
- * @param[out] value The current value of this axis returned.
- *
- * @return If the device supports this event type and code, the return value is
- * non-zero and value is set to the current value of this axis. Otherwise,
- * 0 is returned and value is unmodified.
- *
- * @note This function is signal-safe.
- * @note The value for ABS_MT_ events is undefined, use
- * libevdev_fetch_slot_value() instead
- *
- * @see libevdev_fetch_slot_value
- */
-int libevdev_fetch_event_value(const struct libevdev *dev, unsigned int type, unsigned int code, int *value);
-
-/**
- * @ingroup mt
- *
- * Return the current value of the code for the given slot.
- *
- * The return value is undefined for a slot exceeding the available slots on
- * the device, for a code that is not in the permitted ABS_MT range or for a
- * device that does not have slots.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param slot The numerical slot number, must be smaller than the total number
- * of slots on this device
- * @param code The event code to query for, one of ABS_MT_POSITION_X, etc.
- *
- * @note This function is signal-safe.
- * @note The value for events other than ABS_MT_ is undefined, use
- * libevdev_fetch_value() instead
- *
- * @see libevdev_get_event_value
- */
-int libevdev_get_slot_value(const struct libevdev *dev, unsigned int slot, unsigned int code);
-
-/**
- * @ingroup kernel
- *
- * Set the value for a given code for the given slot.
- *
- * This is a local modification only affecting only this representation of
- * this device. A future call to libevdev_get_slot_value() will return this
- * value, unless the value was overwritten by an event.
- *
- * This function does not set event values for axes outside the ABS_MT range,
- * use libevdev_set_event_value() instead.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param slot The numerical slot number, must be smaller than the total number
- * of slots on this device
- * @param code The event code to set the value for, one of ABS_MT_POSITION_X, etc.
- * @param value The new value to set
- *
- * @return 0 on success, or -1 on failure.
- * @retval -1 the device does not have the event code enabled, or the code is
- * outside the allowed limits for multitouch events, or the slot number is outside
- * the limits for this device, or the device does not support multitouch events.
- *
- * @see libevdev_set_event_value
- * @see libevdev_get_slot_value
- */
-int libevdev_set_slot_value(struct libevdev *dev, unsigned int slot, unsigned int code, int value);
-
-/**
- * @ingroup mt
- *
- * Fetch the current value of the code for the given slot. This is a shortcut for
- *
- * @code
- * if (libevdev_has_event_type(dev, EV_ABS) &&
- * libevdev_has_event_code(dev, EV_ABS, c) &&
- * slot < device->number_of_slots)
- * val = libevdev_get_slot_value(dev, slot, c);
- * @endcode
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param slot The numerical slot number, must be smaller than the total number
- * of slots on this * device
- * @param[out] value The current value of this axis returned.
- *
- * @param code The event code to query for, one of ABS_MT_POSITION_X, etc.
- * @return If the device supports this event code, the return value is
- * non-zero and value is set to the current value of this axis. Otherwise, or
- * if the event code is not an ABS_MT_* event code, 0 is returned and value
- * is unmodified.
- *
- * @note This function is signal-safe.
- */
-int libevdev_fetch_slot_value(const struct libevdev *dev, unsigned int slot, unsigned int code, int *value);
-
-/**
- * @ingroup mt
- *
- * Get the number of slots supported by this device.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- *
- * @return The number of slots supported, or -1 if the device does not provide
- * any slots
- *
- * @note A device may provide ABS_MT_SLOT but a total number of 0 slots. Hence
- * the return value of -1 for "device does not provide slots at all"
- */
-int libevdev_get_num_slots(const struct libevdev *dev);
-
-/**
- * @ingroup mt
- *
- * Get the currently active slot. This may differ from the value
- * an ioctl may return at this time as events may have been read off the fd
- * since changing the slot value but those events are still in the buffer
- * waiting to be processed. The returned value is the value a caller would
- * see if it were to process events manually one-by-one.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- *
- * @return the currently active slot (logically)
- *
- * @note This function is signal-safe.
- */
-int libevdev_get_current_slot(const struct libevdev *dev);
-
-/**
- * @ingroup kernel
- *
- * Change the minimum for the given EV_ABS event code, if the code exists.
- * This function has no effect if libevdev_has_event_code() returns false for
- * this code.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code One of ABS_X, ABS_Y, ...
- * @param min The new minimum for this axis
- */
-void libevdev_set_abs_minimum(struct libevdev *dev, unsigned int code, int min);
-
-/**
- * @ingroup kernel
- *
- * Change the maximum for the given EV_ABS event code, if the code exists.
- * This function has no effect if libevdev_has_event_code() returns false for
- * this code.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code One of ABS_X, ABS_Y, ...
- * @param max The new maxium for this axis
- */
-void libevdev_set_abs_maximum(struct libevdev *dev, unsigned int code, int max);
-
-/**
- * @ingroup kernel
- *
- * Change the fuzz for the given EV_ABS event code, if the code exists.
- * This function has no effect if libevdev_has_event_code() returns false for
- * this code.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code One of ABS_X, ABS_Y, ...
- * @param fuzz The new fuzz for this axis
- */
-void libevdev_set_abs_fuzz(struct libevdev *dev, unsigned int code, int fuzz);
-
-/**
- * @ingroup kernel
- *
- * Change the flat for the given EV_ABS event code, if the code exists.
- * This function has no effect if libevdev_has_event_code() returns false for
- * this code.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code One of ABS_X, ABS_Y, ...
- * @param flat The new flat for this axis
- */
-void libevdev_set_abs_flat(struct libevdev *dev, unsigned int code, int flat);
-
-/**
- * @ingroup kernel
- *
- * Change the resolution for the given EV_ABS event code, if the code exists.
- * This function has no effect if libevdev_has_event_code() returns false for
- * this code.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code One of ABS_X, ABS_Y, ...
- * @param resolution The new axis resolution
- */
-void libevdev_set_abs_resolution(struct libevdev *dev, unsigned int code, int resolution);
-
-/**
- * @ingroup kernel
- *
- * Change the abs info for the given EV_ABS event code, if the code exists.
- * This function has no effect if libevdev_has_event_code() returns false for
- * this code.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code One of ABS_X, ABS_Y, ...
- * @param abs The new absolute axis data (min, max, fuzz, flat, resolution)
- */
-void libevdev_set_abs_info(struct libevdev *dev, unsigned int code, const struct input_absinfo *abs);
-
-/**
- * @ingroup kernel
- *
- * Forcibly enable an event type on this device, even if the underlying
- * device does not support it. While this cannot make the device actually
- * report such events, it will now return true for libevdev_has_event_type().
- *
- * This is a local modification only affecting only this representation of
- * this device.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param type The event type to enable (EV_ABS, EV_KEY, ...)
- *
- * @return 0 on success or -1 otherwise
- *
- * @see libevdev_has_event_type
- */
-int libevdev_enable_event_type(struct libevdev *dev, unsigned int type);
-
-/**
- * @ingroup kernel
- *
- * Forcibly disable an event type on this device, even if the underlying
- * device provides it. This effectively mutes the respective set of
- * events. libevdev will filter any events matching this type and none will
- * reach the caller. libevdev_has_event_type() will return false for this
- * type.
- *
- * In most cases, a caller likely only wants to disable a single code, not
- * the whole type. Use libevdev_disable_event_code() for that.
- *
- * Disabling EV_SYN will not work. Don't shoot yourself in the foot.
- * It hurts.
- *
- * This is a local modification only affecting only this representation of
- * this device.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param type The event type to disable (EV_ABS, EV_KEY, ...)
- *
- * @return 0 on success or -1 otherwise
- *
- * @see libevdev_has_event_type
- * @see libevdev_disable_event_type
- */
-int libevdev_disable_event_type(struct libevdev *dev, unsigned int type);
-
-/**
- * @ingroup kernel
- *
- * Forcibly enable an event code on this device, even if the underlying
- * device does not support it. While this cannot make the device actually
- * report such events, it will now return true for libevdev_has_event_code().
- *
- * The last argument depends on the type and code:
- * - If type is EV_ABS, data must be a pointer to a struct input_absinfo
- * containing the data for this axis.
- * - If type is EV_REP, data must be a pointer to a int containing the data
- * for this axis
- * - For all other types, the argument must be NULL.
- *
- * This function calls libevdev_enable_event_type() if necessary.
- *
- * This is a local modification only affecting only this representation of
- * this device.
- *
- * If this function is called with a type of EV_ABS and EV_REP on a device
- * that already has the given event code enabled, the values in data
- * overwrite the previous values.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param type The event type to enable (EV_ABS, EV_KEY, ...)
- * @param code The event code to enable (ABS_X, REL_X, etc.)
- * @param data If type is EV_ABS, data points to a struct input_absinfo. If type is EV_REP, data
- * points to an integer. Otherwise, data must be NULL.
- *
- * @return 0 on success or -1 otherwise
- *
- * @see libevdev_enable_event_type
- */
-int libevdev_enable_event_code(struct libevdev *dev, unsigned int type, unsigned int code, const void *data);
-
-/**
- * @ingroup kernel
- *
- * Forcibly disable an event code on this device, even if the underlying
- * device provides it. This effectively mutes the respective set of
- * events. libevdev will filter any events matching this type and code and
- * none will reach the caller. libevdev_has_event_code() will return false for
- * this code.
- *
- * Disabling all event codes for a given type will not disable the event
- * type. Use libevdev_disable_event_type() for that.
- *
- * This is a local modification only affecting only this representation of
- * this device.
- *
- * Disabling codes of type EV_SYN will not work. Don't shoot yourself in the
- * foot. It hurts.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param type The event type to disable (EV_ABS, EV_KEY, ...)
- * @param code The event code to disable (ABS_X, REL_X, etc.)
- *
- * @return 0 on success or -1 otherwise
- *
- * @see libevdev_has_event_code
- * @see libevdev_disable_event_type
- */
-int libevdev_disable_event_code(struct libevdev *dev, unsigned int type, unsigned int code);
-
-/**
- * @ingroup kernel
- *
- * Set the device's EV_ABS axis to the value defined in the abs
- * parameter. This will be written to the kernel.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code The EV_ABS event code to modify, one of ABS_X, ABS_Y, etc.
- * @param abs Axis info to set the kernel axis to
- *
- * @return 0 on success, or a negative errno on failure
- *
- * @see libevdev_enable_event_code
- */
-int libevdev_kernel_set_abs_info(struct libevdev *dev, unsigned int code, const struct input_absinfo *abs);
-
-/**
- * @ingroup kernel
- */
-enum libevdev_led_value {
- LIBEVDEV_LED_ON = 3, /**< Turn the LED on */
- LIBEVDEV_LED_OFF = 4 /**< Turn the LED off */
-};
-
-/**
- * @ingroup kernel
- *
- * Turn an LED on or off. Convenience function, if you need to modify multiple
- * LEDs simultaneously, use libevdev_kernel_set_led_values() instead.
- *
- * @note enabling an LED requires write permissions on the device's file descriptor.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param code The EV_LED event code to modify, one of LED_NUML, LED_CAPSL, ...
- * @param value Specifies whether to turn the LED on or off
- * @return 0 on success, or a negative errno on failure
- */
-int libevdev_kernel_set_led_value(struct libevdev *dev, unsigned int code, enum libevdev_led_value value);
-
-/**
- * @ingroup kernel
- *
- * Turn multiple LEDs on or off simultaneously. This function expects a pair
- * of LED codes and values to set them to, terminated by a -1. For example, to
- * switch the NumLock LED on but the CapsLock LED off, use:
- *
- * @code
- * libevdev_kernel_set_led_values(dev, LED_NUML, LIBEVDEV_LED_ON,
- * LED_CAPSL, LIBEVDEV_LED_OFF,
- * -1);
- * @endcode
- *
- * If any LED code or value is invalid, this function returns -EINVAL and no
- * LEDs are modified.
- *
- * @note enabling an LED requires write permissions on the device's file descriptor.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param ... A pair of LED_* event codes and libevdev_led_value_t, followed by
- * -1 to terminate the list.
- * @return 0 on success, or a negative errno on failure
- */
-int libevdev_kernel_set_led_values(struct libevdev *dev, ...);
-
-/**
- * @ingroup kernel
- *
- * Set the clock ID to be used for timestamps. Further events from this device
- * will report an event time based on the given clock.
- *
- * This is a modification only affecting this representation of
- * this device.
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param clockid The clock to use for future events. Permitted values
- * are CLOCK_MONOTONIC and CLOCK_REALTIME (the default).
- * @return 0 on success, or a negative errno on failure
- */
-int libevdev_set_clock_id(struct libevdev *dev, int clockid);
-
-/**
- * @ingroup misc
- *
- * Helper function to check if an event is of a specific type. This is
- * virtually the same as:
- *
- * ev->type == type
- *
- * with the exception that some sanity checks are performed to ensure type
- * is valid.
- *
- * @note The ranges for types are compiled into libevdev. If the kernel
- * changes the max value, libevdev will not automatically pick these up.
- *
- * @param ev The input event to check
- * @param type Input event type to compare the event against (EV_REL, EV_ABS,
- * etc.)
- *
- * @return 1 if the event type matches the given type, 0 otherwise (or if
- * type is invalid)
- */
-int libevdev_event_is_type(const struct input_event *ev, unsigned int type);
-
-/**
- * @ingroup misc
- *
- * Helper function to check if an event is of a specific type and code. This
- * is virtually the same as:
- *
- * ev->type == type && ev->code == code
- *
- * with the exception that some sanity checks are performed to ensure type and
- * code are valid.
- *
- * @note The ranges for types and codes are compiled into libevdev. If the kernel
- * changes the max value, libevdev will not automatically pick these up.
- *
- * @param ev The input event to check
- * @param type Input event type to compare the event against (EV_REL, EV_ABS,
- * etc.)
- * @param code Input event code to compare the event against (ABS_X, REL_X,
- * etc.)
- *
- * @return 1 if the event type matches the given type and code, 0 otherwise
- * (or if type/code are invalid)
- */
-int libevdev_event_is_code(const struct input_event *ev, unsigned int type, unsigned int code);
-
-/**
- * @ingroup misc
- *
- * @param type The event type to return the name for.
- *
- * @return The name of the given event type (e.g. EV_ABS) or NULL for an
- * invalid type
- *
- * @note The list of names is compiled into libevdev. If the kernel adds new
- * defines for new event types, libevdev will not automatically pick these up.
- */
-const char * libevdev_event_type_get_name(unsigned int type);
-/**
- * @ingroup misc
- *
- * @param type The event type for the code to query (EV_SYN, EV_REL, etc.)
- * @param code The event code to return the name for (e.g. ABS_X)
- *
- * @return The name of the given event code (e.g. ABS_X) or NULL for an
- * invalid type or code
- *
- * @note The list of names is compiled into libevdev. If the kernel adds new
- * defines for new event codes, libevdev will not automatically pick these up.
- */
-const char * libevdev_event_code_get_name(unsigned int type, unsigned int code);
-
-/**
- * @ingroup misc
- *
- * @param prop The input prop to return the name for (e.g. INPUT_PROP_BUTTONPAD)
- *
- * @return The name of the given input prop (e.g. INPUT_PROP_BUTTONPAD) or NULL for an
- * invalid property
- *
- * @note The list of names is compiled into libevdev. If the kernel adds new
- * defines for new properties libevdev will not automatically pick these up.
- * @note On older kernels input properties may not be defined and
- * libevdev_property_get_name() will always return NULL
- */
-const char* libevdev_property_get_name(unsigned int prop);
-
-/**
- * @ingroup misc
- *
- * @param type The event type to return the maximum for (EV_ABS, EV_REL, etc.). No max is defined for
- * EV_SYN.
- *
- * @return The max value defined for the given event type, e.g. ABS_MAX for a type of EV_ABS, or -1
- * for an invalid type.
- *
- * @note The max value is compiled into libevdev. If the kernel changes the
- * max value, libevdev will not automatically pick these up.
- */
-int libevdev_event_type_get_max(unsigned int type);
-
-/**
- * @ingroup misc
- *
- * Look up an event-type by its name. Event-types start with "EV_" followed by
- * the name (eg., "EV_ABS"). The "EV_" prefix must be included in the name. It
- * returns the constant assigned to the event-type or -1 if not found.
- *
- * @param name A non-NULL string describing an input-event type ("EV_KEY",
- * "EV_ABS", ...), zero-terminated.
- *
- * @return The given type constant for the passed name or -1 if not found.
- *
- * @note EV_MAX is also recognized.
- */
-int libevdev_event_type_from_name(const char *name);
-
-/**
- * @ingroup misc
- *
- * Look up an event-type by its name. Event-types start with "EV_" followed by
- * the name (eg., "EV_ABS"). The "EV_" prefix must be included in the name. It
- * returns the constant assigned to the event-type or -1 if not found.
- *
- * @param name A non-NULL string describing an input-event type ("EV_KEY",
- * "EV_ABS", ...).
- * @param len The length of the passed string excluding any terminating 0
- * character.
- *
- * @return The given type constant for the passed name or -1 if not found.
- *
- * @note EV_MAX is also recognized.
- */
-int libevdev_event_type_from_name_n(const char *name, size_t len);
-
-/**
- * @ingroup misc
- *
- * Look up an event code by its type and name. Event codes start with a fixed
- * prefix followed by their name (eg., "ABS_X"). The prefix must be included in
- * the name. It returns the constant assigned to the event code or -1 if not
- * found.
- *
- * You have to pass the event type where to look for the name. For instance, to
- * resolve "ABS_X" you need to pass EV_ABS as type and "ABS_X" as string.
- * Supported event codes are codes starting with SYN_, KEY_, BTN_, REL_, ABS_,
- * MSC_, SND_, SW_, LED_, REP_, FF_.
- *
- * @param type The event type (EV_* constant) where to look for the name.
- * @param name A non-NULL string describing an input-event code ("KEY_A",
- * "ABS_X", "BTN_Y", ...), zero-terminated.
- *
- * @return The given code constant for the passed name or -1 if not found.
- */
-int libevdev_event_code_from_name(unsigned int type, const char *name);
-
-/**
- * @ingroup misc
- *
- * Look up an event code by its type and name. Event codes start with a fixed
- * prefix followed by their name (eg., "ABS_X"). The prefix must be included in
- * the name. It returns the constant assigned to the event code or -1 if not
- * found.
- *
- * You have to pass the event type where to look for the name. For instance, to
- * resolve "ABS_X" you need to pass EV_ABS as type and "ABS_X" as string.
- * Supported event codes are codes starting with SYN_, KEY_, BTN_, REL_, ABS_,
- * MSC_, SND_, SW_, LED_, REP_, FF_.
- *
- * @param type The event type (EV_* constant) where to look for the name.
- * @param name A non-NULL string describing an input-event code ("KEY_A",
- * "ABS_X", "BTN_Y", ...).
- * @param len The length of the string in @p name excluding any terminating 0
- * character.
- *
- * @return The given code constant for the name or -1 if not found.
- */
-int libevdev_event_code_from_name_n(unsigned int type, const char *name,
- size_t len);
-
-/**
- * @ingroup misc
- *
- * Look up an input property by its name. Properties start with the fixed
- * prefix "INPUT_PROP_" followed by their name (eg., "INPUT_PROP_POINTER").
- * The prefix must be included in the name. It returns the constant assigned
- * to the property or -1 if not found.
- *
- * @param name A non-NULL string describing an input property
- *
- * @return The given code constant for the name or -1 if not found.
- */
-int libevdev_property_from_name(const char *name);
-
-/**
- * @ingroup misc
- *
- * Look up an input property by its name. Properties start with the fixed
- * prefix "INPUT_PROP_" followed by their name (eg., "INPUT_PROP_POINTER").
- * The prefix must be included in the name. It returns the constant assigned
- * to the property or -1 if not found.
- *
- * @param name A non-NULL string describing an input property
- * @param len The length of the string in @p name excluding any terminating 0
- * character.
- *
- * @return The given code constant for the name or -1 if not found.
- */
-int libevdev_property_from_name_n(const char *name, size_t len);
-
-/**
- * @ingroup bits
- *
- * Get the repeat delay and repeat period values for this device. This
- * function is a convenience function only, EV_REP is supported by
- * libevdev_get_event_value().
- *
- * @param dev The evdev device, already initialized with libevdev_set_fd()
- * @param delay If not null, set to the repeat delay value
- * @param period If not null, set to the repeat period value
- *
- * @return 0 on success, -1 if this device does not have repeat settings.
- *
- * @note This function is signal-safe
- *
- * @see libevdev_get_event_value
- */
-int libevdev_get_repeat(const struct libevdev *dev, int *delay, int *period);
-
-/********* DEPRECATED SECTION *********/
-#if defined(__GNUC__) && __GNUC__ >= 4
-#define LIBEVDEV_DEPRECATED __attribute__ ((deprecated))
-#else
-#define LIBEVDEV_DEPRECATED
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBEVDEV_H */
diff --git a/aml_plugins/trumpet/readme.txt b/aml_plugins/trumpet/readme.txt
deleted file mode 100644
index 6b6eaec..0000000
--- a/aml_plugins/trumpet/readme.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-
-step1:add the macros for trumpet support in buildroot/configs/xxx_defconfig
-#alsa-plugin for dolby daws
-BR2_PACKAGE_ALSA_PLUGINS=y
-BR2_PACKAGE_LIBEVDEV=y
-BR2_PACKAGE_DOLBY_DAWS_PLUGIN=y
-BR2_PACKAGE_DOLBY_DAWS_SERVICE=y
-BR2_PACKAGE_DOLBY_DAWS_SECURITY=y
-
-step2:add trumpet config in asound.conf, path: buildroot/board/amlogic/xxx/rootfs/etc/asound.conf
-pcm.daws {
- type daws
- channels 4
- slave.pcm "hw:0,2"
- dump_enable 0
- dumpin_name "/mnt/plugin.raw"
- dumpout_name "/mnt/plugout.raw"
-}
-#explain:
-# type: plugin name
-# channels: output channels
-# dump_enable: dump data enable
-# dumpin_name: dump plug input path
-# dumpout_name: dump plug output path
-
-step3: compile package or stepwise compilation
- make alsa-plugins-rebuild
- make libevdev-rebuild
- make dolby_daws_plugin-rebuild
- make dolby_daws_service-rebuild
- make dolby_daws_security-rebuild
- make
diff --git a/aml_plugins/trumpet/trumpet.mk b/aml_plugins/trumpet/trumpet.mk
deleted file mode 100644
index 35e8f06..0000000
--- a/aml_plugins/trumpet/trumpet.mk
+++ /dev/null
@@ -1 +0,0 @@
-include ../multimedia/aml_plugins/trumpet/*/*.mk