Fix compiler warning by using the "fallthrough" attribute with GCC
as well.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When the SOF Kconfig is included in other projects, the main menu should
not be that of SOF, rather it should be of the project including SOF.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
There are two types of ipc4 message: global message and module message.
Ipc message is first decoded in handler.c and processed with the help
of helper.c to deal with pipeline message and module message.
Pipeline and Module messages are converted to sof pipeline and
component message.
Ipc4 pipeline message <------> ipc3 pipeline message
RUNNING <-------> TRIGGER START
INIT + PAUSED <-------> PIPELINE COMPLETE
PAUSED <-------> TRIGER_PAUSE
RESET <-------> TRIGER_STOP + RESET
EOS <-------> TRIGER_RELEASE
Ipc4 Module message <------> ipc3 module message
init module <-------> create component
bind modules <-------> connect components
module set_large_config <-------> component cmd
delete module <-------> free component
There is no buffer module in ipc4 design and FW manages buffer for each
module while buffer component is defined by topology and create by ipc
message for ipc3 design. For ipc4 path, FW will create buffer when two
modules are bound since the buffer format can be gathered from source
& sink modules and the buffer can be connected to both modules.
Currently only part of ipc4 messages are processed and others will be done
in future.
Signed-off-by: Rander Wang <rander.wang@intel.com>
This commit enables support for linking in the binary codec from Cadence
for the purpose of decoding Vorbis content.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
ControlBytes section name is given by DEF_EQFIR_COEF macro.
Otherwise, using pipe-eq-fir-volume-playback.m4 in a topology results in
a compilation error.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
No need to write to register MUX when it already has value. Second
write option can't set value and clear register to zero.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
This patch adds support for L1 DRAM memory. If this
memory is available bootloader will try to power up
as many banks of L1 DRAM memory as the platform supports.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This changes the name of MEMORY_POWER_DOWN_DELAY to MEMORY_POWER_CHANGE_DELAY
as we use it in all power change cases and not only when power gating.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Add macro to allow configuration of min channels in PCM_CAPABILITIES.
The default behavior is not changed.
So far min channels was hardcoded to 2 for pipe-volume-playback but we
need mono for i.MX8ULP configuration.
Notice that we need to use the local macro TCHANNELS_MIN because we
don't want to modify the value of CHANNELS_MIN macro outside
of sof/pipe-volume-playback.m4 file.
Doing so will cause unpredictable behavior for next pipeline
definitions.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Make platform_cpu_freq[], platform_ssp_freq[] and
platform_ssp_freq_sources[] arrays static and constant on multiple
platforms.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The default hw param channel is 2, this will cause dai_verify_params
error when set channel is 1 on imx8ulp. Add special config for imx8ulp.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
We expect fclk is 16KHz on imx8ulp, and now it's 48KHz.According to
bclk = mclk / ((DIV + 1) * 2), set SAI_CLOCK_DIV is 0x17.
Also expect mono pcm, then set SAI_TDM_SLOTS is 1
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
In order to work well with bluetooth, we expect mono channel and 16bit
pcm data, then config 16bit sywd one channel for imx8ulp.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
i.MX8ULP uses a MUX to map DMA channels to IP. We map the SAI channels
for now and need to find a more generic approach to select any IP channels.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
This is for generic hda machine driver. Dmic is
not included since it is been developing. The gain
module in ipc4 has the function of volume component
in ipc3 and we use it to control volume.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Volume is supported by gain module in ipc4. We need
to set curve_type, curve_duration and init_val for
this module.
Signed-off-by: Rander Wang <rander.wang@intel.com>
.next_tick is updated on each timer run to the time of the next run.
Instead the current version sometimes only updates it to the current
time. Fix the update condition.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
i.MX8ULP platform integrates HIFI4 DSP running at 528MHz.
This patch adds support for platform drivers and general
platforminitialization.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Add the file for the platform without irqsteer. Now if the platform
have irqsteer we choose interrupt-irqsteer.c, if not then we choose
interrupt-generic.c
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Make mu implementation generic. imx8ulp platform has a new version
of mu, then update mu for preparing to support imx8ulp.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
When the firmware receives a START or RELEASE IPC message, it
immediately triggers all involved components, which starts DMA.
Then it schedules the pipeline task, but since the scheduler can be
already running at that time, the task might be scheduled when DMA
data isn't available yet or has already overflowed. To fix this
change the control flow to also trigger all components from the task
during its first run. Actual data processing then begins with the
next period. Note, that this is currently only possible with
pipelines, using timer-based scheduling. Pipelines, using DMA
interrupts for scheduling are unaffected.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Use bool type for boolean flags, split some too long lines, merge
some needlessly split lines.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
pipeline_task_init() is always called with pipeline_task as its last
parameter. Remove the parameter and use the function explicitly.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add imx8 platform for local testing.
TODO: Update xtensa-build-zephyr.sh when Zephyr repo
is updated with imx8 support.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
In XTOS SOF, ipc_send_queued_msg() is run by task_main_primary_core().
In Zephyr we need to schedule ipc_send_queued_msg() using a notifier
triggered by the periodic ll_scheduler.
This is similar to commit c194125b83 ("zephyr:
add notifier_register(ipc_send_queued_msg) in task_main_start()")
For i.MX we need to use this temporary fix for SOF_SCHEDULE_LL_DMA, also.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>