Commit Graph

2825 Commits

Author SHA1 Message Date
Marcin Rajwa 304336ba60 CMOCKA-KPB: test and verify internal buffering
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa e39d0729e7 CMOCKA-KPB: perform copy test and its verification
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa e6967498c1 CMOCKA-KPB: connect sink and source to KPB device
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 827b240847 CMOCKA-KPB: fill source buffer with test data
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa fb8a650877 CMOCKA-KPB: create dummy source && sink buffers
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 3ff3b61886 CMOCKA: removed old memory allocation in testcases of KPB
The KPB component has changed its buffering
algorithm therefore its test cases needs to
be changed accordingly.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa a98e3f8b37 KPB: change kpb_state naming convention
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 57cc807072 KPB: SET/RESET HOST sink copy mode
This sets HOST copy mode to blocking before
draining starts and resets it back to
normal mode once draining is done.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 7d13838060 KPB: remove unused data types
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa f1a73a66e8 KPB: add draining task
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 5f61594eb0 KPB: check if history buffer has enough data
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa cfd15cab6c KPB: update of init draining procedure
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 6a3526ec68 KPB: update kpb reset function
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 23d4d12598 KPB: reclaim history buffer memory
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa cb4eb46d0a KPB: add verification of history buffer size
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 82e44361bd KPB: rework of new() function
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa fcc3a7b448 KPB: rework of copy function
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 425facee00 KPB: rework of buffering algorithm
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 0956da7be7 KPB: add function to clear history buffer
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 5acf40a3f9 KPB: rework of allocation algorithm
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa cceef7a0be KPB: add history buffer data type
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Marcin Rajwa 0a8c933873 KPB: move private data container from header file to source file.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-19 17:52:45 +02:00
Slawomir Blauciak 253b870a33 Repurpose component self-register functionality for general use.
From now on, modules (including components) that wish to be self-registered
and initialized on boot up shall use the DECLARE_MODULE macro.

Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2019-04-19 15:04:03 +01:00
Rander Wang 896f73d36a topology: dmic: add dmic support in generic hda topology
Now sof kernel driver supports two dmic dai links: DMIC01 PIN,
which supports rate of 48k, and DMIC16k Pin, which supports rate
of 16k. And if four channels dmic is used, we only support one dmic
dai link. CHANNELS would check in intel-generic-dmic to generate
the correct topology file.

Tested on whiskylake & icelake & apollolake up2

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-04-19 10:19:04 +01:00
Seppo Ingalsuo 50bd96ded4 Volume: Allow use of extended volume scale up to 42 dB
This patch alters the volume IPC and ramp to use sQ8.16 gain
values instead of previous Q2.16 kind of unsigned gain value.
The driver has never set the min/max volume values in volume
new() IPC so the macro values VOL_MAX (+42 dB) and VOL_MIN (mute)
are used instead as limits.

The overflow in generic C code with s16 format is fixed. The
comments about volume Q format are updated.

The optimimized xt-xcc version of volume is changed to use 64
bits for multiply result to avoid loss of LSB bits in left shift
after multiply. With 64 bit result there is no need to scale the
volume multiplier as it was done with use of 32 bit multiply
result.

