From: Takashi Iwai Subject: Re: [PATCH v2 2/2] conf: topology: Generate Private data binary blobs Date: Tue, 05 Apr 2016 16:45:37 +0200 Message-ID: References: <1459833605-11223-1-git-send-email-vinod.koul@intel.com> <1459833605-11223-3-git-send-email-vinod.koul@intel.com> <1459867127.3136.39.camel@intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id EDE5F26070F for ; Tue, 5 Apr 2016 16:45:38 +0200 (CEST) In-Reply-To: <1459867127.3136.39.camel@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: "Koul, Vinod" Cc: "liam.r.girdwood@linux.intel.com" , Patches Audio , "alsa-devel@alsa-project.org" , "broonie@kernel.org" , "Nc, Shreyas" List-Id: alsa-devel@alsa-project.org On Tue, 05 Apr 2016 16:38:49 +0200, Koul, Vinod wrote: > > On Tue, 2016-04-05 at 14:00 +0200, Takashi Iwai wrote: > > On Tue, 05 Apr 2016 07:20:05 +0200, > > Vinod Koul wrote: > > > > > > From: Shreyas NC > > > > > > The DSP modules need private data and that is provided as binary > > > blob. These blobs are compiled from C structures which specify > > > module > > > configuration. > > > > > > Signed-off-by: Shreyas NC > > > Signed-off-by: Vinod Koul > > > --- > > > src/conf/topology/sklrt286/data/Makefile.am | 4 + > > > src/conf/topology/sklrt286/data/README | 2 + > > > src/conf/topology/sklrt286/data/compile_local | 16 + > > > src/conf/topology/sklrt286/data/configure.ac | 30 + > > > src/conf/topology/sklrt286/data/pvt.c | 1815 > > > ++++++++++++++++++++++ > > > src/conf/topology/sklrt286/data/pvt_data.c | 90 ++ > > > src/conf/topology/sklrt286/data/pvt_data_local.h | 115 ++ > > > 7 files changed, 2072 insertions(+) > > > create mode 100644 src/conf/topology/sklrt286/data/Makefile.am > > > create mode 100644 src/conf/topology/sklrt286/data/README > > > create mode 100755 src/conf/topology/sklrt286/data/compile_local > > > create mode 100644 src/conf/topology/sklrt286/data/configure.ac > > > create mode 100644 src/conf/topology/sklrt286/data/pvt.c > > > create mode 100644 src/conf/topology/sklrt286/data/pvt_data.c > > > create mode 100644 src/conf/topology/sklrt286/data/pvt_data_local.h > > > > > > diff --git a/src/conf/topology/sklrt286/data/Makefile.am > > > b/src/conf/topology/sklrt286/data/Makefile.am > > > new file mode 100644 > > > index 000000000000..9898b9808055 > > > --- /dev/null > > > +++ b/src/conf/topology/sklrt286/data/Makefile.am > > > @@ -0,0 +1,4 @@ > > > +bin_PROGRAMS = pvt_data > > > +pvt_data_SOURCES = pvt_data.c > > > +AM_CPPFLAGS = \ > > > + -Wall -I../../../../../include > > > > What is this path? > > > > > > > diff --git a/src/conf/topology/sklrt286/data/README > > > b/src/conf/topology/sklrt286/data/README > > > new file mode 100644 > > > index 000000000000..7d1261069dae > > > --- /dev/null > > > +++ b/src/conf/topology/sklrt286/data/README > > > @@ -0,0 +1,2 @@ > > > +To compile the src file, run ./compile_local and then ./pvt_data to > > > execute the binary. > > > +The private data blobs will be generated in the sklrt286 folder. > > > diff --git a/src/conf/topology/sklrt286/data/compile_local > > > b/src/conf/topology/sklrt286/data/compile_local > > > new file mode 100755 > > > index 000000000000..4b935f8b760d > > > --- /dev/null > > > +++ b/src/conf/topology/sklrt286/data/compile_local > > > @@ -0,0 +1,16 @@ > > > +#Helper script to compile > > > +touch ltconfig NEWS README AUTHORS ChangeLog > > > +libtoolize --force --copy --automake > > > +aclocal $ACLOCAL_FLAGS > > > +autoheader > > > +automake --foreign --copy --add-missing > > > +touch depcomp # seems to be missing for old automake > > > +autoconf > > > +export CFLAGS='-O2 -Wall -W -pipe -g' > > > +echo "CFLAGS=$CFLAGS" > > > +echo "./configure $args" > > > +./configure $args || exit 1 > > > +unset CFLAGS > > > +if [ -z "$GITCOMPILE_NO_MAKE" ]; then > > > + make > > > +fi > > > diff --git a/src/conf/topology/sklrt286/data/configure.ac > > > b/src/conf/topology/sklrt286/data/configure.ac > > > new file mode 100644 > > > index 000000000000..72c9021edeaf > > > --- /dev/null > > > +++ b/src/conf/topology/sklrt286/data/configure.ac > > > @@ -0,0 +1,30 @@ > > > +# -*- Autoconf -*- > > > +# Process this file with autoconf to produce a configure script. > > > + > > > +AC_PREREQ([2.69]) > > > +AC_INIT(pvt_data, [VERSION], [BUG-REPORT-ADDRESS]) > > > +AM_INIT_AUTOMAKE(pvt_data, 2.6) > > > +AC_CONFIG_SRCDIR([pvt_data.c]) > > > +AC_CONFIG_HEADERS([]) > > > + > > > +# Checks for programs. > > > +AC_PROG_CC > > > + > > > +# Checks for libraries. > > > + > > > +# Checks for header files. > > > +AC_CHECK_HEADERS([limits.h stdint.h]) > > > + > > > +# Checks for typedefs, structures, and compiler characteristics. > > > +AC_TYPE_INT16_T > > > +AC_TYPE_INT32_T > > > +AC_TYPE_INT8_T > > > +AC_TYPE_UINT16_T > > > +AC_TYPE_UINT32_T > > > +AC_TYPE_UINT8_T > > > + > > > +# Checks for library functions. > > > +AC_CHECK_FUNCS([memset strchr]) > > > +AC_CONFIG_FILES([Makefile]) > > > + > > > +AC_OUTPUT > > > > There is no special dependency here, so we can just add > > src/conf/toplogty/*/data/Makefile.am in the toplevel configure.ac? > > Yes that seems better. Also please note if we do that alsa-lib can > compile the data before it compiles skl topology so we can get rid of > bnary blobs whcih are prebuilt and get them generated on alsa-lib > compile. Yeah, that's nicer, too. > This will solve above header patch and will use std path in lib > > Is that okay with you? Sure. thanks, Takashi