Commit Graph

6647 Commits

Author SHA1 Message Date
Pierre-Louis Bossart fdd8ec03b5 topology: sof-cnl-nocodec: prepare for different multicore configurations
Not all devices have 4 cores, some only have 2 and even APL/GLK is
currently limited to a single core.

For now we still use a single core for all topologies, we will enable
multi-core in a follow-up patch.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart 4050ff6c31 topology: intel-generic-dmic: add macro for DMIC_CORE_ID
Add macros to quickly enable multi-core with DMICs

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart c952c048b2 topology: sof-cnl-nocodec: change SSP index for APL
Prepare for use on APL to use SSP0,1, 5, all other platforms use SSP0,1,2

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart ac8df75466 topology: sof-cnl-nocodec: make SSP clocks parameters
use platform name to infer root clocks

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart ab3663f468 topology: sof-cnl-nocodec: use s32le
No idea what we add artificial limitations on formats

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart 556c114f47 topology: sof-cnl-nocodec: add macros for SSP cores
Prepare for reuse across all platforms. For now this still uses
single-core.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart d1bce3d8fc topology: sof-cnl-nocodec: use DMIC macros
Remove all the hard-coding and use macros.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart a379cc3751 topology: CMakelist: disable DYNAMIC pipelines for nocodec topologies
We first want to enable the simplified topologies, then multi-core
then dynamic pipelines. The latter two cases will be handled in
follow-up patches.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart f07cf8ea1f topology: CMakelists: group nocodec together
Prepare for use of common file

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Andy Ross d2a79d05e1 trace: Don't initialize trace buffer under Zephyr
This memory is already owned and initialized by the OS under Zephyr
(and in many cases already holds live output!), don't touch it.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-06-25 14:06:16 +01:00
Marc Herbert c0f5668a82 panic: add comments, especially link to dump corruption bug #1346
Zero functional change.

These comments would have saved me at least a day.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-06-25 12:44:41 +01:00
Zhang Keqiao d750055a69 zephyr: switch to use 3k private key for tgl-h
TGL-H should be used the 3k otc private key for build.

Signed-off-by: Zhang Keqiao <keqiao.zhang@intel.com>
2021-06-25 11:10:33 +01:00
Keyon Jie 981524d197 idc: print out the target_core when timed out
Print out the target_core value when timed out during
idc_wait_in_blocking_mode(), which is useful for debugging.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-06-25 16:51:19 +08:00
Daniel Baluta 7cc9a80ab8 codec_adapter: cadence: Reset init_done at init time
After first compress play run init_done is initialized with 1 and it
keeps this value as no one resets it.

This causes subsequent compress play to miss codec process init phase
and this causes decoding to fail.

With this change multiple cplay runs work fine!

Notice that cadence_codec_reset calls cadence_codec_init and thus resets
init_done flag.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-06-23 20:35:49 +03:00
Gongjun Song bc1497a742 Topology: Add sof-tgl-rt711-4ch topology
There is no rt1308 on the TGL-H-RVP platform, need to add a topology
file with only rt711 to enable soundwire on the TGL-H-RVP platform.

The patch of enable soundwire on the TGL-H-RVP platform has been
merged into the thesofproject/linux.

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
2021-06-23 15:06:35 +01:00
Viorel Suman 414e727a84 drivers: imx: sai: specify watermark value in fifo descriptor
Specify watermark via fifo descriptor in the same way
as the fifo depth is.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2021-06-23 14:59:35 +03:00
Viorel Suman d89ce5190a drivers: imx: sai: extract common flag outside switch statement
Same flag is set in all switch cases, so extract the
setting outside the switch statement.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2021-06-23 14:59:35 +03:00
Viorel Suman 3a6c6c9fb2 drivers: imx: sai: remove duplicate flag setting
REG_SAI_CR4_FSE flag is already set few lines above, so remove this
line.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2021-06-23 14:59:35 +03:00
Ranjani Sridharan 86c9a037e2 topology: utils: remove DAPM routes for virtual widgets
Remove the addition of DAPM routes for virtual widgets.
These are not needed for suppressing errors with legacy
machine drivers. Just adding the virtual widget is enough.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-21 16:46:39 +01:00
Guennadi Liakhovetski d5d2b41c63 ipc: (cosmetic) reduce the number of "goto"s, unify traces
Avoid "goto"s as much as possible, the only acceptable case is
jumping to a function cleanup block. Also unify trace prints.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-06-18 12:55:51 +01:00
Liam Girdwood e3f8464dc9 notifier: no need to disable IRQs during registration
Use a spinlock for locking the list instead.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-18 12:51:29 +01:00
Liam Girdwood af6655e7fa pipeline: dont disable IRQs around pipeline scheduling.
The walk context is passed in by the caller and not shared. The pipeline
states are locked by IPC.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-18 11:18:38 +01:00
Pierre-Louis Bossart 97bfb24d70 topology: sof-cnl-nocodec: use different core for each DAI
The UpExtreme HAT connector with the SoundWire,
I2S, DMIC mixed mode exposes the following pins

