Commit Graph

442 Commits

Author SHA1 Message Date
Bartosz Kokoszko e3cf1f2fed logger: use fopen binary mode
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-01-31 11:11:57 +01:00
Rander Wang a5d32b4c3a topology: hda: fix a hda bug when pipeline is in 24bit
sof audio pipeline with the format of 24bit doesn't
work on HDA platform. It is caused by sample data layout. SOF supports
S24_LE, and each sample format is like pattern of 0ddd, d stands for
data. Samples are padded with 0‟s at the MSB.

Link dma copys samples directly to hda bus, but hda bus requires samples
layout like pattern of ddd0. Samples are padded with 0‟s at the LSB to
left justify the sample within the container.

Now there is a volume at the end of hda pipeline. We only need to
convert dai type from S24_LE to S32_LE to make volume convert hda data to
correct format

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-01-29 09:53:39 +00:00
Rander Wang b46740523b topology: hda: delete sof-whl-hda.m4
It is useless now and sof-hda-generic.m4 would be used by WHL.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-01-29 09:53:39 +00:00
Pierre-Louis Bossart 7f7e48e27e kmod_scripts: fix dependencies and add delays
dependencies are incorrect due to kernel changes

also add 6s delay after insert to let userspace complete its tasks and
go back to idle

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-01-23 12:56:21 -06:00
Zhu Yingjiang a766e471b0 add nocodec topology for CNL
add nocodec topology for CNL, with three SSPs and one DMIC

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-01-23 09:20:41 +00:00
Zhang Keqiao eca416ad79 test: add a script for xrun injection test
This script is used to check the ability of alsa xrun handling

Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2019-01-21 21:41:22 +00:00
Ranjani Sridharan 03ababfb1c scripts: modify sof_bootone.sh to exit if sof_remove failed
Exit if sof_remove fails. This avoids running into further issues.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-01-18 08:36:03 +00:00
Ranjani Sridharan 364f52b74f topology: cml: update macros for HDA DAI's
HDA_DAI_CONFIG has been replaced to re-use DAI_CONFIG.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-01-17 08:50:06 +00:00
Zhu Yingjiang 2981a6f22c add topology file for Cometlake with rt5682
add the topology file for Cometlake with codec rt5682, a
analog codec with SSP1, and DMIC, HDMIs

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-01-16 13:35:21 +00:00
Ranjani Sridharan a00a38a1ec topology: remove HDA_DAI_CONFIG and re-use DAI_CONFIG
remove the HDA_DAI_CONFIG macro and reuse the DAI_CONFIG
macro with type HDA. This will ensure the hw_config
section gets added for HDA dai's as well.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-01-16 09:53:09 +00:00
Marek Lucki db3d730913 trace: schedule trace added
Added schedule trace instead of pipe. Logger updated.

Signed-off-by: Marek Lucki <marekx.lucki@linux.intel.com>
2019-01-14 14:02:49 +00:00
Pan Xiuli a2fe69c020 tools: gitignore: change the test topology path
Test topology changed location, need the gitignore to update.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-14 13:31:24 +00:00
Xun Zhang 24422c6373 topology: fix virtual widget warnings
add some widgets to prevent kernel warnings generated by the machine
driver.

Signed-off-by: Xun Zhang <xun2.zhang@intel.com>
2019-01-14 11:50:36 +00:00
Guennadi Liakhovetski 64bbee865b logger: support reading from a serial port
On some systems the DSP has no DMA interface to the host and is
using a serial port for sending its trace. This patch adds a "-u"
argument to specify a baudrate, that should be used with the serial
interface. The implementation takes care of spurious bytes,
sometimes seen in the beginning of the trace, produced by the port
initialisation by the DSP. The format is fixed to 8N1.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-11 11:44:21 +00:00
Guennadi Liakhovetski 28039d3024 logger: (cosmetic) fix the return value, use pointers
1. Programs shouldn't exit with negative return values, strictly
   speaking only EXIT_SUCCESS and EXIT_FAILURE should be used,
   however it is also valid to return 0 for success and any number
   from 1 to 125 for a failure.
2. Avoid passing complete structs as function parameters where an
   additional copy of one isn't needed, use const pointers instead.
