This patch adds flexible field "data" to struct sof_abi_hdr to be used
to pass binary data via ABI.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds a define of 32 bit integer that equals to ASCII
string "SOF\0" to be used in checking for correct magic number in
binary data. The char type for the magic is changed to uint32_t for
simpler comparison.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes the trace class and renames the macro to match module
name. Note that some trace patches are related to other changes data
and cannot be separated to this patch.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds a very small size and fast to compute SRC coefficients set
for converting between 8/16/24/32/44.1/48 kHz and 48 kHz. It is
set as default for BYT platform until a more optimized SRC core is
available. The quality of this set has been reduced to achieve the faster
computation.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes the circular dependency of defines that prevented the
16 bit coefficients to be applied correctly.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Currently the scheduler will schedule task based on DAI DMA interrupts.
This patch also adds the option to also schedule based on a 64 bit timer.
The scheduler will now check the tasks in the queue and it will only
run the tasks in the current window otherwise it will set a timer to
call schedule() on the next task start time (in another window).
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Make sure each component checks the state transition prior to performing
any action for the new state. This ensure that only supported transitions
are used and any non supported transition is flagged as an error.
This also removes DRAIN state and performs some cleanup on mixer state
handling.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The DAI IRQ hanlder was always writing back full period size even when
less data was copied. Only writeback the amount of data copied.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1. Add processing case branch of SOF_IPC_GLB_TRACE_MSG.
2. Add processing functions for SOF_IPC_TRACE_DMA_INIT and
SOF_IPC_TRACE_DMA_PARAMS for initlizing DMA for Trace and reply host.
3. Modify page table parsing fucntion for using in both PCM streaming and
DMA tracing case.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
1. Initialize the data structure.
a) Create local DMA buffer for saving trace data.
b) Initialize the tracing work handler for syatem work queue.
2. Implement local circle buffer.
a) When the local buffer is full, empty it and reset reading/writing pointer.
3. Save the host buffer PHY addr which is parsed from IPC message. After this
config, start trace work in work queue.
4. Provide dtrace_event() for recroding trace string into local buffer.
5. Add rstrlen() utility function for getting the trace string length because
DSP side hasn't strlen().
6. Enbale trace DMA copying once every 500ms or some special cases.
a) Schedule the tracing sending work once every 500ms.
b) If the local buffer is half full, call trace sending immediately.
c) When the wrting pointer will arrive iat the end of local buffer, call
trace sending immediately.
7. Use dma_copy_to_host() function to do trace sending.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
1. Add SOF_IPC_GLB_TRACE_MSG class of IPC communication.
2. Add two IPC commands for DMA tracing.
a) SOF_IPC_TRACE_DMA_INIT is used to initilize local buffer on DSP side.
b) SOF_IPC_TRACE_DMA_PARAMS is used to receive host DMA buffer PHY.
3. Define DMA for Trace params IPC info structure.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
It is necessary to add dma callback to set completion_t variable to notify
DMA copying is finished. Otherwise it will always enter into error handler.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
This patch adds missing S24_4LE format. Input and output format need to
be still the same. The filter coefficient set is configured in
src_config.h per platform. BYT uses a small int24 set, other use
standard int24 set. SRC wasnot unmuted by pipeline so in this version
SRC initialized to unmuted state.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
As temporary fix to allow SRC to run do not drop clock frequency to
minimum after BYT platform boot is completed.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This coefficient is suitable for BYT platform RAM. It provides conversions
for 8/16/24/32/44.1/48 kHz to/from 48 kHz. Coefficients are 24 bit word
length.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This set prevented passtrough conversions to work, e.g. 48 kHz to 48 kHz
due to a bug in table. This set is replaced with coefficients with a
profile keyword to help selecting suitable set for a platform.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add support for rescheduling work with a new deadline and for scheduling
on a specific clock tick value.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Reread the DMA IRQ status after clearing the IRQ source to make sure
that the IRQ has been cleared correctly.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add an interrupt handler to slear any SSP IRQs. TODO: extend this to
report XRUNS and other errors.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Align all components, DAIs and DMACs to use the same state levels and
transitions. This simplifies DAI and DMAC components integration.
The DRAIN state has also been removed to further reduce DMAC and DAI
complexity.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This patch changes the time and timeouts used by timers from a uint32_t to a
uint64_t. This means clocks can run for years before overflow.
This patch also provides a virtual high 32 bits for HW that only has
32bit timer support. i.e. the high 32 is incremented at every HW timer
overflow.
Finally the patch updates all timer users to use uint64_t timeouts.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Align parameters on different lines to allow for easier visual
comparison and direct mapping with comments in build.m4
Also fix typo in comments s/priorty/priority/g
No functional change
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Add a couple of missing parameters in comments, align them logically
to help the rest of us figure out what parameters mean.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>