Commit Graph

924 Commits

Author SHA1 Message Date
Cristina Feies (ilie) 9c499bc1d6 topology: imx8m: add kwd component with wm8960 codec
Adapt the apl KWD topology to imx8m by switching to
SCHEDULE_TIME_DOMAIN_DMA on capture pipeline and
creating a no LP capture file for KFBM component.

Signed-off-by: Cristina Feies (ilie) <cristina.ilie@nxp.com>
2021-03-16 13:47:12 +02:00
Seppo Ingalsuo b17280cc0e Topology: Change minimum bus clock to 2.4 MHz for 48 kHz DMIC DAI
The driver configures a lowest feasible bus clock to save power.
Since the 48 kHz and 16 kHz DMIC DAI can now be instantiated in the
runtime there is possibility that the min. 500 kHz clock allowed could
be too low for a new 48 kHz capture when existing 16 kHz capture is
running.

The topologies those define a 48 kHz DMIC DAI need to increase the min.
clock to a sufficient rate. This patch changes every 500 kHz value to
2.4 MHz. This change does not change the external microphone clock in
any platform. The lower than 2.4 MHz clock rates never happened in
previous version to due to the 48 kHz DAI request in these topologies.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-03-08 12:14:26 +00:00
Jaska Uimonen 91a08aa9cc topology: enable setting multiple configs for dai
In some cases we need to change dai configuration in firmware. ASoC
supports already setting multiple hw_configs, but sof M4 scripts lack
the mechanism to do this. Thus enable defining multiple config items in
the dai. Enable now support only for SSP by defining new
SSP_MULTI_CONFIG macros that should not clash with the single dai config.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-03-08 12:11:53 +00:00
Seppo Ingalsuo 5b9a82deff Topology: Add simple topologies (no KWD) for CML RT1011 RT5682
This patch is based on sof-cml-rt1011-rt5682.m4 but omits the
hard coded keyword pipeline and replaces it with a generic
16 kHz capture pipeline. The use of intel-generic-dmic.m4 to
set up the capture pipeline simplifies the topology a lot. This
change makes the topology for CML I2S quite similar to sof-hda-generic
to add audio processing.

All endpoint processing can be defined from top level CMakeLists.txt
with macros HSMICPROC, HSEARPROC, SPKPROC, DMICPROC, DMIC16KPROC.

A sample topology with equalizers in headset and speaker paths is
added.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-03-08 12:07:56 +00:00
Ranjani Sridharan 160886bc6f topology: add new token for dynamic pipelines
Add a new token in scheduler tokens to flag a pipeline
as dynamic. Modify the DAI_ADD ans PIPLINE_PCM_ADD macros
to indicate if the pipeline should be dynamic or now. It is
also possible to make all pipelines in a topology dynamic
by defining the macro DYNAMIC during build.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-03-05 11:26:43 +00:00
Seppo Ingalsuo 6807ebce29 Topology: Add missing include() to pipe-eq-iir-volume-capture-16khz.m4
This patch adds the include of mixercontrol.m4. The topologies build
fails if none of the earlier parsed pipelines contains the same
include.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-03-04 22:01:03 +00:00
Seppo Ingalsuo b872c170a3 Topology: Fix re-define of DMICPROC in sof-hda-generic.m4
The mistake in the topology macro causes overwrite DMICPROC with
volume if HSPROC is not defined. This patch fixes the macro line
to handle properly HSPROC.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-03-04 22:01:03 +00:00
Marc Herbert 288e228c67 cmake: generate the complete .config at configuration time.
Add cmake -DINIT_CONFIG= option that can point at any initial file.

"make clean" does not delete .config any more.

Note reconfiguration does NOT causes recompilation because -imacros
hides the generated .h from CMake's dependency scan. This is not a
regression, that problems exists since -imacros was introduced. At least
it's now possible to "make clean" and rebuild without losing the .config
file.