3. Remove a left-over unused argument.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-11 11:44:21 +00:00
Seppo Ingalsuo 843553646a Topology: Add volume control into SRC playback pipeline
This patch adds a volume component after SRC to be able to convert
the variable pipeline s16/s24/s32 PCM format into PCM format used
by DAI. The PCM capabilities are changed to allow all formats.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-01-09 16:30:58 +00:00
Seppo Ingalsuo 81e0333e19 Testbench: Add S16_LE format test for SRC
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-01-09 16:30:58 +00:00
Zhang Keqiao 0a57440a35 test: add a script for multiplex pipeline stress test
This script is used for simultaneous playback/capture test on
arbitrary multiple pipelines.

Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2019-01-08 15:32:31 +00:00
Michal Jerzy Wierzbicki dd07c8e3b0 tools/coredumper: added support for sof_ipc_dsp_oops_header; added handling of invalid windowbase; added exceptions for invalid flag usage 2019-01-08 13:25:32 +00:00
Seppo Ingalsuo 676e72a895 Topology: EQ IIR: Allow capture with all formats with pipe-eq-capture
This patch adds to IIR EQ capability to convert from s32 source to
s16/s24/s32 sink formats in normal PCM samples equalization. The
feature is useful in microphone equalization where input dynamic
range is high but where pipeline needs to be lower word length. A
typical IIR high-pass response when combined with gain will reduce
the dynamic range by suppressing lowest frequencies from signal to
better fit the smaller sample word length.

The PCM capability in topology macro pipe-eq-capture.m4 is changed to
allow the s16/s24/s32 formats.

The patch also includes 4096 bytes increase to SOF_TEXT_SIZE for CNL
platform.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-20 14:08:32 +00:00
Seppo Ingalsuo dd8cfda311 EQ: Update ABI version number in configuration to match current version
This patch updates the provided example responses as data for
sof-eqctl and in the include files for topologies. The updates into
Matlab scripts are included also. The FIR and IIR example script is
updated to contain all examples.

The patch includes also a bug fix into IPC handler where the check
against SOF_IPC_MSG_MAX_SIZE is off by one and caused it to reject
all set data commands (to the EQs).

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-19 10:28:25 +00:00
Naveen Manohar 8e1249c293 topology: Add GLK topology support for chromebook rt5682+max98357a variant
Add new PCMs and backends for GLK chromebook with codecs rt5682+max98357a.

Signed-off-by: Naveen Manohar <naveen.m@intel.com>
2018-12-18 11:30:08 +00:00
Seppo Ingalsuo 0526077c87 Tools: Update SRC tool for 50 kHz modes, SRC testbench, add topology
This patch adds 50 kHz into SRC generator script for std and tiny
profiles. The src generator script is cleaned up and the default
conversion matrix is moved into caller script for easier maintenance.
The plots appearance is improved and the generated coefficients code
look is improved to pass the git pre- and post-commit script
requirements.

The SRC test bench scripts are updated for changed locations. A SRC
playback topology is used for test bench and real device usage.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-18 11:29:32 +00:00
Liam Girdwood dd98c4721e topology: apl: nocodec config out of host GW DMAC channels
By default topology is using too many capture and playback PCMs, DAIs and
pipelines for available host GW DMAC channels. Comment out some so that
DMAC channels stay within bounds. This also gives users options to
re-enable for theer given test HW.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-13 17:18:16 +00:00
Ranjani Sridharan 30007ca825 topology: glk: change DMIC capture to support 4ch 16-bit format
The requirement for DMIC capture is to support upto 4ch
and 16-bit format. So modify the topology accordingly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-12-11 20:25:33 +00:00
Pierre-Louis Bossart ddebac091f topology: realign sof-apl-da7219 on sof-glk-da7219
Somehow those two files should only differ on SSP connections and MCLK
ID1, so it's pretty obvious no one has tested this since August...

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-12-07 15:47:52 +00:00
Ranjani Sridharan 1aa95f8e27 logger: show version numbers with the ABI mismatch error
Show the version numbers along with the ABI mismatch error.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-12-05 11:08:20 +00:00
Marcin Maka 95a3d93bbd tools: logger: turn off colors if the output file is not a tty.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-12-04 13:37:16 +00:00
Rander Wang 5571da6dc1 topology: hda: change stream format from 32bits to 24bits
For most of hda codecs, 32bits is not supported and 24bits
is a suitable one.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-12-04 13:36:57 +00:00
Rander Wang 15e891202f topology: hda: refine dai setting for hda
This refinement follows commit on WHL

