Create ssp_pre_start/stop() helpers to do kinds of runtime
configuration, and do the bclk request/release there to make sure the
bclk source is hold only when the DAI is active, this will help for
power saving at SSP idle.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
During mn_release_bclk(), check if there is still any SSP which is
holding the M/N clock source, if no, release the clock source for power
saving.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add a helper to reset the bclk M/N source (MNDSS), which will help to
release the clock source when it is not needed.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Currently the mux/demux uuid setting doesn't work and uuid is always set
to "demux". Fix this by quoting the ifelse in 1 line.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
According to spec, we can configure more devidier ratios via register
MDIVR, in 1/N the N could be 2, 3, 4, 5, 6, 7, 8.
Here change to enable these possibilities.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
The ssp.freq is arranged in ascending sequence, to get the smallest
matched clock, we should search from index 0.
We should not stop the searching if 'mclk < ssp.freq', continue the
searching until we get a larger/proper one or fail if all the items
are iterated.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Log the incorrect mdivr_val value when error happen, which could help to
identify what has happened.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This patch fixes the issue with premature free of runtime
parameters memory. Such situation occurs when runtime
params are send in few parts, then after the first packet
has been copied the memory is freed so the consecutive one
no longer has a copy destination.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
alloc_heap_buffer() is trying to allocate memory from a single heap,
no need to check its size on each iteration of an internal loop over
maps.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
With coefficients scaling that creates above 1.0 absolute value
internal biquad output before scaling gain and shift there's
overflow in variable tmp calculation that is used for output
and for recursive a1, a2 coefficients multiplication.
Fixes: #3678
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
for some reason the clang version with oss-fuzz doesn't recognize the
comments so lets add this attributes in the meantime. XCC does not like
them so lets only use them with clang.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This fix adds initialization and declaration of variable f_single
to avoid a previously overlooked error when accessing it in the
end of script. It produces the plot but with a warning print.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add m4 macros to generate enumerated control. Usage is similar to mixer
and bytes control except enumerated values are specified using separate
text section.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
There are simply a dump of a series of messages from the kernel of
messages sent to the firmware. This will be used by the fuzzer to infer
inputs to tests against the the firmware.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Trace is enabled by default for library builds, but the module is not
included. This breaks the ipc handler. Therefore lets include it and
give it a mocked section of memory to write to.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
The fuzzer is makings its way into a lot places where we assume hw
configs exist. Therefore a refactor is needed make it easy to fill in
the missing configs.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Some algorithm functions of crossover and drc are exposed to share the
usage from other components, e.g. a multi-band drc which includes
crossover and drc inside.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Use an upstream commit instead for developing commit.
Included following feature:
rimage cavs 2.5 support
add verify feature
rimage support for TGL-H
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
To support TGL-H build with different binary name, set
CONFIG_RIMAGE_SIGNING_SCHEMA to tgl-h to make sure
output file name matches requirement from Linux driver
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Both the playback and capture PCMs should be restricted to the
corresponding SMART_PB_CH_NUM and SMART_REF_CH_NUM, as running them with
other channel numbers will not work correctly.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
ILL entries in the DW DMA driver are accessed both by the controller,
using DMA and by the DSP. For this to work the DSP has to force cache
synchronisation appropriately. Therefore the ILL area has to be
allocated with cache-line size alignment. This isn't the case with the
Zephyr allocator. This patch switches allocation from rmalloc() to
rballoc() to force such alignment. Eventually a generic fix will be
implemented in an SOF wrapper fpr the Zephyr allocator.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The set of figure property in figure() command is not supported
in Matlab. The separate set() property works for both Octave and
Matlab.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add a macro 'CODEC' to generate topology for rt1011 speaker amp.
Add a macro 'FMT' to seperate speaker dai format: s16le, s24le
Modify both pcm name by 'Speakers'
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
This rounds up the page table DMA transfer size to DMA_ATTR_COPY_ALIGNMENT
instead of a hard-coded 4 bytes.
Signed-off-by: Joseph Burt <caseorum@gmail.com>
This was too small, causing the ptable to be truncated and the
ptable DMA transfer to fail on BDW for small buffers, where the
minimum transfer is 4 bytes.
Signed-off-by: Joseph Burt <caseorum@gmail.com>
Speaker amp's SSP tdm & clock is configured for 32-bit, accordingly
update DAI configuration to s32_le.
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Currently we are checking if matrix row contains any 1's (popcount). In
mux case this doesn't tell us if channels are mixed. For example if we
have 2 input matrix in which first row's position 2 and 4 have value 1,
it means that both streams channel 1 is copied to output channels 2 and
4, so not mixed. So change the check to be channel specific.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Use a correct path to the cAVS memory.h header, build cAVS LPS
only when the respective Kconfig option is selected.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Introduce TRACE_BURST_COUNT Kconfig setting, which allows to define amount
of messages that are allowed to pass through the filter before suppression
kicks in.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
To allow proper display of suppressed message info traces, %pQ specifier
was chosen to decode pointers to log entries.
Helper function asprintf_entry_text() is used to handle the log entry
text for display.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
When user manually overrides trace filtering settings, adaptive trace
rate-limiting is disabled. This assures, that when user deliberately
changes filters, all trace messages are being delivered.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Few recent messages are remembered by the filter, and repetitive messages
reported in short period of time are suppressed. Solution is compile-time
configurable via many Kconfig options, as documented in Kconfig.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Also create trace_log_unfiltered() function, to be used internally
by tracing subsystem to emit information about suppressed trace messages.
The *unfiltered function could be also used as replacement
in _log_message() macro, to disable log filtering for debugging purposes.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
This separates trace filtering from actual sending of the message
and allows usage of sending function without filtering, when necessary.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
If you enable the adapter but disable the cadence codec this will break
Reported-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
So far we only used topologies with rate set
to 48KHz. This is no longer true now when
we enabled KWD pipelines.
So, use rate from parameters passed from kernel.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
We add fsync_rate, bclk_rate because now we
actually need them.
Also, notice that mclk_rate was moved near the other rates
fields.
I think this was broken from the beginning but didn't
show up as a bug because SAI is used in consumer mode
and the clock is provided by the codec.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Prevent unused Xtensa XTOS files from building but keep them in the tree
until migration to Zephyr completes.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>