Commit Graph

9563 Commits

Author SHA1 Message Date
Kai Vehmanen 94a128d516 CODEOWNERS: add owner for installer/ subfolder
Add Marc Herbert as code owner for installer subfolder.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-21 10:20:28 +00:00
Kai Vehmanen 441bd03544 CODEOWNERS: add owners for zephyr/ subfolders
Add Kai Vehmanen, Guennadi Liakhovetski, Iulia Prodan and Daniel
Baluta as owners for the 'zephyr/' subfolder.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-21 10:20:28 +00:00
Kai Vehmanen 9353c2d5f1 CODEOWNERS: add new owner for topology and topology2
Mark Ranjani Sridharan for full topology folder. Add Jyri
Sarha for topology2 folders.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-21 10:20:28 +00:00
Kai Vehmanen a942f10731 west.yml: upgrade Zephyr to 0c0d73721ed
Includes patches to dai-zephyr.c to adapt to DMA interface
change for DW/HDDMA drivers.

Total of 1168 commits, including following related to
intel_adsp/sparse/dmic/xtensa:

8f5bcb2e76c3 intel_adsp: ace: fix linker script for xcc-clang compiler
18ce85c20130 tests: intel_adsp: ssp: fix dma data sizes
60a20471b561 intel_adsp: ace: enable interrupts for secondary core
6045eed2f361 intel_adsp: ace: enable core power gating
e1dbc2efef50 intel_adsp: ace: add core power off step
a99b073392fc intel_adsp: ace: d3 exit update
156c7cd21759 intel_adsp: bbzero/bmemcpy with picolibc fix
60196ca1126a cmake: sparse: deprecate old sparse support
91902c5fd4db cmake: add sparse support to the new SCA infrastructure
a684714d5c82 soc: intel_adsp: Correct HDA parameter docstrings
db495a5ebee3 xtensa: stop execution under simulator for double exception
8ff88346955b xtensa: sparse: fix address space mismatch
7965fd2b4a8a samples/boards/intel_adsp: Make sample work with twister
422250d3b183 mm: intel_adsp_mtl_tlb: suppress sparse address space warnings
618a478ded70 xtensa: fix sparse warning when converting to uncache pointer
8b391dc43841 drivers: audio: dmic_nrfx_pdm: Fix a race condition in the driver
8794de2934f7 intel_adsp: soc: ace: Add communication widget driver
a9b3d935500c intel_adsp: dai: Add support for ALH up to 16 nodes
837432506269 drivers: dai: intel: dmic: don't use assert for error handling

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-21 10:14:17 +00:00
Yong Zhi 7fdc62375a topology2: cavs-rt5682: override BT playback pipeline id
Override the default PIPELINE_ID for BT_PB.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-02-20 16:16:43 +00:00
Guennadi Liakhovetski 17fbf7de22 platform: remove support for Sue Creek
Remove all support for Sue Creek platforms, it isn't supported any
more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-20 15:46:16 +00:00
Paul Olaru 465e6d0ecc sof: audio: eq_fir: Fix GCC-specific check
Currently, the check to prevent too large filters from being loaded on
GCC builds of SOF does not work correctly. This commit changes where the
lengths that are being checked are read from, so that the check works
correctly.

Fixes: c0b9b4057e ("EQ FIR: Add support for runtime reconfiguration")

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2023-02-20 11:19:31 +00:00
ShriramShastry e6baebd54b Math: library: Add an exponential function
The 32-bit exponential library function has an accuracy
of 1e-4 and a unit in last place error of 4.5878 for
inputs from -5 to +5 (Q4.28) and outputs from 0.0067379470
to 148.4131591026 (Q9.23).

Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
2023-02-20 11:17:37 +00:00
jairaj-arava d85d853c6c topology2: add second capture stream for DMIC0 for MTL topology
This patch adds second capture stream by means of copier module