Fix for #3617

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-03-03 22:33:53 +00:00
Daniel Baluta a0ed3e4ba9 tools: topology: Fix runtime controlbytes name
This was a copy paste error in the initial commit.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-03-01 11:13:43 +02:00
Seppo Ingalsuo 8bb8787cd3 Topology: Get PGA_NAME from pipeline caller macro
This patch fixes the error that happens with the hard-coded PGA
names Dmic0 and Dmic1 in pipelines pipe-eq-iir-volume-capture.m4
and pipe-eq-iir-volume-capture-16khz.m4. Pipelines for beamformer
TDFB have the same hard-coded PGA names and are fixed too.

If impacted pipelines are used for any other purpose than DMIC endpoints
the topology graph gets messed up. With this change the caller macro,
e.g. intel-generic-dmic.m4 needs to set the PGA_NAME macro when the
respective pipeline is instantiated. If it is not set the default
name via N_PGA() macro is used.

The macro intel-generic-dmic-kwd.m4 is updated to set the Dmic0
PGA name as well as the earlier missed PIPELINE_FILTER1 and
PIPELINE_FILTER2 definitions for passing filter coefficients.

Fixes: #3378

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-02-26 15:17:36 +00:00
Seppo Ingalsuo 079f916c6a Topology: Move some topologies to development and dsp_enhancement
The main topology directory contains a number of topologies those
are not used directly by Linux kernel machine drivers. Also there
are variant topologies built those are modified versions of the
main topology. The topologies for testing and devolopment are moved to
directory development. The topologies those may be used by end users
to enhance the audios are moved or built to dsp_enhancements directory.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-02-26 14:07:38 +00:00
Seppo Ingalsuo b0facccfc8 Topology: Use pipe-volume-switch-capture in nocodec topologies
This patch replaces use of pipe-volume-capture macro or
pipe-low-latency-capture to pipe-volume-switch-capture in nocodec
topologies for APL, BDW, CHT, CNL, ICL, and TGL based platforms. It
allows to test of volume component mute switch control in SSP loopback
that is used by default in nocodec topologies. The testing of mute
switch feature is simplest to do with loopback topologies. Nocodec
topologies are not in mainstream usage so this is the safest option to
enable testing.

The mute switch add should be possible to all capture topologies but
it can be done later once it is confirmed it is safe to do (avoid
accidental muted audio or problems with UCM).

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-02-18 14:02:21 +00:00
Pierre-Louis Bossart 532df2b7e7 topology: fix semi-abandoned Chrome topologies
we have a set of topologies that don't seem aligned with the
mainstream ones.

All these topologies should be given the boot if they are not used.

FIXME: The case of tools/topology/sof-cml-rt5682-kwd.m4 is rather
strange, M4 seems to go in some sort of infinite recursion if
'DMIC16k' is defined.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-13 13:57:45 +00:00
Pierre-Louis Bossart 8816434ba1 topology: align intel-generic-dmic and dmic-kwd error handling
Add error checks to make sure errors are detected and reported.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-13 13:57:45 +00:00
Pierre-Louis Bossart 38c6761512 topology: remove commented out code in intel-generic-dmic-kwd.m4
Not sure why this was there in the first place.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-13 13:57:45 +00:00
Seppo Ingalsuo e8e536bb03 Topology: Fix handling of PCM ID in intel-generic-dmic.m4
The macro used DAI link ID when it should have used PCM ID

Co-developed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-02-13 13:57:45 +00:00
Pierre-Louis Bossart 155e609ed5 topology: sof-tgl-sdw-max98373-rt5682.m4: fix inclusion
Macro needs to be declared before being used

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-13 13:57:45 +00:00
Pierre-Louis Bossart 47a9b784e1 topology: dmic-kwd: add macros for DMIC names
Fix macros (capitalized K), use them both for regular and -kpb
capture, fix names

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-13 13:57:45 +00:00
Pierre-Louis Bossart bf42529e54 topology: dmic: fix pcm_id/dai_link_id confusion
This problem appeared after renumbering the devices for SoundWire
topologies.

Before this patch, the devices appear as:

pcm=JackIn;id=0;type=playback
pcm=JackOut;id=1;type=capture
pcm=DMIC;id=2;type=capture
pcm=DMIC16kHz;id=3;type=capture
pcm=HDMI 1;id=5;type=playback
pcm=HDMI 2;id=6;type=playback
pcm=HDMI 3;id=7;type=playback

and after:

pcm=JackIn;id=0;type=playback
pcm=JackOut;id=1;type=capture
pcm=HDMI 1;id=5;type=playback
pcm=HDMI 2;id=6;type=playback
pcm=HDMI 3;id=7;type=playback
pcm=DMIC;id=10;type=capture
pcm=DMIC16kHz;id=11;type=capture

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-13 13:57:45 +00:00
Pierre-Louis Bossart 743d1941ff topology: dmic users: define dailink and pcm ID in caller
The topologies changed in this patch relied on dailink defaults, and
never defined PCM IDs.

We want dailinks to be defined in callers, so let's remove those
defaults from intel-generic-dmic.m4

To be backwards 'bug-compatible' the PCM ID remains the same as the
dailink, but this is completely arbitrary and might be modified if
needed.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-13 13:57:45 +00:00
Pierre-Louis Bossart 5cc75be44b topology: use fatal_error instead of errprint
errprint does not stop the compilation as intended, it just prints a
message which is removed by the makefile.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-13 13:57:45 +00:00
Pierre-Louis Bossart 2c46c7a22c topology: use different names for Jack input and output
The topology handling requires names to be unique, regardless of
direction. It's an undocumented 'feature' of the ALSA topology parser.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-13 13:57:45 +00:00
Pierre-Louis Bossart 980d8804e3 topology: align device names in SoundWire topologies
Align on the following names:

PCM0   playback	Jack
PCM1   capture 	Jack
PCM2   playback	Speaker
PCM3   capture	Amplifier Reference (typically based on I/V feedback)
PCM4   capture 	Microphone
PCM5   playback	HDMI 1
PCM6   playback	HDMI 2
PCM7   playback	HDMI 3
PCM8   playback	HDMI 4
PCM9   RESERVED
PCM10  capture	DMIC
PCM11  capture	DMIC16kHz
PCM12  capture 	BufferedMic (aka KPB)
PCM13  playback Bluetooth
PCM14  capture 	Bluetooth

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-10 10:35:02 +00:00
Pierre-Louis Bossart 8839f8536b topology: align device numbers in SoundWire topologies
This patch follows the suggested layout:

PCM0   playback	Jack
PCM1   capture 	Jack
PCM2   playback	Speaker
PCM3   capture	Amplifier Reference (typically based on I/V feedback)
PCM4   capture 	Microphone
PCM5   playback	HDMI 1
PCM6   playback	HDMI 2
PCM7   playback	HDMI 3
PCM8   playback	HDMI 4
PCM9   RESERVED
PCM10  capture	DMIC
PCM11  capture	DMIC16kHz
PCM12  capture 	BufferedMic (aka KPB)
PCM13  playback Bluetooth
PCM14  capture 	Bluetooth

PCM40  playback	Speaker 2 (non-aggregated)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-10 10:35:02 +00:00
Pierre-Louis Bossart 12d5b1358e topology: intel-generic-dmic: add macro for PCM device names
Add macro to allow the use of "BufferedMic" instead of
"DMIC16kHz" in KPB usages.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-10 10:35:02 +00:00
Pierre-Louis Bossart 57d121238f topology: sof-smart-amplifier: fix error message
Confusion between input and output, and PCM name and pipeline ID.

Copy/paste likely here.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-10 10:35:02 +00:00
Pierre-Louis Bossart e24d77aa76 topology: remove sof-tgl-rt5682.m4
This file was used for early enablement of SoundWire on a platform,
before we had support for amplifiers. This is no longer needed, let's
remove it.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-10 10:35:02 +00:00
Pierre-Louis Bossart 9b355efab1 topology: remove sof-tgl-rt711-i2s-rt1308.m4
This topology is no longer used and productized, let's remove it.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-10 10:35:02 +00:00
Hans de Goede 86abd07cba topology: Add sof-byt-wm5102-ssp0 topology file
Add a topology file for Bay Trail boards with a WM5102 codec
connected to SSP0.

