The DMIC driver needs this function. This inline version is a
bit faster and the change does not increase code size.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Note: Use with care since this generic macro is currently used only in
host test bench for debug print commands so there are no speed or
precision optimized versions yet.The cast to int64_t is not necessary
for all integer types. Also float restricts precision of a 64 bit
int.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds the DMIC audio capture driver for SOF DAI component use.
The DMIC feature allows to directly attach one to (typically) four PDM
digital microphones into Intel SoC without a separate codec IC. This is
supported by APL and most successor platforms.
Corresponding patches are needed for kernel driver and topology to enable
this feature.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
These code is for CNL for it is not supported that two HW IPs share
one irq pin. Now it is resolved in new algorithm, so delete it.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
The issue for original data structure and algorithm is that:
(1)it only support 2 level interrupt architecture.
(2)it doesn't support two HW interrupt triggered by one irq pin.
Unify irq parent and child to irq_desc. Now each irq_desc maybe
directly attach to xtensa core or another irq_desc.Each irq_desc
may have 32 child list instead of 32 child.
For CNL or later chips, a group of HW IP(like GP-DMA) share
the same IRQ value. Now add id in IRQ to identify each HW interrupt.
If no IRQ shared, call SOF_IRQ to get the IRQ value, and the default
id value would be zero. otherwise call SOF_ID_IRQ to record its id in
IRQ value.
(1)Add core id check in interrupt register setting.
(2)Check child list in interrupt function
(3)Extend root irq_desc to support 4 core on cnl.
(4)Refine macro for interrupt setting
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
when ALSA lib detect xrun issue, it will send stop and start
command to DSP without reset. it will hit error in hds_dma_start,
if we did not add the dma_stop in the host_trigger function.
Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>