Local filters in ~/gitconfig, such as
[core]
autocrlf = input
can impact the result of git hash-object. Make sure no filters are
used so that the hash value remains unmodified across user setups.
BugLink: https://github.com/thesofproject/sof/issues/5917
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This patch adds a mechanism to load and use dai driver from zephyr
instead of xtos driver.
Patch includes following changes:
- dai-zephyr.c calls directly zephyr driver methods
- include/lib/dai.h is divided into dai-legacy.h and dai-zephyr.h
- use zephyr dais by configuring CONFIG_ZEPHYR_NATIVE_DRIVERS=y
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
It appears that the probes do not work too well with the BLOCKING
flag, so let's go back to the resurrected the dma_copy_to_host_nowait()-
function.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Resurrect dma_copy_to_host_nowait() since the probes do not appear to
work without it. This version implements also non blocking version for
non CONFIG_DMA_GW case. Earlier the function was called nowait, despite
the DMA_COPY_BLOCKING flag given to dma_copy_legacy().
Fixes: 443b21de4b ("dma-trace: Fix potential race issue by using blocking DMA copy")
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Initialize probe_dma_init() config stack variable. Not all used
members are initialized member by member so those members got their
values from what ever there was in the stack.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Add zephyr logging register to host as it doesn't compile otherwise when
zephyr logging is enabled.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add drivers for:
* timer, ipc, interrupt - amd specific implementation
* DMA, for copying data between HOST and DSP
* BT DAI,SP DAI, HS DAI for Audio interface
* I2S DMA, Controller for BT,SP and HS
Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
Add rembrandt platform support to build fw image.
Add rembrandt_defconfig for rembrandt platform.
Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
module_adapter_copy() is typically called every millisecond for each
copy. Issuing an "info"-level log statement with that frequency
floods the log. Replace it with a "comp_dbg()."
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add zephyr logging declares to module_adapter as it doesn't
compile otherwise when zephyr logging is enabled.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Buffer objects are always handled in thread context, only the
_thread() set of the coherent API functions must be used with them.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Under Zephyr when CONFIG_INCOHERENT isn't selected,
coherent_shared_thread() is undefined, add a missing implementation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Even when CONFIG_INCOHERENT isn't selected, coherent_shared() must
hold the lock when setting the flag.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
comp_make_shared() only makes sense and is only called in multi-core
configurations. In such configurations components are allocated from
uncached memory, from the SOF_MEM_ZONE_RUNTIME_SHARED zone. So they
are always uncached and there is no need to flush cached or relink
lists. We only need to set a flag, indicating, that this component
is used on multiple cores.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Save memory when only a single core is enabled. Compiler can now see
always false/true conditions and optimise out unused TEXT.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Currently the DMIC driver uses a separate task to implement its gain
ramping. This creates a race during driver clean up. Avoid an
additional asynchronous context by performing the ramping in DAI's
.copy() context. Use the DAI's .copy() method for that.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
DAI drivers sometimes need to access the underlying component object.
Make this possible by adding a pointer to struct dai_data into struct
dai and to struct comp_dev into struct dai_data and by assigning
those pointers accordingly.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
pcm_converter_func and dma_process_func are used interchangeably,
they must be identical.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Sparse annotations must be used consistently in function definitions
and in declarations.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
dma_buffer_copy_to() and dma_buffer_copy_from() should be called on
properly acquired buffer objects.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
ipc_comp_to_buffer_connect() and ipc_buffer_to_comp_connect() open-
code contents of the comp_buffer_connect() function. Remove redundant
code and call the function directly.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
During transition from D0 to D3, IPC processing completion is done
during power down procedure (file power_down.S).
FW build based on XTOS never exit from ipc_do_cmd() and will not enter
ipc_complete_cmd(). Zephyr based FW on other hand will execute power
down procedure after enering idle, when IPC processing task is
completed. Therefore it should be skipped here.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Move the volume component inside the module_adapter folder and use the
module interface API instead of the component driver interface. Also fix
the volume cmocka tests to use the modified scale_vol function.
Also, add kconfig option for keeping the legacy comp_drv interface for platforms
that are limited in text region memory size, such as
BYT/CHT/APL/JSL/ICL.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Optimize the copy() function for modules that have only 1 source/sink
buffer and produce only period bytes every period. There is no need to
allocate intermediate buffers to hold the processed samples. Also, pass
the buffer stream pointers directly so that there no extra copies.
Introduce a new field, simple_copy in struct processing_module that can
be set by modules that do not need deep buffering and produce exactly
period worth of data in every copy().
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
In preparation for comverting the volume component to use the module
interface, add support for parsing the UUID from topology when parsing
the PGA widget in testbench.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The get_attribute op for copier is used to determine whether the
direction has already been set or not so that the handler can skip
resetting the direction for host/dai components. Remove the op and use
the new fieldm direction_set in struct comp_dev to determine whether the
direction should be updated or not. Also, set the direction_set flag for
host/dai copier when it is created.
This change is in preparation to convert the copier module to use the
module interface instead of the comp_drv ops.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
When neither -c nor -p is passed, the script defaults to '-p
SOF_TOP/zephyrproject', initializing the `west_top` global with
that. When everything is already cloned, this becomes
zephyrproject/modules/audio/sof/zephyrproject which is really not a
`west topdir`. Then west is pointed at:
real_west_top/modules/audio/sof/zephyrproject/zephyr/samples/subsys/audio/sof
which obviously fails.
This was found while testing
https://thesofproject.github.io/latest/getting_started/build-guide/build-with-zephyr.html
and trying (and failing) to switch away from the older .sh script.
Fix find_west_workspace() to return the output of `west topdir` and use
that to update the `west_top` global.
This bug was introduced from the very start when the script was
converted from shell to python. The shell script did not have this
problem because it could be used without using neither -c nor -p. This
logical difference was mentioned in the code review:
https://github.com/thesofproject/sof/pull/5299#discussion_r801158177
Also remove a couple of accidental creations of a sof/zephyrproject/
directory when sof is already inside a higher zephyrproject.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
If each platform has its own output subdirectory, each platform output
subdirectory will include a key subdirectory with same name. Function
show_installed_files() can fail to find the correct parent for a node
as it only compares the subdir name that can no longer be unique.
This patch uses Anynode to replace Node class to define a new
attribute 'long_name' for a node to store its unique relative path
from the output staging directory (e.g. 'sof/apl/community') and
search for its parent.
The attribute 'name' is still used to store the subdir or file name
for a node (e.g. 'community'), and to display the layout of the
installed firmware files.
Signed-off-by: mengdonglin <mengdong.lin@intel.com>
All firmware files are installed in the same staging directory by default.
This patch adds an option --use-platform-subdir to create an output
subdirectory for each platform.
e.g. $scripts/xtensa-build-zephyr.py apl jsl tgl --use-platform-subdir
The layout of installed files will be like this:
build-sof-staging
├── sof
│ ├── apl
│ │ ├── community
│ │ │ └── sof-apl.ri
│ │ └── sof-apl.ldc
│ ├── tgl
│ │ ├── community
│ │ │ └── sof-tgl.ri
│ │ └── sof-tgl.ldc
│ └── jsl
│ ├── sof-jsl.ldc
│ └── community
│ └── sof-jsl.ri
└── tools
├── sof-logger
└── cavstool.py
Signed-off-by: mengdonglin <mengdong.lin@intel.com>
Add argument option --key-type-subdir <key_type> to choose the output
subdirectory name based on the type of rimage signing key.
User can choose subdirectory name from 'community','dbgkey' and 'none'.
The default one is 'community', the type of default rimage signing key.
We can extend the list later.
When the key type is 'community' or 'dbgkey', the layout of SOF output
directory will be like:
build-sof-staging
├── sof
│ ├── sof-platform1.ldc
│ ├── sof-platform2.ldc
│ ├── ...
│ └── <key_type>
│ ├── sof-platform1.ri
│ ├── sof-platform2.ri
│ └── ...
└── tools
├── sof-logger
└── cavstool.py
When the key type is 'none', there will be no key type subdirectory:
build-sof-staging
├── sof
│ ├── sof-platform1.ldc
│ ├── sof-platform1.ri
│ ├── sof-platform2.ldc
│ ├── sof-platform2.ri
│ └── ...
└── tools
├── sof-logger
└── cavstool.py
Signed-off-by: mengdonglin <mengdong.lin@intel.com>
For some of the dai devices, sampling frequency is not passed as a part
of IPC4 blob. Added this value to ipc_config_dai, so during
configuration devices can access it through their common_config
argument.
Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
The copier 'stream_name' and dai 'name' need to match, use macro to
enforce consistency.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The pipeline stream_name is not used at all, and as a consequence we
can remove the pipeline from the Widget objects
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The same 'Analog Playback' string is used for the copier stream_name
and PCM caps name. This is not a coincidence but a requirement to
match PCM and widgets. Same for 'Analog Capture'
Use a macro to make sure this 1:1 mapping is not broken.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Be exhaustive on pipeline contents.
Also remove Windows references and copy/pasted comments
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>