From b2a41422fa86e1c899328b0b768ad779c29e1ede Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Wed, 18 Sep 2019 17:59:48 +0200 Subject: Add a definition for subdevice maximum Add a definition to define the maximum number of subdevices in an ALSA device. BUG-AGL: SPEC-2832 Change-Id: Id44d53252119319feb400f3b3fa59534392038af Signed-off-by: Jonathan Aillet --- alsa-binding/Alsa-ApiHat.h | 7 ++++--- conf.d/cmake/config.cmake | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/alsa-binding/Alsa-ApiHat.h b/alsa-binding/Alsa-ApiHat.h index 59a9b0c..b5d3866 100644 --- a/alsa-binding/Alsa-ApiHat.h +++ b/alsa-binding/Alsa-ApiHat.h @@ -35,11 +35,12 @@ #define STATIC static #ifndef CONTROL_MAXPATH_LEN - #define CONTROL_MAXPATH_LEN 255 + #define CONTROL_MAXPATH_LEN 255 #endif -#define NO_CARD_SELECTED -1 -#define NO_DEVICE_SELECTED -1 +#define NO_CARD_SELECTED -1 +#define NO_DEVICE_SELECTED -1 +#define NO_SUBDEVICE_SELECTED -1 typedef enum { QUERY_QUIET =0, diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake index cad98ee..27b0dfd 100644 --- a/conf.d/cmake/config.cmake +++ b/conf.d/cmake/config.cmake @@ -110,10 +110,11 @@ set(COMPILE_OPTIONS -fdata-sections -fPIC # Personal compilation options --DMAX_SND_CARD=32 # default ALSA max cards --DMAX_CARD_DEVICES=32 # 32 devices by sound card should be enough (more investigation needed about this) --DMAX_LINEAR_DB_SCALE=24 # until 24db volume normalisation use a simple linear scale --DTLV_BYTE_SIZE=256 # Alsa use 4096 as default but 256 should fit most sndcards +-DMAX_SND_CARD=32 # default ALSA max cards +-DMAX_CARD_DEVICES=32 # 32 devices by sound card should be enough (more investigation needed about this) +-DMAX_DEVICE_SUBDEVICES=8 # 8 subdevices by device should be enough (more investigation needed about this) +-DMAX_LINEAR_DB_SCALE=24 # until 24db volume normalisation use a simple linear scale +-DTLV_BYTE_SIZE=256 # Alsa use 4096 as default but 256 should fit most sndcards -DCONTROL_MAXPATH_LEN=255 CACHE STRING "Compilation flags") #set(C_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C language.") -- cgit 1.2.3-korg