DMIC_DATA0: input: HAT PIN 8
DMIC_CLK: output: HAT PIN 26

IS2_MCLK: output: HAT PIN 16

I2S1_SCLK: output: HAT PIN 32
I2S1_SFRM: output: HAT PIN 10
I2S1_TXD: output: HAT PIN 24
I2S1_RXD: input: HAT PIN 18

Let's use core3 for DMIC, core2 for SSP0, core1 for SSP1 and core0 for
SSP2.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-18 11:17:21 +01:00
Ranjani Sridharan 470557bda5 ipc: ip3: handler: check if enable core mask is valid
Check if the enable core mask is valid before trying
to enable the cores.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-18 11:12:37 +01:00
Ranjani Sridharan 7668b39b07 topology2: Add pipeline classes
Add some pipeline classes for volume playback/capture, passthrough
capture and eq capture.
Each of these classes include the pipeline widget objects, connections
between pipeline widgets and pipeline attribute definitions

For ex: A volume playback pipeline can be instanted as follows:
Object.Pipeline.pipeline-volume-playback."2" {
	channels	2
	rate		48000
	index		5
	format		"s32le"
}

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-18 11:10:05 +01:00
Ranjani Sridharan c0bee428ae topology: prepare for Topology2.0
In preparation for Topology2.0, move the current topology files
to the topology1 folder and once the 1.0 topologies are
built copy them to the /sof/tools/build-tools/topology folder.

When Topology2.0 topologies come along, they will be built into
the topology2 folder and the 2.0 binaries will be copied over
the 1.0 binaries.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-17 22:17:30 +01:00
Pin-chih Lin e91001af67 topology: Add DRC_EQ def for adopting DRC/EQ pipeline
For speaker pipeline, we want to deploy DRC/EQ for partial TGL device
like Eldrid. The definition flag DRC_EQ is added to make the choice of
adopting the playback pipeline with DRC/EQ.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-06-17 11:43:45 -07:00
Liam Girdwood 8ee6fcd371 ipc: dont disable IRQs when searching UUIDs
The get_drv() call currently disables IRQs as the driver list is never
manipulated in IRQ context.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-17 13:06:40 +01:00
Liam Girdwood 01829fae2f ipc: removed uneeded headers
Not used by these files so remove.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-17 13:06:40 +01:00
Viorel Suman 195774bce6 topology: imx8: kwd: use s32le format instead of s16le
Use s32le format instead of s16le.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2021-06-17 09:49:22 +01:00
Seppo Ingalsuo b6208b8b63 Drivers: Intel: DMIC: Code lines cleanup
This patch only removes some unnecessary line feeds for better
readability.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-06-16 22:22:32 +01:00
Seppo Ingalsuo 51ce081c8c Drivers: Intel: DMIC: Run dmic_work() in the same core as other driver
Previously the gain ramp updates were executed in core 0 only even
if rest of driver was executed in other core. It caused issues with
driver state variables in cached memory.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-06-16 22:22:32 +01:00
Seppo Ingalsuo eb3893d854 Drivers: Intel: DMIC: Re-arrange DMIC DAI component data
This patch collects the global DMIC driver parameters into single
struct. The pointer global in every DMIC DAI instance points into
the same data. All access from functions happens via the pointer
that simplifies the next step to add NHLT binary data configuration
for the driver.

The previous dmic_prm[] is no more allocated dynamically since the
single data structure is fixed size and not large. It simplifies the
driver code that handles the multiple ownership.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-06-16 22:22:32 +01:00
Keyon Jie f79bbb296d fw_ready: add D3_PERSISTENT to indicate if restoring from D3 supported
Add flag SOF_IPC_INFO_D3_PERSISTENT to inform host driver if the IMR
restore feature is supported to the fw_ready message, then the host
driver can decide whether to choose it or not.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-06-16 22:20:32 +01:00
Keyon Jie 1af8ba0d1c handler: invoke platform_context_save() in ipc_pm_context_save()
Invoke platform_context_save() routine to perform platform specific
suspending stuff, before handling the CTX_SAVE IPC.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-06-16 22:20:32 +01:00
Keyon Jie 6c0db22c65 platform: cavs: configure resume from IMR
To enable the feature that resuming from IMR, we need to configure IMR
layout with correct magic number and IMR restore vector, in the
platform_context_save() routine.

This is harmless even the driver want to re-downloading FW at resuming
stage, sending the FW_PURGE IPC from the host side will ask the ROM code
to omit these IMR restoring stuff.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-06-16 22:20:32 +01:00
Keyon Jie e609b18b54 memory: suecreek: add alias of the boot entry
Use the unified macro IMR_BOOT_LDR_TEXT_ENTRY_BASE for the boot loader
text entry.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-06-16 22:20:32 +01:00
Keyon Jie d2f87976f7 platform: add platform_context_save() routines for all platforms
Add a platform_context_save() routine to all platforms, which can be used
to perform any platform specific stuff during suspending the DSPs.

