samples/audio: Add Sound Open Firmware

Adds the Sound Open Firmware project, built as a Zephyr application,
under samples/subsys/sudio/sof.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2020-07-10 14:58:32 +01:00 committed by Maureen Helm
commit efa794dbc5
8 changed files with 98 additions and 0 deletions

View file

@ -0,0 +1,17 @@
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.13.1)
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
project(sample_sof)
target_sources(app PRIVATE
src/main.c
)
zephyr_interface_library_named(sof_lib)
zephyr_library_include_directories(app PUBLIC
${sof_module}/src/arch/xtensa/include
${sof_module}/src/include
)

View file

@ -0,0 +1,8 @@
CONFIG_APOLLOLAKE=y
CONFIG_INTEL_DMIC=y
CONFIG_INTEL_SSP=y
CONFIG_CORE_COUNT=1
CONFIG_LP_MEMORY_BANKS=2
CONFIG_HP_MEMORY_BANKS=8
CONFIG_PERFORMANCE_COUNTERS=y
CONFIG_COMP_SRC_SMALL=y

View file

@ -0,0 +1,7 @@
CONFIG_CANNONLAKE=y
CONFIG_INTEL_DMIC=y
CONFIG_INTEL_SSP=y
CONFIG_INTEL_ALH=y
CONFIG_LP_MEMORY_BANKS=1
CONFIG_HP_MEMORY_BANKS=47
CONFIG_PERFORMANCE_COUNTERS=y

View file

@ -0,0 +1,6 @@
CONFIG_ICELAKE=y
CONFIG_INTEL_DMIC=y
CONFIG_INTEL_SSP=y
CONFIG_INTEL_ALH=y
CONFIG_LP_MEMORY_BANKS=1
CONFIG_HP_MEMORY_BANKS=47

View file

@ -0,0 +1,6 @@
CONFIG_TIGERLAKE=y
CONFIG_INTEL_DMIC=y
CONFIG_INTEL_SSP=y
CONFIG_INTEL_ALH=y
CONFIG_LP_MEMORY_BANKS=1
CONFIG_HP_MEMORY_BANKS=46

View file

@ -0,0 +1,7 @@
CONFIG_SOF=y
CONFIG_SMP=n
CONFIG_LOG=y
CONFIG_MP_NUM_CPUS=1
# Requires heap_info() be implemented, but no Zephyr wrapper
CONFIG_DEBUG_MEMORY_USAGE_SCAN=n

View file

@ -0,0 +1,11 @@
sample:
description: Audio with SOF
name: sof
common:
tags: audio
tests:
sample.audio.sof:
tags: sof
build_only: true
integration_platforms:
- intel_adsp_cavs15

View file

@ -0,0 +1,36 @@
/*
* Copyright (c) 2020 Intel Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <logging/log.h>
LOG_MODULE_REGISTER(main, LOG_LEVEL_DBG);
/**
* Should be included from sof/schedule/task.h
* but triggers include chain issue
* FIXME
*/
int sof_main(int argc, char *argv[]);
/**
* TODO: Here comes SOF initialization
*/
void main(void)
{
int ret;
LOG_INF("SOF on %s", CONFIG_BOARD);
/* sof_main is actually SOF initialization */
ret = sof_main(0, NULL);
if (ret) {
LOG_ERR("SOF initialization failed");
}
LOG_INF("SOF initialized");
}