topology: whl: refine topology for hda on whl

    Fix the issue that ipc timeout when simutalously playback
    and capture. Now in FW, playback and capture are supported
    by different dai. So dai index should be different for playback
    and capture in the same be dai, or playback would use the same
    dai as capture

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-12-04 13:36:57 +00:00
Seppo Ingalsuo cc6c76f1de Tools: Tune: Update EQ tools for new user ABI plus other cleanup
This patch adds into filter tools retrieving of ABI version from a
single function (a quick solution) and updates all configuration
data tools to apply the user ABI header.

The confusing platform_max_channels struct field is renamed to
channels_in_config (the EQ channel map) that creates many updates. The
EQ response plot title is fixed.

Finally new functions to decode IIR and FIR settings blobs is added.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-11-30 17:19:59 +02:00
Seppo Ingalsuo d27de3a671 tools: Update eqctl tool and sample configurations for new user ABI
The ext bytes read response parsing needs a fix since it now includes
the ABI header. A warning is printed if max control size is reached.
The example configurations are also updated to contain the header.

The patch also includes new IIR and FIR setup for pass-through
configuration (for testing) that configures the EQ component to totally
pass the filter computation.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-11-30 17:19:26 +02:00
Seppo Ingalsuo 2e4b435302 Tools: Topology: Update EQ related topology files for new user ABI
This patch adds the ABI header into topology EQ data files and updates
the pipe-eq-volume-playback.m4 to include the coefficients from m4
directory like other topology files to prevent duplication of
response data.

The CONTROLBYTES_MAX is decreased to 304 due to larger IPC header size.
The update is not critical since the kernel contains other checks to
cover this. However it's done to avoid confusion.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-11-30 14:19:37 +02:00
Liam Girdwood 983517e359
Merge pull request #638 from bkokoszx/logger-rimage-headers
logger: include file_format.h directly from rimage
2018-11-27 14:33:57 +00:00
Liam Girdwood bad017ba56
Merge pull request #636 from ranj063/fix/glk-virtual-widget-warnings
Topology: Fix glk virtual widget warnings
2018-11-27 14:30:25 +00:00
Bartosz Kokoszko 93f1a2eaa7 logger: include file_format.h directly from rimage
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-11-27 10:43:06 +01:00
Ranjani Sridharan 6ff198df7c topology: glk: fix virtual widget warnings
Modify hard-coded virtual widgets to prevent kernel
warnings generated by the machine driver. No need to
add virtual_dapm_routes. Just adding the required virtual
widgets suffices to suppress the warnings.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-11-27 00:10:01 -08:00
Ranjani Sridharan f9b8e08f75 topology: modify virtual_widget definition
Modify virtual_widget macro definition to take type as
an input so it can used for different types and update
its users.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-11-27 00:08:53 -08:00
Rander Wang f9c23243d6 topology: whl: refine topology for hda on whl
Fix the issue that ipc timeout when simutalously playback
and capture. Now in FW, playback and capture are supported
by different dai. So dai index should be different for playback
and capture in the same be dai, or playback would use the same
dai as capture

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-11-27 13:59:45 +08:00
Bartosz Kokoszko 221064d463 tools: logger: abi verification addition
I've added abi_version verification. Be default logger verify: abi
in *.ldc file with logger abi version. Additionally, logger can verify
abi in "/sys/kernel/debug/sof/fw_version" (with -e flag) or in
ver_file (with -v ver_file) with logger abi version.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-11-26 18:06:55 +01:00
Bartosz Kokoszko 159cea157f tools: logger: removed uapi dependency
Logger now includes uapi directly from FW code.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-11-26 18:06:26 +01:00
Curtis Malainey 5b5888ce07 Move SOFT into sub folder for SOF merge
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2018-11-24 23:27:24 -08:00