Commit Graph

3427 Commits

Author SHA1 Message Date
Bartosz Kokoszko de2e08a07a pipeline: refine pipeline_free() function
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>
2019-07-24 23:01:06 +02:00
Janusz Jankowski 9d7aea477b testbench: add missing trace classes
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-07-24 22:33:25 +02:00
Janusz Jankowski 7fb9372d29 logger: add missing trace classes
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-07-24 22:33:25 +02:00
Janusz Jankowski 3d5cc36b1b trace: deduplicate TRACE_CLASS defines
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>
2019-07-24 22:33:25 +02:00
Tomasz Lauda a513ac7251 debug: use IS_ENABLED macro instead of defining new one
Uses IS_ENABLED(CONFIG_GDB_DEBUG) instead of defining
new GDB_DEBUG macro.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-20 10:03:30 +02:00
Tomasz Lauda bdd0f4fa66 arch: xtensa: add missing #include <config.h> to debug-vector.S
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-20 10:03:30 +02:00
Tomasz Lauda 3860b90c9e config: replace #ifdef with #if for CONFIG_* defines
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-20 10:03:30 +02:00
Tomasz Lauda c4778aa375 ipc: kernel: user: revert usage of __packed macro
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>
2019-07-20 10:03:30 +02:00
Tomasz Lauda e20dcd9ff4 spinlock: move DEBUG_LOCKS and DEBUG_LOCKS_VERBOSE to Kconfig
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-20 10:03:30 +02:00
Tomasz Lauda 16df30a73d arch: xtensa: remove level 6 irq define from xtos
We don't have any platform with level 6 interrupt support.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-20 10:03:30 +02:00
Tomasz Lauda 7299afe35c arch: xtensa: use CONFIG_BOOT_LOADER instead of platforms
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>
2019-07-20 10:03:30 +02:00
Tomasz Lauda 4b82db8a62 memory: remove static assert for HEAP_BUF_ALIGNMENT
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>
2019-07-20 10:03:30 +02:00
Tomasz Lauda eff2f46415 memory: make HEAP_BUF_ALIGNMENT macro to use PLATFORM_DCACHE_ALIGN
It adds another abstraction layer, so we don't need to directly use
xtos define.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-20 10:03:30 +02:00
Tomasz Lauda 3fcd4e5a03 cache: move PLATFORM_DCACHE_ALIGN to cache.h
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>
2019-07-20 10:03:30 +02:00
Tomasz Lauda 4b5110b88b dma-trace: use dedicated trace_buffer_error_atomic macro
Creates trace_buffer_error_atomic macro and changes
usage in dma-trace.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-20 10:03:30 +02:00
Tomasz Lauda 5740092514 edf_schedule: change wrong trace function
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-20 10:03:30 +02:00
Tomasz Lauda 88c6626655 pipeline: change wrong trace function in pipeline_reset
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-20 10:03:30 +02:00
Tomasz Lauda 10464ece03 platform: remove PLATFORM_TIMER_START_OFFSET
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>
2019-07-20 10:03:30 +02:00
Tomasz Lauda 3b580ac836 suecreek: remove #include <config.h> from linker script
Removes #include <config.h> from linker script, because it's
not used.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-20 10:03:30 +02:00
Bartosz Kokoszko f79a1a0afc mux: return PPL_STATUS_PATH_STOP in mux_trigger()
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>
2019-07-20 08:29:34 +02:00
Tomasz Lauda 14b23ba5d3 task: move task structure and defines to the right header
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>
2019-07-19 15:50:35 +02:00
Janusz Jankowski f99f276e49 kconfig: IS_ENABLED macro
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>
2019-07-19 13:33:43 +02:00
Marcin Rajwa 0652cb186d handler: rework ipc_cmd to return only once and log last request
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>
2019-07-18 17:51:53 +02:00
Tomasz Lauda db000b3276 spinlock: detect_test: move forgotten includes
Moves forgotten includes to their right place.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-18 16:00:24 +02:00
Tomasz Lauda 54d4d01d64 sof: move c files to dedicated directories
Moves c files to dedicated directories.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-18 16:00:24 +02:00
Tomasz Lauda 4ee9e1159c sof: move headers to dedicated directories
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>
2019-07-18 16:00:24 +02:00
Keyon Jie 200dee8cc7 alloc: fix the heap alloc trace infinite loop issue
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>
2019-07-18 12:04:13 +02:00
Bartosz Kokoszko b66a6d5c10 dai: use periods from sof_ipc_comp_config in dai_params()
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>
2019-07-17 15:48:11 +02:00
Keyon Jie 720cdcda67 sof-ctl: fix ABI dumping doesn't work issue
For dumping to output file without '-r', we need to dump ABI header,
here fix it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-07-17 12:00:54 +02:00
Tomasz Lauda 62035b22fc host: move memory defines to appropriate header
Moves memory defines for host architecture to
memory.h.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-16 15:02:06 +02:00
Tomasz Lauda eb6378cb4b component: move DECLARE_MODULE macro
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>
2019-07-16 15:02:06 +02:00
Tomasz Lauda 1944052617 drivers: include: platform: cleanup includes
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>
2019-07-16 15:02:06 +02:00
Tomasz Lauda fe342f020a lib: cleanup includes
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>
2019-07-16 15:02:06 +02:00
Tomasz Lauda b193c04d1c ipc: cleanup includes
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>
2019-07-16 15:02:06 +02:00
Tomasz Lauda 81f4b9229f schedule: cleanup includes
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>
2019-07-16 15:02:06 +02:00
Tomasz Lauda 34c76fc78f math: cleanup includes
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>
2019-07-16 15:02:06 +02:00
Tomasz Lauda c5f9b1d7e9 task: cleanup includes
Cleanups includes in task file.
Unused headers has been removed and needed
has beed added.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-16 15:02:06 +02:00
Tomasz Lauda ba56ccac4f init: cleanup includes
Cleanups includes in init file.
Unused headers has been removed and needed
has beed added.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-16 15:02:06 +02:00
Tomasz Lauda c1439168a0 gdb: cleanup includes
Cleanups includes in gdb file.
Unused headers has been removed and needed
has beed added.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-16 15:02:06 +02:00
Tomasz Lauda b3a04c7477 audio: cleanup includes
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>
2019-07-16 15:02:06 +02:00
Tomasz Lauda 38f3f3d7ba arch: cleanup includes
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>
2019-07-16 15:02:06 +02:00
Tomasz Lauda 77f94b8ce5 gdb: move xtensa specific defines to arch
Moves xtensa specific defines from generic code
to xtensa arch.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-15 13:29:29 +02:00
Tomasz Lauda a990c611c4 sof: change approach to including arch headers
Further work, but now it's done for remaining arch headers.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-15 13:29:29 +02:00
Tomasz Lauda 0317a7bce5 sof: change approach to including platform headers
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>
2019-07-15 13:29:29 +02:00
Tomasz Lauda 807815f41b include: cleanup inclusions in ipc, kernel and user headers
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>
2019-07-15 13:29:29 +02:00
Tomasz Lauda 0648828b2b cavs: allow for header inclusion only from platform code
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>
2019-07-15 13:29:29 +02:00
Tomasz Lauda ceb35857b6 arch: unify include guards naming
Unifies include guards naming in arch headers.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-12 16:12:59 +02:00
Tomasz Lauda 58d3774948 platform: unify include guards naming
Unifies include guards naming in platform headers.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-12 16:12:59 +02:00
Tomasz Lauda c33687544f sof: unify include guards naming
Unifies include guards naming in ipc, kernel, sof
and user headers.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-12 16:12:59 +02:00
Tomasz Lauda 119746d206 common: replace __attribute__((packed)) with __packed
Replaces all occurrences of __attribute__((packed)) with
__packed macro.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-12 16:12:59 +02:00