Signed-off-by: jairaj-arava <jairaj.arava@intel.com>
2023-02-20 12:54:57 +02:00
Rander Wang 5fdd09ef2a ipc4: copier: set sink buffer format when sink format is set
The original code only set sink format in copier but forget to set format
of sink buffer. This will result to error when sink components use it.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-02-20 10:46:58 +00:00
Rander Wang e9baf1e607 ipc4: copier: use a helper function to update format
Use helper function to update buffer format and avoid code duplication

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-02-20 10:46:58 +00:00
Ranjani Sridharan 74bad5f9cb copier: remove redundant check
The loop should already handle the check for endpoint_num.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-20 12:39:02 +02:00
Andrey Borisovich 9453183cbe Fixed warnings issued by new xt-clang compiler
New Xtensa xt-clang driver issues new warnings that were not
present before when using xt-xcc driver.

Fixed warnings related to enum cast to other enum by removing
"frame_fmt" local variable assignment in the selector.c file.
Assignment was not needed in the build_config function body, as the
variable "frame_fmt" is passed in the next line to
audio_stream_fmt_conversion function, that writes to this variable as
output.

Silenced warnings related to C/C++ interoperability.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-02-17 12:51:01 +02:00
Ranjani Sridharan b70ae5f6af topology2: Remove duplicate conf files
These are already in the common includes.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-17 09:16:34 +02:00
Ranjani Sridharan 45e4cc484d topology2: Move to using arrays for defining objects
Where there more than 1 object of the same type defined at the same node
level, use arrays to define the object. For example, we can define 2
routes as follows:
Object.Base.route [
	{
		source	"smart_amp.2.1"
		sink	"copier.SSP.2.1"
	}
	{
		source	"mixin.1.1"
		sink	"mixout.2.1"
	}
]

This allows us to merge 2 arrays from different conf files without
needing to make their instance ID's unique.

Assume we add another route in a separate conf file like below:
Object.Base.route [
        {
                source  "gain.5.1"
                sink    "copier.5.1"
        }
]

The alsatplg compiler will merge them as follows resulting in 3 route
objects.

Object.Base.route [
        {
                source  "smart_amp.2.1"
                sink    "copier.SSP.2.1"
        }
        {
                source  "mixin.1.1"
                sink    "mixout.2.1"
        }
	{
                source  "gain.5.1"
                sink    "copier.5.1"
        }
]

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-17 09:16:34 +02:00
Curtis Malainey ad3ae32850 lib: fix compiler macro for vec_mem*
using incorrect names for compiler, missing ISA header for HiFi check,
also should add inlines if we don't have the HiFi implementations

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-02-17 09:07:42 +02:00
Curtis Malainey 4269b7226a arch: xtensa: add core-isa to compiler_info
We need this as part of a generic compiler_info so we can handle HiFi
flags in a generic arch include

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-02-17 09:07:42 +02:00
Seppo Ingalsuo 64fe2ea7d2 Tools: Topology2: Add topology to test playback SRC conversions
This patch adds to development topologies a topology
sof-hda-src-generic.tplg. It is similar to sof-hda-generic but adds
to first playback PCM pipeline a SRC component after gain. The
pipeline supports playback of S32_LE with 8 - 192 kHz rates.

