This change allows us to free components and pipelines
in any order. Added setting component pointer to NULL
after comp_free() invocation. In pipeline_free() there is
a incovation of pipeline_comp_free() only if component
pointer is not NULL.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
These traces shouldn't be duplicated, they should be in
more public header because they are used outside of FW.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Reverts usage of __packed macro in ipc, kernel and user
headers. These headers are not only used by firmware,
so they shouldn't have any dependency on it.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes cmake script to use CONFIG_BOOT_LOADER instead
of specific platform configs when choosing whether to
build bootloader.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Removes static assert for HEAP_BUF_ALIGNMENT, because it
doesn't make sense anymore to keep it. The value of this
define has been changed to PLATFORM_DCACHE_ALIGN, so it
will always be valid.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
All cache related defines should be kept inside
dedicated cache header. Also changes sizeof(uint32_t)
to sizeof(void *), so the header could be included
from assembly files.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Removes PLATFORM_TIMER_START_OFFSET define from
platforms, because it's deprecated and not used
anymore.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit does not change FW behaviour since
both COMP_STATUS_STATE_ALREADY_SET and PPL_STATUS_PATH_STOP
defines are equal to 1. It just makes code more clear.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Moves task structure and defines to the sof/task.h,
where they should be from the beginning. sof/schedule.h is
just for scheduler related things.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Allows checking preprocessor symbols in compile-time.
Returns true for config with value 1, false for undefined
or any other value.
Expression like (CONFIG_MY ? a : b) rises compilation error when
CONFIG_MY is undefined, (IS_ENABLED(CONFIG_MY) ? a : b) can be
used instead of it.
It is intended to be used with Kconfig's bool configs - it should rise
error for other types, except positive integers, but it shouldn't be
used with them.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This patch edit ipc_cmd (main ipc dispatcher) to return only at
the end of the function. This simplifies debugging a lot.
Along with that change additional log has been added at the
end of the function to show what was the the last request
and its return value.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Moves headers to dedicated directories in sof/include,
arch/include and platform/include. File tree was too flat,
so some of the files has been moved.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
The while loop in alloc_trace_runtime_heap() and
alloc_trace_buffer_heap() will always get the first matched heap from
get_heap_from_caps() and the loop will run infinitely.
This patch create a function alloc_trace_heap() which will be passed in
different heap_base and heap_count to fix the issue mentioned, and both
runtime_heap and buffer_heap can reuse this same function for tracing.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
In dai_playback_params() and dai_capture_params()
functions we do not have to take period values
from adjacent component. We can retrieve it from
dai component sof_ipc_comp_config struct.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Moves DECLARE_MODULE macro from common.h to
audio/component.h header. It needs config.h
header, which shouldn't be included from common.h,
because it might be indirectly included by external
user applications.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Cleanups includes in all drivers, include and
platform files. Unused headers has been removed
and needed has beed added.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Cleanups includes in all lib files.
Unused headers has been removed and needed
has beed added.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Cleanups includes in all ipc files.
Unused headers has been removed and needed
has beed added.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Cleanups includes in all schedule files.
Unused headers has been removed and needed
has beed added.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Cleanups includes in all math files.
Unused headers has been removed and needed
has beed added.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Cleanups includes in all audio files.
Unused headers has been removed and needed
has been added.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Cleanups includes in all architecture files.
Unused headers has been removed and needed
has beed added.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Right now we have headers spread across main sof include
directory, arch include directory and platform include
directory. The same header e.g. cpu needs to be included
from sof, arch and platform. This creates long inclusion
lists and often we are missing many headers, but since
they are already included in some other headers, we don't
see the issue. This patch changes the approach to including
platform headers. It allows for inclusion only from main
header e.g. sof/cpu.h will include arch/cpu.h and platform/cpu.h.
If we want to use some cpu functionality we only need to include
sof/cpu.h and don't worry about the rest. If we have platform
header, which is only used inside of platform code, then
it can be directly accessed within.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Cleanups inclusions in ipc, kernel and user headers.
Some of the headers were missing and some weren't needed.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds preprocessor check in cavs headers and throws error,
when they are included from outside of equivalent platform
headers.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>