This change adds stream map and channel map structures
used for channel re-routing and stream aggregation.
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
Reverts all changed media pipelines to again have 4000 ms
scheduling period. Change was introduced in order to workaround
firmware scheduling limitation, but with pipelines scheduled
separately we can revert it back.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Use RELATIVE_FILE because __FILE__ makes binary output
dependent on project location.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Latest GCC does additional checks. This patch fixes the following build
error.
Scanning dependencies of target sof-logger
[ 0%] Building C object logger/CMakeFiles/sof-logger.dir/convert.c.o
/home/lrg/work/sof/sof/tools/logger/convert.c: In function ‘serial_read’:
/home/lrg/work/sof/sof/tools/logger/convert.c:311:2: error: converting a packed ‘struct log_entry_header’ pointer (alignment 1) to a ‘uint32_t’ {aka ‘unsigned int’} pointer (alignment 4) may result in an unaligned pointer value [-Werror=address-of-packed-member]
311 | for (len = 0, n = (uint32_t *)&dma_log; len < sizeof(dma_log); n++) {
| ^~~
In file included from /home/lrg/work/sof/sof/tools/logger/convert.c:15:
/home/lrg/work/sof/sof/tools/../src/include/user/trace.h:94:8: note: defined here
94 | struct log_entry_header {
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [logger/CMakeFiles/sof-logger.dir/build.make:76: logger/CMakeFiles/sof-logger.dir/convert.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:91: logger/CMakeFiles/sof-logger.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
i.MX8QXP has one SAI interface. Create a simple topology
without a codec for playback of 2 channels, 16bits samples
at 48Khz.
Host -> Buffer0 -> Volume -> Buffer1 -> SAI1
This is useful for testing various components like Dummy DMA,
EDMA and SAI drivers.
For more information about SAI you can read i.MX8QXP RM at:
https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf
Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
We need large host buffer for keyword detection to make sure there will
be no overwritten during the history buffer draining, increase the buffer
min/max and period max to fit it.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Improve the sof-logger usage description text a little bit.
Specifically the -s argument is pretty confusing right now as
it says nothing about having an additional argument for the state
name.
Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
Due to clock frequency limitation on CML, the bandwidth is not enough
when playback and capture are opened at the same time if we use 32 bps.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
The topology for UP2 + HiFiBerry Digi+ Pro sound card needs to
use for the pipeline host - volume - DAI the DMA interrupts
synchronized scheduling since the DAI is configured as I2S slave.
The timer based scheduling is applicable for this interface only
with ASRC that is not used by this simple topology.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add implement PCM_CAPTURE_LP_ADD() to create low power Capture PCM,
which can run at low power status like d0i3.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add stream token SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3 and
SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3 to denote if the stream can run
at low power d0i3 status or not.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Changes scheduler_init_edf and task_main_init function
definitions as sof structure is no longer needed. It was
only used to pass agent object to main idle task.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Reverts all previosly changed cAVS pipelines from 3 to 2 periods.
Now we have separate buffers for DMA, so there is no need to make
DAI buffers consist of 3 periods. DMA will take care of any internal
hardware requirements.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Add mute switch with led control to capture playback pipeline's volume
component. This will show in user space alsa controls as 1 element with
2 controls (volume and mute switch). Some user space audio software like
this a lot.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add optional mute led token support to mixer control. Optional
parameters at the end of mixer control macro will add mute led tokens
and related parameters to the private data section.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add tokens to topology for led use and led direction. Led use is true
for positive integers, false for 0. Led direction 0 corresponds to
playback and positive integers to capture.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Fix the copy/paste errors in naming the keyword-detect
pipeline connections for CML and GLK.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Chirp test signals confused the test signal begin marker position
seek and caused false test fails. The test stimulus may produce
stronger cross correlation level than the actual marker. Also
the check omitted that the cross correlation max could be negative
so the test was changed into power domain and use first/last
cross correlation peak above threshold as test begin/end position.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Gain of SRC varies by 1 dB due built-in attenuation in the filter
coefficients. It was added to avoid signal overshoots to distort
with some challenging music content. When a converter consists of
two filters in series the attenuation duplicates. While SRC is
missing the gain compensation the test criteria needs to be relaxed.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds topology sof-apl-src-dmic.m4 to test capture SRC.
The topology instantiates SRCs for 48 -> 8-48 kHz and 16 -> 8-48 kHz
capture. The volume component in pipeline handles PCM format
conversion from the fixed S32_LE DMIC DAI format. Also the bugs in
the earlier non-used pipeline macro are fixed.
The macro pipe-src-capture.m4 is renamed to pipe-src-volume-capture.m4
since it contains a volume component. A new macro pipe-src-capture.m4
is created to provide pipeline building block without volume.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Now rt711 is in SDW mode and rt1308 is in I2S mode on TGL RVP
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Switches all pipelines for cAVS platforms to timer scheduling.
This way we limit the number of interrupt levels processed
in the system. Timer, IPC and IDC are already on level 2 and
DMAs are on level 5.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes ICL topology to use 3 periods for buffer connected to ALH DAI.
This topology has been forgotten, when such changes were done.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Fixes SSP format and used pipeline macro in CML topologies.
Fixes: cfe81f5127 ("topology: cml: cnl: use 3 periods for SSP, DMIC and ALH DAIs")
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Fix alloc definitions for host build.
Function definitions were using defines in their body
which blocked usage of const values in said defines.
Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
Changes number of DMIC DAI periods from 2 to 3. This way
we can support both timer and new single DMA channel
scheduling.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes number of SSP and DMIC DAI periods from 2 to 3.
This way we can support both timer and new single DMA
channel scheduling.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes number of SSP, DMIC and ALH DAI periods from 2 to 3.
This way we can support both timer and new single DMA
channel scheduling.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes number of SSP, DMIC and ALH DAI periods from 2 to 3.
This way we can support both timer and new single DMA
channel scheduling.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes number of SSP and DMIC DAI periods from 2 to 3.
This way we can support both timer and new single DMA
channel scheduling.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Uses DAI_PERIODS in calculation of DAI buffer size.
In case the DAI_PERIODS value is undefined, we use
DAI_DEFAULT_PERIOD value of 2.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Fixes pipe-dai-capture and pipe-dai-playback pipelines
to use passed DAI_PERIODS value instead of hardcoded.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Rename dmic pga and control names to human readable format as they might
be used by user space software.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Currently m4 parses pga and mixercontrol topology names partly from
static strings, pipeline id's and user defined names. This automagically
differentiates the pga's nicely, but makes some pga control names human
unreadable and error prone for example to to pipeline id changes. So
make it possible to define the pga and control name with PGA_NAME and
CONTROL_NAME.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
This pipeline adds support for S24_LE, 2 channels, 48KHz playback.
cs42888 codec is connected to i.MX8QXP board on ESAI0 interface
as follows:
i.MX8QXP CPU board <--> i.MX8 base board <-> Audio I/O card
(setup similar with i.MX8QM, so this topology can be used as it is
on i.MX8QM in the future).
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Currently having different amount of periods between DAI and the
component before it is not allowed. This is because it is not allowed to
resize dma connected buffers. So make 50kHz topology use src-volume
pipeline, which has additional volume component, which in turn has
correct amount of periods for the DAI connection.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
i.MX8QXP has one ESAI interface. Create a simple topology
without a codec for playback of 2 channels, 16bits samples
at 48Khz.
Host -> Buffer0 -> Volume -> Buffer1 -> ESAI0
This is useful for testing various components like Dummy DMA,
EDMA and ESAI drivers.
For more information about ESAI you can read i.MX8QXP RM at:
https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Somehow there is an extra "48" in DAI_ADD() and it uses wrong
pipeline in PCM_PLAYBACK_ADD().
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
sof-icl-rt711-rt1308-rt715-hdmi.m4 is based on sof-icl-rt711-rt1308
-rt715.m4 with hdmi supported.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Adds complete callback to task. Some EDF tasks will need to have
additional callback on task completion, which will be executed
in critical section along the setting task state to complete.
Doing it during regular execution is not enough, because it's done
on passive level and we want to avoid any race condition.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
With m/n divider support, we can now support 24 bit/ 48k
on max98357a.
Add check to only use update BCLK if m/n support is present.
Else fallback to older settings.
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Add rt1011 speaker CML Audio topology on top of
sof_rt5682 where RT1011 is configured as
TDM 4 SLOT ( 2 CH PB and 4 CH Feedback), 100 FS BCLK.
BCLK delay is added for supported ABI versions.
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Some of the features on topology need to have
ABI version check. This adds few definitions to
check ABI version being 3.9 or more.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
The PCM512x requires 32-bit data words, so the only solution is to use
a 3.2MHz bit clock and a 48->50kHz SRC.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Update the topology to use the same iDisp link_id's as in
tgl-rt1308 m/c driver.
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
The DAI definition needs to come first otherwise the media pipeline with
be parsed incorrectly resulting in a failure to load the topology
Signed-off-by: Curtis Malainey <cujomalainey@google.com>
This patch updates the locations of "make install" libraries default
install locations into shell script to run SRC test cases. The script
also now prints the used LD_LIBRARY path to ease setting up code
debugging.
The segfault of testbench executable is fixed by returning a valid
pointer reference instead of a NULL from test dummy function
arch_schedulers_get(). The rest of testbench version of schedule.c
was also updated to be like the current real version module.
Finally in the testbench.c main the file names string pointers are
initilizated to null as well as the word length parameter to avoid
a segfault if executable is started without command line arguments
to see the usage help text.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds a shell script sof_test_perf.sh that measures
gain, frequency response, and total harmonic distortion plus
noise for a remote device.
Matlab or Octave is needed. The shell script launches by default
Octave to process the signal generation and test results analysis
scripts.
The remote device must be set to be accessible by ssh without
passwords. An external high quality USB sound card is recommended
as analog interface to connect to test device's analog interface.
The configuration file sof_test_perf_config.m must be edited for
the remote device's user account, audio device, audio format, and
capture sound card audio device, and audio format.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Fixes media pipeline period for nocodec byt and cht topologies.
Now codec and nocodec topologies are aligned in regards to pipe
configurations.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>