Coder Social home page Coder Social logo

sof-docs's Introduction

sof-docs's People

Contributors

anton-intel avatar cujomalainey avatar dbaluta avatar dbkinder avatar dbogdzix avatar deb-intel avatar eurofun avatar fredoh9 avatar intelkevinputnam avatar jajanusz avatar jsarha avatar jxstelter avatar keyonjie avatar ktrzcinx avatar kv2019i avatar lbetlej avatar lgirdwood avatar lrgirdwo avatar lyakh avatar marc-hb avatar mmaka1 avatar mwasko avatar nklayman avatar plbossart avatar singalsu avatar stripes416 avatar tlauda avatar ujfalusi avatar xiulipan avatar ymdatta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sof-docs's Issues

"Hello World Tutorial" doesn't compile

Hello,
I the this article , until everything is ok. But when i try to compile the part "Hello World Tutorial" i got several errors such us:
errors
It seems that that example "Hello World Tutorial" is not updated,
please could someone provide a code from where i could start?

Thanks in advance

[FEATURE] Topology2 in depth docs

With the new richly featured topology system that has a lot of fields not self explanatory there needs to be a level documentation that someone completely unrelated to the project would be able to use the docs and references and generate new topologies for themselves (since this is essentially what 3P processors are doing). This would require detailed meaning for all fields, how they are used and no assumptions on knowledge of TLAs.

Cherry Trail Configuration

In the instruction a Cherry trail configuration is mentioned but some steps doesn't take this configuration into consideration.
Cherry trail is mentioned here:

for |CHT|:
.. code-block:: bash
mkdir build_cht && cd build_cht
cmake -DTOOLCHAIN=xtensa-cht-elf -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-cht-elf ..
make cherrytrail_defconfig
make bin -j4

but those steps couldnt't be executed, because previous steps doesn't include cherry trail configuration:

.. code-block:: bash
#Baytrail
./configure --target=xtensa-byt-elf --prefix=/home/$USER/work/sof/xtensa-root
make
make install
rm -fr rm etc/config.cache
#Haswell
./configure --target=xtensa-hsw-elf --prefix=/home/$USER/work/sof/xtensa-root
make
make install
rm -fr rm etc/config.cache
#Apollo Lake
./configure --target=xtensa-apl-elf --prefix=/home/$USER/work/sof/xtensa-root
make
make install
rm -fr rm etc/config.cache
#Cannon Lake
./configure --target=xtensa-cnl-elf --prefix=/home/$USER/work/sof/xtensa-root
make
make install

export PATH=~/work/sof/xtensa-byt-elf/bin/:$PATH
export PATH=~/work/sof/xtensa-hsw-elf/bin/:$PATH
export PATH=~/work/sof/xtensa-apl-elf/bin/:$PATH
export PATH=~/work/sof/xtensa-cnl-elf/bin/:$PATH

