Commit Graph

830 Commits

Author SHA1 Message Date
Seppo Ingalsuo 88488567ee DMIC: Change math library link order
Order is changed to let drivers library to be able to use functions from
math.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-07 12:18:30 +01:00
Seppo Ingalsuo d59654c25b DMIC: Add DMIC registers bit fields handling macros
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-07 12:18:30 +01:00
Seppo Ingalsuo aea16662ca DMIC: Add DMIC DMA setting to DAI
Note that this is hardwired to stereo for now to enable testing of
feature. It need to be updated to support any number of channels and
optimized DMA burst size.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-07 12:18:30 +01:00
Seppo Ingalsuo 0c6c12aa96 DMIC: Add SOF DMIC IPC definitions
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-07 12:18:30 +01:00
Seppo Ingalsuo 89a7af4473 DMIC: Add SOF DMIC definitions
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-07 12:18:30 +01:00
Pan Xiuli 8080070449 platform: panice: Send exception memory offset via IPC
Send the memory window offset with the panic IPC in case the panic
happen before DSP ready when the memory window info is sent.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-05-07 11:54:22 +01:00
Pan Xiuli 530ef2a213 mailbox: use mailbox function for SW_REG
SW_REG is in memory window and the cache is enabled, need to
writeback the SW_REG.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-05-07 11:48:48 +01:00
Dylan Reid 85ae8e7418 scripts: Add build-soft.sh
Make it easier to build the topology when working in sof.git. This
script automates the change of directory to and from soft.git.
It also makes building in a container easier because all scripts can
execute from the same working directory.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
2018-04-30 20:05:24 +01:00
Dylan Reid e3dfa4e1bd scripts: Add ability to build in a container
Having a docker container that contains the cross compiler and host
dependencies eases setup and maintenance of local builds.

The container setup procedure is based of the wiki instruction. A few
more dependencies were added.

In addition to the ct-ng and xtensa-newlib steps, this container builds
top of tree alsa-lib and alsa-utils as distros seem to be slow to update
them with the needed topology features.

The docker-run.sh script is used to automatically bind mount local
soft.git and sof.git directories in to the container. This provides
build artifacts in the same place as a local "make" would.

Use it like the following:

./scripts/docker-run.sh make
./scripts/docker-run.sh ./scripts/xtensa-build-all.sh
etc...

The container only needs to be re-built when the toolchain or alsa
dependencies are modified.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
2018-04-30 16:24:56 +01:00
Dylan Reid 2470f8c0b3 scripts: Add #! headers to shell scripts
Use /bin/sh by default.  The lists used in xtensa-build-all.sh are a
bash feature, use bash for that script.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
2018-04-30 16:21:39 +01:00
Yan Wang 3ad69eb715 FIX: Remove unused variable.
The variable "i" shouldn't be used.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
2018-04-24 08:09:52 -07:00
Zhang Keqiao 9a33490ce0 dist: fix make dist compiling issue
Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2018-04-24 08:09:43 -07:00
Pierre-Louis Bossart 29d4e8b126 apl-ssp: use macros instead of hard-coded shifts/masks
Missed those definitions in previous patch, fix.

Suggested-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-13 19:49:12 +01:00
Pierre-Louis Bossart 0cc866fde1 apl-ssp: allow for 19.2 MHz SSP reference
Don't hard-code MCLK source on ApolloLake, use settings provided over
IPC to select 24.576 MHz PLL or 19.2 MHz XTAL oscillator.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-13 15:45:15 +01:00
Pierre-Louis Bossart 36f23c6cc3 apl-ssp: fix padding bit issues in I2S/LEFT_J mode
The current code doesn't work for I2S/LEFT_J when the slot width and
number of valid bits don't match (e.g. 24 bit data in 32-bit slot).

In I2S/LEFT_J mode, the padding is not at the end of the frame but
at the end of each slot, and is evenly distributed between the two
left and right phases.

