Commit Graph

303 Commits

Author SHA1 Message Date
Tomasz Lauda 3afc474518 task: add complete callback
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>
2019-10-01 11:24:40 +02:00
Tomasz Lauda eb0d309cf9 task: rename func to run
Renames task's func to run to better show intention of this callback.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 11:24:40 +02:00
Sathya Prakash M R 7663447632 topology : update max98357a configuration in CML
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>
2019-09-27 16:36:02 +01:00
Sathya Prakash M R f0264aa0c5 topology: Add CML topology support for rt1011 SPK AMP
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>
2019-09-27 16:36:02 +01:00
Sathya Prakash M R 61d153bbe3 topology: Add ABI version utilities
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>
2019-09-27 16:36:02 +01:00
Pierre-Louis Bossart b5f26539de topology: add topology for Up board w/ Hifiberry DAC+ using 50kHz SRC
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>
2019-09-27 16:33:17 +01:00
Sathyanarayana Nujella 7046e849cb topology: tgl_rt1308: update link_id's for iDisp Dai Config's
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>
2019-09-26 10:15:25 +02:00
Curtis Malainey 0b4712906d topology: sof-cht-max98090 reduce buffer size of media pipeline
Reduce size of buffers so dsp doesn't run out of memory on topology load

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-09-20 16:58:44 +02:00
Curtis Malainey aa3b18ed71 topology: sof-cht-max98090 move DAI definition above media pipeline
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>
2019-09-20 16:58:44 +02:00
Curtis Malainey 1571af188b topology: cht-max98090 add missing virtual widgets
Topology will fail to probe without these widgets

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-09-20 11:44:19 +02:00
Liam Girdwood 25c8990d39 fuzzer: add BSW platform and fix fw_ready for CHT.
CHT was missing fw_ready callback. Add BSW platform.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 689ce5ac99 fuzzer: byt: align macros to line length limit.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 224f177020 fuzzer: add support for HSW and BDW platforms.
Can now send fuzzing IPCs and topologies to HSW/BDW VMs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood bf72bf7a7b fuzzer: cleanup mailbox platform abstraction
Pass mailbox as parameter and add convenience helper for platform ops.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 29a9b9d529 fuzzer: add more logging and cleanup printf
provide more detail to the user and print to stdout.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood c33e1a3677 fuzzer: no need for extra new line.
message already contains the newline.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 5dce3fb8fb fuzzer: fix return value of topology loader.
Return the real error code.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 8cd194e624 fuzzer: fix fuzzer hardcoding of topology.
Command line option was ignored. Fix it.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Seppo Ingalsuo 81f8de93c5 Tools: Test: Updates for testbench to match other changes in SOF
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>
2019-09-18 20:50:50 +02:00
Seppo Ingalsuo 573e0b17b3 Tools: Audio quality test for ssh accessible device
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>
2019-09-17 15:40:29 +01:00
Tomasz Lauda 0ba3fec518 topology: byt: fix media pipeline period for nocodec
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>
2019-09-16 16:14:59 +02:00
Tomasz Lauda 5bb4ce172c topology: remove accidentally added topologies
Removes topologies, which have been removed and accidentally
added again to the repository.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-16 16:14:59 +02:00
Seppo Ingalsuo 92ec08dad5 Tools: Tune: Fix file paths for example FIR script
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-09-13 10:25:58 +01:00
Seppo Ingalsuo fa2f3a51ad Tools: Tune: Get SOF ABI header for EQs with sof-ctl
This patch avoids the need to main SOF ABI version information in
Matlab/Octave file eq_get_abi.m for equalizer tools. The ABI
header is fetched via new "-p" command line option for sof-ctl.

The BSD 3 clause copyright text is also updated to new short style.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-09-13 10:25:58 +01:00
Seppo Ingalsuo d013fbc6d7 Tools: Add current sof_abi_hdr struct print capability to sof-ctl
This patch adds command line option "-g" to generate and with help
of options "-o <file>" to store the current ABI version header data
into file. Use "-b" to change the default CSV format to binary.

It is used by external tools to create configuration data blobs for
SOF audio processing components.

