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:
parent
afefcd118f
commit
efa794dbc5
8 changed files with 98 additions and 0 deletions
17
samples/audio/sof/CMakeLists.txt
Normal file
17
samples/audio/sof/CMakeLists.txt
Normal 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
|
||||||
|
)
|
8
samples/audio/sof/boards/intel_adsp_cavs15.conf
Normal file
8
samples/audio/sof/boards/intel_adsp_cavs15.conf
Normal 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
|
7
samples/audio/sof/boards/intel_adsp_cavs18.conf
Normal file
7
samples/audio/sof/boards/intel_adsp_cavs18.conf
Normal 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
|
6
samples/audio/sof/boards/intel_adsp_cavs20.conf
Normal file
6
samples/audio/sof/boards/intel_adsp_cavs20.conf
Normal 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
|
6
samples/audio/sof/boards/intel_adsp_cavs25.conf
Normal file
6
samples/audio/sof/boards/intel_adsp_cavs25.conf
Normal 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
|
7
samples/audio/sof/prj.conf
Normal file
7
samples/audio/sof/prj.conf
Normal 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
|
11
samples/audio/sof/sample.yaml
Normal file
11
samples/audio/sof/sample.yaml
Normal 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
|
36
samples/audio/sof/src/main.c
Normal file
36
samples/audio/sof/src/main.c
Normal 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");
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue