Commit Graph

6760 Commits

Author SHA1 Message Date
Ranjani Sridharan 56d1fe652c topology1: sof-cavs-nocodec: convert all playback pipelines to mixer-based pipelines
Convert all playback pipelines to have a mixer so adding a deep-buffer
pipeline will be simpler.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-07-23 08:34:36 +01:00
Ranjani Sridharan 808c4512c5 Revert "topology: cavs-nocodec: Add deepbuffer pipeline to SSP0 and SSP2"
This reverts commit a10b5dcf85.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-07-23 08:34:36 +01:00
Ranjani Sridharan 463c4afd10 Revert "topology1: sof-cavs-nocodec: Add the deep buffer PCMs"
This reverts commit 6516a8c89b.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-07-23 08:34:36 +01:00
Rander Wang 8ccfe50ab3 pcm_converter: add ipc4 converter support
Ipc4 pcm converter will check container size and valid sample
size to do format conversion. This patch add general support for
valid sample / container size s16c16 <-> s16c32, s32c32 <-> s16c32
s16c32 <-> s24c32 s24c32 <->s16c32, which are not supported
by sof now.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-23 08:26:11 +01:00
Daniel Baluta 52bc39fe73 topology: i.MX: Add topology to demonstrate EQ component
This enables EQ component with IIR filter for i.MX8QM/i.MX8QXP/i.MX8MP
with wm8960 codec.

Users can try various configurations for EQ parameters using sof-ctl tool:

$  amixer -Dhw:1 controls | grep EQ
numid=44,iface=MIXER,name='EQIIR1.0 eqiir_coef_1'

$ ./sof-ctl -Dhw:1 -n 44 -s sof/tools/ctl/eq_iir_bassboost.txt

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-07-22 17:07:23 +01:00
Daniel Baluta 1203a46633 tools: ctl: Fix getopt() stop condition
getopt() returns an int, which in our implementation is assigned to a
char type var.

On some platforms char is unsigned thus making getopt() return value
always > 0.

Use int instead of char here to fix the stop condition for parameter
parsing.

This makes sof-ctl work on ARM platforms.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-07-22 17:06:52 +01:00
Bard Liao bb18f62b54 topology2: copier: add ALH type
ALH is a valid type of copier.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-07-22 17:03:08 +01:00
Seppo Ingalsuo 83897cc92a Audio: TDFB: Clear input and output buffers in reset()
The component should reset to default state so these
buffers need to be cleared.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-22 17:02:39 +01:00
Seppo Ingalsuo d30f47dd13 Audio: SRC: Cleanup not needed state variables
The source_format and sink_format variables are not needed in
component data. They can be local in prepare().

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-22 17:02:39 +01:00
Seppo Ingalsuo 9d0d818d8c Audio: EQ-IIR: Change source and sink format component data to local
The source_format and sink_format variables do not need to be in
component data. Local variables in prepare() are sufficient.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-22 17:02:39 +01:00
Seppo Ingalsuo 4dd766a0b5 Audio: EQ-FIR: Cleanup not used state variables
The processing function selection no more uses these
component struct fields.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-22 17:02:39 +01:00
Marc Herbert 8059b8f9fd xtensa-build-zephyr: better help and error message when -p is required
-p is required when the real (not symbolic) directories are not nested
in one another.

The documentation gap was clearly demonstrated by me getting confused
even though _I_ implemented this logic some time back.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-22 17:01:19 +01:00
Rander Wang 33af554ed3 ipc4: add fw_reg definition
fw_reg is located in memory windows 0 for host to
query fw status

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-22 14:00:57 +01:00
Rander Wang 60bd8d78d8 ipc4: add missed attribute for large_config
Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-22 14:00:57 +01:00
Rander Wang 743e6294df ipc4: add ipc4 message for deleting module instance
Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-22 14:00:57 +01:00
Rander Wang f6e12130f5 ipc4: add header file for notification definition of ipc4
Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-22 14:00:57 +01:00
Rander Wang 8367bd8bb4 ipc4: add header file for error code definition of ipc4
Ipc4 error code will be used in ipc4 interface layer and
current sof error code in framework or components will be
translated to ipc4 error code in this layer.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-22 14:00:57 +01:00
Rander Wang 1c73215bc3 ipc4: add header file for base config
Base config defines input & output information of each ipc4
modules. The information includes audio stream format, input
& output buffer size.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-22 14:00:57 +01:00
ShriramShastry 1f4395f805 Math: Trignometry: Add arc sine, cosine, cexp fun
Added cordic based approximation of arcsine,arc cosine and
complex exponential function to math trigonometry.

Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
2021-07-21 14:18:51 +01:00
Seppo Ingalsuo 4c376680f5 Tools: Fix topology1 path in Matlab language scripts
The change for topology1 was missing from various tuning
and testing scripts those access binary blob data from
topology m4 directories.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-21 12:13:36 +01:00
Rander Wang 8d68de8db5 ipc4: add ipc4 dai configuration support
Dai configuration is generated based on gateway config in copier module

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-21 10:31:28 +01:00
Rander Wang c52e8dbba2 ipc4: alh: add alh support for ipc4
Stream id is included in ipc4 config and fw constructs
hw_params for alh based on this information.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
2021-07-21 10:31:28 +01:00
Rander Wang 457465fa15 ipc4: ssp: add ssp blob support
Ssp setting can be generated offline by tools and sent
to fw by driver in memory blob. Fw decodes this blob and
set hw registers accordring to blob configuration. This
patch add support to this type of ssp configuration.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-21 10:31:28 +01:00
Ranjani Sridharan 6516a8c89b topology1: sof-cavs-nocodec: Add the deep buffer PCMs
We weren't really testing these yet without the PCM devices.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-07-21 10:23:10 +01:00
Rander Wang 3d90a4548e ipc4: add bind & unbind ops for ipc4 module
In ipc4 each module will be bound to its sink module by pipeline.
This patch add new ops bind & unbind to dispatch these events to
related modules.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-21 10:21:58 +01:00
Ranjani Sridharan 4beb748c23 mixer: use separate flags for source/sink buffer locking
Fix xruns caused because of using the same flags for locking
both the sink and source buffer.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-07-21 12:05:51 +03:00
Marc Herbert 3f4da1f1bb sof.doxygen.in: add CONFIG_TRACE=1
Stop ignoring most comments in the trace.h file.