The cavs/src.conf is merged to src.conf, and the SRC format
include files are brought up from cavs directory. The topology
cavs-sdw-src-gain-mixin.tplg related .conf files are updated
for common location. The missing rate_out attribute is added.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-16 16:21:30 +00:00
Guennadi Liakhovetski d80635054f platform: remove support for Broadwell and Haswell
Remove all support for Broadwell and Haswell platforms, they
aren't supported any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-16 16:19:36 +00:00
Peter Ujfalusi 70f9faf870 detect_test: Split the module config and blob receiving for IPC4
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>
2023-02-15 17:39:40 +00:00
Kai Vehmanen cfeaceb394 topology2: use passthrough-capture-be instead of passthrough-be
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>
2023-02-15 19:18:16 +02:00
Kai Vehmanen a62fa8e418 topology2: cavs: add passthrough-capture-be pipeline
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>
2023-02-15 19:18:16 +02:00
Chao Song 2f29bc31fc Topology2: add smart amp pipeline in nocodec topology
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>
2023-02-15 18:47:30 +02:00
Chao Song cc21dfa01a Topology2: add mixout-gain-smart-amp-dai-copier-playback pipeline
This patch adds mixout-gain-smart-amp-dai-copier-playback
pipeline.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-15 18:47:30 +02:00
Chao Song 82cedc1665 Topology2: add smart_amp widget class
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>
2023-02-15 18:47:30 +02:00
Ranjani Sridharan f829c30d6b topology2: tokens: Remove the payload_with_output_format token
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>
2023-02-15 18:47:30 +02:00
Ranjani Sridharan e8237f3e0b ipc: ipc-common: Fix the logic for setting the pipeline source/sink component
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>
2023-02-15 18:45:28 +02:00
Ranjani Sridharan 31598f521e smart_amp_test: Correct bytes calculations for processing
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>
2023-02-15 18:12:40 +02:00
Piotr Makaruk 5b8c622908 dai: fix xrun handling
dai copy should continue with flow if status returns xrun warning

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-02-15 18:08:41 +02:00
Seppo Ingalsuo 63598ee054 Tools: Tune: EQ: Use updated sof-ctl for tplg2 blob export
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>
2023-02-15 11:36:51 +00:00
Uday M Bhat 9f318fd3d5 topology2: cavs-rt5682: Update BT offload SSP for MTL chromebook
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>
2023-02-15 11:28:20 +00:00
Jaska Uimonen b052563015 topology2: development: add hda efx pipelines
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>
2023-02-15 10:02:20 +00:00
Jaska Uimonen 568dd2457c topology2: add fir eq class
Add fir eq class with proper fir eq uuid.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-02-15 10:02:20 +00:00
Jaska Uimonen 984c61381c topology2: modify iir class to use needed params
Kernel is expecting audio formats and pin count for a process/effect
component, thus add it.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-02-15 10:02:20 +00:00
Long Wang 8a1798e4e8 smart_amp: eliminat pops when switch device between speaker and headphone.
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>
2023-02-14 16:25:18 +00:00
Pin-chih Lin feeb51f216 topology1: add PDM1 version for sof-adl-max98360a-rt5682-2way
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>
2023-02-14 16:10:28 +00:00
Kai Vehmanen 00442c2310 west.yml: upgrade rimage to 3863e94fa5
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>
2023-02-14 15:33:24 +00:00
Libin Yang 813c7bd505 topology2: dmic-wov: refine wov pipeline id
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>
2023-02-14 10:07:08 +02:00
Libin Yang f494b4c583 topology2: dmic-wov: fixup output_pin_binding
src_pin_binding has been renamed to output_pin_binding.
Fixup the name.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2023-02-14 10:07:08 +02:00
Libin Yang ace472f726 topology2: wov-detect: set num_xxx_audio_format
Set num_input_audio_formats and num_output_audio_formats for wov widget.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2023-02-14 10:07:08 +02:00
Libin Yang 857fb4c4fe topology2: wov: add D0i3 support
Add D0i3 support by setting attribute capture_compatible_d0i3.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2023-02-14 10:07:08 +02:00
Libin Yang eb36d58725 topology2: update the WoV config data
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>
2023-02-14 10:07:08 +02:00
Libin Yang cbb4c277e5 topology2: wov-detect: set the virtual widget name
Set the virtual widget name.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2023-02-14 10:07:08 +02:00
Guennadi Liakhovetski 7b8da69176 module-adapter: allow different statuses
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>
2023-02-13 13:02:43 +00:00
Michal Bukowski aaac08a082 cavs: memory bank powerup flow adjustment
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>
2023-02-13 11:01:35 +00:00
Pin-chih Lin eedd76ae37 module_adapter: waves: fix unfreed rballoc memory block
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>
2023-02-13 12:49:03 +02:00
Jyri Sarha 62b676727b topology2: Use new attribute references notation in route definitions
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>
2023-02-10 14:17:13 +02:00
Andrula Song f9c3cfccfe Audio: Mixer: Remove the prime operations for unaligned samples
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>
2023-02-10 13:30:44 +02:00
Andrula Song 671f79819d Audio: Mixer: Use frame aligned API
Use frame aligned API to reduce the division calculation in mixer
process function.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-02-10 13:30:44 +02:00
Piotr Makaruk 6009c21c66 hda: Maintain dma buffer alignment
Hda chain dma buffer require aligning after its size recalculation.

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-02-10 13:14:43 +02:00