This patch replaces legacy component API with new module adapter
API. There are no changes to functionality.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Fixes commit 4286bb3ee1 (".github/zephyr: west update with new, faster
git --filter-tree:0") that accidentally dropped git tags from `git
describe` in Zephyr since April and made the build different from
everyone else.
See detailed explanation added to the source.
To find the output of `git -C zephyr/ describe`, search for
`generated/version.h` in the build logs.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add an new topology adl-max98360a-da7219.tplg for DA7219 headphone
codec with MAX98360A speaker amplifier on ADL boards. The MCLK
frequency is set to 24.576MHz to use PLL bypass mode and avoid the
WCLK locking problem on earlier platforms.
Signed-off-by: Brent Lu <brent.lu@intel.com>
This config is used for old intel cavs 1.x platform, now, those
platform are removed from sof, this config also need remove,
related code got removed as well.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
SDMA support loading firmware RAM scripts in order to enhance
functionality. We will need this for supporting multi-fifo
with upcoming MICFIL PDM driver.
Allow SDMA to load such scripts selected via CONFIG_HAVE_SDMA_FIRMWARE
config.
A RAM script interface guarantees that there will be the following
information provided:
- sdma_code, an array of bytes containting the actual script binary
- RAM_CODE_START_ADDR, location in RAM where to load the script
- RAM_CODE_SIZE, size of the sdma_code array.
Because RAM scripts are NXP proprietary binaries we won't make them
public but offer the interface to integrate them with SOF in private
builds.
We use for now sdma_script_code_imx7d_4_5.h header file which must be
present in location indicated by CONFIG_SDMA_SCRIPT_CODE.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Fixes commit 6f9f2ee28e (".github/zephyr: build with the debug overlay
and CONFIG_ASSERT")
Remove misspelled `zephyr_revsion` matrix variable. It was a hasty
copy/paste in that commit.
It's a harmless no-op because build-windows does not play any git tricks
and always builds from the manifest. However it makes the list of
configurations confusing in the Github interface.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The existing component ID is composed with
'module_id << 16 | instance_id', it doesn't
comply to the initial instance IPC structure:
struct {
uint32_t module_id : 16;
uint32_t instance_id : 8;
...
};
When the ID is logged through mtrace, it is
hard to use the ID to find the related linux
kernel message.
This patch fixes component ID composition macros,
thus helps to eliminate component ID inconsistency
between firmware and linux kernel.
Link: https://github.com/thesofproject/sof/issues/8051
Signed-off-by: Chao Song <chao.song@linux.intel.com>
source_set_ibs() and source_set_obs() take a cached pointer.
Fix code in ipc_comp_connect() to adhere to the prototype.
Fixes sparse warnings:
ipc4/helper.c:389:49: warning: incorrect type in argument 1 (different address spaces)
ipc4/helper.c:390:45: warning: incorrect type in argument 1 (different address spaces)
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The multiband_drc_coef_default.m4 is updated to what the current
setup tool example_multiband_drc() exports.
Another blob for pass-through is added with emphasis and all bands
processing disabled. Such blob is useful when headphone and
speaker paths are shared. Headphone mode should use pass-through.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
In this patch, audio_format is deprecated, and use
input_audio_format/output_audio_format instead.
Correct the IIR control bytes naming, and make it the
same with other HDA topology.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Currently the pipeline state change flow handles the phases at the same
time for each pipeline (for two pipelines):
pipeline1 prepare
Pipeline1 trigger
pipeline0 prepare
Pipeline0 trigger
This can open a race condition when pipeline1 is already triggered and is
in active state while pipeline0 is not yet prepared, configured.
The process function of a component from pipeline1 might query information
from pipeline0 at this point, which can lead to errors.
With the separate loops the flow will be changed to:
pipeline1 prepare
pipeline0 prepare
Pipeline1 trigger
Pipeline0 trigger
It will make sure that all pipelines and components have been prepared
before the triggering is going to happen.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
# Conflicts:
# src/include/sof/ipc/topology.h
# src/ipc/ipc4/handler.c
Execute the requested phases of the pipeline state change specified by
the phase parameter.
If no phase has been specified then run both phases as oneshot.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Make the ipc4_pipeline_prepare and ipc4_pipeline_trigger available outside
of handler.c to be used to implement staged pipeline state phases.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Add definitions for pipeline state change phases to be executed when a
PPL_STATE message is handled by a remote core.
The phase can be a combination of:
PREPARE and TRIGGER.
PREPARE will run a configuration (state change preparations) phase on the
pipeline
TRIGGER will run a a trigger on the pipeline
Set ONESHOT in ipc4_set_pipeline_state() to have both phases to be run in
order to avoid regression.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
In preparation to share the extension with an action, first introduce a
mask so that the idc code is prepared for a shared use of the extension.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Separate the set_pipeline_state() function into two distinct phase:
ipc4_pipeline_prepare() and ipc4_pipeline_trigger()
The two phase will be used later directly to avoid race conditions when
a pipeline is already set to run while the connected pipeline is not yet
prepared.
With the split also clean up the debug prints to be unified and clear.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Currently DMA buffer size is aligned to 32. It should be:
rec_buff_size = ROUND_UP(rec_buff_size, min_buffer_size);
rec_buff_size = ROUND_UP(rec_buff_size, round_up_size);
Period_bytes should also not be aligned to 32 for 24/24 format
Change resolves timeout problem during offload
of playback with 44.1 format
Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
/home/bamboo/sof_dir/sof/src/audio/mfcc/mfcc_hifi4.c: In function
‘mfcc_source_copy_s16’:
/home/bamboo/sof_dir/sof/src/audio/mfcc/mfcc_hifi4.c:86: warning:
assignment from incompatible pointer type
/home/bamboo/sof_dir/sof/src/audio/mfcc/mfcc_hifi4.c: In function
‘mfcc_fill_prev_samples’:
/home/bamboo/sof_dir/sof/src/audio/mfcc/mfcc_hifi4.c:119: warning:
assignment from incompatible pointer type
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
In IPC4 system the output sinks of crossover are not defined by
pipeline identifiers but by pin indices. The error message is
updated to be IPC version agnostic to avoid confusion.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The code contains some m-language syntax that is not supported
by Matlab. The code lines are changed to compatible with both
Octave and Matlab. The blobs computation is not changed.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch re-structures function example_multiband_drc() to
let it generate multiple differentiated configurations. The
computation of blob is moved to new function export_multiband_drc().
The script now generates default (same as before) and pass-through
blobs.
Inside the function the paths for tplg1 and tplg2 are updated as
well as locations of data blobs for sof-ctl. The run of export
function creates blobs for both tplg1 and tplg2 with SOF IPC
versions three and four.
check_create_dir() common function is added to avoid error with
missing directory for export and for warning message about
already existing directory that just using mkdir() would do.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Includes following rimage commits:
4fb9fe0057 config: lnl+mtl: fix length of ADSP.man CSE manifest
c809af8168 Config: Add crossover component for TGL and TGL-H cAVS platforms
8c8440070a style: trailing whitespace is the root of all evil
d20f1d8a85 actions: remove travis
af9a2fe58f Config: Fix comment typo for EQ FIR module
b8ee1aa8f6 Config: Add DRC component to TGL, TGL-H, MTL, LNL
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Result of the function call ipc_get_comp_by_id() had been dereferenced
without checking whether the pointer may be null.
Returned pointer may be null when component does not exist on the
list.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
The script runs the unit tests natively as gcc compiled. The
tgph_defconfig is no more available, so use another configuration
that is available in src/arch/xtensa/configs.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Use small tricks to make dai have better performance, with
this patch, dai single playback performance back to origin
state(before convert to module interface).
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
This patch removes non-practical sof-hda-generic-loud topologies and
generates instead IIR and IIR+FIR topologies for headphone/speaker
path for no-DMIC/2ch-DMIC/4ch-DMIC platforms. The IIR and FIR are
by default programmed for pass-through without any processing.
sof-hda-generic-iir.tplg
sof-hda-generic-iir-2ch.tplg
sof-hda-generic-iir-4ch.tplg
sof-hda-generic-iir-fir.tplg
sof-hda-generic-iir-fir-2ch.tplg
sof-hda-generic-iir-fir-4ch.tplg
The custom topologies can be used e.g. copying them to
/lib/firmware/intel/sof-tplg-custom/ and by adding
to /etc/modprobe.d/sof.conf the following lines with desired
configuration un-commmented.
#options snd_sof_pci tplg_filename="sof-hda-generic-iir.tplg" tplg_path="intel/sof-tplg-custom"
#options snd_sof_pci tplg_filename="sof-hda-generic-iir-fir.tplg" tplg_path="intel/sof-tplg-custom"
#options snd_sof_pci tplg_filename="sof-hda-generic-iir-2ch.tplg" tplg_path="intel/sof-tplg-custom"
#options snd_sof_pci tplg_filename="sof-hda-generic-iir-fir-2ch.tplg" tplg_path="intel/sof-tplg-custom"
#options snd_sof_pci tplg_filename="sof-hda-generic-iir-4ch.tplg" tplg_path="intel/sof-tplg-custom"
#options snd_sof_pci tplg_filename="sof-hda-generic-iir-fir-4ch.tplg" tplg_path="intel/sof-tplg-custom"
The patch contains a fix for pipeline with FIR to undefine the
related macros to avoid them to possibly impact another FIR instance.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The hardware programming flow dictates that the DSP side should set the
GEN bit first followed by the host setting the EN bit.
We cannot assume that the GEN bit is already enabled (and it would in fact
will leave the DMA on the DSP side wrongly configured at best).
To support the currently used flow (single step) and add support for the
correct programming flow, the proposed solution is to use the lib_id as
indication of the method the host software is going to use.
Two stage flow:
The first LOAD_LIBRARY_PREPARE with valid dma_id
- just allocate and set the GEN bit
Second LOAD_LIBRARY with valid lib_id and dma_id
- proceed to the loading of the library via host DMA to local buffer
Single stage flow (currently supported)
LOAD_LIBRARY with valid lib_id and dma_id
- allocate, set GEN bit and proceed to loading the library
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
The issue with __sparse_cache in sinks[] array seems quite
complicated to change so avoiding it with further module API
conversion seems like better approach.
The processing functions in crossover_generic.c are changed to
use struct output_stream_buffer pointer array from module API.
The function crossover_assign_sinks() is changed to pick the
output stream buffers from module API in the order that is
defined in configuration blob.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The check needs to be for or, the and condition is never met.
With e.g. num_sinks = 1 the index to function map became -1
that returned an invalid function.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Contains 2211 commits, including following directly affecting
SOF targets:
ab0ed577111b mm: intel_adsp_tlb: Handle address space conversion warnings
823e6b70d240 arch: xtensa: Implement arch_float_enable&disable
be779f2a6195 intel_adsp: hda: fix usage of FIFORDY bit
498f294b2720 west: update sof ref in manifest
42ca64d60cd2 tests: dma_sg: intel_adsp_ace15 specific config
0e373019d65e dma: intel_adsp_gpdma: Unmask interrupt on ACE
6e66efa08871 soc: intel_adsp_ace15: Include stdint.h
250748bfe671 intel_adsp: Add option about switch off hpsram
b4293ec026c4 dts: xtensa: nxp: add nodes for IPC
1295283a8a72 soc: xtensa: nxp: add resource_table section in linker script
e6d89268572d xtensa: set no optimization for arch_cpu_idle() with xt-clang
a458d0443a91 xtensa: allow arch-specific arch_spin_relax() with more NOPs
f60306193844 soc: xtensa: intel_adsp: cavs: fix PM hooks guards
385ad46a39ca boards/xtensa: Skip cleaning intermediate binaries up
1c0c2a095b48 drivers: intel_adsp_gpdma: Fix release ownership
e55fb88bcbe7 soc: intel_adsp/ace: update clock rate
35e8e6fa03fa soc/xtensa/nxp_adsp/CMakeLists.txt: use new WEST_SIGN_OPTS variable
c35d97534fd1 include: util_internal: add Z_SPARSE_LIST_{ODD|EVEN}_NUMBERS
25c6553edde5 soc: intel_adsp/ace: use functions to do CPU power control
3764814831a7 intel_adsp: boot: d3: hp sram reinit
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The component build fails if it is enabled in Kconfig. The variable
pipeline_id is not defined, it should be sink_id.
Fixes: 5bcbcf19f7 ("Audio: Crossover: Convert to module adapter")
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Fix the cmocka build issue after adding functions
for explicitly get ipc device for component, buffer
and pipeline.
Signed-off-by: Chao Song <chao.song@linux.intel.com>