Skip to contentSkip to conversation

conf: topology: Add the conf for SKL-rt286

PATCH Superseded Vinod Koul 2 participants 14 messages Apr 21, 2016 – Apr 22, 2016 Sound

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

v3 cover conf: topology: Add the conf for SKL-rt286

This series adds SKL-i2c conf for simple PCM topology graph

Changes in v3:

- remove bin blobs, now they are generated in install step
- hook the tool compilation to alsa-lib and run it on install
- add u8 in alsa type_compat.h

Shreyas NC (3):
conf: topology: Add Skylake i2s conf
Add u8 in type_compat.h
conf: topology: Generate Private data binary blobs

 configure.ac                                       |    2 +
 include/sound/type_compat.h                        |    2 +
 src/conf/topology/Makefile.am                      |    2 +-
 src/conf/topology/sklrt286/Makefile.am             |   11 +
 src/conf/topology/sklrt286/data/Makefile.am        |    6 +
 src/conf/topology/sklrt286/data/pvt.c              | 1815 ++++++++++++++++++++
 src/conf/topology/sklrt286/data/pvt_data.c         |   90 +
 src/conf/topology/sklrt286/data/pvt_local.h        |    9 +
 .../topology/sklrt286/data/skl-tplg-interface.h    |  232 +++
 src/conf/topology/sklrt286/skl_i2s.conf            |  342 ++++
 10 files changed, 2510 insertions(+), 1 deletion(-)
 create mode 100644 src/conf/topology/sklrt286/Makefile.am
 create mode 100644 src/conf/topology/sklrt286/data/Makefile.am
 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_local.h
 create mode 100644 src/conf/topology/sklrt286/data/skl-tplg-interface.h
 create mode 100644 src/conf/topology/sklrt286/skl_i2s.conf
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v3 1/3 conf: topology: Add Skylake i2s conf

From: Shreyas NC <[email protected]>

The Skylake topology configuration for simple topology graph is provided. This exposes the PCM capabilities of the DSP.

---
 configure.ac                            |   1 +
 src/conf/topology/Makefile.am           |   2 +-
 src/conf/topology/sklrt286/Makefile.am  |  11 +
 src/conf/topology/sklrt286/skl_i2s.conf | 342 ++++++++++++++++++++++++++++++++
 4 files changed, 355 insertions(+), 1 deletion(-)
 create mode 100644 src/conf/topology/sklrt286/Makefile.am
 create mode 100644 src/conf/topology/sklrt286/skl_i2s.conf
configure.ac +1 -0
index c265ec9e159b..1bf75e6d9c2b 100644
@@ -661,6 +661,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
 	  src/conf/topology/Makefile \
 	  src/conf/topology/broadwell/Makefile \
 	  modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
+	  src/conf/topology/sklrt286/Makefile \
 	  alsalisp/Makefile aserver/Makefile \
 	  test/Makefile test/lsb/Makefile \
 	  utils/Makefile utils/alsa-lib.spec utils/alsa.pc)
src/conf/topology/Makefile.am +1 -1
index f56a96c651e5..cbdb7cf07c97 100644
@@ -1 +1 @@
-SUBDIRS=broadwell
+SUBDIRS=broadwell sklrt286
src/conf/topology/sklrt286/Makefile.am new file +11 -0
new file mode 100644
index 000000000000..f10d12fa0f73
@@ -0,0 +1,11 @@
+alsaconfigdir = @ALSA_CONFIG_DIR@
+SUBDIRS = data
+sklrt286dir = $(alsaconfigdir)/topology/sklrt286
+sklrt286_DATA = skl_i2s.conf
+EXTRA_DIST = sklrt286_DATA
+install-data-hook:
+	cp -p media0_in-cpr-0.bin media0_in-mi.bin media0_out-mo.bin media0_out-cpr-6.bin codec0_out-mo.bin codec0_out-cpr-4.bin codec1_out-mo.bin codec1_out-cpr-5.bin codec0_in-cpr-1.bin codec0_in-mi.bin dmic01_hifi_in-cpr-3.bin dmic01_hifi_in-mi.bin hdmi1_pt_out-cpr-7.bin hdmi1_pt_out-cpr-8.bin hdmi2_pt_out-cpr-9.bin hdmi2_pt_out-cpr-10.bin hdmi3_pt_out-cpr-11.bin hdmi3_pt_out-cpr-12.bin $(sklrt286dir)
+clean-local: clean-local-check
+.PHONY: clean-local-check
+clean-local-check:
+	-rm -rf *.bin
\ No newline at end of file
src/conf/topology/sklrt286/skl_i2s.conf new file +342 -0

