Commit Graph

9397 Commits

Author SHA1 Message Date
Guennadi Liakhovetski f35132fed6 eq-fir: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register eq-fir with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski d1d3cfdeaf tone: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register tone with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 644a11b251 switch: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register switch with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 674aed94c2 selector: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register selector with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski dba274da89 chain-dma: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register chain-dma with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski ad3e2e4ab1 src: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register src with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski efa132a9c8 dai: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register dai with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 3c46100163 mixer: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register mixer, mixin and mixout with the
Zephyr initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 4ff094088e volume: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register volume with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 6d48dc5ca4 zephyr: add a macro for module initialisation
This macro integrates SOF modules into Zephyr initialisation
framework. SOF module initialisation functions use
DECLARE_MODULE_ADAPTER() or DECLARE_MODULE() to register with the SOF
native initialisation scheme, now the same initialisation functions
can be used with the new SOF_MODULE_INIT() macro to integrate them
into the Zephyr initialisation flow.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski dfaa45c95e zephyr: move primary_core_init() to POST_KERNEL
Zephyr has an elaborate subsystem initialisation framework. Use it
for primary_core_init() instead of calling it from main(). This
prepares for a migration of module initialisation to that framework
too.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Dobrowolski, PawelX 389d7e1bcd lib_manager: lib_id mismatch prevention
It is possible that lib_id from IPC would not match
with lib_id of module. That can cause NULL pointer and FW crash.

Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
2023-01-26 13:23:08 +02:00
Ranjani Sridharan ae8ca22a59 topology2: Add instance attribute for all classes
In preparation for making it easier to write topology conf files that
can be conditionally included without having to worry about conflicting
node ID's for objects between the included file and the top-level conf
file, modify all classes to include an instance attribute. This means
that irrespective of the object type, all objects will be instantiated
as follows:

Object.Widget.gain.1 {} or Object.Base.pdm_config.2 {} etc

The instance ID's are typically only meant for the alsatplg compiler to
differentiate the nodes in the conf file and are not relevant for the
kernel or the firmware. This change will allow the alsatplg compiler to
be modified to automatically make the node ID's unique before
conditionally including conf files.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-25 12:16:29 -08:00
Ranjani Sridharan d739207f90 topology2: Build the topology for MTL chromebook
Build the topology for the MTL chromebook with Headset on SSP 2 and
speakers on SSP 0.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
2023-01-25 10:10:28 -08:00
Ranjani Sridharan 3ab06327df topology2: cavs-rt5682: Parameterize all HS and Speaker names
Add variable definitions for all HS and Speaker settings such as codec
name, SSP DAI index, PCM caps names etc in preparation to make this file
reusable for variations in the SSP ports in different machines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
2023-01-25 10:10:28 -08:00
Ranjani Sridharan 231622fa01 module_adapter: refactor the copy function
Refactor the module_adapter_copy() function to split the simple_copy
case into a separate helper function

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-24 21:22:42 +00:00
Krzysztof Frydryk 34b9345942 platform: ace: enable IDC on primary core
Init IDC on primary core to enable receiving IDCs from secondary cores.

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2023-01-23 21:33:30 +02:00
Pin-chih Lin 091948ccc0 topology1: Align DAI format as SSP config to 24-bit for rt1019
This commit fixes Speakers audio issue by aligning bitwidth format
of DAI config to 24-bit as SSP config, which has been modified by
commit c8fe1927c <topology1: change audio format to 24 bit for rt1019>

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-01-23 21:27:55 +02:00
Kai Vehmanen e2b4a58e85 ipc4: dai: remove S32_LE hardcode for SSP DAIs
The limitation that SSP sample format is always S32_LE
does not hold. There can be I2S codecs where 16bit sample
width is used and SSP FIFO will expect 16bit samples from
DMA.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-01-23 21:27:10 +02:00
Ranjani Sridharan 97374b6f91 topology2: Make name a mandatory attribute in hw_config
Add an instance attribute and make the name attribute mandatory for the
hw_config objects. This is required because the topology2 compiler allows
for expansion of string values with variable definitions. So, if we
wanted to expand the name from a variable definition(as shown below), it
is only possible if it were a normal attribute instead of the node ID as
it is currently.