Initialize all these routines to be do nothing.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-06-16 22:20:32 +01:00
Ranjani Sridharan 3018193d3a topology: eq pipelines: remove duplicate SectionData
Remove the duplicate SectionData when multiple EQ's use the
same filter coefficients. There is no change in the topology
binary generated with just one SectionData instead of multiple
ones.

But this will help clean up the conf file so that converting to
topology2.0 will become easier as the name tells me which
coefficients to include.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-16 22:16:47 +01:00
Curtis Malainey fdcf636530 readme: remove IRC link
freenode management has banned IRCcloud.

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2021-06-16 22:13:08 +01:00
Ranjani Sridharan 55f6116bbf topology2: Add pipeline widget class definition
The pipeline widget can be instantiated within a pipeline class as:
	Object.Widget.pipeline."N" {
		index		1
		time_domain	"timer"
		period		1000
	}

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-16 21:51:03 +01:00
Ranjani Sridharan 855cdd9301 topology2: Add class for DAPM route
Add a route class that will be used for creating DAPM routes
between widgets. A route can be between 2 widgets or between a
widget and pipeline endpoint as follows:
	Object.Base.route."N" {
		source	"dai.SSP.1.dai.capture"
		sink	"buffer.0.1"
	}

	Object.Base.route."N" {
		source	"buffer.2.1"
		sink	"pga.2.0"
	}

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-16 21:51:03 +01:00
Ranjani Sridharan a996be5031 topology2: pga: Add mixer controls
Add the volume and switch mixer control objects for the
PGA class. The mixers will be added to the PGA widget
if the pga widget is instantiated with names for each
of the mixers as follows:

Object.Widget.pga.0 {
	Object.Control.mixer.1 {
		name	"1 Master Capture Volume"
	}
	Object.Control.mixer.2 {
                name   "Capture Switch"
        }
}

If the name is only provided for one of the controls, only
that control will be added to the widget when building topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-16 21:51:03 +01:00
Ranjani Sridharan 0027521536 topology2: Add mixer control class
Add the class definition for a mixer control.
A mixer control can be instantiated as follows:
	Object.Control.mixer."0" {
		Object.Base.channel."fr" {
			shift	0
		}
		Object.Base.channel."fl" {}

		Object.Base.tlv."vtlv_m64s2" {
			Object.scale."0" {
				mute	1
			}
		}

		Object.ops."ctl" {
			info	"volsw"
			get	256
			put	256
		}
	}

Also add the other commonly used class definitions that
will be used to instantiate the mixer object such as,
channel, TLV, ops, scale etc.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-16 21:51:03 +01:00
Curtis Malainey a29806d9c7 topology: remove default google hotword
hotword is not public and therefore should not be on by default

Signed-off-by: Curtis Malainey <curtis@malainey.com>
2021-06-16 21:09:50 +01:00
Pin-chih Lin 444f9a2a59 config: Enable DRC related components on TGL override config
Enabled CROSSOVER, DRC, and MULTIBAND_DRC component configs to
tigerlake_chrome.config in order to deploy DRC/EQ on speaker pipeline
on partial TGL device, e.g. Eldrid.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-06-15 16:35:04 -07:00
Pin-chih Lin 1289b33e9c drc: Make DRC_MAX_PRE_DELAY_FRAMES as kconfig
DRC_MAX_PRE_DELAY_FRAMES determines the length of pre-delay frame
buffers which are allocated runtime on DRC setup.

Use rballoc instead of rzalloc to allocate frame buffers.

The default value 512 is suggested by inference to avoid memory waste
and provide reasonable length for pre-delay frames.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-06-15 16:35:04 -07:00
Chao Song 9c50fff928 topology2: add asrc class
Add the class definition for ASRC widget, it can be
instantiated as follows:
	Object.Widget.asrc."N" {
		period_sink_count	2
		period_source_count	2
		format			"s24le"
		rate_out		48000
		asynchronous_mode	1
		operation_mode		0
	}

Where N is the unique instance number for asrc widget
within the same alsaconf node.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-06-15 12:43:12 +01:00
Chao Song d3f3c50205 topology2: add src class
Add the class definition for SRC widget, it can be
instantiated as follows:
	Object.Widget.src."N" {
		period_sink_count	2
		period_source_count	2
		format			"s24le"
		rate_out		48000
	}

Where N is the unique instance number for src widget
within the same alsaconf node.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-06-15 12:43:12 +01:00
Ranjani Sridharan a68b1af80d topology2: Add pga class
Add the class definition for PGA widget. It can be
instantiated as follows:
        Object.Widget.pga."N" {
                format	     s24le
                index        0
		period_sink_count 2
		period_source_count 2
        }

Where N is the unique instance number for pga widget in the same
alsaconf node.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-14 18:51:12 +01:00