This patch adds atomic_read and atomic_set methods.
Also includes xtensa implementation of those methods.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
There is no need to implement dedicated irq handler per each sw irq level.
A single implementation may use the context passed by XTOS.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
During XRUN recover process (in pipeline_xrun_recover() function),
"COMP_TRIGGER_XRUN" cmd will be processed first, then "COMP_TRIGGER_START"
cmd will be processed. If the host dma is not stopped in the first
cmd process, we will hit "eS0" error in the hda_dma_start() function during
"COMP_TRIGGER_START" cmd process. the XRUN recover process will fail.
Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
This patch adds the missing paths for header files and
libraries required for building the host testbench.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
merge commit 36f23c6cc3 ("apl-ssp: fix padding bit issues in
I2S/LEFT_J mode") and refine it on Broadwell.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
This patch makes the following changes to configure DMIC from ipc params:
1. remove redundant hdr member item from struct sof_ipc_dai_dmic_params
2. Rename number_of_pdm_controllers member in the above structure
to num_pdm_active to be more representative of the active pdm count.
3. Add an "id" member to struct sof_ipc_dai_dmic_pdm_ctrl
4. Remove hardcoded config params from DMIC set_config function
and use ipc params instead.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This patch adds the testbench that parses a test topology file,
and sets up the pipeline for processing. It schedules pipeline_copy()
for reading samples from an input file, processing them through a
pipeline and writing the processed samples to the output file.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This patch adds a new file component that testbench
can use to read in samples and write out processed samples. Both
text and raw pcm input formats are supported.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This patch adds the common header and source files required for all
component testbench. These files include routines for parsing
topology files, initializing sof ipc, scheduler, memory allocation
and pipeline structures. It also provides simpler implementations for
some of the SOF features such as tracing.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This patch adds the trace information to BYT and APL platforms type
SSP drivers. The traced value helps to determine the configured serial
bus format.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
A non-platform define may be easily shared by other platforms
without adding || define(CONFIG_...) in the arch code.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
This patch ensures that modes matching request returns immediately if
the results length would exceed the allocated length. The caller function
will issue an error in such case.
Also the possibility of using array pdm[] in the IPM helper function
as uninitialized is avoided by initializing it with zeros.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Interrupt clear will clear all interrupt bit. If two channel is enabled
and when pause/resume one of stream, the two interrupts may happen at
same time and one of them will be wrongly cleared.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Actually I did not have full confidence about this patch.
if someone can help do more test, that would be better.
before this, do not accept this patch.
Incorrect TFT/RFT will cause DMA IRQ happened too frequently.
the interval will be less than 1ms, which will cause XRUN easily.
The old code will has this issue in TDM4-s32le test.
Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Here remove the first_copy workaround(it was needed as HDA DMA is not
available at the trigger start stage).
This require the fix from host driver side:
ASoC: SOF: hw-apl: start HDA DMA at stream_prepare() stage and remove
stream_trigger()
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
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>