Commit Graph

235 Commits

Author SHA1 Message Date
Liam Girdwood 71a35c317b trace: provide locking around trace output.
Make sure trace mailbox writes are atomic and provide reef context.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-09 17:48:50 +01:00
Liam Girdwood 14e1310bb1 arch: xtensa: generate a disassembly output fro debug.
Also generate a disassembly with no interleaved source for easier
memory debugging.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-09 16:00:31 +01:00
Rajavardhan Gundi def4a9ffaf build: Generate separate .map and .lst files.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2017-08-09 15:52:58 +01:00
Keyon Jie afbc689446 byt-ipc: fix a src/dst error
We should copy from [inbox_base + offset(0 here)] src to
msg->rx_data dst here, otherwise, copying to 0 dst will
crash the firmware here.

Reported-by: Luo Xionghu <xionghu.luo@intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2017-07-07 12:10:14 +01:00
Seppo Ingalsuo 891235ea0e Fix long lines and other white space issues
This change fixes the warnings and errors returned by checkpatch.pl in
source code files eq_fir.c, eq_iir.c, fir.h, and tone.c.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-29 11:49:55 +01:00
Seppo Ingalsuo 4a00691b9e SRC: IPC updates and fixes v3
SRC sets the sink and downstream pipeline PCM rate, period_count and
period_bytes in src_params() according to received out_rate via IPC.

Fail in delay lines allocation results to -ENOMEM error.

Function call comp_set_sink_params() is renamed to
comp_buffer_sink_params().

Added void to functions and corresponding headers without parameters.

Plus white space and long lines fixes for all SRC source files.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-29 11:49:55 +01:00
Seppo Ingalsuo 54fbb1347d Component: Rename comp_set_sink_params to comp_buffer_sink_params
Rename to avoid confusion with the purpose of this function.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-29 11:49:55 +01:00
Seppo Ingalsuo 7bf86f5bb3 Add test bench SOF component types
Types SOF_COMP_FILEREAD and SOF_COMP_FILEWRITE are used used in host
test bench for test vector file I/O. These components are not used in
DSP firmware.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-29 11:49:55 +01:00
Seppo Ingalsuo c6faa66e39 Audio/buffer: Set alloc_size
The buffer->alloc_size was not set. It needs to be equal to
buffer->end_addr minus buffer->addr for circular buffers.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-29 11:49:55 +01:00
Seppo Ingalsuo a08edbf89f IIR EQ: Avoid issue with non-defined number of channels in configuration v2
Initialize EQ for max number of channels in configuration or switch
commands to avoid not set number of channels. A return value of -ENOMEM is
propagated in init functions and returned if allocation for memory fails.

Some trace output is added into EQ setup and some comments cleaned and
added.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-28 12:52:04 +01:00
Seppo Ingalsuo 7bb5530938 FIR EQ: Allocation bug fix and updates to configuration and switch cmd v2
A free of null pointer is fixed with this change. Also the possibility of
nondefined number of channels in EQ config or switch command is eliminated by
by initializing the FIR for max channels. An error of -ENOMEM is propagated
in functions and returned if allocation in config or switch response fails.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-28 12:51:07 +01:00
Seppo Ingalsuo a0a81ffbfa Tone: Bug fixes v2
The default tone frequency of 997 Hz was updated to a proper Q16.16 value.
Macros for tone frequency and gain were added to tone.h and a generic
float to fractional value conversion macro to format.h. Also some common
Q1.31 decibel constants were added. Tone function pointer set was moved to
tone_new() since it is not modified later in this component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-28 12:51:07 +01:00
Liam Girdwood 246d4f79a6 pipeline: perform prepare() on the selected component.
prepare() is not being performed on the selected component. Fix this so
that all components including the selected are prepared in a pipeine.


Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-26 16:21:25 +01:00
Liam Girdwood a26c4cca98 ipc: byt: use SOF_IPC_FW_READY for boot notification
Use global SOF_IPC_FW_READY to notify FW boot,

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-26 16:07:06 +01:00
Liam Girdwood 8337b77972 ipc: make sure all IPC return error values are processed correctly
Return int instead of uint32_t for errors.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-15 13:42:01 +01:00
Liam Girdwood 82be00f200 comp: dai: remove extra memcpy()
No need to copy data twice during DAI init.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-15 13:41:52 +01:00
Seppo Ingalsuo 56856e6a38 tone: The endpoint needs to be set
The signal generator is an endpoint component so this needs to be set for
the pipeline to function.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-14 11:16:24 +01:00
Liam Girdwood 29f3cc815d pipeline: set component pipeline ID when connecting components.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-13 15:43:54 +01:00
Liam Girdwood 3032fc4667 ipc: fix IIR and FIR build since they use IPC comp that embeds hdr
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-12 13:46:17 +01:00
Liam Girdwood 09988f00da ipc: all platform to specify the size of host page table data
This can save almost 4k of memory by allowing some tuning of the
compressed page table that is sent by the host.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-12 13:45:01 +01:00
Liam Girdwood 13ea3bcbe6 ipc: move iir, fir and src IPC data next to the other components.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-12 13:38:47 +01:00
Liam Girdwood be8c46b2e3 ipc: ext data: dont use zero size arrays and specify max elems
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-12 13:37:37 +01:00
Liam Girdwood 0a0944ce69 ipc:: dont use 0 as IPC code, start at 1
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-12 13:36:41 +01:00
Liam Girdwood 960cf8ecb8 comp: make the ipc component data memcpy explicit.
Lets not fool any code scanning tools.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-12 11:38:07 +01:00
Liam Girdwood 64609174a5 Merge remote-tracking branch 'sof/1.0-dev' into pre-1.0 2017-06-12 10:37:46 +01:00
Seppo Ingalsuo 6f27ab602d SRC: Fix possible use of uninitialized plus code cleanup
The s1.x_rptr, s1.y_wptr, and s2.y_wptr might be used as uninitialized.
Also remove some obsolete code lines.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-12 10:36:13 +01:00
Seppo Ingalsuo f132824ff8 IIR equalizer: Fix a null pointer issue
The cd->config could be passed as null pointer to eq_iir_setup() if the
previous malloc() would fail.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-12 10:36:13 +01:00
Seppo Ingalsuo 139df3efe3 FIR equalizer: Fix a null pointer issue
The cd->config could be passed as null pointer to eq_fir_setup() if the
previous malloc() would fail.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-06-12 10:36:13 +01:00
Liam Girdwood 3234a3dc4a cache: remove writeback for ICACHE
Not used so remove.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-09 22:26:17 +01:00
Liam Girdwood 29bc19f042 cache: fix build error when cache ops are builtin
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-09 21:39:34 +01:00
Liam Girdwood 06bb8e3dd3 ipc: values: read value ID and context from component data before use.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-09 17:59:55 +01:00
Liam Girdwood c3153812b9 scheduler: allocate scheduler context in system heap.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-09 17:58:49 +01:00
Liam Girdwood 9e8b23d548 ipc: check pipeline source is non NULL before using it
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-09 17:57:19 +01:00
Liam Girdwood af9e00e030 pipeline: err might be used uninitialized in component_op_upstream()
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-09 17:56:44 +01:00
Liam Girdwood 1764152119 audio: components: Allocate correct device size
The devices sizes can be variable depending on any IPC init data that is
stored. Make sure we allocate the correct size.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-09 17:27:02 +01:00
Seppo Ingalsuo 6a24a293c6 Add IIR Equalizer component
This change provides an IIR equalizer component. The
 IIR equalizer can be used for any transducer or effects equalizer needs but
 it is especially recommended for speaker response equalization and other
 applications without dependence to matched phase response or best possible
 THD+N performance where FIR may be a better choise. IIR equalization is
 capable to strong response enhancement without need for large DSP resources
 consumption. The tool to create the EQ setup blobs is included in the
 rimage tools.