342 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH v3 1/3] conf: topology: Add Skylake i2s conf

Quoted 43 lines · Vinod Koul

From: Shreyas NC <[email protected]>

The Skylake topology configuration for simple topology graph is provided. This exposes the PCM capabilities of the DSP.

---
 configure.ac                            |   1 +
 src/conf/topology/Makefile.am           |   2 +-
 src/conf/topology/sklrt286/Makefile.am  |  11 +
 src/conf/topology/sklrt286/skl_i2s.conf | 342 ++++++++++++++++++++++++++++++++
 4 files changed, 355 insertions(+), 1 deletion(-)
 create mode 100644 src/conf/topology/sklrt286/Makefile.am
 create mode 100644 src/conf/topology/sklrt286/skl_i2s.conf
configure.ac +1 -0
index c265ec9e159b..1bf75e6d9c2b 100644
@@ -661,6 +661,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
 	  src/conf/topology/Makefile \
 	  src/conf/topology/broadwell/Makefile \
 	  modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
+	  src/conf/topology/sklrt286/Makefile \
 	  alsalisp/Makefile aserver/Makefile \
 	  test/Makefile test/lsb/Makefile \
 	  utils/Makefile utils/alsa-lib.spec utils/alsa.pc)
src/conf/topology/Makefile.am +1 -1
index f56a96c651e5..cbdb7cf07c97 100644
@@ -1 +1 @@
-SUBDIRS=broadwell
+SUBDIRS=broadwell sklrt286
src/conf/topology/sklrt286/Makefile.am new file +0 -0
new file mode 100644
index 000000000000..f10d12fa0f73

src/conf/topology/sklrt286/Makefile.am line 5

Quoted 5 lines
src/conf/topology/sklrt286/Makefile.am new file +5 -0
@@ -0,0 +1,11 @@
+alsaconfigdir = @ALSA_CONFIG_DIR@
+SUBDIRS = data
+sklrt286dir = $(alsaconfigdir)/topology/sklrt286
+sklrt286_DATA = skl_i2s.conf
+EXTRA_DIST = sklrt286_DATA

Isn't it $(sklrt286_DATA)?

src/conf/topology/sklrt286/Makefile.am line 7

Quoted 2 lines
src/conf/topology/sklrt286/Makefile.am new file +2 -0
+install-data-hook:
+	cp -p media0_in-cpr-0.bin media0_in-mi.bin media0_out-mo.bin media0_out-cpr-6.bin codec0_out-mo.bin codec0_out-cpr-4.bin codec1_out-mo.bin codec1_out-cpr-5.bin codec0_in-cpr-1.bin codec0_in-mi.bin dmic01_hifi_in-cpr-3.bin dmic01_hifi_in-mi.bin hdmi1_pt_out-cpr-7.bin hdmi1_pt_out-cpr-8.bin hdmi2_pt_out-cpr-9.bin hdmi2_pt_out-cpr-10.bin hdmi3_pt_out-cpr-11.bin hdmi3_pt_out-cpr-12.bin $(sklrt286dir)

I guess these bin files aren't present or generated in this patch? This would break bisection.

thanks,

Takashi

author
#3 lore raw

Re: [PATCH v3 1/3] conf: topology: Add Skylake i2s conf

Quoted 9 lines · Takashi Iwai

src/conf/topology/sklrt286/Makefile.am line 5

Quoted 7 lines

+++ b/src/conf/topology/sklrt286/Makefile.am