Confusingly, only comments in trace.c were considered because unlike
trace.h, trace.c is not turned off by the preprocessor but by CMake
instead.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-21 09:17:05 +01:00
Marc Herbert 15330bc27d doxygen: fix or delete a large number of broken comments
At first I assumed some refactorings forgot to update the comments to
match. Then I saw some of these could never had made sense ever.

This does not fix _all_ doxygen warnings, it only makes the remaining
warnings easy to grep -v. This is just good enough for me to test other
doxygen changes without being drown into warning noise.

C files are not parsed by the default doxygen configuration - "if it's
not tested then it does not work".

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-21 09:17:05 +01:00
Marc Herbert 8d25e69005 doxygen: delete many broken \file arguments
Remove all the duplicate \file platform/lib/cpu.h. The \file parameter
is optional, the duplicates made these entire comments no-ops and spit a
lot of warnings.

Doxygen knows where the files are.

Removed the \file argument in other places as well which fixes a ton of
warnings like:

sof/src/audio/volume/volume_hifi3.c:7: warning: the name
'audio/volume_hifi3.c' supplied as the argument in the \file statement
is not an input file

Or:

sof/src/lib/pm_runtime.c:7: warning: the name 'lib/pm_runtime.c'
supplied as the argument in the \file statement matches the following
input files:
   sof/src/lib/pm_runtime.c
   sof/src/platform/intel/cavs/lib/pm_runtime.c
   sof/src/platform/library/lib/pm_runtime.c
Please use a more specific name by including a (larger) part of the path!

Note these warnings are not seen in the default doxygen configuration
which ignores a lot of comments.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-21 09:17:05 +01:00
Curtis Malainey 004b26aed9 host: remove duplicate clear
pointers should have been clear on reset step which is called between
prepare and hd is allocated with rzalloc so its already 0 on first call.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-07-20 08:05:41 -07:00
Curtis Malainey 5ac748c8db codec_adapter: passthrough: fix typo
logging as process in prepare step

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-07-20 08:05:41 -07:00
Keyon Jie 424beb0f8f memory: apollolake: refine the heap sections size
Reduce the system and system_runtime size, fine tune the size of runtime
and runtime_shared sections.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-07-20 10:31:21 +08:00
Bard Liao f96e25ffcc topology2: add cavs sdw topology
Add sdw topology for headset which includes one playback and one capture
pcms.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-07-19 13:19:12 +01:00
Bard Liao 4e76df5221 topology2: add ALH DAI class
Add ALH DAI class definition, ALH DAI objects can be
instantiated as:

Object.Dai.ALH."N" {
 	direction		"capture" # playback or capture
 	dai_name		"SDW0-Capture"
 	id 			2
 	Object.hw_config."2" {
 	}
}

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-07-19 13:19:12 +01:00
Seppo Ingalsuo 4f8cf51b6f Drivers: Intel: DMIC: Add NHLT binary data based configuration
This patch adds to DMIC driver support for binary data based HW
registers setup. The driver mode is selected in Kconfig.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-19 13:17:49 +01:00
Seppo Ingalsuo ccd7bcb7ed Drivers: Intel: DMIC: Add sample rate dependence to default ramp time
This patch replaces previous constant 400 ms ramp time with
sample rate dependent first order slope. The Slope coefficient -205
as Q15 and offset 500 as Q0 cause 400 ms ramp for 16 kHz and
200 ms ramp for 48 audio. The ramp min and max time are limited to
previously used check values. The default ramp is used when IPC does
not provide it from topology.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-19 13:17:49 +01:00
Seppo Ingalsuo c5f50f533f Drivers: Intel: DMIC: Separate decimation filters setup computation
This patch moves the run-time decimation factors search and filter
coefficients scaling code to separate module as preparation to add
more functionality to the driver. There are no changes to
functionality.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-19 13:17:49 +01:00
Seppo Ingalsuo 922cb6af7c Drivers: Intel: DMIC: Move driver code to subdirectory dmic
In preparation for more functionality the module is moved
to own directory similarly as other DAI drivers.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-19 13:17:49 +01:00
Pierre-Louis Bossart d1abc88153 topology: add development version for Volteer tests
Add support for reuse of sof-tgl-rt711-rt1308 on Google Volteer. This
is not intended for production but removes both hotwording and
smart-amp support - this simpler topology is intended for
SoundWire/DMIC tests only.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-07-19 09:40:52 +01:00
Pierre-Louis Bossart f3840a70c3 topology1: tweak sof-tgl-rt711-rt1308 to test on Google Volteer
The topologies used for sof-tgl-rt711-rt1308 and
sof-tgl-max98357a-rt5682 are almost equivalent.

Conditionally add support for the amplifier reference dailink and BT
offload, so that this topology can be used as is on Google
Volteer. This will help root-cause suspend/resume issues we see only
on TGL_RVP_SDW

Related kernel PR: https://github.com/thesofproject/linux/pull/3006

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-07-19 09:40:52 +01:00
Seppo Ingalsuo 99ebc324f4 test: cmocka: Add exit to function __panic()
This change avoids build error:

cc1: warnings being treated as errors
sof/test/cmocka/src/common_mocks.c: In function ‘__panic’:
sof/test/cmocka/src/common_mocks.c💯 warning: ‘noreturn’ function does return

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-16 14:19:41 +01:00
Seppo Ingalsuo f117b18c7c arch: xtensa: APL: De-select beamformer and tone components to save RAM
This patch helps to avoid the build fail due to running out of .bss
section in Apollo Lake platforms.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-15 15:28:27 +01:00
Chao Song 2545288afc Revert "memory: apollolake: refine the heap sections size"
This reverts commit 38f18bd082.

The above commit causes the issue "sof section `.bss'
will not fit in region `sof_fw'" on APL with xcc,
revert it.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-07-15 14:29:29 +01:00
Seppo Ingalsuo 0fa9f7d892 Topology: Updated TDFB related topology files with beam controls
This patch contains updates to add beam on/off and direction controls.
The common m4 tasks to add controls are placed to include files
tdfb_controls.m4, tdfb_defines.m4, tdfb_undefines.m4.

The single beam examples are replaced by blobs with 0, +/-30, and +/-90
degree angled beams. The Arrays are 50m, 68mm spaced for typical
notebook microphones. The 28mm example is for four microphones. A four
microphones for notebook with microphones at 0, 36, 146, and 182mm
line locations.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo bd6db82eeb Tools: Tune: TDFB: Do not include plot figures to saved .mat files
This saves disk space from unnecessary data.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo a5fc4a643f Tools: Tune: Update TDFB topology include files location
Topologies 1.0 location has been changed. This update allows the
tool to create the files into correct path.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo b9a14709bf Tools: Tune: Add option for delay-and-sum to beamformer design
The delay-and-sum beamformer has highest white noise gain (WNG)
performance. It's good id suppressing microphone self noise. The
beam is steered with pure delay adjust in the all-pass filter
bank. Default type is still super directive. Use DSB or SDB
as beamformer type to select.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo deb7849f76 Tools: Fixes to TDFB tune and test scripts
Matlab does not support isfile(), so another command is used to
check if a file exists. The new way works both in Octave and Matlab.

The bf_defaults.m is fixed to properly initialize empty strings
to cell arrays. It's needed with minimal command like usage
as shown in SOF Docs examples.

In bf_design.m the num_filters determination is moved after array
helpers because other than line and circle do not use mic_n parameter.
The bug resulted to zero num_filters.

In bf_merge.m the unused bf3 and bf4 are removed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo 46d52efdd8 Tools: Tune: Add multiple angles and beam off settings add to TDFB blob
This patch essentially adds support for steer_az/steer_el to be
vector instead of scalar. The beam off preset is added by default
automatically for N-channel in N-channel out configurations. Microphone
(x,y,z) coordinates are passed in to blob for direction of arrival
reporting.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo 92ddb0d137 Tools: Tune: Fix beamformer rotate and diffuse simulation data generate
This patch fixes the incorrect delaying of simulation input signal to
microphones. Instead of delaying the old code advanced the input the
more the larger the input is. E.g. It caused the tests for line arrays
to show a mirrored beam pattern.

The num_filters is replaced by mic_n (microphones count). It is the
correct count to use here though usually filters count is the same.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00