Add an argument to specify if we want to build the HDMI only topology.
To build the HDMI only topology, use the following command:
alsatplg -p -c cavs-gain-hdmi.conf -o cavs-gain-hdmi.tplg
To build the HDA topology use the following command:
alsatplg -D HDA_CONFIG="gain" -p -c cavs-gain-hdami.conf -o
cavs-gain-hda.tplg
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add the host<->gain route in the gain-playback/gain-capture
pipeline and keep only the top-level routes in the top-level topology
file.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
No functional change, only fix an ASCII-art topology representation
in a comment.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add io_clk attribute to dmic and ssp dai class. This is the platform
dependent clock that needs to variated in upper level topology files.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add boolean nhlt attribute to manifest class. This attribute will tell
alsatplg to generate nhlt blob from dai definitions and add it into
the manifesst itself.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add an instance attribute for all pipeline class definitions and the pcm
class. This will be used to instantiate unique PCM/pipeline instances.
The ID attribute for PCM and the index attribute for pipeline may be the
same as the instance attribute in most cases. But in some cases, the
pipeline ID or the PCM index will be passed from the CMakeLists.txt file
as pre-processor definitions and they will be replaced as needed.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
These flags are required to prevent unwanted bugs in the ctl tool. They
have been used to detect an undefined behaviour instance which occurred
due to lack of a return value in a non-void function.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Most of the errors are unused variables, plus an unused label. Those are
benign.
One of the errors was the following:
/work/repos/sof/tools/ctl/ctl.c: In function ‘ctl_set_get’:
/work/repos/sof/tools/ctl/ctl.c:497:1: error: control reaches end of
non-void function [-Werror=return-type]
497 | }
| ^
This error had caused an undefined-behaviour-driven bug internally (an
error being displayed with a return code of 0, when it shouldn't have
been possible to display that message if the return code was 0). At line
614 of the old code, the message "Error: could not Set control, ret:0"
was displayed.
The errors only show up when you add -Wall -Werror to the compile
options of ctl, which I will do in the next commit.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Fix the documentation to match actual topology definition. The comments
did not include addition of mixers nor the capture PCMs. Also many
comments reflect a fixed core id that is no longer accurate.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit:
- adds flags argument into scheduler_free function pointer in
scheduler_ops struct;
- adds SOF_SCHEDULER_FREE_IRQ_ONLY flag, which indicates to disable
only interrupts in scheduler_free() functions.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Add two classes to be used with dmic for nhlt conformance. Mic extension
includes snr and sensitivity values. Mic vendor config has multiple
values for defining the mic array geometry and mic positions.
Do not add tokens as these values are used currently only with nhlt
generation. Defining these classes in dmic is optional.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
This patch adds for the IIR equalized component a test with
comparison 100 ms of Octave generated output to output of the
component. The test signal is a full scale chirp signal. The
IIR response is both amplifying and attenuating to trigger as
much as possible issues with internal overflows.
All test data was generated by Octave script
cmocka_data_eq_iir.m. Re-run of script updates the used header
files the in cmocka tests directory.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Always use "!" with array definitions so that items do not get
duplicated when arrays are merged when the conf file is included
multiple times.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The DTS Codec can be conditionally added to the sof-mt8195-mt6359-rt1019-rt5682 topology on those pipelines intended for headphone and speaker output.
To enable processing and configure settings, additional bytes must be sent to the control via ALSA TLV. The intention is that endusers will use ALSA UCM to achieve this.
Signed-off-by: Mark Barton <mark.barton@xperi.com>
Commit 771db86de2 ("topology1: codec_adapter: Add 'codec_adapter' pipeline configuration")
in an attempt to support PCM + compr mixer scenarios broke simple codec adapter
pipelines.
So, similar with PCM case (see sof/pipe-host-volume-playback.m4 vs
sof/pipe-volume-playback.m4) we introduce two separate configuration
files.
One for Passthrough codec-adapter pipeline and one standalone Host +
codec-adapter pipeline that can be independently scheduled in a scenario
with a mixer for example.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
As opposed to pipe-codec-adapter-playback this has its own scheduling
task and can be used in more complex scenarios.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Support SKU 0B29 product, the audio hardware configuration is rt711
on link2, two rt1316s on link0 and link1, rt714 on link3.
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Support SKU 0AF3 product. The audio hardware configuration is two
rt1316s on link1 and link2, and rt714 on link0.
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
This patch adds support for three configurations:
SSP1 connects max98390 2/4 speakers
SSP2 connects max98390 2 speakers
The SSP TDM configuration uses 4 slots for playback and
4 slots for the echo reference capture - regardless of the number of speakers.
UCM files in userspace specify which channels needs to be used on the specific platform.
There is no information reported by the topology/firmware related to valid channels.
Max98390 uses following channels mapping for playback and EchoRef capture
Chan 0 = Left
Chan 1 = Right
Chan 2 = Tweeter Left
Chan 3 = Tweeter Right
(Chan 0 and 1 with regular speakers;Chan 2 and 3 with tweeter speakers)
Addition:
Add SSP2 BT_OFFLOAD support
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Add support for cs42l42 with max98360a running on JSL boards. The
cs42l42 needs to enable bclk earlier in prepare stage and disable bclk
at hw_free statge so we add the SSP_CC_BCLK_ES flag for it.
Signed-off-by: Brent Lu <brent.lu@intel.com>
This topologies are for i.MX8QXP/i.MX8QM, i.MX8MP demonstrating
mixing for 1 PCM stream and 1 Compr stream.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
sof_ri_info.py --erase_vars reproducible.ri sof.ri
replaces variable fields (signature and date right now) by constants.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signature and date are (for now) the only variable fields when
re-signing with the same tool so their locations matter.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
stderr is often highlighted with a different color.
This also makes the usual >/dev/null redirection possible.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
File offsets were critical in finding the serious begin_off bug fixed in
the same series. The information is already there so just show it.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes the adsp_mft_cse_entry Component added by
commit 8885b465df ("tools: sof-ri-info: move parsing adsp mft outside
cse mft").
`adsp_mft_cse_entry.entry_file_offset` did not account for the extended
manifest.
Also fix the large `reader.ext_mft_length + entry_offset`
copy/paste/diverge
That variable did not seem to be used anywhere yet but it's wrong value
was confusing and time-consuming when debugging.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add support for max98360a running on ADL boards. We choose SSP1 for
speaker amplifier for BT offload compatibility. Also increase the
sample depth to 32 bits for more dynamic range and avoid using m/n
counter.
We add the flag SSP_CC_BCLK_ES to SSP0 for the compatibility with
CS42L42 in the future.
Signed-off-by: Brent Lu <brent.lu@intel.com>
Add m4 and headers to support basic topology with passthrough
pipeline for ACPSP and DMIC use cases support on renoir platform.
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: balapati <balakishore.pati@amd.com>
Comments for calls to PIPELINE_PCM_ADD and DAI_ADD describe parameters
in the same order they are passed to the macros. The only exception is
order of "priority" and "core", and this can be very misleading. In
most cases the actual current values for the two parameters are 0,
making it even easier to make a mistake when modifying them.
Fix the order in the comments to match the actual order in which the
parameters should be passed to PIPELINE_PCM_ADD and DAI_ADD.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Updated guidance for BT hardware is to use 38.4Mhz MCLK for both
SCO and A2DP mode. This applies for all Intel platforms supporting
Bluetooth offload.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This adds 'codec_adapter' pipeline configuration allowing this
pipeline to be part of a more complex topology.
Important configuration here is the 'scheduler' widget. Without this,
'codec_adapter' would work in a more complex topology. This is because
each individual pipeline needs to have a 'scheduling' component.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
The run with valgrind will error if memory leaks are detected.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Previously the file component stored component data to device
private data similarly as processing components. However the
pipeline treats file as DAI. Without this patch the missing driver
and DAI operation get_init_delay_ms() causes a segfault in pipeline
parameters walk. It is sufficient for the walk to pass to have just
rzalloc() cleared pointers in driver structure.
The file component data is now placed into DAI private data.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
We plan to test the CI test topology on ADL-P nocodec device, so
add the topology build support in cmake list.
Signed-off-by: Zhang Keqiao <keqiao.zhang@intel.com>
Without CMP0079 we cannot conditionally include libraries against SOF in
sub directories without seriously restructuring the project. This is
because the old policy requires the link target must be created in the
same folder. This does not work well from a configuration standpoint for
3P audio libraries trying to keep their config in src/audio/*. Rather
than enable the policy, lets simply upgrade since 3.13 is widely
available.
With this upgrade we can also remove the two version dependent checks at
the top of our scripts.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Not sure why they were intertwined, let's separate them out to avoid
git conflicts with integration.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This topology is used on GLK and TGL. variations include:
- DMIC supported on TGL and not on GLK
- TGL uses SSP0 instead of SSP2
APL support was added only based on user reports. This assumes the
same topology as GLK but was not tested.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
When the firmware receives a START or RELEASE IPC message, it
immediately triggers all involved components, which starts DMA.
Then it schedules the pipeline task, but since the scheduler can be
already running at that time, the task might be scheduled when DMA
data isn't available yet or has already overflowed. To fix this
change the control flow to also trigger all components from the task
during its first run. Actual data processing then begins with the
next period. Note, that this is currently only possible with
pipelines, using timer-based scheduling. Pipelines, using DMA
interrupts for scheduling are unaffected.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
We need to split the START trigger command into two commands because
some components have a long delay inside their START handling. This
patch introduces two new trigger commands: PRE_START and
PRE_RELEASE and a new state PRE_ACTIVE to prepare for that split.
For simmetry POST_STOP and POST_PAUSE are also added, however they
aren't used yet.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Added singular value decomposition algorithm
for diagonal matrix calculation. Added filters for side
lobe artifacts.
Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
This patch adds topologies sof-apl-nocodec-demux-eq-2ch4ch.tplg and
sof-apl-nocodec-demux-eq-4ch4ch.tplg. Playback of 2ch creates 4ch
output in format L_lo, L_hi, R_lo, and R_hi. An example band-split
at 2 kHz is configured for EQ processing. The low band contains
an additional 80 Hz high-pass.
The pipeline was tested in UP2 device. The nocodec topology enables
an useful SPP loopback mode. The capture PCM is connected to DAI
loopback so this pipeline can be tested with simultaneous 2ch aplay
and 4ch arecord.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Also add a simple pipeline used by windows. A normal
playback pipeline is : copier -> mixin -> mixout -> gain -> copier
Signed-off-by: Rander Wang <rander.wang@intel.com>
This reverts May 2020 commit a2de860f42 ("cmake: fix tools build
with submodules") that added a dependency on rimage for the entire
`tools/` subdirectory, probably because `smex/ldc.h` included
`rimage/fw.h` (removed in previous commit).
Looking at the code review I can see no apparent attempt to understand
anything, not even a quote of a build error message.
This will hopefully unblock
https://github.com/zephyrproject-rtos/zephyr/pull/37250
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This PR adds RTNR Noise Reduction/Suppression(NR/NS) component by
Realtek Semiconductor Corp. This feature links to proprietary libraries.
Please contact antz0525@realtek.com for any question about the library.
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
Without enclosing ENDPOINT_NAME with `', the generated tplg has
pcm id 0 named to "Headphones" instead of "Speakers".
$ ./tplgtool.py ~/work/sof/tools/build_tools/topology/sof-tgl-max98357a-rt5682.tplg
pcm=Headphones;id=0;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=Headset;id=1;type=both;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI1;id=2;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI2;id=3;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI3;id=4;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI4;id=5;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=EchoRef;id=6;type=capture;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=DMIC;id=99;type=capture;fmt=S32_LE;rate_min=48000;rate_max=48000;ch_min=4;ch_max=4;
pcm=DMIC16kHz;id=100;type=capture;fmt=S16_LE;rate_min=16000;rate_max=16000;ch_min=2;ch_max=2;
$ grep Headphones topology/sof-tgl-max98357a-rt5682.conf -n -B5
7071-# PCM Low Latency, id 0
7072:SectionPCM."Headphones" {
7073-
7074- # used for binding to the PCM
7075- id "0"
7076-
7077: dai."Headphones 0" {
7078- id "0"
7079- }
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
For speakers SSP2 link is used.
For Headset SSP0 link is used.
Adding required macros to select SSP and Platform.
Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
Modify sof-jsl-rt5682 topology so Waves codec can be added
to playback in case 'WAVES' is defined.
Small refactoring
Signed-off-by: Oleh Titov <Otitov@waves.com>
The patch to fix CHANNELS_MIN side effects had a bug in which caused
LOCAL_CHANNELS_MIN to slip into conf output. Example from
sof-adl-sdw-max98373-rt5682:
---cut--
SectionPCMCapabilities."Passthrough Capture 14" {
» formats "S16_LE"
» rate_min "8000"
» rate_max "16000"
» channels_min "LOCAL_CHANNELS_MIN"
--cut--
Fixes: 659266685b ("topology: remove side effects from macro definitions")
BugLink: https://github.com/thesofproject/sof/issues/4621
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Dynamic range compression (DRC) or simply compression is an
audio signal processing operation that reduces the volume of
loud sounds or amplifies quiet sounds, thus reducing or
compressing an audio signal's dynamic range.
This enables the DRC component for i.MX8QM/i.MX8QXP/i.MX8MP
with wm8960 codec.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
This commit fixes the issue mentioned in #4583.
A temporary definition is introduced that takes it's value from
"CHANNELS_MIN" if it is already defined, otherwise it is set to
a default value. This temporary is used instead of "CHANNELS_MIN"
for the rest of the file. This avoids having the macro defined in
files where it shouldn't be.
In order to be completely sure it avoids side effects this temporary
is undefined after it is no longer needed.
Signed-off-by: Bud Liviu-Alexandru <budliviu@gmail.com>
ControlBytes section name is given by DEF_EQFIR_COEF macro.
Otherwise, using pipe-eq-fir-volume-playback.m4 in a topology results in
a compilation error.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>