~canonical-hwe-team/hwe-next/+git/sof:imx-stable-v2.1

Last commit made on 2022-05-25
Get this branch:
git clone -b imx-stable-v2.1 https://git.launchpad.net/~canonical-hwe-team/hwe-next/+git/sof

Branch merges

Branch information

Name:
imx-stable-v2.1
Repository:
lp:~canonical-hwe-team/hwe-next/+git/sof

Recent commits

90c52df... by Paul Olaru <email address hidden>

topology1: remove setup config info from further codec_adapter topologies

Remove the setup config info from all initial config data in the
codec_adapter kcontrol's. This is no longer needed.

Fixes: bfd5e61768713 ("topology1: remove setup config info from all codec_adapter topologies")
Fixes: 692299f2a65fc ("codec_adapter: Remove setup config from module data")

Signed-off-by: Paul Olaru <email address hidden>

c2ce17d... by Daniel Baluta <email address hidden>

codec_adapter: cadence: Resolve api_id at runtime

Linux host will send codec_id at runtime via sof_ipc_stream_params
as part of extended data appended at the end.

When ext_data_length is non-zero this means that the kernel wants us
the use dynamic codec id. When ext_data_length is zero, use backward
use default codec id which means we keep compatibility with older
kernels.

The codec_id is sent using compress API interface. We need to convert
that to internal cadence numbering scheme.

And final step, in order to use the dynamic id we need to move
cadence_codec_post_init() from init() function to prepare() in order
to be sure that the kernel already sent us the parameters.

We need to this operation atomically in one patch in order to avoid
breaking the functionality between patches.

Signed-off-by: Daniel Baluta <email address hidden>

d7c4226... by Daniel Baluta <email address hidden>

codec_adapter: cadence: Remove api_id parameter

api_id parameter will be dynamically updated at runtime. Remove api_id
parameter id and use the default value in order to make code easier
to update for dynamic id change.

Signed-off-by: Daniel Baluta <email address hidden>

cea7fb2... by Daniel Baluta <email address hidden>

ipc3: Check ipc size check for pcm_params to account for ext_data

Now that sof_ipc_pcm_params struct has some extended data at the end
the hdr.size will also account for this data.

Change sanity condition to see if hdr.size is updated to keep track of
extended data.

Also check that ext_data will not go beyond SOF_IPC_MAX_SIZE.

Signed-off-by: Daniel Baluta <email address hidden>

4f819f6... by Daniel Baluta <email address hidden>

codec_adapter: Copy extended data found at the end of sof_ipc_stream_params

When ext_data_length is not zero this means that sof_ipc_stream_params
will contain additional data appended at the end.

Copy this data in mod->stream_params so that we can use it later.
Signed-off-by: Daniel Baluta <email address hidden>

33ca282... by Daniel Baluta <email address hidden>

ipc: stream: Add extended data at the end of sof_ipc_stream_params

In order to support sending the compress parameters (and maybe other
parameters) we introduce `ext_data_length` field inside
sof_ipc_stream_params.

We use 2 bytes from the reserved pool. This will represent
the size of extended data that will be placed at the end
sof_ipc_stream_params struct.

existing value for this reserved bytes is `0`. This will mean
that we can keep backward compatibility. 0 means no extended data.

Add also VLA data[] in order to easily access extended data.

Signed-off-by: Daniel Baluta <email address hidden>

8857548... by Daniel Baluta <email address hidden>

codec_adapter: Dynamically allocate stream_params

This prepares sof_ipc_stream_params structure to have some
extended data appended at the end.

For this reason we no longer can use the sof_ipc_stream_params
object inside processing_module, but we need a pointer.

stream_params is allocated at codec_adapter_params().

Signed-off-by: Daniel Baluta <email address hidden>

db982fd... by Daniel Baluta <email address hidden>

codec_adapter: Remove assert after memcpy_s

Remove assert and report the error condition to the upper layers.
It does not make sense to stop the FW if config parameters fails.

Signed-off-by: Daniel Baluta <email address hidden>

d341894... by Daniel Baluta <email address hidden>

platform: Rename module_init section

.module_init sections is used to keep all components constructor
functions.

Zephyr uses -ffunction-sections option which will create a section for
each function. Unfortunately, this creates a section named .module_init
for the function module_init() used to initialize the processing module
generic layer.

Thus, places module_init() in the constructor area named .module_init
which is wrong.

To avoid this we rename .module_init section for constructors to
.initcall.

Fixes: https://github.com/thesofproject/sof/issues/5662
Signed-off-by: Daniel Baluta <email address hidden>

c067f7e... by Daniel Baluta <email address hidden>

codec_adapter: cadence: Only apply config is codec is prepared

Obviously this is a bug, but it works now because parameters are known
before prepare is done.

We will be introducing dynamic codec id set at prepare time, so there
will be a problem if apply config is called before codec is prepared.

Signed-off-by: Daniel Baluta <email address hidden>