These setups works with the standard settings from sof-byt-codec.m4.

This has been tested on a Lenovo Yoga Tablet 2 1015L.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-02-10 10:32:09 +00:00
Curtis Malainey 10656d614c oss-fuzz: add error for incorrect build env and readme
add proper build instructions

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-02-09 13:52:30 +00:00
Keyon Jie 6781f0dd41 topology: sof-tgl-nocodec-ci: use 38.4MHz MCLK
Define to use 38.4MHz MCLK for DSM, to align with other SSP ports.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-02-05 13:09:01 +08:00
Pierre-Louis Bossart 6126ccc626 topology: use DMIC gain boost similar to HDAudio topologies
We used the same macros in .m4 files but missed the additional
configuration needed in CMakeLists.txt

Reported-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-02-03 15:55:00 +00:00
Seppo Ingalsuo cb924991a5 Topology: HDA Generic: Headset filters configuration from CMakeLists.txt
This patch eases the definition of headset post processing filters
blobs. First, the macro name PPROC is changed to HSPROC to indicate
the processing targets headset endpoint.

The CMakeLists.txt for topologies is edited to add build of topology
sof-hda-generic-eq.tplg that does not include DMIC endpoints for
devices without such. Previously there was no variant without
DMIC enable.

The main macro sof-hda-generic.m4 is enhanced to define HSPROC as
volume to use pipeline pipe-volume-playback.m4 when it has not been
defined in CMakeLists.txt.

The definitions for PIPELINE_FILTERx are copied from endpoint specific
HSPROC_FILTERx if they were defined. If they were left undefined
the pipeline will apply default processing configuration (e.g.
for EQs pass-through).

In the example the EQs are left to pass-through. The topology
sof-hda-generic-eq.tplg shows an example of explicitly setting
the filter coefficients at the top level. The FILTER1 is impacts the
first algorithm in pipeline (IIR) and FILTER2 the second algorithm
algorithm (FIR) in the used HSPROC definition eq-iir-eq-fir-volume.
In this case volume does not support such but for future there could
be FILTER3, FILTER4, ... added if need. The current m4 macros support
now only HSPROC_FILTER1 and HSPROC_FILTER2.

The patch adds undefine to PIPELINE_FILTERx in intel-generic-dmic.m4 to
make sure the macro is not set by other than DMICPROC_FILTERx. The
same is done for 16 kHz DMIC capture. Currently there were no issues
caused by it.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-01-29 11:48:58 +00:00
Pierre-Louis Bossart 3658341a3f topology: sof-cml/icl-rt700: align DMIC support with HDaudio
Somehow we use different configurations for the DMIC, remove
everything in this file and rely on the same macros.

The only difference with HDaudio is the pipeline and PCM device
numbers.

the old topology names sof-icl-rt700 and sof-cml-rt700 alias to the
same 4ch topology, when the kernel looks for the 2ch or 4ch versions
we can remove it. Make then break.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-01-29 11:33:19 +00:00
Pierre-Louis Bossart cb23581048 topology: sof-tgl-rt711-rt1308: align DMIC support with HDaudio
Somehow we use different configurations for the DMIC, remove
everything in this file and rely on the same macros.