The parameter for size is the configuration data payload size with
the size of sof_abi_hdr struct excluded. It does not impact the
the length of printed header. It just places the length into the
correct location in the header.

This patch also fixes the permissions of file output. The mode
need to be provided for open() to avoid having no access to
created file and allow overwrite of existing file.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-09-13 10:25:58 +01:00
Tomasz Lauda 8c61213c37 schedule: support dynamic scheduler creation
Refactors schedule code in order to allow dynamic scheduler
creation. We don't want to add every new scheduler to the static
array of scheduler_ops and also we don't want to have every
scheduler created on every platform. Maybe some of the platforms
won't need some of the future scheduler types.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-11 16:24:00 +02:00
Pan Xiuli b899489e49 topology: fix wrongly used SCHEDULE_DEADLINE
SCHEDULE_DEADLINE is replaced with SCHEDULE_PERIOD, but there is one
missed in DAI_ADD for W_PIPELINE.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-09-11 14:48:46 +02:00
Seppo Ingalsuo 92b23fa856 Tools: EQ: Don't force upper case EQ response name
The existing IIR response names are not all upper case. This patch
removes the conversion to upper case to be able to automatically
generate the topology m4 syntax example equalizers.

Without this patch run of example_iir_eq.m script causes successive
topologies build to fail.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-09-08 13:19:48 +01:00
Tomasz Lauda 1c93a4c15f schedule: pass sof context during scheduler init
Passes sof context structure to the schedulers during
scheduler initialization. It will be required by the new
EDF scheduler.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-06 15:51:02 +01:00
Pierre-Louis Bossart ba32f4ad0b topology: SoundWire topologies for CML and ICL
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2019-09-05 15:49:46 +02:00
Slawomir Blauciak 79e7a3d206 dai: rename soundwire to alh
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2019-09-05 15:49:46 +02:00
Dragos Tarcatu 90873c5d35 sof-ctl: fix segfault when no ctl name given
If no control name is passed to sof-ctl, it currently pops an error,
dumps the usage and then segfaults:

root@gr-mrb:~# sof-ctl -D hw:0
Error: No control was requested.
Usage:   ...
Segmentation fault (core dumped)

Fix all that by jumping to the right label.

Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
2019-09-02 21:27:37 +02:00
Curtis Malainey 514857912e topology: sof-cht-max98090: fix media pipeline
Need to add the SCHED_COMP name so pipeline will properly load

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-08-31 18:57:31 +01:00
Jaska Uimonen 39ed9d6e1f topology: set glk kwd pipeline rate to 16kHz
Currently glk kwd pipeline is set to run at 48kHz. This rate is wrong
and will create too big buffers and we will run out of memory. So set
the kwd pipeline rate to 16kHz.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-30 11:29:00 +02:00
Pan Xiuli 8d0e863afc topology: add tgl_rt1308 with no hdmi
Enable tgl_rt1308 topology with RT1308 speaker and DMIC01.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-08-28 12:20:20 +02:00
Pan Xiuli d3b2fa0249 topology: add tgl_rt1308 topology
Add tgl_rt1308 topology with RT1308 speaker, DMIC and 4 HDMI.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-08-28 12:20:20 +02:00
Pan Xiuli 3f4c3c8286 topology: add tigerlake nocodec support
Enable SSP0/1/2 and DMIC01 nocodec topology for tigerlake.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-08-28 12:20:20 +02:00
Pan Xiuli 381063d266 topology: add tigerlake platform info
Modify from icelake.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-08-28 12:20:20 +02:00
Pan Xiuli a704c7a5a6 topology: add virtual routes for hda-idisp
Add missing virtual routes that will fail the probe.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-08-27 09:27:05 +02:00
Jaska Uimonen 9f4a893845 topology: change byt/cht max media pcm rate to 48kHz
Byt doesn't have enough memory to handle buffer size
increase from updating media pipeline's pcm_max_rate to
96kHz. So limit it to 48khz.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-22 23:55:16 +02:00
Jaska Uimonen db138eba8f topology: fix buffer size calculation
The buffer frame size calculation has obvious issues by
doing division instead of multiplication. On the other
hand we can't do decimal calculations in M4. So fix this
by introducing new macro for buffer frame size where we
multiply samplerate and schedule_period and divide by
1000000.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-20 09:21:14 +02:00
Seppo Ingalsuo b8fa3c7ad5 Topology: Add amplifying high-pass EQ to DMIC capture paths
This patch alters topologies those use pipelines definitions from
intel-generic-dmic.m4. The 48 kHz and 16 kHz capture pipelines are
changed to use pipe-eq-capture instead of pipe-volume-capture. The new
pipeline contains volume but also an IIR EQ set for second order
high-pass with 50 Hz cut-off frequency. The IIR includes +20 dB
gain. The volume max is decreased by 10 dB due to the amplifying
IIR add.

The gain in IIR helps with too low capture loudness with default 0 dB
setting for volume. Further gain can be achieved with volume control.

The high-pass filter fixes the issue of too slow DCCOMP settling in
DMIC platform hardware. With IIR add the DMIC unmute ramp is shortened
to 200 ms from 400 ms in the 48 kHz pipeline. In 16 kHz pipeline the
400ms unmute is preserved due to slower DCCOMP settling time.

The min. channels count of two is replaced by pipeline channels count
macro to prevent corrupt capture to happen by capturing as 2ch from
4ch source.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-08-19 09:47:04 +02:00
Seppo Ingalsuo 4a4923ee53 Topology: Change minimum channel count in volume capture pipeline
This patch replaces minimum channel count two by PIPELINE_CHANNELS to
avoid corrupted capture audio due to capturing other channel count
than what the DAI is configured for.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-08-19 09:47:04 +02:00
Seppo Ingalsuo c55aed4793 Tune: Update file path for demo EQ responses
This patch fixes the wrong file path to output example EQs and places
an identifier string to high-pass responses used in topology embedded
filter setup. The identifier is needed to correctly refer in topology
to right response when there are several similar type EQs in the
topology e.g. two separate IIR filters.

A new 16 kHz rate high-pass filter export is added into the script to
be used in voice pipelines.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-08-19 09:47:04 +02:00
Jaska Uimonen 8bd25eac3f topology: add 50kHz output topology for apl
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-15 14:29:22 +02:00
Jaska Uimonen 77b6db8894 topology: enable pcm range and pipeline rate and remove frame count
Enable setting pcm min and max rate from top level m4 pipeline macro.
This way it is possible to configure the whole pipeline to correct
samplerate range in 1 file. Previously you needed to modify the pipeline
macros where the rate was hardcoded. As the frame count is calculated
from pcm/dai rate and scheduling time the frame count is obsolete.

Introduce pipeline rate parameter to help configuring components with
fixed output rate. We can't deduce this from pcm range since for example
src might accept bigger max rate than the following dai. Even though the
parameter is named "pipeline rate" it essentially means the "final"
output rate to which this pipeline is connected to (dai or other
pipeline). In capture pipelines it means the originating fixed dai rate.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-15 14:29:22 +02:00
Pierre-Louis Bossart c6f1b08fd2 topology: intel-generic-dmic: rename devices
DMIC32 and DMIC16 are just confusing. It's not clear if the numbers
refer to kHz or bits. Rename to make the names self-explanatory.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-08-10 10:35:02 +02:00
Pierre-Louis Bossart 6237763d96 topology: generate HDaudio topologies without DMIC
Not all HDaudio platforms have DMIC support, generate solution without
any DMIC. This will be used in combination with NHLT information (or
kernel module parameter) by the driver to automatically select the
relevant topology.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-08-10 10:35:02 +02:00
Pierre-Louis Bossart 52e4b00908 kmod_scripts: handle renaming of pci/apci SOF modules
sof-pci-dev and sof-acpi-dev were renamed, so make sure we handle the
new names. The old ones are kept for backwards compatibility but will
be removed at some point.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-08-09 12:09:19 +02:00
Pierre-Louis Bossart 753a76bbfa kmod_scripts: handle rt700/soundwire machine driver
In theory we wouldn't need to explicitly load the rt700 driver but
doing so solves a race condition we will have to fix in the kernel at
some point.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-08-09 12:09:19 +02:00