Define {
	SSP0_HW_CONFIG_NAME	"SSP0"
}
Object.DAI.SSP.1 {
	dai_index 0
	Object.Base.hw_config.1 {
		name $SSP0_HW_CONFIG_NAME
	}
}

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-23 21:14:17 +02:00
Ranjani Sridharan 969b387584 topology2; Make dai_index a mandatory attribute for DAI objects
Add an instance attribute that will be used to instantiate DAI objects
and make dai_index a mandatory attribute for all DAI objects types. This
is in preparation to make the instance attribute default for all objects
with topology2. This is required because the topology2 compiler allows
for expansion of string values with variable definitions. So, if we
wanted to expand the value of dai_index from a variable definition(shown
as below), it is only possible if it were a normal attribute instead of
the node ID as it is currently.

Define {
	SSP_DAI_INDEX	3
}

Object.Dai.SSP.1 {
	dai_index	$SSP_DAI_INDEX
}

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-23 21:14:17 +02:00
Ranjani Sridharan 54f6f623de topology2: remove all pipeline stream_name setting
It is not used at all.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-23 21:14:17 +02:00
Marc Herbert cc00c57057 xtensa-build-zephyr.py: require zephyr.strip
Make CONFIG_BUILD_OUTPUT_STRIPPED mandatory so we can always compare
builds. It makes practically zero build space and time difference and
has huge reproductibility value, see discussion in
https://github.com/zephyrproject-rtos/zephyr/pull/51954

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-23 19:28:51 +02:00
Marc Herbert 35dda2ae27 .github/zephyr: compare Windows and Linux builds
The End.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-23 19:28:51 +02:00
Marc Herbert 1193203717 .github/zephyr: align git fetch and describe across Windows and Linux
Fetching different tags causes `git describe` output to be different.