The only difference with HDaudio is the pipeline and PCM device numbers

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-01-29 11:33:19 +00:00
Iuliana Prodan dcba48583e topology: imx8m: add mixer component with wm8960 codec
This topology works on i.MX8MP with wm8960 codec.
When loaded, one will have a sound card with two playback subdevices.
This way, samples pushed to the two subdevices will be mixed and
sent to SAI3 and then to wm8960 codec.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-01-28 22:56:45 +00:00
Iuliana Prodan f5b28cc151 topology: imx8: add mixer component with cs42888 codec
This topology works on i.MX8QM and i.MX8QXP with cs42888 codec.
When loaded, one will have a sound card with two playback subdevices.
This way, samples pushed to the two subdevices will be mixed and
sent to ESAI0 and then to cs42888 codec.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-01-28 22:56:45 +00:00
Iuliana Prodan 21e38421d7 topology: imx8: add mixer component with wm8960 codec
This topology works on i.MX8QM and i.MX8QXP with wm8960 codec.
When loaded, one will have a sound card with two playback subdevices.
This way, samples pushed to the two subdevices will be mixed and
sent to SAI1 and then to wm8960 codec.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-01-28 22:56:45 +00:00
Pin-chih Lin fdbb90e786 tools: topology: Add common Codec Adapter capture pipeline tplg
pipe-codec-adapter-capture.m4 is implemented as a common pipeline
module of a capture codec w/ Codec Adapter API.

For codec developers, a upper-layer tplg file should be provided for
the specified codec with the information of control bytes, schedule
core, and byte-control names.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-01-27 18:20:17 -08:00
Pin-chih Lin 1a2afeb552 tools: topology: Add common Codec Adapter playback pipeline tplg
pipe-codec-adapter-playback.m4 is implemented as a common pipeline
module of a playback codec w/ Codec Adapter API.

For codec developers, a upper-layer tplg file should be provided for
the specified codec with the information of control bytes, schedule
core, and byte-control names.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-01-27 18:20:17 -08:00
Keyon Jie 7fb6d5f0f3 topology: smart_amp: make the DSP core configurable
Define SMART_AMP_CORE configurable, configure to run DSM pipelines on
DSP core0 if it is not set.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-01-22 15:38:45 +00:00
sriram a47a8a6a21 audio: tools: fix matlab/octave directory compatibility
To support exist function - fullfile() path addition is to prevent Matlab (differently than Octave)
to give false positive with some other directory location with it's search path

Added correction to isempty.

Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
2021-01-22 15:28:32 +00:00
Marc Herbert 9dc763f782 testbench/cmake: don't hardcode the BUILD_COMMAND
ExternalProject() preserves the existing BUILD_COMMAND

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-18 16:11:46 +00:00
Pan Xiuli a571fdb8e9 tools: sof_ri_info: add EHL support
Add EHL prod key
Add EHL memory layout

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-12 22:16:44 +00:00
Pan Xiuli 06d126f8f4 tools: sof_ri_info: update TGL memory layout
change old TGL to TGL-LP, add new TGL-H

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-12 22:16:44 +00:00
Pan Xiuli 0767ffaf85 tools: sof_ri_info: fix memory layout match
For sof-tgl.ri and sof-tgl-h.ri the old match function will
always return tgl layout. Add suffix in match to make sure
we always match the right name.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-12 22:16:44 +00:00
Pan Xiuli 586caa79f5 tools: sof_ri_info: add new community key for TGL+ platforms
Add the 3K community key for TGL+ platforms.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-12 22:16:44 +00:00
Pan Xiuli 5ebf036d01 tools: sof_ri_info: update the full_bytes usage
make the full_bytes can output bytes in format we need in
KNOWN_KEYS

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-12 22:16:44 +00:00
Hans de Goede e862e25a9c topology: Add sof-cht-nau8824 topology file
Add a topology file for Cherry Trail boards with a NAU8824 codec.
These setups work with the standard settings from sof-byt-codec.m4.

This has been tested on the following devices:

Medion E2215T:   stereo speakers, analog mic
Medion E2228T:   stereo speakers, stereo digital mics
Cube iWork8 Air: mono speaker, analog mic

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-01-11 16:27:47 +00:00
Keyon Jie b50d496958 topology: sof-tgl-max98373-rt5682: use 32bit dai and 24.576MHz mclk
To align with maxim 98373 12.288MHz bclk requirement, change rt5682 to
32bit with BCLK 3.072MHz.

To follow the rule that the MCLK should use the same clock source with
BCLK, change the mclk to 24.576MHz.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-01-07 14:10:55 +00:00