Fix by using DMYSTOP for I2S/LEFT_J, and only program SSPSP2 for DSP_A
and DSP_B modes

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-13 15:44:55 +01:00
Liam Girdwood a197715d09 configure: check for doxygen and graphviz to build docs
Documentation needs doxygen and graphviz so warn if they are not
installed.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-13 15:33:57 +01:00
Marcin Maka 6aee21bb42 Makefile support for doc target.
Builds uapi documentation in html format using doxygen.
See doc/sof_uapi/html/index.html
First dox samples in the source code provided by the patch.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-04-13 14:56:04 +01:00
Liam Girdwood 7e91484c26 uapi: ipc: Add executable memory flag
Add flag to mark memory as executable.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 21:50:38 +01:00
Liam Girdwood 7db25d8924 rimage: add support to build and sign runtime modules
Currently rimage only supports building ELF images with know TEXT, DATA
and BSS addresses. This patch adds support to build runtime relocatable
modules that can be loaded linked into the base SOF FW at runtime.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 21:49:19 +01:00
Liam Girdwood 78e7f30f42 ipc: page tables: Make page table API generic for use outside IPC core
Allow users outside of IPC to make use of compressed host page tables.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 20:45:47 +01:00
Liam Girdwood 301418d94d rimage: fix formatting and alignment of manifest section printf
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 16:40:31 +01:00
Liam Girdwood 4736bd7379 host: string: remove xthal references.
xthal only needed for xtensa arch.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 15:52:40 +01:00
Liam Girdwood 54e833e7a4 host: build fix for missing string.h
Add string.h for host build.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 14:31:51 +01:00
Liam Girdwood 8c71c4466b core: sof.h: remove unused code.
Code is not used or referenced anywhere.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 09:04:02 +01:00
Liam Girdwood 0e26f15448 rimage: display ELF section names.
Display the name of each ELF section to aid build and debug.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 08:58:02 +01:00
Liam Girdwood 5d7ad56d84 lib: string: Add rstrcmp() string compare.
Add strcmp() equivalent.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 08:56:53 +01:00
Keqiao.Zhang 949c4339ab dist: fix make dist compiling issue for HSW, APL and CNL
Signed-off-by: Keqiao.Zhang <keqiao.zhang@linux.intel.com>
2018-04-11 19:42:41 +01:00
Tomasz Lauda 7f35266a78 configure: Fix --with-dsp-core flag
--with-dsp-core flag should accept every core name.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-04-06 11:53:27 +01:00
Pierre-Louis Bossart 6900f4d094 uapi: ipc: move sample_valid_bits to SSP definitions
This field doesn't mean anything for DMIC or HDaudio, move it
where it makes sense (I2S/TDM modes)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:21:45 +01:00
Pierre-Louis Bossart e7fd644c5e uapi: ipc: start moving SSP-specific fields into ssp structure
sample_valid_bits remains in main structure for now since it is
handled with a generic dai token.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:21:45 +01:00
Pierre-Louis Bossart fbcbe586d0 uapi: ipc: remove zero-length array for DAI IPC
Making this dynamic doesn't really save much memory and makes the
code more complex for no good reason

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:21:45 +01:00
Pierre-Louis Bossart 7579429eb6 uapi: ipc: align SSP IPC with kernel
Rename fields to follow topology definitions
Add placeholder for new fields for quirks and associated pdata
No functionality change

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:21:45 +01:00
Pierre-Louis Bossart 04b68062fe uapi: ipc: change DAI sample_valid_bits definition
The kernel uses this value as 32-bit uint, use the same definitions

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:21:45 +01:00
Pierre-Louis Bossart 1562d1fd3b uapi: ipc: align ipc.h with kernel
Style corrections and addition of panic codes

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:21:45 +01:00
Liam Girdwood d2cdb21084 Merge branch '1.1-stable' 2018-04-05 15:12:56 +01:00
Pierre-Louis Bossart 81708a5d2a sof: global replacement of 'reef' by 'sof'
Let's remove reef to avoid confusion/legacy.
no functionality change but the name of generated files
will change so targets and install scripts will need
to be updated

There should be only one occurrence of "Reef" left in
rimage/file_format.h, left as is for backwards compatibility.
This may be changed separately at a later point.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:10:14 +01:00
Pierre-Louis Bossart eb9b9231a7 clean: dos2unix: broadwell.x.in (take2, really clean)
Previous attempts left file in DOS mode

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:09:16 +01:00
Pierre-Louis Bossart 6989dd0e2d clean: dos2unix: haswell.x.in (take2, really clean)
Previous attempts left file in DOS mode

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:09:01 +01:00
Pierre-Louis Bossart 863805c051 clean: dos2unix: baytrail.x.in (take2, really clean)
Previous attempts left file in DOS mode

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:08:40 +01:00
Pierre-Louis Bossart a8bab6df81 clean: fix style warning before big SOF rename
Remove checkpatch warnings before the rename
to better track real ones

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 14:38:47 +01:00
Pierre-Louis Bossart 0f71a415ab interrupts: harden macros with parenthesis
It's crazy to use shifts and masks without parenthesis

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 14:38:47 +01:00
Pierre-Louis Bossart 3477df30d3 interrupts: fix non-sensical macro
Parenthesis are not balanced, not sure if/how this ever worked?

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 14:38:47 +01:00
Liam Girdwood 017c40bb67 dist: fix make dist for SRC
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-05 10:25:46 +01:00
Liam Girdwood c819afd16f clean: dos2unix: broadwell.x.in
Remove any DOS line termination.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-04 20:50:58 +01:00
Liam Girdwood 9e2750a1e6 clean: dos2unix: haswell.x.in
Remove any DOS line termination.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-04 20:50:25 +01:00
Liam Girdwood e831c81e6f clean: dos2unix: baytrail.x.in
Remove any DOS line termination.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-04 20:49:45 +01:00
Liam Girdwood 9383717cc3 core: atomic: Add atomic addition and subtraction APIs
Add APIs to allow atomic additions or subtractions.

This API can be used to synchronize buffer W/R pointers between
pipelines and components running on different DSP cores.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-04 16:37:43 +01:00
Liam Girdwood f32a390432 scripts: checkpatch: don't complain about int_t uint_t types
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-04 15:54:03 +01:00
Liam Girdwood 4a40468b6c scripts: checkpatch: dont complain about missing MAINTAINERS
File not used by SOF.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-04 15:50:44 +01:00
Liam Girdwood 06160169c9 ipc: core: rename intel-ipc.c to handler.c
Rename as there is nothing Intel specific about the IPC. It's generic.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-04 15:48:38 +01:00