Commit Graph

741 Commits

Author SHA1 Message Date
Seppo Ingalsuo 93f9cab7c6 DAI: Check DAI type in dai_get() in CNL platform
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-09 19:48:49 +01:00
Seppo Ingalsuo 94f023612e DAI: Check DAI type in dai_get() in APL platform
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-09 19:48:49 +01:00
Keyon Jie 09b97dccba byt-ssp: fix status transition for ssp_stop
This fix the regression(line missed when copying) introduced by
commit 0d6e17ed99ea 'byt-ssp: change and wrap status transition
into ssp_stop'.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Tested-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2018-05-09 19:36:59 +01:00
Seppo Ingalsuo 6be7b1d26a DMIC: Add SOF DMIC trace definitions
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-08 16:02:37 +01:00
Keyon Jie 0b6e17ed99 byt-ssp: change and wrap status transition into ssp_stop
This will remove manual status change, wrap them into ssp_stop(),
where the status transition is protect by spin_lock.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-05-08 16:01:48 +01:00
Keyon Jie 72e63a467f apl-ssp: change and wrap status transition into ssp_stop
This will remove manual status change, wrap them into ssp_stop(),
where the status transition is protect by spin_lock.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-05-08 16:01:48 +01:00
Prashant Malani e3f45d2770 scripts: Modify Docker Ubuntu version
This ensures that the ubuntu version we use has the right
versions of Open SSL. Without this, the rimage compilation will
fail with the following error:

 pkcs1_5.c: In function 'pkcs_sign':
 pkcs1_5.c:117:20: error: dereferencing pointer to incomplete type 'RSA
 {aka struct rsa_st}'

Signed-off-by: Prashant Malani <pmalani@google.com>
Acked-by: Dylan Reid <dgreid@chromium.org>
2018-05-08 16:00:21 +01:00
Seppo Ingalsuo 8b664cee3f DMIC: Add decimator raw coefficients tables
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-07 12:18:30 +01:00
Seppo Ingalsuo 92dc65faa7 DMIC: Fix compilation issue with SRC
The MIN and MAX macros are provided by numbers.h.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-07 12:18:30 +01:00
Seppo Ingalsuo 40ed5ad121 DMIC: Fix compilation issue with SSP by removing duplicate macro
This macro is provided by io.h.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-07 12:18:30 +01:00
Seppo Ingalsuo ea5f722747 DMIC: Add min/max, ceil divide, find number, and normalize utils
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-07 12:18:30 +01:00
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