# HG changeset patch # User Mychaela Falconia # Date 1627603813 0 # Node ID c458e33060bf99dfcf968e9092e2463d76093e98 # Parent 625bee54ed346c1012cd7d4a6929b4f8e24f2557 ffstools/tiaud: prep for adding support for new AEC diff -r 625bee54ed34 -r c458e33060bf ffstools/tiaud/binstruct.h --- a/ffstools/tiaud/binstruct.h Tue Jun 22 02:28:18 2021 +0000 +++ b/ffstools/tiaud/binstruct.h Fri Jul 30 00:10:13 2021 +0000 @@ -16,9 +16,12 @@ uint16_t speaker_fir[32]; int8_t sidetone_gain; uint8_t pad4[3]; - uint16_t aec_words[6]; + uint16_t aec_words[12]; }; +#define MODE_FILE_SIZE_NEWAEC (sizeof(struct audio_cfg_bin)) +#define MODE_FILE_SIZE_OLDAEC (sizeof(struct audio_cfg_bin) - 12) + /* mic_mode byte */ #define AUDIO_MICROPHONE_HANDHELD (0) #define AUDIO_MICROPHONE_HANDFREE (1) diff -r 625bee54ed34 -r c458e33060bf ffstools/tiaud/compile.c --- a/ffstools/tiaud/compile.c Tue Jun 22 02:28:18 2021 +0000 +++ b/ffstools/tiaud/compile.c Fri Jul 30 00:10:13 2021 +0000 @@ -633,7 +633,7 @@ perror(filename); exit(1); } - write(fd, &bin, sizeof bin); + write(fd, &bin, MODE_FILE_SIZE_OLDAEC); close(fd); } diff -r 625bee54ed34 -r c458e33060bf ffstools/tiaud/decomp.c --- a/ffstools/tiaud/decomp.c Tue Jun 22 02:28:18 2021 +0000 +++ b/ffstools/tiaud/decomp.c Fri Jul 30 00:10:13 2021 +0000 @@ -32,11 +32,11 @@ fprintf(stderr, "%s is not a regular file\n", filename); exit(1); } - if (st.st_size != sizeof(struct audio_cfg_bin)) { + if (st.st_size != MODE_FILE_SIZE_OLDAEC) { fprintf(stderr, "%s has the wrong length\n", filename); exit(1); } - read(fd, &bin, sizeof bin); + read(fd, &bin, MODE_FILE_SIZE_OLDAEC); close(fd); }