2017-06-07 15:23:58 +01:00
Seppo Ingalsuo 6f03aa5a5b Add FIR Equalizer component
This change provides a finite impulse response (FIR)
 equalizer component. The FIR equalizer can be used for any transducer or
 effects equalizer needs but it is especially recommended for microphone
 arrays equalization. The tool to create EQ setup blobs is included in the
 rimage tools.
2017-06-07 15:23:57 +01:00
Seppo Ingalsuo 29566ee3e4 Add tone generator component
This change provides a tone generator component. The
 purpose is to provide a high quality FW internal test signal generator for
 objective audio quality measurements for component or system tests. It can
 also be used as simple beep indication tones generator for users.
2017-06-07 15:09:57 +01:00
Seppo Ingalsuo 6a274839ee Add SRC component
This change provides a sample rate converter (SRC).
 The SRC is polyphase FIR type. All the conversions coefficients tables are
 automatically generated by a separate Octave scripts set in the rimage
 tools set. The supported in/out rates and the performance can be customized
 for a different quality/resources trade-off.
2017-06-07 15:09:31 +01:00
Liam Girdwood 84e46b0b2a cache: xtensa: Add cache region implementation for xtensa
Add cache ops for the xtensa architecture.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-07 12:41:29 +01:00
Liam Girdwood 3c5d9a3b63 cache: Add cache management API to writeback/invalidate regions
Add an API to allow drivers to writeback or invalidate cache contents.
This is useful where the DSP firmware runs from cache and needs to
writeback/buffer prior to DMA or other peripheral usage.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-07 10:13:57 +01:00
Liam Girdwood 425aa5e917 ipc: Add support for creating pipelines dynamically. Part 1
Currently pipelines have to be statically defined in the firmware source
code. This patch provides a mechanism whereby they can be created and
destroyed via IPC messages from the host.

Part 2 to follow.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-06 20:35:05 +01:00
Liam Girdwood f4fc2328bf scheduler: Add initial EDF scheduler.
Add an Earliest Deadline First scheduler to perform scheduling of audio
pipeline tasks based on task deadlines. i.e. the task with the earliest
deadline will be scheduled so that it will complete and preempt other
lower priority tasks before the deadline.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-06 20:35:05 +01:00
Liam Girdwood 2d2cd78be1 task: add priority driven task management
Provide a method for tasks to be performed on a priority basis using the
interrupts levels to preempt lower priority tasks.

The scheduler will use the to schedule work at different priorities.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-06 20:35:05 +01:00
Liam Girdwood 535201458f arch: xtensa: display memory dump in the map file and add prefix
Also make sure the binaries have platform prefix.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-06 20:14:56 +01:00
Liam Girdwood 2743d0eeda drivers: ssp: move regsier macros into seperate header
Move the register macros into separate header.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-06 19:39:13 +01:00
Liam Girdwood a2d5fe5d58 drivers: dw-dma: move register macros into platform specific header.
Clean up the DW-DMA rsgisters so that it can be more easily integrated
into other platforms.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-06 19:36:27 +01:00
Liam Girdwood 405b1f34f2 list: add list previous iterator
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-06 16:41:35 +01:00
Liam Girdwood 69222cf7d7 core: create a context and pass it to each subsystem at init
Create a global firmware context structure and pass this to each subsystem
on initialisation. This allows components to share access to global DSP
context.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-06 16:41:07 +01:00
Liam Girdwood d65a18a98b trace: add more detailed trace vales for init
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-06 16:37:05 +01:00