ls builds/
#xtensa-apl-elf xtensa-byt-elf xtensa-cnl-elf xtensa-hsw-elf
cp -r builds/* ~/work/sof/

.. code-block:: bash
#Baytrail
cp config-byt-gcc8.1-gdb8.1 .config
./ct-ng build
#Haswell
cp config-hsw-gcc8.1-gdb8.1 .config
./ct-ng build
#Apollo Lake
cp config-apl-gcc8.1-gdb8.1 .config
./ct-ng build
#Cannon Lake
cp config-cnl-gcc8.1-gdb8.1 .config
./ct-ng build

Clarify Docker build is just one option (was: build SOF fail with docker)

Transferred from sof to sof-docs, see November 18th comment below from @greg-intel why.

Describe the bug
I run ./docker-build.sh in .../sof_buiilder directory
the mirror http://isl.gforge.inria.fr/ is down
Then I stuck in downloading isl-0.19.tar.xz

the mirror http://isl.gforge.inria.fr/ is down
So I change mirror https://libisl.sourceforge.io , it can work
but the cnofig file in SOF project should be change, also.
When I git branch SOF project, the script also stuck here.

To Reproduce
I follow the instructions in SOF documentation

SOF_WORKSPACE=~/work/sof
mkdir -p "$SOF_WORKSPACE"
cd "$SOF_WORKSPACE"
git clone --recurse-submodules https://github.com/thesofproject/sof.git
cd "${SOF_WORKSPACE}"/sof/scripts/docker_build/sof_qemu
./docker-build.sh
cd "${SOF_WORKSPACE}"/sof/scripts/docker_build/sof_builder
./docker-build.sh <------ stuck here 

Reproduction Rate
always

Expected behavior
It should be work

Impact
I can not start my SOF project

Environment

Screenshots or console output

# log 
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20211116.004925
[INFO ]  Building environment variables
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[ERROR]    isl: download failed
[ERROR]   
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Retrieving needed toolchain components' tarballs'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
# relative script in Dockerfile
ARG GITHUB_SOF=https://github.com/thesofproject
ARG XT_OVERLAY_REPO=$GITHUB_SOF/xtensa-overlay.git
ARG CT_NG_REPO=$GITHUB_SOF/crosstool-ng.git
# build cross compiler
USER sof
RUN cd /home/sof && \
	git clone $CLONE_DEFAULTS --branch sof-gcc10.2 $XT_OVERLAY_REPO && \
	cd xtensa-overlay && cd ../ && \
	git clone $CLONE_DEFAULTS --branch sof-gcc10x $CT_NG_REPO && \
	mkdir -p /home/sof/work/ && \
	cd crosstool-ng && \
	./bootstrap && ./configure --prefix=`pwd` && make && make install && \
	for arch in byt hsw apl cnl imx imx8m imx8ulp rn; do \
		cp config-${arch}-gcc10.2-gdb9 .config && \

cmocka: update needed for cmocka usage

The cmocka page is missing some detail on the commands needed to build xtensa cmocka binary and any patch/diff needed to build such a static library. Instruction for building with GCC should also be provided.

Can't load firmware on UP Xtreme with 5.12 kernel

Transferred from sof-bin to sof-docs

Board: Up Xtreme board (WHL01), BIOS version 1.9 (UPW1AM19).

I have been using 5.10-rc7 kernel with 1.6.1 sof firmware and this has been working just fine.
But when I change to 5.12.0-rc8 kernel from torvalds/master the SOF firmware fails to load (see dmesg output at end of this ticket). I tried replacing the sof firmware with 1.7 from this repo, but get exactly the same problem.

I've tracked this to a kernel patch that went in between 5.10 and 5.12 that breaks firmware loading on Up Xtreme. If I revert commit thesofproject/linux@bd8036eb1526, the firmware loads ok:

Author: Pierre-Louis Bossart <[email protected]>
Date:   Mon Feb 8 17:18:53 2021 -0600

    ASoC: SOF: sof-pci-dev: add missing Up-Extreme quirk
    
    The UpExtreme board supports the community key and was missed in
    previous contributions. Add it to make sure the open firmware is
    picked by default without needing a symlink on the target.
    
    Fixes: 46207ca24545 ('ASoC: SOF: pci: change the default firmware path when the community key is used')
    Signed-off-by: Pierre-Louis Bossart <[email protected]>
    Reviewed-by: Bard Liao <[email protected]>
    Reviewed-by: Ranjani Sridharan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>

diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c
index 215711ac7450..9adf50b20a73 100644
--- a/sound/soc/sof/sof-pci-dev.c
+++ b/sound/soc/sof/sof-pci-dev.c
@@ -65,6 +65,13 @@ static const struct dmi_system_id community_key_platforms[] = {
                        DMI_MATCH(DMI_BOARD_NAME, "UP-APL01"),
                }
        },
+       {
+               .ident = "Up Extreme",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "AAEON"),
+                       DMI_MATCH(DMI_BOARD_NAME, "UP-WHL01"),
+               }

My sof firmware install has a /lib/firmware/intel/sof/community/ that matches the one from the v1.7 branch of this sof-bin github repository.

Error see if I do NOT revert the above patch:

[    2.608023] sof-audio-pci-intel-cnl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[    2.608036] sof-audio-pci-intel-cnl 0000:00:1f.3: enabling device (0000 -> 0002)
[    2.608195] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    2.610378] sof-audio-pci-intel-cnl 0000:00:1f.3: use msi interrupt mode
<SNIP>
[    2.615092] sof-audio-pci-intel-cnl 0000:00:1f.3: No SoundWire machine driver found
[    2.615094] sof-audio-pci-intel-cnl 0000:00:1f.3: warning: No matching ASoC machine driver found
[    2.615095] sof-audio-pci-intel-cnl 0000:00:1f.3: Using nocodec machine driver
[    2.628716] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 1:7:0-47d07
[    2.628719] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:18:1 Kernel ABI 3:18:0
[    2.628725] sof-audio-pci-intel-cnl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
<SNIP>
[    5.696645] sof-audio-pci-intel-cnl 0000:00:1f.3: error: cl_copy_fw: timeout HDA_DSP_SRAM_REG_ROM_STATUS read
[    5.696675] sof-audio-pci-intel-cnl 0000:00:1f.3: error: status = 0x0000002c panic = 0x00000000
[    5.696716] sof-audio-pci-intel-cnl 0000:00:1f.3: error: extended rom status:  0x80000012 0x2c 0x0 0x0 0x0 0x0 0x1811102 0x0                                                                                                         
[    5.696732] sof-audio-pci-intel-cnl 0000:00:1f.3: error: load fw failed ret: -110
[    5.696765] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to reset DSP
[    5.696771] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to boot DSP firmware -110
[    5.747966] sof-audio-pci-intel-cnl 0000:00:1f.3: error: hda_dsp_core_reset_enter: timeout on HDA_DSP_REG_ADSPCS read                                                                                                                
[    5.747981] sof-audio-pci-intel-cnl 0000:00:1f.3: error: dsp core reset failed: core_mask 1
[    5.748162] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to probe DSP hardware!
[    5.748497] sof-audio-pci-intel-cnl: probe of 0000:00:1f.3 failed with error -110

End-user documentation and bug reporting

I'm not sure if this is the correct place for documentation requests, feel free to point me to the right place.

I had a rather difficult time finding SOF firmware logs with the official kernel from my distribution when trying to debug thesofproject/sof#3868. One of the reasons is that it is still not clear to me, as an end-user relatively unfamiliar with SOF/kernel development, exactly how to get logs in a reliable way in either my own or my distribution's kernel builds.

The questions below are things I'm wondering or found out while doing research.


What's the difference between trace and etrace?

The documentation on the Logger mentions the existence of two files, /sys/kernel/debug/sof/trace and /sys/kernel/debug/sof/etrace.

  • What are they?
  • Why two of them?

Since there are two options, and my distro's official kernel only has etrace enabled by default, my hypothesis is that trace has more overhead/is more detailed, and as such is not enabled in default builds. Am I correct?

How to enable log tracing?

By default on my distro's official build etrace is empty and trace doesn't exist, but in custom builds I do following the build instructions both show messages.

  • What kernel compilation options control them? Should I need only CONFIG_SND_SOC_SOF_DEBUG and CONFIG_SND_SOC_SOF_DEBUG_ENABLE_FIRMWARE_TRACE?
  • Can I enable them dynamically without having to recompile my distro's official kernel?

What is dynamic debug, is that different from the logger?

This page suggests to use dynamic debug options. Should I expect to get different kinds of information than from the logger (other than the fact that the logs go into the dmesg output instead of a separate tool)?

Update list of development HW to include new boards from Intel, AMD, NXP, Mediatek and Google

sof docs list some older development hardware platforms, but does not list recommended development HW and links. A new HW list should be added to include latest recommended public developer HW from Intel, AMD, NXP, Mediatek and Google.

@dbaluta @yaochunhung @kuanhsunchen @bhiregoudar @sunilkumardommati @mengdonglin @cujomalainey

We could add a table to the end of https://thesofproject.github.io/latest/platforms/index.html for recommended HW that developers should use for developing code on our platforms. This could include some links, costs, features etc. Comments ?

How to test firmware and topology files

Hello,
I follow the tutorial , I modify a little the file amp.c taking into count the switch.c and volume.c , The files compiles.

The code amp.c is:

#include <sof/audio/component.h>
#include <sof/lib/alloc.h>


DECLARE_SOF_RT_UUID("amp", amp_uuid, 0x1d501197, 0xda27, 0x4697,
                 0x80, 0xc8, 0x4e, 0x69, 0x4d, 0x36, 0x00, 0xa0);

DECLARE_TR_CTX(amp_tr, SOF_UUID(amp_uuid), LOG_LEVEL_INFO);

struct amp_comp_data {
        int placeholder;
};

static struct comp_dev *amp_new(const struct comp_driver *drv,
                                struct comp_ipc_config *comp,
                                void *spec);
static void amp_free(struct comp_dev *dev);

static int amp_trigger(struct comp_dev *dev, int cmd);

static int amp_prepare(struct comp_dev *dev);

static int amp_reset(struct comp_dev *dev);

static int amp_copy(struct comp_dev *dev);



struct comp_driver comp_amp = {
    .type = SOF_COMP_AMP,
    .uid = SOF_RT_UUID(amp_uuid),
    .tctx = &amp_tr,
    .ops = {
            .create = amp_new,
            .free = amp_free,
            .params = NULL,
            .cmd = NULL,
            .trigger = amp_trigger,
            .prepare = amp_prepare,
            .reset = amp_reset,
            .copy = amp_copy,
    },
};

static SHARED_DATA struct comp_driver_info comp_amp_info = {
    .drv = &comp_amp,
};

static void sys_comp_amp_init(void)
{
    comp_register(platform_shared_get(&comp_amp_info,sizeof(comp_amp_info)));
}

/**
 *\brief Creat amp component
 *
 *\return Pointer to amp base component device.
**/
static struct comp_dev *amp_new(const struct comp_driver *drv,
                                struct comp_ipc_config *comp,
                                void *spec)
{
    struct comp_dev *dev;
    //struct ipc_config_amp *ampli = spec;
    struct amp_comp_data *cd;

    comp_cl_dbg(&comp_amp, "amp_new()");
    
    //struct sof_ipc_comp_process *amp;
    /*
    struct sof_ipc_comp_process *ipc_amp
            = (struct sof_ipc_comp_process *) comp;
    */
    
    //Allocates memory for the component device and initializes common part
    dev = comp_alloc(drv, sizeof(struct comp_dev));

    if(!dev){
        rfree(dev);
        return NULL;
    }
    dev->ipc_config = *comp;

    cd = rzalloc(SOF_MEM_ZONE_RUNTIME, 0, SOF_MEM_CAPS_RAM, sizeof(*cd));

    if(!cd){
        rfree(dev);
        return NULL;
    }

    //amp = COMP_GET_IPC(dev, sof_ipc_comp_process);
    //int ret;
    //ret = memcpy_s(amp,sizeof(*amp),ipc_amp,sizeof(struct sof_ipc_comp_process)));
    //assert(!ret);

    comp_set_drvdata(dev, cd);
    dev->state = COMP_STATE_READY;

    comp_dbg(dev, "amplifier created");
    
    return dev;
}

