topology: Add build support for topology files.

Add support to build topology text files into binary files understood
by the drivers. This is a two stage build, the first stage is to
pre-process the files with M4 into regular alsa-conf format and the second
stage is to compile with the alsa topology compiler.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2017-07-06 16:52:14 +01:00
parent dd08ed7a19
commit c52d42685d
4 changed files with 47 additions and 2 deletions

3
.gitignore vendored
View File

@ -1,5 +1,6 @@
*.o
*.in
*~
autom4te*
*.Po
*.swp
@ -16,3 +17,5 @@ ltmain.sh
rimage/rimage
rmbox/rmbox
rwav/rwav
*.tplg
topology/*.conf

View File

@ -1 +1 @@
SUBDIRS = rimage rmbox
SUBDIRS = rimage rmbox topology

View File

@ -16,6 +16,7 @@ AC_OUTPUT([
Makefile
rimage/Makefile
rmbox/Makefile
topology/Makefile
])
echo "
@ -23,4 +24,4 @@ echo "
prefix: ${prefix}
Compiler: ${CC}
CFLAGS: ${CFLAGS}
"
"

41
topology/Makefile.am Normal file
View File

@ -0,0 +1,41 @@
#
# Dependencies
#
DEPS = \
dsps/*.m4 \
common/*.m4 \
m4/*.m4 \
sof/*.m4
#
# Machines
#
MACHINES = \
reef-cht-nocodec.tplg \
reef-apl-nocodec.tplg \
reef-bxt-nocodec.tplg \
reef-byt-nocodec.tplg \
reef-bdw-rt286.tplg \
reef-bdw-rt5640.tplg \
reef-byt-rt5640.tplg \
reef-byt-rt5651.tplg \
reef-hsw-rt5640.tplg
# Uncomment the following line if you want to debug conf files
.PRECIOUS: %.conf
%.conf : %.m4 ${DEPS}
m4 -I m4 $< > $@
%.tplg : %.conf
alsatplg -v 1 -c $< -o $@
all: ${MACHINES}
clean:
rm -f *.conf
rm -f *.tplg