Remove all support for Broadwell and Haswell platforms, they
aren't supported any more.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
During the component create (module init) we are not receiving the blob
containing the sof_detect_test_config, only the base_cfg is received.
The sof_detect_test_config content will be sent via large_config_set at a
later time.
The blob received via large_config_set must be the same format as the blob
with IPC3 but in runtime the sample_width from the blob is ignored and the
audio_fmt.depth is used from the base_cfg.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
As the copier can do format conversions, and many pipeline components
can do conversions as well, it is important for the topology to define a
single format to use in the "dai_out" copier. This ensures deterministic
behaviour with the driver.
Implement this behaviour by switching topologies to use the
passthrough-capture-be pipeline as template for the backend capture
pipelines.
The previously used passthrough-be template is problematic as
the base class already defines multiple audio formats, with multiple
different sample formats. The new passthrough-capture-be only defines
one sample format by default and is a better starting point as a base
class.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add a separate template for capture backend pipelines. The
passthrough-be pipeline has been used as template for both playback and
capture, but we want to provide different defaults especially for the
audio formats in capture case.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Use mixout-gain-smart-amp-dai-copier-playback pipeline
for SSP0 DAI playback.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This patch adds the widget class for smart_amp module
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The micsel will need to use the base config extension and the init
config type will need to be set in the manifest.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
It's not enough to look at the first component in the module's buffer
list. Check all of them to make sure that they belong to different
pipelines.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The avail_frames should not be used for other than the feedback buffer.
Source/sink should be using the avail_passthrough_frames when calculating
for the processing.
If we have feedback buffer then the avail_frames can be different than
avail_passthrough_frames which will cause underrun reports.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
No more need for hard-coded blob header, sof-ctl provides
an up-to-date header so better to use it.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
For MTL chromebook, SSP 1 is used for BT offload with
cavs-rt5682 configuration
Co-developed-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Co-developed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Add pipelines for iir and fir eq as EFX (endpoint effect) component in
hda. Add HDA_CONFIG "efx" to compile efx versions of hda_generic
pipelines.
Add define EFX_IIR_PARAMS and EFX_FIR_PARAMS to define different iir and
fir parameters from separate conf files during compile time (default
"passthrough").
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
There are two pops caused by SOF Firmware.
Pop occurs when switch from headphone to speaker:
When switch to headphone, audio playback data still remains in
DSM internal processing buffer and not consumed by DMA.
So when switch back to speaker, the DSM processing buffer is not clean,
then pop noise occurs. We can clean and reset the point for
DSM internal processing buffer by called this function 'smart_amp_init'
in function 'smart_amp_prepare'.
Pop occurs when switch from speaker to headphone:
The feedback and feed-forward buffer processing should be independent.
But the number of frames processed by DSM feedforward is corrupted by
feedback buffer calculation. When capture pipeline exists,
the number of frames for feedforward is always same as feedback.
And the number of frames for feedback is zero at the first time
when the capture pipeline setup. Then the number of frames processed
by DSM feed forward is also zero though there are many frames in
playback buffer. So the available frames will become larger.
It is easy to exceed the limit size of DSM input.
Then it will cause the buffer overflow and we could hear obvious pop
noise from speaker. We fix it by calculating the number of frames
for feedforward and feedback respectively.
Signed-off-by: Long Wang <long.wang@analog.com>
Adds new topology build based on sof-adl-max98360a-rt5682-2way
with appending arg `-DDMIC_DAI_LINK_16k_PDM=STEREO_PDM1` for existing
ADL-P projects.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Pull in following rimage changes:
3863e94fa5 Don't convert ROM addresses to cached aliases
1e0a85b44a config:tgl/tglh: Do not set cached/uncached address aliases
9b507ecc82 config: set cached and uncached aliases for affected platforms
def9d51d7d Fix regression - make default return code an error
d48ae7aada config: mtl: Set init_config for smart amp
b5d762290f config: tgl-cavs: set init_config for smart test
15ea48177a src: adsp_config: Use reserved bits for module init config
ec649f37d6 Convert all ELF addresses to cached for calculations
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
As WoV may be used on HDA platforms, SDW platforms, as well as
nocodec platforms. Let's use a more safe pipeline ID for WoV.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Now the abi header is changed and the config data is send through
large_config ipc message instead of init_instance ipc message.
Update the config data accordingly.
Signed-off-by: Libin Yang <libin.yang@intel.com>
The following problem is observed when testing pause functionality:
in a case of a playback stream host -> mixin -> mixout -> DAI where
host and mixin belong to the pipeline A and mixout and DAI belong to
pipeline B, pipeline B is scheduled before A. So at start we get:
scheduler start
B: no data
A: read 1 period of data
scheduler sleep
(1 period of data pending in pipeline A)
scheduler start
B: send 1 period of data out
A: read 1 period of data
scheduler sleep
(1 period of data pending in pipeline A)
PAUSE
RELEASE
scheduler start
B: old data before sleep isn't sent because A is PAUSED
A: read 1 period of data
scheduler sleep
(2 periods of data pending in pipeline A)
...
With repeated pause-release cycles this leads to buffer overrun. To
fix this allow sending out data by pipeline B when A is still paused.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Memory banks enablement flow is adjusted to recommended approach.
Power status should be read twice to ensure ebb readiness
Signed-off-by: Michal Bukowski <michal.bukowski@intel.com>
There is a rballoc() call during module_init() lacking the
correspondent rfree() on module_free(). Replace it with
module_allocate_memory() to ensure the memory to be freed
by module_adapter.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Changes all routes of form:
Object.Base {
route.1 {
source copier.host..1
sink gain..1
}
route.2 {
source gain..1
sink mixin..1
}
}
to
Object.Base {
route.1 {
source copier.host.$index.1
sink gain.$index.1
}
route.2 {
source gain.$index.1
sink mixin.$index.1
}
}
E.g. change ".." notation where the route index is expanded in between
the dots to explicit reference to the route index.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Remove the unliaged operations since we use the frame aligned API
in mixer process function while get the available frames. Simplify
the code and get better performance for 16/24 bit process(save about
18% cycles) for HiFi version.
Signed-off-by: Andrula Song <andrula.song@intel.com>
For IPC4 we are re-using the sof_abi_hdr to encapsulate the blob from/to
user space with minor deviation from IPC3:
- ABI magic is different
- the type is used as param_id in IPC4 (it carries the same functionality)
The IPC type can be specified with -i and defaults to 3 (IPC3).
-p is added as a new option for param_id, but -t and -p will do the same
thing.
After reading a blob, print a message for unexpected ABI magic number, but
do not block the execution.
To generate a header for 100 bytes payload:
For IPC3:
sof-ctl -g 100 -t 2
sof-ctl -i 3 -g 100 -t 2
For IPC4:
sof-ctl -i 4 -g 100 -p 2
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
With IPC4 the sof_abi_hdr is only used between user space and the kernel,
it is not sent to the firmware.
The magic number for IPC3 and IPC4 also differs to avoid mixing blobs
created for different IPC versions.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Initialising a list head to NULL makes no sense and checking whether
it's initialised every time a constructor function is called is
redundant, initialise the list head statically instead.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
To statically initialise a list do something like
static struct list_item item = LIST_INIT(item);
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
sbuf length is empirically found and used to compute buffer_start.
buffer_start address is used by some instructions that require
8-byte aligned addresses:
See: src/audio/src/src_hifi4.c:
220 /* Load two data samples from two channels */
221 AE_L32X2F24_XC(d0, dp, inc); /* r0, l0 */
buffer_start = cd->delay_lines + cd->param.sbuf_length
Then we make sure cd->delay_lines is aligned to 8 and we only add
multiple by 8 lenghts.
Suggested-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
During the component create (module init) we are not receiving the blob
containing the sof_smart_amp_config, only the base_cfg and base_cfg_ext is
received.
The sof_smart_amp_config content will be sent via large_config_set at a
later time.
Introduce a new IPC4 only struct to store the base and pin configurations
and handle the IPC3 / IPC4 init differently.
The blob received via large_config_set must be the same format as the blob
with IPC3.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
eq_iir_set_alignment() should use the __sparse_cache annotation for
both its arguments.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove all support for Baytrail and Cherrytrail platforms, they
aren't supported on the "main" branch any more. To build SOF for them
use the "table-v2.2" branch.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Now deep buffer uses S24_LE but other pipelines use S32_LE internal format
. Chrome team found a bug that deep buffer can't work well with I2S codec
since fw only support S32_LE for I2S now.
This patch will use S32_LE to align with current requirement
Signed-off-by: Rander Wang <rander.wang@intel.com>
This patch adds a number of generic or effect type of blobs
to enable use of equalizers in topology2.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Use of isempty() instead of length() to the check for non-empty
variable can avoid warnings in executing code in Matlab.
The unnecessary print of variable to console is removed. E.g.
struct bs, or biquad transfer function zeros vector a.
In system() command no need to store the console output, just
check the return status.
In switch-case statements no need for comma after case and
otherwise.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch contains the changes to export EQ blobs in both tplg1
IPC3 and tplg2 IPC4 formats.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch moves the existing .txt blobs for sof-ctl to directory
ipc3. There will be a similar new ipc4 directory.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
If one mixout (A) is not able to process data, the 'sinks_free_frames'
will be truncated compared other mixout buffers. When the mixin process
is producing data to another mixout buffer (B), the number of already
mixed frames may be larger than 'sinks_free_frames'. Further it is
possible this mixout (B) has pending frames, leading to a larger
'start_frame' value.
This is a valid and possible scenario, but will trigger
assert(sinks_free_frames >= start_frame)
in current code.
As 'frames_to_copy' is already correctly calculated as limited to
available free frames across all mixouts, no extra logic is needed when
this condition happens. Mixin is not able to proceed until the congested
mixout (A) has room again for further samples.
Link: https://github.com/thesofproject/sof/issues/6896
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>