src/conf/topology/sklrt286/Makefile.am new file +5 -0
@@ -0,0 +1,11 @@
+alsaconfigdir = @ALSA_CONFIG_DIR@
+SUBDIRS = data
+sklrt286dir = $(alsaconfigdir)/topology/sklrt286
+sklrt286_DATA = skl_i2s.conf
+EXTRA_DIST = sklrt286_DATA

Isn't it $(sklrt286_DATA)?

Yes, will fix

Quoted 5 lines

src/conf/topology/sklrt286/Makefile.am line 7

Quoted 2 lines
src/conf/topology/sklrt286/Makefile.am new file +2 -0
+install-data-hook:
+	cp -p media0_in-cpr-0.bin media0_in-mi.bin media0_out-mo.bin media0_out-cpr-6.bin codec0_out-mo.bin codec0_out-cpr-4.bin codec1_out-mo.bin codec1_out-cpr-5.bin codec0_in-cpr-1.bin codec0_in-mi.bin dmic01_hifi_in-cpr-3.bin dmic01_hifi_in-mi.bin hdmi1_pt_out-cpr-7.bin hdmi1_pt_out-cpr-8.bin hdmi2_pt_out-cpr-9.bin hdmi2_pt_out-cpr-10.bin hdmi3_pt_out-cpr-11.bin hdmi3_pt_out-cpr-12.bin $(sklrt286dir)

I guess these bin files aren't present or generated in this patch? This would break bisection.

Okay, will move this to second one

Signature · 1 line
~Vinod
author
#4 lore raw

PATCH v3 2/3 Add u8 in type_compat.h

In reply to Vinod Koul

From: Shreyas NC <[email protected]>

Skylake headers use u8 data types which were not present in type_compat so add them.

---
 include/sound/type_compat.h | 2 ++
 1 file changed, 2 insertions(+)
include/sound/type_compat.h +2 -0
index eec86e4bc41e..e973ff3139e2 100644
@@ -32,9 +32,11 @@ typedef int32_t __s32;
 #define __le64 __u64
 #define __le32 __u32
 #define __le16 __u16
+#define __le8  __u8
 #define __be64 __u64
 #define __be32 __u32
 #define __be16 __u16
+#define __be8  __u8
 #endif /* DOC_HIDDEN */
 
 #endif /* __TYPE_COMPAT_H */
Signature · 1 line
1.9.1
author
#5 lore raw

PATCH v3 3/3 conf: topology: Generate Private data binary blobs

In reply to Vinod Koul

From: Shreyas NC <[email protected]>

The DSP modules need private data and that is provided as binary blob. These blobs are compiled from C structures which specify module configuration.

---
 configure.ac                                       |    1 +
 src/conf/topology/sklrt286/data/Makefile.am        |    6 +
 src/conf/topology/sklrt286/data/pvt.c              | 1815 ++++++++++++++++++++
 src/conf/topology/sklrt286/data/pvt_data.c         |   90 +
 src/conf/topology/sklrt286/data/pvt_local.h        |    9 +
 .../topology/sklrt286/data/skl-tplg-interface.h    |  232 +++
 6 files changed, 2153 insertions(+)
 create mode 100644 src/conf/topology/sklrt286/data/Makefile.am
 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_local.h
 create mode 100644 src/conf/topology/sklrt286/data/skl-tplg-interface.h
configure.ac +1 -0
index 1bf75e6d9c2b..28fcd24a883d 100644
@@ -661,6 +661,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
 	  src/conf/topology/Makefile \
 	  src/conf/topology/broadwell/Makefile \
 	  modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
+	  src/conf/topology/sklrt286/data/Makefile \
 	  src/conf/topology/sklrt286/Makefile \
 	  alsalisp/Makefile aserver/Makefile \
 	  test/Makefile test/lsb/Makefile \
src/conf/topology/sklrt286/data/Makefile.am new file +6 -0
new file mode 100644
index 000000000000..1eb9b2e13b78
@@ -0,0 +1,6 @@
+noinst_PROGRAMS = pvt_data
+pvt_data_SOURCES = pvt_data.c
+AM_CPPFLAGS = \
+         -Wall -I$(top_srcdir)/include
+install-exec-local:
+	./pvt_data
src/conf/topology/sklrt286/data/pvt.c new file +1815 -0

