Commit Graph

6122 Commits

Author SHA1 Message Date
Liam Girdwood 9f8983fceb sof: abi: Add component ABI header for host configuration
Add an ABI header to be pre-pended to all binary blobs or bespoke
component data structures that will be passed from host to DSP component
or vice versa (i.e via binary kcontrols).

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-09-04 12:36:12 +01:00
Liam Girdwood 6cb0fd2806 topology: src: fix src config data by adding ""
SRC config data was missing "". Fixed.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-09-03 22:15:59 +01:00
Liam Girdwood ea3ff83bdc topology: media: fix media min period size to align with 1ms granularity
Make sure media buffers can align min period size on 1ms granularity.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-09-03 22:15:59 +01:00
Liam Girdwood 12b1907499 topology: src: fix W_SRC widget argument list order
Put format and data in correct order.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-09-03 22:15:58 +01:00
Liam Girdwood 22ce806f58 comp: src: use buffer allocator when allocating delay lines.
delay lines are typically several kB in size so use buffer allocator.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-09-03 22:04:26 +01:00
Liam Girdwood b12aa0d2e6 comp: src: add validation to SRC config and runtime params.
Make sure we validate all config and params variables and complain
if there are omissions or errors.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-09-03 22:00:58 +01:00
Liam Girdwood c3148825b9 heap: byt: balance heap block size map
Balance the heap block map size out to better fit real world usage by
reducing small blocks to create extra larger blocks.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-09-03 21:58:04 +01:00
Liam Girdwood 854b2e518b component: data: Make component get/set data host API generic
Make the host API and IPC to set and get component runtime data and values
generic with no bespoke commands at the IPC level.

Create a generic structure that descibes the type and size of data and
whether that data is appended to the IPC message or is available to
be DMAed from host.

Update the components to use the new structure. Some components like
SRC, tone and tone still require some work to export thier ABI.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-09-02 23:14:02 +01:00
Liam Girdwood 1bed6ee95d topology: bind kcontrols to PGA widgets.
Add an parameter to bind TLV volume kcontrol to volume widget.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-31 23:51:20 +01:00
Seppo Ingalsuo aa62532d82 Testing: Add enums for file I/O based test components
This patch adds to ipc.h enabling for two new components to read and
write test vectors via file I/O. They are specific to test bench usage
on development computer only and are not real SOF components. This update
avoids need to edit this file for test bench build.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-08-31 13:36:16 +01:00
Seppo Ingalsuo f36e74c424 Tone: Bug fixes and code cleanup
This patch fixes issues in setting up the tone generator for correct
sample rate and channels number. Component IPC was missing latest needed
changes. The buffers handling issue is fixed. Obsolete commented code is
removed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-08-31 13:17:57 +01:00
Seppo Ingalsuo 48adb1933f SRC: Remove obsolete conversion filters
These conversion filters are no more used and will be replaced later with
new. The deletion is because the stop-band spec was changed from 0.51xFs
to 0.50xFs (no intentional aliasing of transition band) so the file
names of new default high-quality filters will be with different filename.
The filter spec is appended to file name to differentiate different
bandwidth filters for same rates fraction.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-08-31 13:17:49 +01:00
Seppo Ingalsuo 28ef854d02 SRC: Bug fixes, add support for int16 coefficients, comments cleanup
This patch fixes bugs in sink and source buffers handling and adds
support for short coefficient type to save RAM in platforms with less
space such as BYT. The patch introduces also a RAM saving minimum
conversions set between 16, 44.1, and 48 kHz. A new possible rate 18.9 kHz
was added to supported rates indication bits. SRC filters quality is also
adjusted for lower default performance. The higher performance will need
>16bit coefficients usage. The larger conversion set and 32 bit
filter coefficients can be easily restored with the SRC tools in rimage.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-08-31 13:17:35 +01:00
Liam Girdwood 6bb4da421c rmbox: Add support for floating point clock freq in MHz
Allow timestamp clock frequency to be set in MHz

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-30 22:55:57 +01:00
Liam Girdwood 7a1105772d rmbox: fix help output to show all options
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-30 22:55:57 +01:00
Liam Girdwood 811918df70 topology: Add format and scheduling info to DAI pipelines.
Some pipelines can be used to service DAIs before data is sent on to
other processing pipelines. Add scheduling and format info to DAI
pipelines.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-30 22:55:57 +01:00
Pierre-Louis Bossart 7e1610920f uapi: fix SOF_RATE common frequencies
Current definitions are missing 12 and 64 kHz, have
typos (11250, 22500), list a weird 40kHz and don't
have extension capabilities for non-standard rates