// Destructor
static void amp_free(struct comp_dev *dev)
{
    struct comp_data *cd = comp_get_drvdata(dev);
    rfree(cd);
    rfree(dev);
}

//State Transition handler
static int amp_trigger(struct comp_dev *dev, int cmd)
{
    comp_dbg(dev, "amplifier got trigger cm %d, cmd");
    return comp_set_state(dev, cmd);    
}

// Stream Parameters Handler
static int amp_prepare(struct comp_dev *dev)
{
    int ret;
    struct comp_buffer *sink_buf;
    //struct sof_ipc_comp_config *config = dev_comp_config(dev);

    uint32_t sink_per_bytes;

    ret = comp_set_state(dev, COMP_TRIGGER_PREPARE);
    if(ret<0)
        return ret;
    
    if(ret==COMP_STATUS_STATE_ALREADY_SET)
        return PPL_STATUS_PATH_STOP;

    sink_buf = list_first_item(&dev->bsink_list, struct comp_buffer, source_list);

    sink_per_bytes = audio_stream_period_bytes(&sink_buf->stream, dev->frames);

    if(sink_buf->stream.size < dev->ipc_config.periods_sink * sink_per_bytes)
    {
        comp_err(dev, "amp_prepare(): sink_buffer size is insuficient");
        return -ENOMEM;
    }

    comp_dbg(dev, "amplifier prepared");
    return 0;
}

// Reset Handler
static int amp_reset(struct comp_dev *dev)
{
    return comp_set_state(dev, COMP_TRIGGER_RESET);
}

// Signal processing function

