~canonical-hwe-team/hwe-next/+git/sof:lrg/topic/topology2

Last commit made on 2020-12-12
Get this branch:
git clone -b lrg/topic/topology2 https://git.launchpad.net/~canonical-hwe-team/hwe-next/+git/sof

Branch merges

Branch information

Name:
lrg/topic/topology2
Repository:
lp:~canonical-hwe-team/hwe-next/+git/sof

Recent commits

a12fa26... by Liam Girdwood <email address hidden> on 2020-07-21

Topology2: introduction to topology2.0

About
-----

This is a high level keyword extension on top of the existing ALSA conf
topology format designed to:

1) Simplify the ALSA conf topology definitions by providing high level
   "classes" so topology designers need to write less config for common
   object definitions.

2) Allow simple reuse of objects. Define once and reuse (like M4) with
   the ability to alter objects configuration attributes from defaults.

3) Allow data type and value verification. This is not done today and
   frequently crops up in FW bug reports.

Common Topology Classes
-----------------------

Topology today has some common classes that are often reused throughout
with slightly altered configurations. i.e. widgets (components),
pipelines, dais and controls.

This PR introduces the high level concept of reusable "class" like
definitions that can be used to create topology objects e.g.
Class.Component - Class for widgets that can be instantiated by pipeline
classes/objects. See volume.conf, buffer.conf, host.conf, dai.conf in
<include/components>

Class.Pipeline - Class for pipelines that can be instantiated in the
top-level conf files. See pipeline-volume.conf in <include/pipelines>

Class.DAI - Class for DAIs such as SSP/DMIC/HDA etc.
See ssp.conf in <include/dais>

Class.Control- Class for mixers, byte controls, enum controls etc.
See mixer.conf in <include/controls>

Class.Base - Class for generic objects that cannot be inherited and
are not usually instantiated as stand-alone objects but embedded within
classes/objects of the above types.
Ex: hw_config class for SSP hw_config params,
see ssp_hw_config.conf in <include/dais>

Common Topology Attributes
--------------------------

Topology defines a lot of attributes per object with different types and
constraints. Today there is no easy way to validate type or constraints
and this can lead to many hard to find problems in FW at runtime.

A new keyword "DefineAttribute" has been added to define attribute type,
size, min value, max value, enum_values. This then allows alsatplg to
validate each topology object attribute.

Topology Classes define the list of attributes that they use and whether
the attribute is mandatory, can be overridden by parent users or is
immutable. This also helps alsatplg emit the appropriate errors for
attribute misuse.

Common Topology Arguments
-------------------------

Arguments are used to pass essential data needed for instantiating an
object particulary needed for the object name. Ex: host."5.playback".
The first part in the object name stands for the class name “host” and
the remaining “5.playback” stand for the 3 arguments needed to
instantiate the host object i.e.. pipeline_id, , direction.

ALSA Conf Parser
----------------

All the changes being proposed and discussed here must be 100% compliant
with the ALSA conf parser. i.e. no syntax changes or changes to semantics
for any existing keyword.

It's intended that there will be NO changes to the ALSA conf parser
(unless new keywords require this ?) and all topology building changes
will be in the alsatplg compiler.

alsatplg Compiler
-----------------

The alsatplg compiler requires changes to construct and validate objects
based on the new keywords. No changes to existing keywords. Existing
topologies will not require any changes. The only two new keywords
proposed at the top-level are “Class” and “Object”. All other keywords
for class arguments and attributes are limited within the tplg2 compiler
changes. Topology2 compiler changes also re-uses most of the code in the
conf parser for parsing the configuration for widgets, controls, DAI,
hw_config, backends etc.

Opens
-----

Add platform constraints and capabilities and include them so that
alsatplg can apply these platform constraints on top of existing class
attribute constraints such as valid SSP port number is 3 or 6 depending
on the platform.

Signed-off-by: Liam Girdwood <email address hidden>
Signed-off-by: Ranjani Sridharan <email address hidden>

aeea2b0... by Keyon Jie <email address hidden> on 2020-11-10

topology: smart_amp: restrict channel number of PCM capabilities

Both the playback and capture PCMs should be restricted to the
corresponding SMART_PB_CH_NUM and SMART_REF_CH_NUM, as running them with
other channel numbers will not work correctly.

Signed-off-by: Keyon Jie <email address hidden>

a68c756... by Guennadi Liakhovetski <email address hidden> on 2020-11-26

dw-dma: align ILL allocations

ILL entries in the DW DMA driver are accessed both by the controller,
using DMA and by the DSP. For this to work the DSP has to force cache
synchronisation appropriately. Therefore the ILL area has to be
allocated with cache-line size alignment. This isn't the case with the
Zephyr allocator. This patch switches allocation from rmalloc() to
rballoc() to force such alignment. Eventually a generic fix will be
implemented in an SOF wrapper fpr the Zephyr allocator.

Signed-off-by: Guennadi Liakhovetski <email address hidden>

cc1cd8a... by Seppo Ingalsuo <email address hidden> on 2020-12-01

Tools: Test: Fix Matlab compatibility in process_test.m

The set of figure property in figure() command is not supported
in Matlab. The separate set() property works for both Octave and
Matlab.

Signed-off-by: Seppo Ingalsuo <email address hidden>

6521799... by Brent Lu on 2020-11-24

topology: sof-tgl-max98357a-rt5682: support rt1011 amp

Add a macro 'CODEC' to generate topology for rt1011 speaker amp.
Add a macro 'FMT' to seperate speaker dai format: s16le, s24le
Modify both pcm name by 'Speakers'

Signed-off-by: Brent Lu <email address hidden>
Signed-off-by: Mac Chiang <email address hidden>

d08e777... by Marcin Rajwa <email address hidden> on 2020-12-02

trace: fix missing trace variable for CONFIG_TRACEM

This patch adds missing trace variable for CONFIG_TRACEM.

Signed-off-by: Marcin Rajwa <email address hidden>

ddd3736... by Joseph Burt <email address hidden> on 2020-12-01

ipc: Use DMA attribute for min. ptable copy size

This rounds up the page table DMA transfer size to DMA_ATTR_COPY_ALIGNMENT
instead of a hard-coded 4 bytes.

Signed-off-by: Joseph Burt <email address hidden>

1edfe08... by Joseph Burt <email address hidden> on 2020-12-01

ipc: Fix page table size calculation

This was too small, causing the ptable to be truncated and the
ptable DMA transfer to fail on BDW for small buffers, where the
minimum transfer is 4 bytes.

Signed-off-by: Joseph Burt <email address hidden>

12ce388... by Sathyanarayana Nujella <email address hidden> on 2020-11-16

topology: sof-smart-amplifier: update speaker amp ssp DAI configuration

Speaker amp's SSP tdm & clock is configured for 32-bit, accordingly
update DAI configuration to s32_le.

Signed-off-by: Sathyanarayana Nujella <email address hidden>

67f3b06... by Jaska Uimonen <email address hidden> on 2020-11-30

mux: check individual channels and not entire matrix row

Currently we are checking if matrix row contains any 1's (popcount). In
mux case this doesn't tell us if channels are mixed. For example if we
have 2 input matrix in which first row's position 2 and 4 have value 1,
it means that both streams channel 1 is copied to output channels 2 and
4, so not mixed. So change the check to be channel specific.

Signed-off-by: Jaska Uimonen <email address hidden>