Commit Graph

1058 Commits

Author SHA1 Message Date
Tomasz Lauda 7498774514 idc: simplify idc_pipeline_trigger
Simplifies idc_pipeline_trigger function by reading
component data directly from IPC buffer. This way
we don't need to send unneeded data through IDC.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-20 16:44:27 +02:00
Liam Girdwood f9a491f405
Merge pull request #397 from xiulipan/hostfix2
host: do not free the list header in host_reset
2018-09-20 11:49:56 +01:00
Pan Xiuli 7eae0a4264 host: do not free the list header in host_reset
The CONFIG_DMA_GW only enable with hda_dma, as the create_local_elems is
refined to create elem at every start. Did not need to keep the first
elem.

Use list_for_item_safe to delete all item in list. The old way will
delete and free the list header with belongs to the host_data. Free
the list header will directly free host_data and make the second run
fail if the memory is alloced again.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-20 18:11:08 +08:00
Jaska Uimonen 6b07e980d5 eq: iir: don't destroy eq config in reset
Remove freeing of config data in reset. If pm is
not enabled, stopping the stream causes component
reset in firmware. When you start a new stream the
eq parameters are gone and defaults will be used.
When pm is enabled this is not a problem because
component is recreated from swidget in kernel side.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2018-09-20 09:25:08 +03:00
Liam Girdwood d7404c587e host: fix build for host library target.
Fixed size warnings in io.h and missing scheduler API.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-09-19 20:58:48 +01:00
Liam Girdwood 009447234c
Merge pull request #383 from mmaka1/smp-heap
memory: heap reorg for smp
2018-09-19 08:43:00 +01:00
Marcin Maka 13cdfbc6d5 dma: old unused mm context save/restore ops removed
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-09-18 19:44:29 +02:00
Liam Girdwood e4e3cb131c
Merge pull request #388 from mmaka1/hda-get-free
dma: hda: get-free-size simplified
2018-09-18 13:50:37 +01:00
Liam Girdwood f560916155
Merge pull request #387 from mmaka1/dai-dir-fix
dai: hda: fixed swapped direction flags
2018-09-18 13:15:54 +01:00
Liam Girdwood 102b7ad1e8
Merge pull request #386 from xiulipan/merge12_3
Merge stable 1.2 (part 3) scheduler and BYT part into master
2018-09-18 13:14:36 +01:00
Marcin Maka 49f2175731 dma: hda: get-free-size simplified
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-09-18 11:45:11 +02:00
Marcin Maka 22b2492a49 dai: hda: fixed swapped direction flags
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-09-18 11:30:41 +02:00
Pan Xiuli 5b39370e1e scheduler: refine schedule_edf function to handle multiple task
There will be new task added in schedule_edf function, refine the
function to handle multiple task.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-18 16:28:54 +08:00
Pan Xiuli cc4e8c8205 task: clear interrupt earlier
list_item_for_safe is safe for item deletion, but when a new item is
appended to the list. It seems the item could not be go through.
To fix this limitation, move interrupt clear to make sure every IRQ is
handled.
Do not try to handle two task with one IRQ handler.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-18 16:26:23 +08:00
Rander Wang edef72f314 dma: fix dma issue on BYT
It is caused by the change of removing dai waiting after stop.
dma should not be stopped in dai_comp_trigger if HW LLI is not
enable. At this time DMA is still working and it can't be stopped
DMA engine would stop the channel automatically after each transfer.
So just query channel status to stop dma on BYT

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-18 16:25:01 +08:00
Rander Wang a2f0dd0931 wait: add a function to wait for a register ready by pulling method
The register status is checked by polling its value in request time

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-18 16:24:52 +08:00
Rander Wang 3b966f3d57 ipc: remove waiti running in IRQ level higher than passive level
waiti would cause FW panic if it is called in irq level
higher than passive level

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-18 16:24:33 +08:00
Wu Zhigang 90d3956780 sof: fix the spelling error
fix the spelling error.

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
2018-09-18 14:01:01 +08:00
Marcin Maka 5118c6d330 memory: heap reorg for smp
All kernel level components/services allocate objects
from sys heap again. Separation from the runtime heap
provides more reliable, deterministic power flows.
It also presents an opportunity to implement kernel/app
memory protection on platforms which support it.

A better performance is expected due to much simpler
allocation approach.

In order to enable 'free()', slave cores allocate their
objects from their small dedicated sys heaps and when
the core goes down, the entire heap is reset at once.
Further memory power optimization is possible by moving
each sys heap to a separate memory bank that is powered
on/off along with the slave core.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-09-17 14:54:00 +02:00
Pan Xiuli 4f3f4d7ec3 ipc: set IPC process task to lower priority
IPC process task priority should be lower than pipeline copy task.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-14 14:17:40 +08:00
Pan Xiuli 38d541fee9 scheduler: add task priority into scheduler
Check priority before check timeout delta to make sure task with higher
priority run first.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-14 14:17:40 +08:00
Pan Xiuli 85e1c0d738 schedule: fix schedule list double add
Check if the schedule task is added in the list before add it.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-14 14:17:39 +08:00
Pan Xiuli 869c08d6c0 schedule: fix edf reschedule
Should reschedule if we did not try to reschedule.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-14 14:17:39 +08:00
Rander Wang d527b50816 pipe: fix a infinite loop issue in schedule module
There are two paths to delete a task in shedule list. A task would be
deleted when task is completed or cancelled. So it maybe deleted
twice. there is a circle in the schedule list after a sequence
of append-delete operations. This makes a infinite loop in schedule function

