Skip to content

Commit c4723a4

Browse files
committed
goke-osdrv-gk7205v200: ship the VQE engines the microphone path loads by dlopen
The Goke half of the change that installs the voice quality enhancement engines for OpenIPC/majestic#287. The HiSilicon side landed separately; this is kept apart because it is the only part that adds binaries to the tree and the only part with no hardware here to run it on. Same mechanism as HiSilicon. libupvqe.so is only the framework: it dlopen()s one shared object per DSP stage when HI_MPI_AI_EnableVqe runs, resolving names from a "lib%s_%s.so" template, and it prints dlopen libvqe_common.so/libsecurec.so or %s failed when they are absent. Goke names them libvqe_* where HiSilicon names them libhive_*. Only the stages majestic can switch on are installed: the high-pass filter, noise reduction and automatic gain control of the 8/16 kHz talk engine, libvqe_common.so which is a NEEDED of the last two, and the 48 kHz record engine. Echo cancellation and the equaliser are not exposed, and the resampler is compiled into libupvqe.so itself (RES_ReSampler_* are defined there), so libvqe_res.so is never loaded. They sit in files/vqe/ rather than files/lib/ because this package installs files/lib/* wholesale, and there is no other way to keep 360 KB out of a lite image where majestic has no VQE compiled in to load them. Provenance: the five libraries come from the GK7205V200 vendor SDK drop, the same drop the twenty libraries already in files/lib/ came from. Each of those twenty was checked byte-identical to a file in that drop before these five were copied from it, and libupvqe.so -- the loader that will dlopen them -- is one of the twenty. Not validated on hardware. There is no GK7205V200 on the bench, and matching provenance and an identical dlopen mechanism are not the same as watching the enable call succeed on the part. Holding this until someone can run it.
1 parent 2a0d5ca commit c4723a4

6 files changed

Lines changed: 21 additions & 0 deletions

File tree

59.5 KB
Binary file not shown.
59.4 KB
Binary file not shown.
Binary file not shown.
10 KB
Binary file not shown.
Binary file not shown.

general/package/goke-osdrv-gk7205v200/goke-osdrv-gk7205v200.mk

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@ GOKE_OSDRV_GK7205V200_LICENSE = MIT
1010
GOKE_OSDRV_GK7205V200_LICENSE_FILES = LICENSE
1111
GOKE_OSDRV_GK7205V200_INSTALL_STAGING = YES
1212

13+
# Voice quality enhancement engines for the microphone capture path
14+
# (OpenIPC/majestic#287). See hisilicon-osdrv-hi3516ev200.mk for the full
15+
# reasoning: libupvqe.so is only the framework and dlopen()s one shared
16+
# object per DSP stage when HI_MPI_AI_EnableVqe() runs, so without these that
17+
# call fails with 0xa0158041 and the microphone is passed through unprocessed.
18+
# Goke names them libvqe_* where HiSilicon names them libhive_*. AEC and EQ
19+
# are not exposed by majestic, and the resampler is compiled into libupvqe.so
20+
# (RES_ReSampler_*), so libvqe_res.so is never loaded.
21+
#
22+
# They sit in files/vqe/ rather than files/lib/ because the install below
23+
# takes files/lib/* wholesale — putting them there would ship 360 KB into
24+
# every lite image, where majestic has no VQE compiled in to dlopen() them.
25+
ifeq ($(OPENIPC_MAJESTIC),ultimate)
26+
GOKE_OSDRV_GK7205V200_VQE_LIBS = \
27+
libvqe_common.so libvqe_agc.so libvqe_anr.so \
28+
libvqe_hpf.so libvqe_record.so
29+
endif
30+
1331
define GOKE_OSDRV_GK7205V200_INSTALL_STAGING_CMDS
1432
$(INSTALL) -m 755 -d $(STAGING_DIR)/usr/include/goke
1533
#$(INSTALL) -m 644 -t $(STAGING_DIR)/usr/include/goke $(GOKE_OSDRV_GK7205V200_PKGDIR)/files/include/*
@@ -65,6 +83,9 @@ define GOKE_OSDRV_GK7205V200_INSTALL_TARGET_CMDS
6583

6684
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib
6785
$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib $(GOKE_OSDRV_GK7205V200_PKGDIR)/files/lib/*
86+
$(foreach lib,$(GOKE_OSDRV_GK7205V200_VQE_LIBS), \
87+
$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib $(GOKE_OSDRV_GK7205V200_PKGDIR)/files/vqe/$(lib) ; \
88+
)
6889
endef
6990

7091
$(eval $(generic-package))

0 commit comments

Comments
 (0)