Commit Graph

12258 Commits

Author SHA1 Message Date
Curtis Malainey 974a577c23 Incorrect trace variable name
Minor debugging issue, when verbose trace is turned on it will not compile
because these variables are incorrect.

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2017-08-10 12:22:50 +01:00
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
Liam Girdwood 8083e91a99 topology: Add machine specific update for buffer and scheduling tokens
Allow machines to specify scheduling config in pipeline topologies.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-09 15:01:41 +01:00
Liam Girdwood c78d832441 topology: pipeline: Update pipelines to use new tokens
Update the pipelines to use the new buffer and scheduling tokens.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-09 15:01:41 +01:00
Liam Girdwood 85ed032295 topology: dsp: Add scheduling tokens to DSP platform files.
Add initial scheduling platform scheduling. TODO: fine tune the MIPS

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-09 15:01:41 +01:00
Liam Girdwood 31d540e413 topology: builder: Add support pipeline scheduling to topology
Allow topology pipelines to define their scheduling.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-09 15:01:41 +01:00
Liam Girdwood e50cccdae3 topology: Add token support for PCMs and components buffers.
Add topology tokens for PCM and buffer configuration.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-09 15:01:41 +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
Liam Girdwood c52d42685d topology: Add build support for topology files.
Add support to build topology text files into binary files understood
by the drivers. This is a two stage build, the first stage is to
pre-process the files with M4 into regular alsa-conf format and the second
stage is to compile with the alsa topology compiler.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-07-06 16:52:14 +01:00
Liam Girdwood dd08ed7a19 topology: Add machine specific topology configurations.
Add some initial machine specific topology configurations that define
some simple pipelines for certain machines.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-07-06 16:49:37 +01:00
Liam Girdwood e52b9dd37a topology: Add initial TLV library.
Add initial TLV library that can be included and re-used by pipelines.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-07-06 16:48:06 +01:00
Liam Girdwood a7a3bc4d57 topology: Add M4 topology pre-processor macros
Add initial macros to simplify the construction of topology components and
pipelines.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-07-06 16:43:33 +01:00
Liam Girdwood 1c73054da6 topology: Add DSP specific topology configuration
Add initial configuration for DSP specific data. This data still requires
further tuning.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-07-06 16:41:09 +01:00
Liam Girdwood b8c9db4f6b topology: Add initial SOF topology pipeline definitions
Add pipeline and token definitions to allow creation of SOF topology
files. The files define standard pipelines and tokens that can be reused
to build machine specific topology files.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-07-06 16:39:29 +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 9b241ae555 rmbox: make sure we close all files
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-15 14:36:24 +01:00
Liam Girdwood b424e981ec rimage: free ELF program and section allocations
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-15 14:34:01 +01:00
Liam Girdwood 321aa0504d rimage: show correct error on write failure.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-06-15 14:33:39 +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