1,815 lines not on this page · raw message

src/conf/topology/sklrt286/data/pvt_data.c new file +90 -0

90 lines not on this page · raw message

src/conf/topology/sklrt286/data/pvt_local.h new file +9 -0
new file mode 100644
index 000000000000..5edf7bd71ce9
@@ -0,0 +1,9 @@
+#include <stdio.h>
+#include "skl-tplg-interface.h"
+
+struct skl_dfw_module_mod {
+	char name[100];
+	struct skl_dfw_module skl_dfw_mod;
+};
+
+
src/conf/topology/sklrt286/data/skl-tplg-interface.h new file +232 -0

232 lines not on this page · raw message

Signature · 1 line
1.9.1
author
#7 lore raw

Re: [PATCH v3 3/3] conf: topology: Generate Private data binary blobs

Quoted 5 lines · Takashi Iwai
Quoted 3 lines · Vinod Koul

From: Shreyas NC <[email protected]>

Quoted 8 lines
Quoted 6 lines

The DSP modules need private data and that is provided as binary blob. These blobs are compiled from C structures which specify module configuration.

What if this program is executed on big endian system?

So we made the data structure m,emebers as __lexx shouldn't that take care of this, or we can say, we don't support BE systems.

Am not sure if someone running BE system will be intrested in Intel aDSP :D

Signature · 1 line
~Vinod
#8 lore raw

Re: [PATCH v3 3/3] conf: topology: Generate Private data binary blobs

Quoted 14 lines · Vinod Koul
Quoted 12 lines · Takashi Iwai
Quoted 9 lines · Vinod Koul

From: Shreyas NC <[email protected]>

The DSP modules need private data and that is provided as binary blob. These blobs are compiled from C structures which specify module configuration.

Quoted 6 lines
Quoted 1 line

What if this program is executed on big endian system?

So we made the data structure m,emebers as __lexx shouldn't that take care of this, or we can say, we don't support BE systems.

Am not sure if someone running BE system will be intrested in Intel aDSP :D

It's not about whether it runs on a BE system. The most likely problem is about the package build.

The firmware sub-package is usually handled as a noarch one that is used commonly among all architectures. If you generate a different data per architecture and write to the same file, it results in the inconsistent package, since the firmware generated by a BE host may be used for LE machine.

So, this needs a bit more consideration. If we don't provide the firmware binary but only rely on the file creation at build time, it won't get the complete set depending on the running machine.

Maybe we should add the binary files in addition to the f/w generation code in case anyone needs to modify the data.

Takashi

author
#9 lore raw

Re: [PATCH v3 3/3] conf: topology: Generate Private data binary blobs

Quoted 32 lines · Takashi Iwai
Quoted 14 lines · Vinod Koul
Quoted 12 lines · Takashi Iwai
Quoted 9 lines · Vinod Koul

From: Shreyas NC <[email protected]>

The DSP modules need private data and that is provided as binary blob. These blobs are compiled from C structures which specify module configuration.

Quoted 6 lines
Quoted 1 line

What if this program is executed on big endian system?

So we made the data structure m,emebers as __lexx shouldn't that take care of this, or we can say, we don't support BE systems.

Am not sure if someone running BE system will be intrested in Intel aDSP :D

It's not about whether it runs on a BE system. The most likely problem is about the package build.

The firmware sub-package is usually handled as a noarch one that is used commonly among all architectures. If you generate a different data per architecture and write to the same file, it results in the inconsistent package, since the firmware generated by a BE host may be used for LE machine.

Quoted 6 lines

So, this needs a bit more consideration. If we don't provide the firmware binary but only rely on the file creation at build time, it won't get the complete set depending on the running machine.

Maybe we should add the binary files in addition to the f/w generation code in case anyone needs to modify the data.

Yes anyway based on other discussion we will add precompiled files as well to this, so default binary data is present. And we should generate only if someone modifies, will modify this

Thanks

Signature · 1 line
~Vinod
#10 lore raw
In reply to Vinod Koul
Quoted 6 lines · Vinod Koul

