Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
68c84c7
sof: lib: notifier: Do not break build on platforms without CLK_SSP
Nov 22, 2019
551fa11
pm: cavs: fix literal dcache lock in power down
Nov 22, 2019
66c3784
topology: intel-generic-dmic.m4: fix dai parameters
Nov 15, 2019
ccd09c1
drivers: imx: sai: fix minor log issue
groncarolonxp Nov 25, 2019
6d53f05
arch: string: enable vec_memcpy only with HIFI3
xiulipan Oct 31, 2019
d7581cb
haswell: fix _memmap_vecbase_reset address
xiulipan Oct 31, 2019
c821f9e
memory: modify bootloader for xcc build
xiulipan Oct 31, 2019
9c90af8
sof: clk: Remove specificity on clock notifier change ID
Nov 26, 2019
39de272
Topology: Fix DAI_ADD function call in sof-cml-rt1011-rt5682 topology
wwittbrx Nov 28, 2019
93b84ec
alloc: invalidate uncached memory
tlauda Dec 6, 2019
4243192
alloc: fix modulo zero bug
tlauda Dec 11, 2019
0f24dd2
Volume: Fix handling of mute and unmute control
singalsu Dec 11, 2019
7013662
platform: cht: reset ssp clk M/N dividers on boot
cujomalainey Nov 27, 2019
1b5398e
platform: bdw: fix bdw DMA timer
xiulipan Dec 10, 2019
e305697
platform: bdw: fix SSP clock setting
xiulipan Dec 10, 2019
9f57fb1
gdb: ringbuffer: Fix void pointer arithmetic
Dec 16, 2019
9eda078
cmake: Use correct config option for GDB_DEBUG
Dec 16, 2019
9ddadf6
eq_iir: set iir_delay pointer to NULL when freed
tlauda Dec 17, 2019
dca7887
eq_fir: set fir_delay pointer to NULL when freed
tlauda Dec 17, 2019
96a6b07
ll_schedule: fix task insertion
tlauda Dec 17, 2019
5023ab4
alloc: Fix bug in handling first_free member of the block map
Dec 20, 2019
917d75e
cmake: version: consider unannotated tags
jajanusz Jan 7, 2020
1c60097
github: fix link to bug tracking docs
jajanusz Jan 9, 2020
66a5ae9
sof: align sof structure to cache line size
tlauda Dec 19, 2019
61577dc
cannonlake: shim: clock status registers
jajanusz Oct 10, 2019
47f3601
cannonlake: shim: clock control registers
jajanusz Oct 10, 2019
ec4cb78
suecreek: shim: clock control registers
jajanusz Oct 10, 2019
e802a7c
suecreek: shim: clock status registers
jajanusz Oct 10, 2019
e7ea4ae
icelake: shim: clock control registers
jajanusz Oct 10, 2019
a8c280d
icelake: shim: clock status registers
jajanusz Oct 10, 2019
7c67800
tigerlake: shim: clock control registers
jajanusz Oct 10, 2019
658a079
tigerlake: shim: clock status registers
jajanusz Oct 10, 2019
8311e0c
cavs: lib: check status mask in cpu clock set
jajanusz Dec 3, 2019
5a7ef9c
cavs: interrupt: move irq names to cavs header
tlauda Dec 19, 2019
0ca4545
platform: intel: LP HP freq indexes
jajanusz Jan 24, 2020
1b71a50
arch: xtensa: add waiti wakeup hook
jajanusz Jan 24, 2020
7605252
platform: intel: add clock switch for waiti
jajanusz Jan 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ assignees: ''
**Describe the bug**
A clear and concise description of what the bug is.
What have you tried to diagnose or workaround this issue?
Please also read https://thesofproject.github.io/latest/howtos/process/bug-tracking.html for further information on submitting bugs.
Please also read https://thesofproject.github.io/latest/contribute/process/bug-tracking.html for further information on submitting bugs.

