Commit Graph

6424 Commits

Author SHA1 Message Date
Curtis Malainey 0a1029c2a2 actions: consolidate yamlint
Lets not trust that everyone remembers to lint themselves or that they
fetch the repo in order to execute their job.

Also rename workflow file to be a bit more generic

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-05-18 17:24:22 +01:00
Curtis Malainey e11c3c9e51 actions: rename fuzzer job
rename scant to ipc as this is the ipc fuzzer

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-05-18 17:24:22 +01:00
Curtis Malainey 39551b08ce actions: scant fuzzer: refactor CI build
Use oss-fuzz infra to make sure we don't break the fuzzer

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-05-18 17:24:22 +01:00
Marc Herbert 571cc290a4 xtensa/cmake: fix !CONFIG_TRACE
Looks like no one ever !CONFIG_TRACE

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-18 16:46:44 +01:00
Marc Herbert 964b7afa74 smex: don't corrupt the build with a bogus .ldc output
This made troubleshooting CMake issues more complicated.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-18 16:46:44 +01:00
Marc Herbert 7e1fd0adef Really copy sof-$platform.{ri,ldc} to sof.{ri,ldc}
Fixes incomplete commit 0e60ec8da4 ("Copy sof-$platform.{ri,ldc} to
sof.{ri,ldc}"), see full rationale there. I missed the
copy/paste/diverge at the time and did it only in the MEU_SIGN case.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-18 16:46:44 +01:00
Chao Song f510435a25 topology: sof-tgl-nocodec-ci: run pipelines on different cores
This patch moves DMIC pipeline to run on DSP core 2,
and SSP1 pipelines to run on DSP core 3 for multi-core
verification.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-17 22:24:06 +08:00
Keyon Jie b5df7bf2ac dmic: switch to use uncached dmic_prm[]
When multi-core introduced, we need to use uncached address for the
global configuration variables, to make sure they are consistent for all
DSP cores.

When variables change, write through for both cached and uncached
addresses, to ensure the consistency.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-17 22:23:54 +08:00
Yong Zhi e9d2900b3b topology: adl-sdw-max98373-rt5682: Add BT offload support
Add BT offload support for ADL platform:

PCM14 <---> passthrought (pipe 14, 15) <---> SSP2 (BT offload)

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-05-17 09:15:38 +01:00
Daniel Baluta 67bf7b479a dai: limit number of bytes copied to one period for all directions
This is similar with:
commit 761bbac5ac ("host: dai: limit number of bytes copied to one
period") which limits the number of copied bytes for CAPTURE direction.

This patch does the same thing for PLAYBACK direction.

We need this with codec adapter component that most of the time
will produce more than period_bytes in a period.

DAI will copy more than on period_bytes at a time and this
affects sound quality.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-05-16 21:57:22 +01:00
Ranjani Sridharan eb9b04a205 drivers: Intel: DMIC: make DMIC prm and active fifo count shared
When the DMIC pipeline is moved to a core other than the
primary core, the DMIC params and dmic_active_fifos are
not valid. Modify them to be shared data and handle
cache management when accessing/modifying them.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-05-16 21:49:34 +01:00
Guennadi Liakhovetski a5cc6f47b5 ll-scheduler: fix the wrong use of atomic operations
A sequence of atomic_sub(); atomic_read() breaks atomicity. A single
atomic_sub() should be used instead.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-14 11:58:52 +01:00
Iuliana Prodan 8ed78885bc imx: invalidate cache for specific address range only
The _memmap_cacheattr_reset linker script variable has
dedicate cache attribute for every 512M in 4GB space
1: write through
2: cache bypass
4: write back
F: invalid access

For imx, implement is_cached() based on
_memmap_cacheattr_reset.

Without this fix, when loading a topology we get:
sof-audio-of 556e8000.dsp: error: reply expected 20 got 12 bytes
sof-audio-of 556e8000.dsp: error: ipc error for 0x30010000 size 20
sof-audio-of 556e8000.dsp: error: DSP failed to add widget id 0 type 23 name : PCM0P stream Passthrough Playback 0 reply 0
sof-audio-of 556e8000.dsp: ASoC: failed to load widget PCM0P
sof-audio-of 556e8000.dsp: ASoC: topology: could not load header: -22
sof-audio-of 556e8000.dsp: error: tplg component load failed -22
sof-audio-of 556e8000.dsp: error: failed to load DSP topology -22
sof-audio-of 556e8000.dsp: ASoC: error at snd_soc_component_probe on 556e8000.dsp: -22
sof-audio-of 556e8000.dsp: ASoC: failed to probe component -22
asoc-simple-card sof-sound-wm8960: ASoC: failed to instantiate card -22
asoc-simple-card: probe of sof-sound-wm8960 failed with error -22

That's because, on mailbox_hostbox_read() we don't invalidate cache
before reading the address.

Fixes: bfe7707f37 ("cavs: disable data cache operations on uncached addresses")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-05-13 20:34:09 +03:00
Iuliana Prodan 844df3dde3 platform: imx: add info for linker script variable
Added information for linker script variable that
contains the cache attributes.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-05-13 20:34:09 +03:00
Keyon Jie d4b8fa80dc mux: stop copy if get_stream_index() fail
We should return error if the matching in get_stream_index() fail, add
check in the callers, stop using it and return failure when needed.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-13 13:09:31 +01:00
Keyon Jie 8da8060ea9 mux: remove the wrong error message
A wrong error message was added in helper get_stream_index(), remove to
fix it.

Fixes: 80666b7cc7 ("ipc: component: abstract the component creation API")
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-13 13:09:31 +01:00
Vamshi Krishna e112e0bc0f topology: sof-tgl-sdw-max98373-rt5682: add support for ADL
For speakers SDW2 link is used.
For Headset SDW0 link is used.
add sof-adl-sdw-max98373-rt5682 topology

Signed-off-by: Vamshi Krishna <vamshi.krishna.gopal@intel.com>
2021-05-13 12:27:22 +01:00
Vamshi Krishna 7d44f31e7d topology: sof-tgl-sdw-max98373-rt5682: remove redundant topologies
removing 2-ch topology and renaming 4-ch topology.

Signed-off-by: Vamshi Krishna <vamshi.krishna.gopal@intel.com>
2021-05-13 12:27:22 +01:00
Keyon Jie fc0fe9f4aa ll_schedule: add new_target_tick to ll_schedule_domain
Add a new_target_tick to store the new target tick for the next set,
which is used during the reschedule stage.

Update the new_target_tick on tasks done on each core, and do the final
domain_set() at the point that tasks on all cores are finished.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-13 12:04:44 +01:00
Keyon Jie c855cffb35 ll_schedule: domain tasks/cores refinement
Refinement to make the domain tasks/cores management more clear:

a. update the total_num_tasks and num_cores in the helper pair
domain_register/unregister().

b. update the enabled[core] and enabled_cores in the helper pair
domain_enable/disable().

c. for the completed task, do the domain client/task update in the new
created helper schedule_ll_task_done().

d. cleanup and remove the tasks/cores management from the ll_schedule
helpers schedule_ll_clients_enable(), schedule_ll_tasks_run(),
schedule_ll_domain_set() and schedule_ll_domain_clear().

Without those refinement, the num_clients was not used correctly,
we used it for both num_registered_cores and num_enabled_cores, with
that we observed that it may be changed to '-1' when component/pipeline
is asked for running on a slave core.

This reverts changes in 'commit b500999477 ("scheduler: guard against
subdivision underflow on domain clear")' as it is not needed anymore.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-13 12:04:44 +01:00
Keyon Jie 8bfcdcfb55 ll_schedule_domain: add flag to store the enabled cores
The flag registered_cores was created to denote the number of registered
cores, but it is also used as the number of the enabled cores today.

Here add a new flag enabled_cores for the former purpose to remove the
confusion and help for the subsequent domain tasks/cores management
refinement.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-13 12:04:44 +01:00
Keyon Jie 364ee49c53 ll_schedule: rename num_clients to registered_cores
Rename the 'num_clients' in struct ll_schedule_domain to 'registered_cores'
to reflect the real use of it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-13 12:04:44 +01:00
Keyon Jie 538d7dba7a ll_schedule_domain: add return value of domain_unregister()
Add return value of domain_unregister(), which will be used for the LL
scheduler and the domain state management in the subsequent refinement.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-13 12:04:44 +01:00
Keyon Jie 77a231202c cavs: timer: remove the wrong timer_disable
The timer_disable() in the timer_register() is wrong, the
interrupt_enable() calling handles the interrupt enabling already,
remove the wrong timer_disable() calling to correct it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-13 12:04:44 +01:00
Keyon Jie a398e92f2e schedule: add a core index for schedule_data
A scheduler will run on a specific scheduler only, add a core index flag
to schedule_data to denote that.

To schedule or cancel a task, looking for the scheduler with correct
core index to perform the action.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-13 12:04:44 +01:00
Marc Herbert 40c9bb2e30 .github: switch docker image from ':latest' to ':v0.17.3'
Even though "latest" is being referenced by the current
https://github.com/zephyrproject-rtos/docker-image/tree/072880b3#readme
I've been told it's too "bleeding edge" to be used in CI.

v0.17.3 also has libssl-dev which was the only thing we were missing.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-13 12:00:45 +01:00
Marc Herbert 55025f6343 zephyr/docker-build.sh: remove apt update / install libssl-dev
The Zephyr image has been updated in
https://github.com/zephyrproject-rtos/docker-image/pull/58

This will save some time and even better avoid llvm.org
glitches like this one:

https://github.com/thesofproject/sof/pull/4089/checks?check_run_id=2554961695

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-13 12:00:45 +01:00
Ranjani Sridharan 426d7816e2 topology: nocodec: switch to dynamic pipelines
Switch the APL/CNL/ICL/JSL/TGL nocodec topologies to use dynamic
pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-05-13 11:58:06 +01:00
Ranjani Sridharan b371f93c51 topology: hda: re-enable dynamic pipelines
Re-enable dynamic pipelines for HDA topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-05-13 11:58:06 +01:00
Fred Oh 5083b2b73a docker: upgrade base ubuntu image to 20.04
Catching up latest LTS Ubuntu image, 20.04. It is supposed to be minor
upgrade but alsa-lib need to be set default library path,
/usr/lib/x86_64-linux-gnu/. Otherwise topology library loading error
is found for SOF tool build. This is typical error message,

alsatplg: error while loading shared libraries: libatopology.so.2:
cannot open shared object file: No such file or directory.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2021-05-12 20:29:37 +01:00
Fred Oh c7a527e4bd Dockerfile: remove apt.conf dependency
There was a assumption /etc/apt/apt.conf has apt proxy settings for
the system. This workaround is not required.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2021-05-12 20:29:37 +01:00
Fred Oh cbef494ee6 Dockerfile: add vim and jed to apt install list
Can't imagine editing files without vim or jed.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2021-05-12 20:29:37 +01:00
Fred Oh 4b9fbaf24b docker-run.sh: minor alignment fix
Removed extra spaces.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2021-05-12 20:29:37 +01:00
Fred Oh 77ef08a951 docker-run.sh: set http/https proxy when docker run
Use http/https proxys setting from the host.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2021-05-12 20:29:37 +01:00
Pin-chih Lin 1f68cabafa topology: add drc-eq-volume-demux playback pipeline and default coefs
Adds pipe-drc-eq-volume-demux-playback.m4 for locating Multiband DRC and EQ
IIR on the path of the internal speaker.

This pipeline will be used by Eldrid first for Audio DRC/EQ offloading
purpose.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-05-12 13:44:28 +01:00
Daniel Baluta 8c722f0bf3 audio: Fix codec adapter submenu display
Without this patch codec adapter submenu is displayed after IGO NR
component resulting in something like this:

[*] Codec adapter
[*] IGO NR components
  Codec adapter codecs

After this patch is applied the display will be as expected:

[*] Codec adapter
  Codec adapter codecs
[*] IGO NR components

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-05-12 13:14:01 +01:00
fy.tsuo 9ec1039ac5 audio: igo_nr: abstract igo_nr creation API.
Abstract igo_nr creation API.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-12 13:01:15 +01:00
fy.tsuo 7fa9befd57 topology: sof-tgl-max98373-rt5682: added igonr.
Added sof-tgl-max98373-rt5682-igonr.tplg.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-12 13:01:15 +01:00
fy.tsuo 3e36f6cf1a config: override: chrome: Added tigerlake_chrome_igonr.config.
Added igonr override config for tigerlake_chrome.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-12 13:01:15 +01:00
fy.tsuo 2b714ecbba audio: igo_nr: update email address.
Changed the email address of Intelligo Technology Inc.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-12 13:01:15 +01:00
Pierre-Louis Bossart d430091259 topology: add missing configuration for byt-max99080
Somehow we only support this configuration for BYT, but there are
Baytrail devices using the same codec.

BugLink: https://github.com/thesofproject/sof/issues/4160
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-05-12 09:23:22 +01:00
Marc Herbert 96f6a7b385 logger: add error messages when failing in the middle of fetch_entry()
Failing _in the middle of one log entry_ should really not be treated as
a normal event. The purpose of a logging tool is to find issues, not
hide them.

Don't abort on EOF because of valid use cases like device suspend but
don't do it quietly.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert e6f0f8b60f logger: add or fix error handling in read_entry_from_ldc_file()
Add a few missing log_err().

Remove calls to ferror() because:
- its return value is a meaningless "non-zero" boolean,
- we don't really care whether the dictionary file is in an error state
  or not; an unexpected end of dictionary file is just as bad.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert fb02c56649 logger: don't sound like the DMA trace can wrap
In general the DMA trace runs until interrupted but there are cases
where it can exit "normally": when reading from a file or stdin, when
some error happens,....

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert 1e64b7e83c logger: fix relative timestamp when re-opening the trace after EOF
Need to reset the (now global) entry number.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Kai Vehmanen d337c0a9ba kconfig: add a namespace prefix to top-level xtensa specific options
The top-level Kconfig has a number of platform and architecture specific
options. For clarity, rename all Xtensa specific options with "XT_"
prefix. Impacted options:

config WAITI_DELAY
config BOOT_LOADER
config HAVE_RESET_VECTOR_ROM
config IRQ_MAP
config INTERRUPT_LEVEL_[12345]

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-05-11 18:57:37 +01:00
fy.tsuo ea5d9be6a0 audio: igo_nr: Added LICENSE file.
Added legal license file for igo_nr feature.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-10 15:39:46 +01:00
fy.tsuo 19666007e1 audio: igo_nr: Added a new line.
A new line is missing after variable declaration.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-10 15:39:46 +01:00
fy.tsuo 9287747f90 audio: igo_nr: Removed ENUM type get/set of Kcontrol.
ENUM handlers have been removed in igo_nr_cmd_get_value
and igo_nr_cmd_set_value.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-10 15:39:46 +01:00
fy.tsuo ff3c8fec98 audio: igo_nr: Removed NULL assignment of cd.
The NULL initialization of cd is not necessary.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-10 15:39:46 +01:00