This series adds SKL-i2c conf for simple PCM topology graph

Changes in v3:

- remove bin blobs, now they are generated in install step

This isn't good in general. Usually all installed files are generated in the normal make step, and make-install only copies them. There are a few reasons:
- Invoking a random program as root is a security risk.
- This may create a file by root in the working directory, and either it's not always possible (e.g. on NFS) or it may be left undeletable after make install.

thanks,

Takashi

Quoted 30 lines

- hook the tool compilation to alsa-lib and run it on install
- add u8 in alsa type_compat.h

Shreyas NC (3):
conf: topology: Add Skylake i2s conf
Add u8 in type_compat.h
conf: topology: Generate Private data binary blobs

 configure.ac                                       |    2 +
 include/sound/type_compat.h                        |    2 +
 src/conf/topology/Makefile.am                      |    2 +-
 src/conf/topology/sklrt286/Makefile.am             |   11 +
 src/conf/topology/sklrt286/data/Makefile.am        |    6 +
 src/conf/topology/sklrt286/data/pvt.c              | 1815 ++++++++++++++++++++
 src/conf/topology/sklrt286/data/pvt_data.c         |   90 +
 src/conf/topology/sklrt286/data/pvt_local.h        |    9 +
 .../topology/sklrt286/data/skl-tplg-interface.h    |  232 +++
 src/conf/topology/sklrt286/skl_i2s.conf            |  342 ++++
 10 files changed, 2510 insertions(+), 1 deletion(-)
 create mode 100644 src/conf/topology/sklrt286/Makefile.am
 create mode 100644 src/conf/topology/sklrt286/data/Makefile.am
 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_local.h
 create mode 100644 src/conf/topology/sklrt286/data/skl-tplg-interface.h
 create mode 100644 src/conf/topology/sklrt286/skl_i2s.conf
Signature · 1 line
1.9.1
author
#11 lore raw
Quoted 9 lines · Takashi Iwai
Quoted 6 lines · Vinod Koul

This series adds SKL-i2c conf for simple PCM topology graph

Changes in v3:

- remove bin blobs, now they are generated in install step

Quoted 7 lines

This isn't good in general. Usually all installed files are generated in the normal make step, and make-install only copies them. There are a few reasons:
- Invoking a random program as root is a security risk.
- This may create a file by root in the working directory, and either it's not always possible (e.g. on NFS) or it may be left undeletable after make install.

Right, that is good point indeed.

So what is your suggestion then?

Thanks

Signature · 1 line
~Vinod
#12 lore raw
Quoted 19 lines · Vinod Koul
Quoted 9 lines · Takashi Iwai
Quoted 6 lines · Vinod Koul

This series adds SKL-i2c conf for simple PCM topology graph

Changes in v3:

- remove bin blobs, now they are generated in install step

Quoted 7 lines

This isn't good in general. Usually all installed files are generated in the normal make step, and make-install only copies them. There are a few reasons:
- Invoking a random program as root is a security risk.
- This may create a file by root in the working directory, and either it's not always possible (e.g. on NFS) or it may be left undeletable after make install.

Quoted 3 lines

Right, that is good point indeed.

So what is your suggestion then?

Just put the normal make rule and generate it at the normal make step (only when needed).

Takashi

author
#13 lore raw
Quoted 21 lines · Takashi Iwai
Quoted 19 lines · Vinod Koul
Quoted 16 lines · Takashi Iwai
Quoted 6 lines · Vinod Koul

This series adds SKL-i2c conf for simple PCM topology graph

Changes in v3:

- remove bin blobs, now they are generated in install step

This isn't good in general. Usually all installed files are generated in the normal make step, and make-install only copies them. There are a few reasons:
- Invoking a random program as root is a security risk.
- This may create a file by root in the working directory, and either it's not always possible (e.g. on NFS) or it may be left undeletable after make install.

Quoted 6 lines
Quoted 3 lines

Right, that is good point indeed.

So what is your suggestion then?

Just put the normal make rule and generate it at the normal make step (only when needed).

Okay, thanks will send updated patchset

Signature · 1 line
~Vinod