static int amp_copy(struct comp_dev *dev)
{
    struct comp_copy_limits cl;
    struct comp_buffer *source;
    struct comp_buffer *sink;
    int frame;
    int channel;
    uint32_t buff_frag = 0;
    uint16_t *src;
    uint16_t *dst;

    source = list_first_item(&dev->bsource_list, struct comp_buffer, sink_list);
    sink = list_first_item(&dev->bsink_list,struct comp_buffer,source_list);

    comp_get_copy_limits_with_lock(source, sink, &cl);
    //buffer_invalidate(source, cl.source_bytes);

    for (frame = 0; frame < cl.frames; frame++){
        for (channel = 0; channel < sink->stream.channels; channel++){
            src = audio_stream_read_frag_s16(&source->stream, buff_frag);
            dst = audio_stream_write_frag_s16(&sink->stream, buff_frag);

            *dst = *src;
            ++buff_frag;
        }
    }
    //buffer_writeback(sink, cl.sink_bytes);

    comp_update_buffer_produce(sink, cl.sink_bytes);
    //comp_update_buffer_comsume(source, cl.source_bytes);

    return 0;

}

DECLARE_MODULE(sys_comp_amp_init);

I used the next topology file from here :

#
# Topology for i.MX8MP board with wm8904 codec
#

# Include topology builder
include(`utils.m4')
include(`dai.m4')
include(`pipeline.m4')
include(`sai.m4')
include(`pcm.m4')
include(`buffer.m4')

# Include TLV library
include(`common/tlv.m4')

# Include Token library
include(`sof/tokens.m4')

# Include DSP configuration
include(`platform/imx/imx8.m4')

#
# Define the pipelines
#
# PCM0 <----> volume <-----> SAI3 (wm8904)
#

dnl PIPELINE_PCM_ADD(pipeline,
dnl     pipe id, pcm, max channels, format,
dnl     period, priority, core,
dnl     pcm_min_rate, pcm_max_rate, pipeline_rate,
dnl     time_domain, sched_comp)

# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Set 1000us deadline with priority 0 on core 0
PIPELINE_PCM_ADD(sof/pipe-`PPROC'-playback-4test.m4,
	1, 0, 2, s32le,
	1000, 0, 0,
	44100, 44100, 44100)

# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Set 1000us deadline with priority 0 on core 0
PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
	2, 0, 2, s32le,
	1000, 0, 0,
	44100, 44100, 44100)
#
# DAIs configuration
#

dnl DAI_ADD(pipeline,
dnl     pipe id, dai type, dai_index, dai_be,
dnl     buffer, periods, format,
dnl     period, priority, core, time_domain)

# playback DAI is SAI3 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
	1, SAI, 3, sai3-wm8904-hifi,
	PIPELINE_SOURCE_1, 2, s32le,
	1000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA)

# capture DAI is SAI3 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-capture.m4,
	2, SAI, 3, sai3-wm8904-hifi,
	PIPELINE_SINK_2, 2, s32le,
	1000, 0, 0)

# PCM Low Latency, id 0

dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture)
PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2)

dnl DAI_CONFIG(type, idx, link_id, name, sai_config)
DAI_CONFIG(SAI, 3, 0, sai3-wm8904-hifi,
	SAI_CONFIG(I2S, SAI_CLOCK(mclk, 11565177, codec_mclk_in),
		SAI_CLOCK(bclk, 1411200, codec_provider),
		SAI_CLOCK(fsync, 44100, codec_provider),
        SAI_TDM(2, 32, 3, 3),
		SAI_CONFIG_DATA(SAI, 3, 0)))

and this pipe-volume-playback-4test.m :

# Low Latency Passthrough with volume Pipeline and PCM
#
# Pipeline Endpoints for connection are :-
#
#  host PCM_P --> B0 --> Volume 0 --> B1 --> sink DAI0