**To Reproduce**
Steps to reproduce the behavior: (e.g. list commands or actions used to reproduce the bug)
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if(EXISTS ${TARBALL_VERSION_SOURCE_PATH})
message(STATUS "Found ${TARBALL_VERSION_FILE_NAME}")
message(STATUS "Version: ${GIT_TAG} / ${GIT_LOG_HASH}")
else()
execute_process(COMMAND git describe --abbrev=4
execute_process(COMMAND git describe --tags --abbrev=4
OUTPUT_VARIABLE GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
Expand Down
9 changes: 9 additions & 0 deletions src/arch/xtensa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@ config SMP
help
Indicates that architecture uses multiple cores

config WAKEUP_HOOK
bool
default n
help
Enables hook that is called and after coming back from WAITI.
This config should be selected by other platform-level configs.
Platforms that use it, have to implement hook function
platform_interrupt_on_wakeup.

endmenu
2 changes: 1 addition & 1 deletion src/arch/xtensa/debug/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause

if (CONFIG_GDB)
if (CONFIG_GDB_DEBUG)
add_subdirectory(gdb)
endif()
2 changes: 1 addition & 1 deletion src/arch/xtensa/drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: BSD-3-Clause

add_local_sources(sof timer.c)
add_local_sources(sof interrupt.c timer.c)
14 changes: 14 additions & 0 deletions src/arch/xtensa/drivers/interrupt.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright(c) 2020 Intel Corporation. All rights reserved.
//
// Author: Janusz Jankowski <janusz.jankowski@linux.intel.com>

#include <sof/drivers/interrupt.h>

#if CONFIG_WAKEUP_HOOK
void arch_interrupt_on_wakeup(void)
{
platform_interrupt_on_wakeup();
}
#endif
10 changes: 5 additions & 5 deletions src/arch/xtensa/include/arch/drivers/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
#include <xtensa/xtruntime.h>
#include <stddef.h>
#include <stdint.h>

extern char irq_name_level2[];
extern char irq_name_level3[];
extern char irq_name_level4[];
extern char irq_name_level5[];
#include <config.h>

static inline int arch_interrupt_register(int irq,
void (*handler)(void *arg), void *arg)
Expand Down Expand Up @@ -88,6 +84,10 @@ static inline void arch_interrupt_global_enable(uint32_t flags)
:: "a" (flags) : "memory");
}

#if CONFIG_WAKEUP_HOOK
void arch_interrupt_on_wakeup(void);
#endif

#endif /* __ARCH_DRIVERS_INTERRUPT_H__ */