The cmocka volume type is changed to signed integer to match
component type used in this patch. The xtensa AE integer types
are signed so better to avoid unsigned gain values. The volume
scale in reference volume does a small error and cannot handle
above 0 dB max so it is changed as well. The test levels are
changed to exercise gains above and below 0 dB.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-04-18 22:06:13 +02:00
Seppo Ingalsuo 5ef0713b7b TPLG: Rename a volume scale macro to avoid confusion
The macro in tlv.m4 defines a volume scale from -64 dB with 2 dB
steps for playback pipelines. Hence the name m90s3 is incorrect.
The new name m64s2 is a correct description of the defined volume
scale. It's useful since there's another volume scale defined for
capture pipelines.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-04-18 22:06:13 +02:00
Seppo Ingalsuo 90a6efd154 TPLG: Change volume capture pipeline gain range to -50 .. +30 dB
This patch replaces the -64 to 0 dB volume scale for capture with
more practical -50 to +30 dB gain. The step is 1 dB. It allows to
compensate for different microphone model sensitivities when constant
acoustical decibels to digital decibels level is needed in a
microphone capture application.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-04-18 22:06:13 +02:00
Jakub Dabek 4c6f6f7b48 memory: connected memory max size to kconfig values
Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2019-04-18 16:09:14 +02:00
Liam Girdwood 738c83ddeb comp: Add initial keyword detector testing component.
This is a testing component acting as a dummy keyword
detector comp. Add the init/free and cmd op so as to be
able to accept switch cmd from userspace.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2019-04-18 12:51:01 +01:00
Slawomir Blauciak 0bcc7a597b ipc: initial host notification support
Provides ipc_send_comp_notification function for
sending custom notifications to the host.

Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2019-04-18 12:51:01 +01:00
Slawomir Blauciak 06c030defc math: added crc32
It will compute crc32 of a given area in memory.

Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2019-04-18 12:51:01 +01:00
Slawomir Blauciak 0b56f064c2 kpb: rename comp_data struct to avoid conflicts
The kpb's comp_data struct is located in a public header,
which will be used by different components.
As such, it would cause conflicting definitions.

Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2019-04-18 12:51:01 +01:00
Ranjani Sridharan 2748716bd5 ipc: tplg: add effect type comp for keyword detect
Add keyword detect effect component type.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2019-04-18 12:51:01 +01:00
Jakub Dabek 76306470ce kconfig: Add cores and memory sizes configurability
Signed-off-by: Jakub Dabek <jakub.dabek@linux.intel.com>
2019-04-18 12:44:29 +02:00
Tomasz Lauda 5d554c515d host: remove check for host buffer alignment
Removes check for host buffer alignment to period size.
This check is deprecated as we are correctly handling
split transfers.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-18 11:48:20 +02:00
Tomasz Lauda e2b994ee03 dw-dma: cleanup the whole driver
Cleanups the whole DW-DMA driver:
- Move platform register defines to proper headers.
- Make driver independent of platform.
- Use the same accepted style of trace logs.
- Other minor tweaks.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-18 08:49:48 +01:00
Tomasz Lauda 06e9a34583 dw-dma: make DMA FIFO partitioning configurable from Kconfig
Makes DMA FIFO partitioning configurable from Kconfig.
Some platforms need to set FIFO partitions before
enabling DMA controller.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-18 08:49:48 +01:00
Tomasz Lauda 1edaef67f4 dw-dma: set DMA suspend and drain stop from Kconfig
Makes DW-DMA stop method to be configurable from Kconfig.
Some of the platforms cannot stop DMA channel immediately,
but first need to suspend and drain FIFO.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-18 08:49:48 +01:00
Tomasz Lauda 012f87b570 dw-dma: remove unused conditional code
Removes unused conditional code from DW-DMA
driver.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-18 08:49:48 +01:00
Bartosz Kokoszko 8b4cc887af schedule: task priority levels reversal
I've reverted level of priority tasks. Now tasks
levels are as follows:
- level 0 - highest priority;
- level 9 - lowest priority.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-04-18 00:10:00 +02:00
Tomasz Lauda 99e9f4370e dw-dma: unify irq handling for all platforms
Unifies code responsible for interrupt handling
for all platforms. This way we can eliminate #if
based on platform type and rather use feature ones.
Support for hardware linked list defines what kind
of interrupt we expect - block or transfer. There
is no point of supporting both of them simultaneously.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-16 15:43:56 +02:00
Tomasz Lauda c0c8992bcd dw-dma: configure aggregated irq from Kconfig
Moves configuration of aggregated channel interrupts to
Kconfig. Currently only Apollolake has possibility
to register interrupt per channel.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-16 15:43:56 +02:00
Tomasz Lauda dc3b98c799 dw-dma: make HW_LLI configurable from Kconfig
Makes platform support for hardware linked list
configurable from Kconfig. HW_LLI is supported
for all cAVS platforms.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-16 15:43:56 +02:00
Marcin Rajwa 9be2694232 memory: enable LPSRAM related defines for APL
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-16 13:18:30 +02:00
Marcin Rajwa c17de6a979 memory: enable LPSRAM on APL
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-16 13:18:30 +02:00
Marcin Rajwa 2593efb82b memory: add LPSRAM status and control registers
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-16 13:18:30 +02:00
Adrian Bonislawski 9d3471d851 coredump-reader: print exception cause and location
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-04-16 10:14:37 +01:00
Adrian Bonislawski f16b141184 exception: saving the EPC1 register
It will change in the panic functions so it is needed to save it in exception()

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-04-16 10:14:37 +01:00
Tomasz Lauda 68f27263c8 topology: increase number of periods for low latency pipeline
Increases number of periods for low latency playback pipeline
from 1 to 2 for volume and mixer components. 1 period
is not good enough to have continuous DMA transfer across
the whole pipeline, especially with the new copy flow,
which requires playback pipeline preload.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-16 10:13:20 +01:00
Seppo Ingalsuo 1b15fad849 TPLG: Fix mistake in 2ch configuration related DMIC macro
This patch fixes 2ch dmic capture topology. It appeared as topology
completion fail in SOF boot. The missing quote characters in m4
caused the STEREO_PDM0 macro triggered lines to no not be included
into conf file.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-04-15 23:08:08 +02:00