# Include topology builder
include(`utils.m4')
include(`buffer.m4')
include(`pcm.m4')
include(`pga.m4')
include(`dai.m4')
include(`mixercontrol.m4')
include(`bytecontrol.m4') # ADDED
include(`pipeline.m4')
include(`amp.m4') # ADDED


#
# Controls
#
# Volume Mixer control with max value of 32
C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
	CONTROLMIXER_OPS(volsw, 256 binds the mixer control to volume get/put handlers, 256, 256),
	CONTROLMIXER_MAX(, 32),
	false,
	CONTROLMIXER_TLV(TLV 32 steps from -64dB to 0dB for 2dB, vtlv_m64s2),
	Channel register and shift for Front Left/Right,
	VOLUME_CHANNEL_MAP)

#
# Volume configuration
#

define(DEF_PGA_TOKENS, concat(`pga_tokens_', PIPELINE_ID))
define(DEF_PGA_CONF, concat(`pga_conf_', PIPELINE_ID))

W_VENDORTUPLES(DEF_PGA_TOKENS, sof_volume_tokens,
LIST(`		', `SOF_TKN_VOLUME_RAMP_STEP_TYPE	"2"'
     `		', `SOF_TKN_VOLUME_RAMP_STEP_MS		"20"'))

W_DATA(DEF_PGA_CONF, DEF_PGA_TOKENS)


############### ADDED ###############
# Amp Parameters
include(`amp_bytes.m4')

# Amp Bytes control with max value of 140
# The max size needs to also take into account the space required to hold the control data IPC message
# struct sof_ipc_ctrl_data requires 92 bytes
# AMP priv in amp_bytes.m4 (ABI header (32 bytes) + 2 dwords) requires 40 bytes
# Therefore at least 132 bytes are required for this kcontrol
# Any value lower than that would end up in a topology load error

C_CONTROLBYTES(AMP, PIPELINE_ID,
     CONTROLBYTES_OPS(bytes, 258 binds the control to bytes get/put handlers, 258, 258),
     CONTROLBYTES_EXTOPS(258 binds the control to bytes get/put handlers, 258, 258),
     , , ,
     CONTROLBYTES_MAX(, 140),
     ,
     AMP_priv)

#####################################

#
# Components and Buffers
#

# Host "Passthrough Playback" PCM
# with 2 sink and 0 source periods
W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, 2, 0, SCHEDULE_CORE)

# "Volume" has 2 source and x sink periods
W_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 2, DEF_PGA_CONF, SCHEDULE_CORE,
	LIST(`		', "PIPELINE_ID Master Playback Volume"))

############### ADDED ###############
# "Amp" has 2 sink periods and 2 source periods
W_AMP(0, PIPELINE_FORMAT, 2, 2, SCHEDULE_CORE,
     LIST(`           ', "AMP"))
#####################################

# Playback Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(2,
	COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
	PLATFORM_HOST_MEM_CAP, SCHEDULE_CORE)
W_BUFFER(1, COMP_BUFFER_SIZE(DAI_PERIODS,
	COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
	PLATFORM_DAI_MEM_CAP, SCHEDULE_CORE)

############### ADDED ###############
# W_BUFFER(name, size, capabilities)

W_BUFFER(2, COMP_BUFFER_SIZE(2,
     COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
     PLATFORM_HOST_MEM_CAP)

#####################################

#
# Pipeline Graph
#
#  host PCM_P --> B2 --> Amp -> B0 --> Volume 0 --> B1 --> sink DAI0

P_GRAPH(pipe-volume-playback-4test, PIPELINE_ID,
	LIST(`		',
	`dapm(N_BUFFER(2), N_PCMP(PCM_ID))',
     `dapm(N_AMP(0), N_BUFFER(2))',
	`dapm(N_BUFFER(0), N_AMP(0))',
	`dapm(N_PGA(0), N_BUFFER(0))',
	`dapm(N_BUFFER(1), N_PGA(0))'))

#
# Pipeline Source and Sinks
#
indir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(1))
indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_ID)

ifdef(`CHANNELS_MIN',`define(`LOCAL_CHANNELS_MIN', `CHANNELS_MIN')',
`define(`LOCAL_CHANNELS_MIN', `2')')

#
# PCM Configuration

#
PCM_CAPABILITIES(Passthrough Playback PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, LOCAL_CHANNELS_MIN, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)

undefine(`LOCAL_CHANNELS_MIN')
undefine(`DEF_PGA_TOKENS')
undefine(`DEF_PGA_CONF')

Could you explain me if this function COMP_GET_IPC(dev, sof_ipc_comp_process) is still needed? , Sorry if my questions are too basic.
How could i test this firmware from the tutorial ?

Thanks in advanced

Is DYNAMIC_INTERRUPTS mandatory in the sof system?

Is DYNAMIC_INTERRUPTS mandatory in the sof system?
I plan to call the sof library in zephyr, maybe my soc does not support dynamic interrupt.
What is the reason for the need for dynamic interrupt enable in sof?

If CONFIG_LIBRARY is enabled, is it necessary to enable dynamic interrupts?

file : modules\audio\sof\zephyr\wrapper.c

/* Confirm Zephyr config settings - TODO: Use ASSERT */
#if !CONFIG_DYNAMIC_INTERRUPTS
#error Define CONFIG_DYNAMIC_INTERRUPTS
#endif

.gitmodules instead of asking for additional repo clone steps on source?

In the instructions for building SOF from source, devs are asked to clone alsa-lib, alsa-utils, xtensa-overlay, and crosstool-ng into the SOF_WORKSPACE directory. is there no reason we don't just have these as submodules with something like this? It would greatly reduce the complexity of the "build from source" instructions.

[submodule "alsa-lib"]
        path = alsa-lib
        url = git://git.alsa-project.org/alsa-lib
[submodule "alsa-utils"]
        path = alsa-utils
        url = git://git.alsa-project.org/alsa-utils
[submodule "xtensa-overlay"]
        path = xtensa-overlay
        url = https://github.com/thesofproject/xtensa-overlay
        branch = sof-gcc10.2
[submodule "crosstool-ng"]
        path = crosstool-ng
        url = https://github.com/thesofproject/crosstool-ng
        branch = sof-gcc10x

remove the prompt in all bash examples

Make sure people can just copy/paste instructions in a terminal window for all bash examples

Instructions such as

$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update
$ sudo apt-get install gcc-7 g++-7
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7

should really be

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7

Add Algorithms input & output capabilities

It would be useful to provide input / output capabilities of SOF FW Algorithms.

The documentation could be as a table of supported format variations on input & output
Input
Pins count | Sampling Rate formats | Number of Channels | Sample Size | Container Size
Output
Pins count | Sampling Rate formats | Number of Channels | Sample Size | Container Size

build-from-scratch instructions incorrect

the following instructions are incorrect

#Baytrail
$ ./configure --target=xtensa-byt-elf --prefix=/home/$USER/work/sof/xtensa-root
$ make
$ make install
#Haswell
$ ./configure --target=xtensa-hsw-elf --prefix=/home/$USER/work/sof/xtensa-root
$ make
$ make install
#Apollo Lake
$ ./configure --target=xtensa-apl-elf --prefix=/home/$USER/work/sof/xtensa-root
$ make
$ make install
#Cannon Lake
$ ./configure --target=xtensa-cnl-elf --prefix=/home/$USER/work/sof/xtensa-root
$ make
$ make install

it's necessary to do a

rm etc/config.cache

between platforms

'ImageDraw' object has no attribute 'textsize' warning with new pillow version 10.0.0

On July 1st, python library "Pillow" (needed by sphinxcontrib.blockdiag) released version 10.0.0
https://pypi.org/project/Pillow/#history

The sof-docs build immediately started to fail with the warning below.

https://github.com/thesofproject/sof/actions/workflows/daily-tests.yml
https://github.com/thesofproject/sof/actions/runs/5433906267/jobs/9881925923

WARNING: dot code 'blockdiag edf_scheduling {\n\n\tnode_width = 250;\n\tnode_height = 120;\n\tdefault_fontsize = 16;\n\n\tComp_1 -> Comp_2\n\tcomment_1 -> Comp_2 [style=dashed]\n\tComp_2 -> Comp_3\n\tcomment_2 -> Comp_3 [style=dashed]\n\tComp_3 -> Comp_4\n\tcomment_3 -> Comp_4 [style=dashed]\n\tComp_4 -> sink\n\tcomment_4 -> sink [style=dashed]\n\n\tComp_1 [label="DP component 1\n\n\t\tprocessing period\n\n\t\tcompute requirement"]\n\tComp_2 [label="DP component 2\n\n\t\tprocessing period\n\n\t\tcompute requirement"]\n\tComp_3 [label="DP component 3\n\n\t\tprocessing period\n\n\t\tcompute requirement"]\n\tComp_4 [label="DP component 4\n\n\t\tprocessing period\n\n\t\tcompute requirement"]\n\n\tsink [label="real time sink", shape=endpoint, fontsize = 16]\n\n\tcomment_1 [label="DP1 to deliver data let\n\n\t\tDP2 meet its objective"]\n\tcomment_2 [label="DP2 to deliver data let\n\n\t\tDP3 meet its objective"]\n\tcomment_3 [label="DP3 to deliver data let\n\n\t\tDP4 meet its objective"]\n\tcomment_4 [label="DP4 to deliver data\n\n\t\tto real time-sink"]\n}\n': 'ImageDraw' object has no attribute 'textsize'
generating indices... genindex done

Also seen in recent sof-docs PRs:
https://github.com/thesofproject/sof-docs/actions/runs/5461579335/jobs/9939764550

To reproduce:

pip3 install -r scripts/requirements.txt
# override the debian package python3-pil or whatever else
pip3 install pillow==10.0.0

Collecting Pillow==10
  Using cached Pillow-10.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)

# It's just a warning so we need a re-build
make clean
# ... or this shortcut seems to be enough
rm _build/html/architectures/firmware/sof-zephyr/mpp_layer/mpp_scheduling.html
Screenshot 2023-07-10 at 17 01 56

Undefined AM_GNU_GETTEXT when building alsa-utils [WSL2 Ubuntu 20.04 LTS (Windows)]

I am following Getting Started instructions to build SOF on WSL2 Ubuntu 20.04 LTS (Windows) and i was able to successfully compile ALSA libraries. I am however stuck on compiling alsa-utils with the following errors:

configure.ac:10: error: possibly undefined macro: AM_GNU_GETTEXT
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:11: error: possibly undefined macro: AM_GNU_GETTEXT_VERSION

Here below is the complete output after executing ./gitcompile

configure.ac:10: warning: macro 'AM_GNU_GETTEXT' not found in library
configure.ac:11: warning: macro 'AM_GNU_GETTEXT_VERSION' not found in library
./gitcompile: line 10: gettextize: command not found
configure.ac:15: installing './compile'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
alsactl/Makefile.am: installing './depcomp'
axfer/test/Makefile.am:9: warning: source file '../container.c' is in a subdirectory,
axfer/test/Makefile.am:9: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled. For now, the corresponding output
automake: object file(s) will be placed in the top-level directory. However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
axfer/test/Makefile.am:9: warning: source file '../container-riff-wave.c' is in a subdirectory,
axfer/test/Makefile.am:9: but option 'subdir-objects' is disabled
axfer/test/Makefile.am:9: warning: source file '../container-au.c' is in a subdirectory,
axfer/test/Makefile.am:9: but option 'subdir-objects' is disabled
axfer/test/Makefile.am:9: warning: source file '../container-voc.c' is in a subdirectory,
axfer/test/Makefile.am:9: but option 'subdir-objects' is disabled
axfer/test/Makefile.am:9: warning: source file '../container-raw.c' is in a subdirectory,
axfer/test/Makefile.am:9: but option 'subdir-objects' is disabled
axfer/test/Makefile.am:20: warning: source file '../container.c' is in a subdirectory,
axfer/test/Makefile.am:20: but option 'subdir-objects' is disabled
axfer/test/Makefile.am:20: warning: source file '../container-riff-wave.c' is in a subdirectory,
axfer/test/Makefile.am:20: but option 'subdir-objects' is disabled
axfer/test/Makefile.am:20: warning: source file '../container-au.c' is in a subdirectory,
axfer/test/Makefile.am:20: but option 'subdir-objects' is disabled
axfer/test/Makefile.am:20: warning: source file '../container-voc.c' is in a subdirectory,
axfer/test/Makefile.am:20: but option 'subdir-objects' is disabled
axfer/test/Makefile.am:20: warning: source file '../container-raw.c' is in a subdirectory,
axfer/test/Makefile.am:20: but option 'subdir-objects' is disabled
axfer/test/Makefile.am:20: warning: source file '../mapper.c' is in a subdirectory,
axfer/test/Makefile.am:20: but option 'subdir-objects' is disabled
axfer/test/Makefile.am:20: warning: source file '../mapper-single.c' is in a subdirectory,
axfer/test/Makefile.am:20: but option 'subdir-objects' is disabled
axfer/test/Makefile.am:20: warning: source file '../mapper-multiple.c' is in a subdirectory,
axfer/test/Makefile.am:20: but option 'subdir-objects' is disabled
parallel-tests: installing './test-driver'
configure.ac:10: error: possibly undefined macro: AM_GNU_GETTEXT
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:11: error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
CFLAGS=-O2 -Wall -pipe -g
./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
./configure: line 2937: syntax error near unexpected token external' ./configure: line 2937: AM_GNU_GETTEXT(external)'

docker build for imx8 not working out of the box

The getting started nxp page mentions building inside a docker container as an option and refers to https://thesofproject.github.io/latest/getting_started/build-guide/build-with-docker.html
Too bad that the container installed after following this page doesn't contain an aarch64 toolchain. sof branch is a one week old 'main'.

Inside the container I had to
apt update && apt-get install gcc-aarch64-linux-gnu

and make the following changes after the toolchain install was committed to a new container 'mysof':

diff --git a/scripts/build-tools.sh b/scripts/build-tools.sh
index 49f0eeaa7..f9e0afed0 100755
--- a/scripts/build-tools.sh
+++ b/scripts/build-tools.sh
@@ -38,7 +38,7 @@ reconfigure_build()
         mkdir -p "$BUILD_TOOLS_DIR"
 
         ( cd "$BUILD_TOOLS_DIR"
-          cmake -GNinja -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" "${SOF_REPO}/tools"
+          cmake -DCMAKE_TOOLCHAIN_FILE=../scripts/cross-arch64.cmake -GNinja -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" "${SOF_REPO}/tools"
         )
 }
 
diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh
index 29d7ebc0f..573bbc88a 100755
--- a/scripts/docker-run.sh
+++ b/scripts/docker-run.sh
@@ -44,4 +44,4 @@ docker run -i -v "${SOF_TOP}":/home/sof/work/sof.git \
        --env https_proxy="$https_proxy" \
        --user "$(id -u)" \
        $SOF_DOCKER_RUN \
-       thesofproject/sof "$@"
+       mysof "$@"
diff --git a/scripts/xtensa-build-all.sh b/scripts/xtensa-build-all.sh
index 05cb8f13d..233e32f4d 100755
--- a/scripts/xtensa-build-all.sh
+++ b/scripts/xtensa-build-all.sh
@@ -190,7 +190,7 @@ fi
 
 OLDPATH=$PATH
 CURDIR="$(pwd)"
-
+git config --global --add safe.directory /home/sof/work/sof.git
 # build platforms
 for platform in "${PLATFORMS[@]}"
 do

For the xtensa toolchain the docs say 'contact nxp support' but as far as I know everybody can download them directly from cadence (after some registration). So some installation instructions could be helpful - personally I don't care right now as gcc does its job sufficiently good.

Under https://thesofproject.github.io/latest/developer_guides/debugability/logger/index.html there are only instructions on how to disable suspend for intel (plus there is one tiny spelling error on this page: sof-loggerr ).
For imx8mp this works:
/sys/class/devlink/platform:power-domains:audiomix-pd--platform:3b6e8000.dsp/consumer/power# echo on>control

https://thesofproject.github.io/latest/developer_guides/topology/topology.html#debug-topology :

root@d73e8cbcbd51:~/work/sof.git/tools/topology/topology1# m4 -I m4 -I common -I platform/common --define=GRAPH sof-imx8-nocodec.m4 2> test.dot
root@d73e8cbcbd51:~/work/sof.git/tools/topology/topology1# cat test.dot 
"PCM0P"->"BUF1.0"
"BUF1.0"->"PGA1.0"
"PGA1.0"->"BUF1.1"
"BUF1.1"->"ESAI0.OUT"

dot -Tpng -o a.png tools/topology/topology1/test.dot
Error: tools/topology/topology1/test.dot: syntax error in line 1 near '"'

Isn't there a digraph G {} missing? At least I can't get dot to produce an image without that... I guess it's debatable whether this is
a) related to the original topic of this issue (sorry) and b) should be fixed in the documentation or elsewhere.

sof-eqctl

Is there any method to determine when SOF is idle?

The equalizer can be updated only when SOF is idle. Update during
playback is not currently supported and when attempted the playback
will continue with existing setting. The driver will re-send to
configuration when DSP is not busy.

I couldn't get success result when executing

sof-eqctl -Dhw:0 -n 22 -s eq_iir_bandpass.txt

until I reboot the OS. The instruction doesn't mention what to do if we don't get success result and what eventually could be the culprit.

Host build / testbench docs

There is almost no info about testbench in docs (only how to build it).
We need description telling what it is and how to use it.

Problem with modifying topology files

Hello,
I have been following the Hello World Tutorial, and in the Part II - Modifying the Topology & Driver I got the following output:

-- The C compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- No CMAKE_BUILD_TYPE, defaulting to Debug
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kubuntu/Documents/work/sof/sof/tools/build_tools
-- The C compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for one of the modules 'glib-2.0'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kubuntu/Documents/work/sof/sof/tools/build_tools/fuzzer

  • cmake --build /home/kubuntu/Documents/work/sof/sof/tools/build_tools --
    [  0%] Built target abi_v1
    [  0%] Generating production/main-topology.conf
    [  0%] Generating production/main-topology.tplg
    ALSA lib conf.c:2005:(_snd_config_load_with_include) toplevel:21:49:Unexpected char
    ALSA lib parser.c:223:(tplg_load_config) could not load configuration
    Unable to load configuration: Invalid argument
    topology/topology1/CMakeFiles/topology1_main-topology.dir/build.make:72: recipe for target 'topology/topology1/production/main-topology.tplg' failed
    make[2]: *** [topology/topology1/production/main-topology.tplg] Error 1
    CMakeFiles/Makefile2:5081: recipe for target 'topology/topology1/CMakeFiles/topology1_main-topology.dir/all' failed
    make[1]: *** [topology/topology1/CMakeFiles/topology1_main-topology.dir/all] Error 2
    Makefile:135: recipe for target 'all' failed
    make: *** [all] Error 2

I don catch where is the error, then i tried to modify sof-imx8mp-wm8904.m4 , it can be compiled, I where the pipe-volume-playback-4test.m4 file is modified with small changes in order to find out where is the error.

The code for pipe-volume-playback-4test.m4 is:

# Low Latency Passthrough with volume Pipeline and PCM
#
# Pipeline Endpoints for connection are :-
#
#  host PCM_P --> B0 --> Volume 0 --> B1 --> sink DAI0

# Include topology builder
include(`utils.m4')
include(`buffer.m4')
include(`pcm.m4')
include(`pga.m4')
include(`dai.m4')
include(`mixercontrol.m4')
include(`bytecontrol.m4') # ADDED
include(`pipeline.m4')
include(`amp.m4') # ADDED

#
# Controls
#
# Volume Mixer control with max value of 32
C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
	CONTROLMIXER_OPS(volsw, 256 binds the mixer control to volume get/put handlers, 256, 256),
	CONTROLMIXER_MAX(, 32),
	false,
	CONTROLMIXER_TLV(TLV 32 steps from -64dB to 0dB for 2dB, vtlv_m64s2),
	Channel register and shift for Front Left/Right,
	VOLUME_CHANNEL_MAP)

#
# Volume configuration
#

define(DEF_PGA_TOKENS, concat(`pga_tokens_', PIPELINE_ID))
define(DEF_PGA_CONF, concat(`pga_conf_', PIPELINE_ID))

W_VENDORTUPLES(DEF_PGA_TOKENS, sof_volume_tokens,
LIST(`		', `SOF_TKN_VOLUME_RAMP_STEP_TYPE	"2"'
     `		', `SOF_TKN_VOLUME_RAMP_STEP_MS		"20"'))

W_DATA(DEF_PGA_CONF, DEF_PGA_TOKENS)


############### ADDED ###############
# Amp Parameters
include(`amp_bytes.m4')

# Amp Bytes control with max value of 140
# The max size needs to also take into account the space required to hold the control data IPC message
# struct sof_ipc_ctrl_data requires 92 bytes
# AMP priv in amp_bytes.m4 (ABI header (32 bytes) + 2 dwords) requires 40 bytes
# Therefore at least 132 bytes are required for this kcontrol
# Any value lower than that would end up in a topology load error
C_CONTROLBYTES(AMP, PIPELINE_ID,
     CONTROLBYTES_OPS(bytes, 258 binds the control to bytes get/put handlers, 258, 258),
     CONTROLBYTES_EXTOPS(258 binds the control to bytes get/put handlers, 258, 258),
     , , ,
     CONTROLBYTES_MAX(, 140),
     ,
     AMP_priv)
#####################################

#
# Components and Buffers
#

# Host "Passthrough Playback" PCM
# with 2 sink and 0 source periods
W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, 2, 0, SCHEDULE_CORE)

# "Volume" has 2 source and x sink periods
W_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 2, DEF_PGA_CONF, SCHEDULE_CORE,
	LIST(`		', "PIPELINE_ID Master Playback Volume"))

# Playback Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(2,
	COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
	PLATFORM_HOST_MEM_CAP, SCHEDULE_CORE)
W_BUFFER(1, COMP_BUFFER_SIZE(DAI_PERIODS,
	COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
	PLATFORM_DAI_MEM_CAP, SCHEDULE_CORE)

#
# Pipeline Graph
#
#  host PCM_P --> B0 --> Volume 0 --> B1 --> sink DAI0

P_GRAPH(pipe-volume-playback, PIPELINE_ID,
	LIST(`		',
	`dapm(N_BUFFER(0), N_PCMP(PCM_ID))',
	`dapm(N_PGA(0), N_BUFFER(0))',
	`dapm(N_BUFFER(1), N_PGA(0))'))

#
# Pipeline Source and Sinks
#
indir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(1))
indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_ID)

ifdef(`CHANNELS_MIN',`define(`LOCAL_CHANNELS_MIN', `CHANNELS_MIN')',
`define(`LOCAL_CHANNELS_MIN', `2')')

#
# PCM Configuration

#
PCM_CAPABILITIES(Passthrough Playback PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, LOCAL_CHANNELS_MIN, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)

undefine(`LOCAL_CHANNELS_MIN')
undefine(`DEF_PGA_TOKENS')
undefine(`DEF_PGA_CONF')

After compilation, i got :

  • cmake --build /home/kubuntu/Documents/work/sof/sof/tools/build_tools --
    [ 0%] Built target abi_v1
    [ 1%] Generating production/sof-imx8mp-wm8904.conf
    [ 1%] Generating production/sof-imx8mp-wm8904.tplg
    ALSA lib data.c:1375:(tplg_parse_data) failed to parse data bytes
    ALSA lib parser.c:231:(tplg_load_config) failed to parse topology
    Unable to load configuration: Invalid argument
    topology/topology1/CMakeFiles/topology1_sof-imx8mp-wm8904.dir/build.make:72: recipe for target 'topology/topology1/production/sof-imx8mp-wm8904.tplg' failed
    make[2]: *** [topology/topology1/production/sof-imx8mp-wm8904.tplg] Error 1
    CMakeFiles/Makefile2:5081: recipe for target 'topology/topology1/CMakeFiles/topology1_sof-imx8mp-wm8904.dir/all' failed
    make[1]: *** [topology/topology1/CMakeFiles/topology1_sof-imx8mp-wm8904.dir/all] Error 2
    Makefile:135: recipe for target 'all' failed
    make: *** [all] Error 2

I hope someone could help me.

Thanks in advanced
Julio C. Molina

"M_PI" does not exist

When I use zephyr (minimal library) to call sof, I found that there is no definition of "M_PI".
Cause build error

I added the following code:
file:modules\audio\sof\src\math\trig.c

#ifndef M_PI
#define M_PI       3.14159265358979323846   // pi
#endif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.