Fixes commit 68b49c186e (".github/zephyr: switch Windows build to west
update --narrow")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-23 19:28:51 +02:00
Ranjani Sridharan 1abfb3448f up_down_mixer: Convert module to use the module interface
Use the module_adapter interface instead of comp_drv ops

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-23 18:50:49 +02:00
Kai Vehmanen 7b100fc356 dai-zephyr: fix crash in dai_reset
It is not guaranteed that 'dd->z_config' is set when dai_reset() is
called. E.g. if the requested runtime parameters are not supported by
the hardware, the parameter setup will not be completed. When
dai_reset() is called in this state, a FW crash is hit due to NULL
dereference.

Fix the issue by checking dd->z_config value before use.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-01-23 15:15:54 +02:00
Rander Wang e7e29b61e2 ipc4: increase max pipeline count to 32
Now each stream is built with at least two pipelines and this can't
support more than 8 streams, 6 streams in normal. This results to CI
test failure since it will tests all streams although current topology
is simple.

Now increase it to 32 for future enhancement.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-01-23 12:58:44 +02:00
Kai Vehmanen c3807ae4a7 topology2: avs-tplg: disable USE_CHAIN_DMA
The pipeline-free chain DMA implementation has multiple
issues, so disable it by default in Intel cAVS topologies.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-01-23 10:07:29 +02:00
Trevor Wu 7294275740 topology1: add mt8188 related pipelines and components
Add topology files for mt8188 including mt8188.m4 and
sof-mt8188-mt6359.m4.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-01-20 13:48:25 +00:00
Trevor Wu 890037740b platform: mtk: add platform dai support for mt8188
Add platform dai_init() to platform_init().
Add platform dai to build list.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-01-20 13:48:25 +00:00
Trevor Wu d340f72f39 platform: mtk: add platform driver for mt8188
Add mt8188 dai and dma platform driver.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-01-20 13:48:25 +00:00
Trevor Wu 81bcc8999f platform: mtk: move extern declaration to common header
There is a checkpatch warning shown as below.
"WARNING: externs should be avoided in .c files"

Move extern declaration to afe-memif.h, so that the warning won't be
seen in the follow-up project.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-01-20 13:48:25 +00:00
Trevor Wu 2633535cb2 drivers: mtk: add mt8188 AFE sinegen support
Add MT8188 sinegen driver for debug purpose.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-01-20 13:48:25 +00:00
Trevor Wu d1dd69822e drivers: mtk: move afe drivers to common folder
Move afe driver to afe folder so that platform independent drivers could
be reused. There are platform folder inside afe folder which are
reserved for platform independent driver.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-01-20 13:48:25 +00:00
Trevor Wu 785ebb87c9 drivers: mtk: separate sinegen control from memif
Sinegen control part is platform dependent and optional for debug
purporse. On the other hand, memif control driver which is platform
independent could be reused. As a result, sinegen control driver is
separated from afe-memif.c.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-01-20 13:48:25 +00:00
Trevor Wu 41dfc80e48 platform: mtk: add afe-platform support for mt8188
Add mt8188 AFE common header and register header files.
Add AFE platform for mt8188 audio.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-01-20 13:48:25 +00:00
Bard Liao 64dc4a7a7b topology2: sof-mtl-rt711-4ch: specify PLATFORM=mtl
It worked because we defined DMIC_DRIVER_VERSION 3 as the default value.
We have to specify PLATFORM=mtl when the default value was removed.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-01-19 23:34:48 +02:00
Piotr Makaruk 507ad53b48 tgl-h: hda: enable chain dma
Enable building chain dma component on TGL-H platform

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-19 15:37:32 +01:00
Piotr Makaruk f90c69c5ae mtl: hda: enable chain dma
Enable building chain dma component on MTL platform

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-19 15:37:32 +01:00
Piotr Makaruk 114a372d1d tgl: hda: enable chain dma
Enable building chain dma component on TGL platform

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-19 15:37:32 +01:00
Piotr Makaruk 19df10fea6 hda: enable handler for hw chain dma
HW chain dma support require new logic in handler

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-19 15:37:32 +01:00
Piotr Makaruk d92f07ad30 hda: chain management and logic implementation
Hardware HDA chain require manager for controlling multiple streams tasks.
Enable support with LL task and DMA mandatory logic.

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-19 15:37:32 +01:00
Guennadi Liakhovetski 4cc9d5418b copier: remove redundant cache invalidation, add comments
No need to invalidate cache again - comp_new() already has done it.
Also document why we don't need to copy config_data[] and use
memcpy() directly instead of mailbox_hostbox_read() - we already have
a pointer and cached have been invalidated already.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-18 16:41:00 +02:00
Guennadi Liakhovetski 31c637a285 copier: fix a wrong DAI device pointer
With IPC4 the top level component that receives trigger events is a
copier and not the associated with it DAI. We need to retrieve the
DAI device pointer for its timing parameters.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-18 16:41:00 +02:00
Guennadi Liakhovetski aa69b492cf dai: (cosmetic) remove a duplicate header
rtos/interrupt.h is included twice in dai-zephyr.c, remove one copy.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-18 16:41:00 +02:00
Guennadi Liakhovetski a0a7952b58 dai: protect common properties objects
Some DAI types share properties objects between playback and capture
directions and write to them and read from them with no locking. Add
a DAI spinlock to protect them.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-18 16:41:00 +02:00
Marc Herbert 235dd98e83 CODEOWNERS: be more selective when matching CMakeLists.txt files
I don't want to be spammed any more every time someone adds or renames a
source file.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-18 14:11:07 +00:00
Marc Herbert cb4cb1d0a2 CODEOWNERS: search/replace @mrajwa -> @abonislawski
Dumb search/replace per @mwasko's request in #6933.

Urgently required because the @mrawja account does not exist anymore and
Github complains.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-18 14:11:07 +00:00
Baofeng Tian 46cb40aa07 dai: remove dai frame format configuration
frame_fmt was later overwritten by ipc_config.framefmt, so
the previous assignment no use anymore.
Removed whole dai_get_hw_params function to avoid misunderstand.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-01-18 14:02:08 +00:00