Now all of list items are deleted in one place and cancelled when task are complete

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-09-14 14:17:32 +08:00
Pan Xiuli 7be08fdbeb task: refine task to avoid double task function run
Add spinlock to the arch task irq list to avoid double function run.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-14 13:43:07 +08:00
Liam Girdwood f17abe644c
Merge pull request #370 from mmaka1/link
build: linker: x scripts for cavs platforms aligned
2018-09-13 16:09:22 +02:00
Liam Girdwood 96edbbb99c
Merge pull request #368 from xiulipan/mirqlistfix
interrupt: fix unsafe list del
2018-09-13 16:08:01 +02:00
Marcin Maka 15fdbd938c build: linker: x scripts for cavs platforms aligned
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-09-13 13:44:51 +02:00
Pan Xiuli 2ad08d2893 interrupt: fix unsafe list del
Use list_for_item_safe when need to del list item

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-13 18:57:35 +08:00
Rander Wang 1ff4a9df32 playback: kill a infinite loop in pcm_param
Don't delete item with list_for_item. with list_for_item, a item
is deleted from list but the next of this item is used to visit
the list.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-13 16:29:23 +08:00
Rander Wang bc96f88e65 dma-trace: kill a infinite loop in dma_trace_config
Don't delete item with list_for_item. with list_for_item, a item
is deleted from list but the next of this item is used to visit
the list.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-13 16:29:07 +08:00
Rander Wang 7c400d0f7f byt: remove waiti on byt
waiti would cause FW panic if it is called in irq level
higher than passive level.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-13 16:28:46 +08:00
Pan Xiuli 0df634e8a9 list: refine list_item_del to avoid make list chaos
There are possible that we call list_item_del to same list item twice. This
will cause the list be into chaos. Reset the next and prev pointer to 0
to avoid risk.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-13 16:27:48 +08:00
Rander Wang be0b058974 dma-trace: tune the dma trace reschedule time
500us woulld cause dma trace buffer overflow at the boot up time.
Now refine it to 100us to make both scheduler and dma trace happy

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-13 16:26:15 +08:00
Pan Xiuli c0c720a6cb dma-trace: workaround reschedule work fail
If reschedule work timeout is too small. The reschedule will fail.
Workaround this issue by increace the reschedule timeout.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-13 16:26:15 +08:00
Pan Xiuli 734a5bfe70 wait: add check for waiti
waiti can only work with interrupt level 0, check if the level is 0 and
set SOF_IPC_PANIC_WFI panic.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-13 16:25:29 +08:00
Rander Wang 9ebd1bce88 dw-dma: refine dw_dma_stop to clear done bit in all lli
The initialization of lli should be out of loop

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-13 16:15:47 +08:00
Janusz Jankowski eb7e101ae0 apl: remove duplicated platform.c file
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-09-12 13:26:25 +02:00
Liam Girdwood 7d9c1b4080
Merge pull request #325 from tlauda/topic/mem_window_3_change
platform: cavs: let trace manager to clear mem window
2018-09-10 16:56:05 +01:00
Bartosz Kokoszko 1d2c681d8d drivers: apl-ssp: handling bclk idle state
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-09-10 16:02:48 +02:00
Bartosz Kokoszko 780dd79659 uapi: ipc: Add clks_control field to ssp_struct
I've added clks_control field in sof_ipc_dai_ssp_params
struct. I've deleted mclk/bclk/fs_keep_active field. They
will be supported by clks_control field and defined macros.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-09-10 16:02:48 +02:00
Liam Girdwood d582a36fd0
Merge pull request #340 from tlauda/topic/cache_fixes
memory: cavs: cache fixes
2018-09-10 14:14:36 +01:00
Liam Girdwood 269659622b
Merge pull request #339 from tlauda/topic/notifier_master_core
notifier: right now reserved only for master core
2018-09-10 14:07:01 +01:00
Liam Girdwood 1395483aea
Merge pull request #338 from tlauda/topic/agent_ms
agent: switch from us to ms
2018-09-10 14:06:19 +01:00
Liam Girdwood 6c3b0ac18b
Merge pull request #336 from mmaka1/cherry-pick/hda-dma-init-fix
dma: hda: playback preload phase synced with logical buffer state
2018-09-10 14:01:45 +01:00
Tomasz Lauda 1b28d0b88c notifier: right now reserved only for master core
Make notifier available only for master core.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-10 11:10:10 +02:00
Tomasz Lauda 4d1c566c3c memory: cavs: cache fixes
We need to writeback clock data, because it's used
in work queue. Also we need to writeback bss in order
to share static pointers with slave cores.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-10 11:05:53 +02:00
Bard liao c45746e8f8 ipc: add missing schedule_task_init/config
schedule_task_init and schedule_task_config was removed on the
"Merge remote-tracking branch 'gh/next' into next-master2" commit.
Which is necessary for scheduler task.

Signed-off-by: Bard liao <yung-chuan.liao@intel.com>
2018-09-10 16:42:35 +08:00
Tomasz Lauda 08ed1b4d9a agent: switch from us to ms
We should switch from microseconds to milliseconds as
difference in cycles for current timeout is 150000.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-10 10:34:55 +02:00
Marcin Maka fee9f9656d dma: hda: playback preload phase synced with logical buffer state
Removed dma/dsp race condition that happened within preload phase.

Min buffer size set to entire buffer to avoid dma and dsp
pointers misalignmen in case the period size is not multiple
of the hda dma burst size.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-09-08 17:34:10 +02:00