#else
Expand Down
1 change: 1 addition & 0 deletions src/arch/xtensa/include/arch/lib/wait.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <sof/debug/panic.h>
#include <sof/drivers/interrupt.h>
#include <sof/lib/clk.h>
#include <ipc/trace.h>
#include <config.h>
#include <xtensa/xtruntime.h>
Expand Down
6 changes: 3 additions & 3 deletions src/arch/xtensa/include/arch/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int memset_s(void *dest, size_t dest_size,
int memcpy_s(void *dest, size_t dest_size,
const void *src, size_t src_size);

#if __XCC__ && !CONFIG_LIBRARY
#if __XCC__ && XCHAL_HAVE_HIFI3 && !CONFIG_LIBRARY
void *__vec_memcpy(void *dst, const void *src, size_t len);
void *__vec_memset(void *dest, int data, size_t src_size);
#endif
Expand All @@ -54,7 +54,7 @@ static inline int arch_memcpy_s(void *dest, size_t dest_size,
if (src_size > dest_size)
return -EINVAL;

#if __XCC__ && !CONFIG_LIBRARY
#if __XCC__ && XCHAL_HAVE_HIFI3 && !CONFIG_LIBRARY
__vec_memcpy(dest, src, src_size);
#else
memcpy(dest, src, src_size);
Expand All @@ -72,7 +72,7 @@ static inline int arch_memset_s(void *dest, size_t dest_size,
if (count > dest_size)
return -EINVAL;

#if __XCC__ && !CONFIG_LIBRARY
#if __XCC__ && XCHAL_HAVE_HIFI3 && !CONFIG_LIBRARY
if (!__vec_memset(dest, data, count))
return -ENOMEM;
#else
Expand Down
4 changes: 4 additions & 0 deletions src/arch/xtensa/xtos/int-medpri-dispatcher.S
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ no_context:
* number and exception stack frame), then call the interrupt handler.
* Note: The callx12 preserves the original user task's a4..a15.*/

xtos_on_wakeup

#if CONFIG_SMP
xtos_addr_percore_add a12, xtos_interrupt_table, MAPINT(SINGLE_INT_NUM)*XIE_SIZE
#else
Expand Down Expand Up @@ -228,6 +230,8 @@ no_context:
/* set interrupt task context */
xtos_task_ctx_store_percore a11, a14

xtos_on_wakeup

/* Loop to handle all pending interrupts. */

LABEL(.L1,_loop0):
Expand Down
2 changes: 2 additions & 0 deletions src/arch/xtensa/xtos/xea1/int-lowpri-dispatcher.S
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ no_context:
/* set interrupt task context */
xtos_task_ctx_store_percore a11, a14

xtos_on_wakeup

/* Loop to handle all pending interrupts. */

LABEL(.L1,_loop0):
Expand Down
2 changes: 2 additions & 0 deletions src/arch/xtensa/xtos/xea2/int-lowpri-dispatcher.S
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ no_context:
/* set interrupt task context */
xtos_task_ctx_store_percore a11, a14

xtos_on_wakeup

/* Loop to handle all pending interrupts. */

LABEL(.L1,_loop0):
Expand Down
7 changes: 7 additions & 0 deletions src/arch/xtensa/xtos/xtos-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,13 @@ XTOS_PENDING_OFS: .space 4 /* _xtos_pending variable */
s32i \ax, \ay, XTOS_TASK_CONTEXT_OFFSET
.endm

// Executes optional callback on wake up
.macro xtos_on_wakeup
#if CONFIG_WAKEUP_HOOK
call12 arch_interrupt_on_wakeup
#endif
.endm

#else /* !_ASMLANGUAGE && !__ASSEMBLER__ */

/*
Expand Down
1 change: 1 addition & 0 deletions src/audio/eq_fir/eq_fir.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ static void eq_fir_free_delaylines(struct comp_data *cd)
* each FIR channel delay line to NULL.
*/
rfree(cd->fir_delay);
cd->fir_delay = NULL;
cd->fir_delay_size = 0;
for (i = 0; i < PLATFORM_MAX_CHANNELS; i++)
fir[i].delay = NULL;
Expand Down
1 change: 1 addition & 0 deletions src/audio/eq_iir/eq_iir.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ static void eq_iir_free_delaylines(struct comp_data *cd)
* each IIR channel delay line to NULL.
*/
rfree(cd->iir_delay);
cd->iir_delay = NULL;
cd->iir_delay_size = 0;
for (i = 0; i < PLATFORM_MAX_CHANNELS; i++)
iir[i].delay = NULL;
Expand Down
106 changes: 60 additions & 46 deletions src/audio/volume/volume.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ static enum task_state vol_work(void *data)
int again = 0;
int i;

cd->vol_ramp_active = true;

/* inc/dec each volume if it's not at target */
for (i = 0; i < PLATFORM_MAX_CHANNELS; i++) {
/* skip if target reached */
Expand All @@ -96,6 +98,7 @@ static enum task_state vol_work(void *data)
/* ramp up, check if ramp completed */
if (vol >= cd->tvolume[i] || vol >= cd->vol_max) {
vol_update(cd, i);
cd->ramp_increment[i] = 0;
} else {
cd->volume[i] = vol;
again = 1;
Expand All @@ -105,11 +108,13 @@ static enum task_state vol_work(void *data)
if (vol <= 0) {
/* cannot ramp down below 0 */
vol_update(cd, i);
cd->ramp_increment[i] = 0;
} else {
/* ramp completed ? */
if (vol <= cd->tvolume[i] ||
vol <= cd->vol_min) {
vol_update(cd, i);
cd->ramp_increment[i] = 0;
} else {
cd->volume[i] = vol;
again = 1;
Expand All @@ -122,7 +127,11 @@ static enum task_state vol_work(void *data)
}

/* do we need to continue ramping */
return again ? SOF_TASK_STATE_RESCHEDULE : SOF_TASK_STATE_COMPLETED;
if (again)
return SOF_TASK_STATE_RESCHEDULE;

cd->vol_ramp_active = 0;
return SOF_TASK_STATE_COMPLETED;
}

/**
Expand Down Expand Up @@ -212,9 +221,12 @@ static struct comp_dev *volume_new(struct sof_ipc_comp *comp)
for (i = 0; i < PLATFORM_MAX_CHANNELS; i++) {
cd->volume[i] = MAX(MIN(cd->vol_max, VOL_ZERO_DB),
cd->vol_min);
cd->tvolume[i] = cd->volume[i];
cd->tvolume[i] = cd->volume[i];
cd->mvolume[i] = cd->volume[i];
cd->muted[i] = false;
}

cd->vol_ramp_active = false;
trace_volume_with_ids(dev,
"vol->initial_ramp = %d, vol->ramp = %d, "
"vol->min_value = %d, vol->max_value = %d",
Expand Down Expand Up @@ -359,10 +371,11 @@ static inline void volume_set_chan_mute(struct comp_dev *dev, int chan)
{
struct comp_data *cd = comp_get_drvdata(dev);

/* Check if not muted already */
if (cd->volume[chan] != 0)
cd->mvolume[chan] = cd->volume[chan];
cd->tvolume[chan] = 0;
if (!cd->muted[chan]) {
cd->mvolume[chan] = cd->tvolume[chan];
volume_set_chan(dev, chan, 0);
cd->muted[chan] = true;
}
}

/**
Expand All @@ -374,9 +387,10 @@ static inline void volume_set_chan_unmute(struct comp_dev *dev, int chan)
{
struct comp_data *cd = comp_get_drvdata(dev);

/* Check if muted */
if (cd->volume[chan] == 0)
cd->tvolume[chan] = cd->mvolume[chan];
if (cd->muted[chan]) {
cd->muted[chan] = false;
volume_set_chan(dev, chan, cd->mvolume[chan]);
}
}

/**
Expand All @@ -389,7 +403,8 @@ static int volume_ctrl_set_cmd(struct comp_dev *dev,
struct sof_ipc_ctrl_data *cdata)
{
struct comp_data *cd = comp_get_drvdata(dev);
int i;
uint32_t val;
int ch;
int j;
int ret = 0;

Expand All @@ -407,57 +422,56 @@ static int volume_ctrl_set_cmd(struct comp_dev *dev,
"cdata->comp_id = %u",
cdata->comp_id);
for (j = 0; j < cdata->num_elems; j++) {
trace_volume_with_ids(dev, "volume_ctrl_set_cmd(), "
"SOF_CTRL_CMD_VOLUME, "
"channel = %u, value = %u",
cdata->chanv[j].channel,
cdata->chanv[j].value);
i = cdata->chanv[j].channel;
if (i >= 0 && i < SOF_IPC_MAX_CHANNELS) {
ret = volume_set_chan(dev, i,
cdata->chanv[j].value);
} else {
ch = cdata->chanv[j].channel;
val = cdata->chanv[j].value;
trace_volume_with_ids(dev, "volume_ctrl_set_cmd(), channel = %d"
", value = %u", ch, val);
if (ch < 0 || ch >= SOF_IPC_MAX_CHANNELS) {
trace_volume_error_with_ids(dev,
"volume_ctrl_set_cmd() "
"error: "
"SOF_CTRL_CMD_VOLUME, "
"invalid i = %u",
i);
"volume_ctrl_set_cmd(), illegal channel = %d",
ch);
return -EINVAL;
}

if (cd->muted[ch]) {
cd->mvolume[ch] = val;
} else {
ret = volume_set_chan(dev, ch, val);
if (ret)
return ret;
}
if (ret)
return ret;
}

schedule_task(&cd->volwork, VOL_RAMP_UPDATE_US,
VOL_RAMP_UPDATE_US);
if (!cd->vol_ramp_active)
schedule_task(&cd->volwork, VOL_RAMP_UPDATE_US,
VOL_RAMP_UPDATE_US);
break;

case SOF_CTRL_CMD_SWITCH:
trace_volume_with_ids(dev, "volume_ctrl_set_cmd(), "
"SOF_CTRL_CMD_SWITCH, "
"cdata->comp_id = %u", cdata->comp_id);
for (j = 0; j < cdata->num_elems; j++) {
trace_volume_with_ids(dev, "volume_ctrl_set_cmd(), "
"SOF_CTRL_CMD_SWITCH, "
"channel = %u, value = %u",
cdata->chanv[j].channel,
cdata->chanv[j].value);
i = cdata->chanv[j].channel;
if (i >= 0 && i < SOF_IPC_MAX_CHANNELS) {
if (cdata->chanv[j].value)
volume_set_chan_unmute(dev, i);
else
volume_set_chan_mute(dev, i);
} else {
ch = cdata->chanv[j].channel;
val = cdata->chanv[j].value;
trace_volume_with_ids(dev, "volume_ctrl_set_cmd(), channel = %d"
", value = %u", ch, val);
if (ch < 0 || ch >= SOF_IPC_MAX_CHANNELS) {
trace_volume_error_with_ids(dev,
"volume_ctrl_set_cmd() error: "
"SOF_CTRL_CMD_SWITCH, invalid i = %u",
i);
"volume_ctrl_set_cmd(), illegal channel = %d",
ch);
return -EINVAL;
}

if (val)
volume_set_chan_unmute(dev, ch);
else
volume_set_chan_mute(dev, ch);
}

schedule_task(&cd->volwork, VOL_RAMP_UPDATE_US,
VOL_RAMP_UPDATE_US);
if (!cd->vol_ramp_active)
schedule_task(&cd->volwork, VOL_RAMP_UPDATE_US,
VOL_RAMP_UPDATE_US);
break;

default:
Expand Down
6 changes: 3 additions & 3 deletions src/debug/gdb/ringbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#define BUFFER_OFFSET 0x120

volatile struct ring * const rx = (void *) SRAM_DEBUG_BASE;
volatile struct ring * const tx = (void *) SRAM_DEBUG_BASE + BUFFER_OFFSET;
volatile struct ring * const debug = (void *) SRAM_DEBUG_BASE +
(2*BUFFER_OFFSET);
volatile struct ring * const tx = (void *)(SRAM_DEBUG_BASE + BUFFER_OFFSET);
volatile struct ring * const debug = (void *)(SRAM_DEBUG_BASE +
(2 * BUFFER_OFFSET));

void init_buffers(void)
{
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/imx/sai.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

static void sai_start(struct dai *dai, int direction)
{
tracev_sai("SAI: sai_start");
trace_sai("SAI: sai_start");

dai_update_bits(dai, REG_SAI_XCSR(direction),
REG_SAI_CSR_FRDE, REG_SAI_CSR_FRDE);
Expand Down
Loading