Before we create ABI problems with the Linux kernel, let's add all
the sampling frequencies needed before we submit stuff upstream
(the same list needs to be reflected in the kernel include/uapi)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2017-08-30 22:17:49 +01:00
Liam Girdwood 6aebc6e26b drivers: ssp: Improve SSP I2S and DSP mode generation from topology.
Improve support for I2S and DSP modes alongside using topology data to
define the mode configuration. Add trace errors to reject any unsupported
configurations.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-30 22:08:58 +01:00
Liam Girdwood 4ca4028d2c Revert "rimage: remove flat file builder."
This reverts commit 072fb5c43f.
2017-08-27 17:11:06 +01:00
Liam Girdwood 91bee9eb50 Revert "rimage: update to new SOF driver file format."
This reverts commit 03acfd640d.
2017-08-27 17:10:08 +01:00
Liam Girdwood a80e2f84cc comp: mixer: make error trace messages non verbose
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-25 21:08:07 +01:00
Liam Girdwood 50be05b950 pipeline: params: Use correct host side comp when installing params.
Some components have multiple sources/sink and the correct host side
component must be used when installing params. Make sure the correct
component is used here by tracking the previous component and passing it
to the params installation.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-25 20:15:40 +01:00
Liam Girdwood 3d640ff6af comp: dai: Verify config ib params() and be verbose about any errors
Verify the configuration in params and send any errors to host and trace.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-25 19:56:59 +01:00
Liam Girdwood 26e11996b6 comp: mixer: calculate frame and period bytes in params().
TODO: need to check all sources for params.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-24 22:12:25 +01:00
Liam Girdwood 0f8737e2a0 comp: volume: provie additional trace on prepare() errors
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-24 22:09:25 +01:00
Liam Girdwood 6c40c58532 ipc: make sure all messages start at 1 instead of 0 to simplify debug
Messages starting at offset 1 remove any ambiguity over whether the
message has been constructed correctly.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-24 22:06:06 +01:00
Liam Girdwood 5ca8e8d39c topology: Remove second SRC from BYT/CHT default topologies
SRC in default full rate and high quality configuration is quite large.
free up some memory on BYT and CHT by using only one SRC.

TODO: Provide the SRC with configuration data for supported rates and
quality in order to significantly reduce it's footprint.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-24 21:52:00 +01:00
Liam Girdwood da9108adff topology: test: Add new test topologies to help with component debug
Add a simple passthrough and a passthrough with volume.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-24 21:49:08 +01:00
Liam Girdwood 7fb7598bc3 rmbox: Add EQs, SRC and Tone components to trace output
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-24 17:10:49 +01:00
Liam Girdwood 803f33a676 comp: buffer: complain loudly if componenst try to under/over run buffers
Complain loudly in trace if we have components overruning or underruning
buffers. Components should check buffer free/avail before use.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-23 23:57:08 +01:00
Liam Girdwood 6d5723dfd6 comp: buffer: condense buffer status trace data.
Condense the buffer status data into fewer trace lines.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-23 23:55:33 +01:00
Liam Girdwood 4897246c75 ipc: component config must always be after comp header.
State this to be obvious. TODO: merge into 1 structure to enforce this.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-23 23:54:15 +01:00
Liam Girdwood a68343fee8 comp: host: make sure we have enough data to copy to/from host
Perform a check in the copy() function to make sure there is enough
data to copy to/from host buffers.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-23 23:52:00 +01:00
Liam Girdwood c73ff5c16d ipc: byt: remove comment
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-22 22:34:46 +01:00
Liam Girdwood b0df61d04e ipc: stream params: Add reply for stream params.
Stream params has it's own reply message so use it.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-22 22:34:27 +01:00
Liam Girdwood 9ec831b137 comp: volume: use XRUN handler to report XRUNs
Use the new XRUN API to report XRUNs to host and trace.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-22 22:33:52 +01:00
Liam Girdwood bc83a0e147 component: xrun: Add XRUN convenience APIs for notification and trace
Add a simple convenience API to allow components to report XRUNs

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-22 22:32:21 +01:00
Liam Girdwood a1da5bcc8d pipeline: xrun: Add XRUN initial handler into pipeline
Add an XRUN handler into the pipeline to report bag overrun and underrun
from component buffers to the host. An XRUN on a component will now cause
a IPC XRUN message to each PCM interface source/sink to the component.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-22 22:31:04 +01:00
Liam Girdwood 2d5f55ca5f byt: mailbox: fix mailbox size.
4k is correct size.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-22 22:24:17 +01:00
Liam Girdwood 7c43aefb6f trace: cleanup: cleanup some trace.
Simple cleanup of some trace calls.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-21 20:33:49 +01:00
Liam Girdwood 8c0338e349 pipeline: preload: Fix preload completion detection and add limit
Make sure the preloader can detect when all buffers are loaded prior
to trigger and add a limiter to make sure we dont pre-load forever.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-21 20:33:49 +01:00
Liam Girdwood 0f1a8fd771 comp: volume: make sure we only calculate buffer positions once.
Position was being calculated in twice in the copy funcs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-21 20:33:49 +01:00
Liam Girdwood 2126e25089 ipc: reply: Add message replies to component creation.
Make sure we return an error or 0 after component creation.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-21 20:33:49 +01:00
Liam Girdwood 2cfaebe1f0 component: params: removed unused host params arg in params() config API
Remove the unused pointer to host parameters in params(). This was only
useful to the host component. Provide some component frame configuration
variables to give more flaxability than host params.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-21 20:33:49 +01:00
Liam Girdwood c69a7516ef topology: Add simple playback passthrough pipeline with volume.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-21 20:29:01 +01:00
Liam Girdwood 08adb55f0b topology: Include DAI format in pipeline definitions
Make sure we allow different DAI formats in pipelines.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-21 20:29:01 +01:00
Liam Girdwood 3d8e7478a4 topology: Add sample bits to DAI_CONFIG
Add a token for number of bits in a sample for DAI configs

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-21 20:29:01 +01:00
Liam Girdwood ec2198621d dai: config: Use a generic structure for DAI configuration
Use a generic structure containing common DAI settings for configuration.
This structure also contains a tail of DAI specific data that can also
be used by DAI drivers.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-21 16:57:28 +01:00
Liam Girdwood 2436d794a3 topology: dai: Fix DAI tokens to avoid naming colision
The wrong name is used for naming and may collide with the capture stream
on the same DAI.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-16 20:35:55 +01:00
Liam Girdwood 0a08a62e05 topology: pipelines: give more headroom for buffer size refinement
Give the ALSA HW refinement code more headroom for buffer calculations
to provide more buffering options.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-08-16 20:34:01 +01:00