Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion src/audio/module_adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC)
add_local_sources(sof module/waves.c)
sof_add_static_library(MaxxChrome ${CMAKE_CURRENT_LIST_DIR}/lib/release/libMaxxChrome.a)
# folder with Waves API must be among include directories
target_include_directories(sof PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../../include/sof/audio/)
endif()

if(CONFIG_DTS_CODEC)
Expand Down
33 changes: 15 additions & 18 deletions src/audio/module_adapter/module/waves.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@
//
// Author: Oleksandr Strelchenko <oleksandr.strelchenko@waves.com>
//

#include <rtos/init.h>
#include <sof/audio/module_adapter/module/generic.h>
#include <sof/debug/debug.h>
#include <sof/compiler_attributes.h>
#include <rtos/init.h>

#include "MaxxEffect/MaxxEffect.h"
#include "MaxxEffect/MaxxStream.h"
#include "MaxxEffect/MaxxStatus.h"
#include "MaxxEffect/Initialize/MaxxEffect_Initialize.h"
#include "MaxxEffect/Process/MaxxEffect_Process.h"
#include "MaxxEffect/Process/MaxxEffect_Reset.h"
#include "MaxxEffect/Control/RPC/MaxxEffect_RPC_Server.h"
#include "MaxxEffect/Control/Direct/MaxxEffect_Revision.h"
#include <sof/audio/MaxxEffect/Initialize/MaxxEffect_Initialize.h>
#include <sof/audio/MaxxEffect/Process/MaxxEffect_Process.h>
#include <sof/audio/MaxxEffect/Process/MaxxEffect_Reset.h>
#include <sof/audio/MaxxEffect/Control/RPC/MaxxEffect_RPC_Server.h>
#include <sof/audio/MaxxEffect/Control/Direct/MaxxEffect_Revision.h>

#define MAX_CONFIG_SIZE_BYTES (8192)
#define NUM_IO_STREAMS (1)
Expand Down Expand Up @@ -235,31 +232,31 @@ static int waves_effect_check(struct comp_dev *dev)
/* todo use fallback to comp_verify_params when ready */

/* resampling not supported */
if (src_fmt->rate != audio_stream_get_rate(snk_fmt)) {
if (audio_stream_get_rate(src_fmt) != audio_stream_get_rate(snk_fmt)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, yeah, that's the punishment for being too inventive with names, we couldn't possibly have guessed to grep for src_fmt as a buffer stream name ;-)

comp_err(dev, "waves_effect_check() source %d sink %d rate mismatch",
audio_stream_get_rate(src_fmt), audio_stream_get_rate(snk_fmt));
ret = -EINVAL;
goto out;
}

/* upmix/downmix not supported */
if (src_fmt->channels != audio_stream_get_channels(snk_fmt)) {
if (audio_stream_get_channels(src_fmt) != audio_stream_get_channels(snk_fmt)) {
comp_err(dev, "waves_effect_check() source %d sink %d channels mismatch",
audio_stream_get_channels(src_fmt), audio_stream_get_channels(snk_fmt));
ret = -EINVAL;
goto out;
}

/* different frame format not supported */
if (src_fmt->frame_fmt != audio_stream_get_frm_fmt(snk_fmt)) {
if (audio_stream_get_frm_fmt(src_fmt) != audio_stream_get_frm_fmt(snk_fmt)) {
comp_err(dev, "waves_effect_check() source %d sink %d sample format mismatch",
audio_stream_get_frm_fmt(src_fmt), audio_stream_get_frm_fmt(snk_fmt));
ret = -EINVAL;
goto out;
}

/* different interleaving is not supported */
if (source_c->buffer_fmt != sink_c->buffer_fmt) {
if (audio_stream_get_buffer_fmt(src_fmt) != audio_stream_get_buffer_fmt(snk_fmt)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, these ones should've been caught, but looks like they were wrong too

comp_err(dev, "waves_effect_check() source %d sink %d buffer format mismatch");
ret = -EINVAL;
goto out;
Expand All @@ -271,7 +268,7 @@ static int waves_effect_check(struct comp_dev *dev)
goto out;
}

if (!layout_is_supported(source_c->buffer_fmt)) {
if (!layout_is_supported(audio_stream_get_buffer_fmt(src_fmt))) {
comp_err(dev, "waves_effect_check() non interleaved format not supported");
ret = -EINVAL;
goto out;
Expand All @@ -284,7 +281,7 @@ static int waves_effect_check(struct comp_dev *dev)
goto out;
}

if (src_fmt->channels != 2) {
if (audio_stream_get_channels(src_fmt) != 2) {
comp_err(dev, "waves_effect_check() channels %d not supported",
audio_stream_get_channels(src_fmt));
ret = -EINVAL;
Expand Down Expand Up @@ -328,10 +325,10 @@ static int waves_effect_init(struct processing_module *mod)
goto out;
}

buffer_format = layout_convert_sof_to_me(source_c->buffer_fmt);
buffer_format = layout_convert_sof_to_me(audio_stream_get_buffer_fmt(src_fmt));
if (buffer_format < 0) {
comp_err(dev, "waves_effect_init() sof buffer format %d not supported",
source_c->buffer_fmt);
audio_stream_get_buffer_fmt(src_fmt));
ret = -EINVAL;
goto out;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define MAXX_EFFECT_REVISION_H

#include <stdint.h>
#include "MaxxEffect/MaxxEffect.h"
#include "MaxxEffect/MaxxStatus.h"
#include <sof/audio/MaxxEffect/MaxxEffect.h>
#include <sof/audio/MaxxEffect/MaxxStatus.h>

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define MAXX_EFFECT_RPC_SERVER_H

#include <stdint.h>
#include "MaxxEffect/MaxxEffect.h"
#include "MaxxEffect/MaxxStatus.h"
#include <sof/audio/MaxxEffect/MaxxEffect.h>
#include <sof/audio/MaxxEffect/MaxxStatus.h>

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
#define MAXX_EFFECT_INITIALIZE_H

#include <stdint.h>
#include "MaxxEffect/MaxxEffect.h"
#include "MaxxEffect/MaxxStatus.h"
#include "MaxxEffect/MaxxStream.h"
#include <sof/audio/MaxxEffect/MaxxEffect.h>
#include <sof/audio/MaxxEffect/MaxxStatus.h>
#include <sof/audio/MaxxEffect/MaxxStream.h>

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
#ifndef MAXX_EFFECT_PROCESS_H
#define MAXX_EFFECT_PROCESS_H

#include "MaxxEffect/MaxxEffect.h"
#include "MaxxEffect/MaxxStatus.h"
#include "MaxxEffect/MaxxStream.h"
#include <sof/audio/MaxxEffect/MaxxEffect.h>
#include <sof/audio/MaxxEffect/MaxxStatus.h>
#include <sof/audio/MaxxEffect/MaxxStream.h>

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions src/include/sof/audio/MaxxEffect/Process/MaxxEffect_Reset.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#ifndef MAXX_EFFECT_RESET_H
#define MAXX_EFFECT_RESET_H

#include "MaxxEffect/MaxxEffect.h"
#include "MaxxEffect/MaxxStatus.h"
#include <sof/audio/MaxxEffect/MaxxEffect.h>
#include <sof/audio/MaxxEffect/MaxxStatus.h>

#ifdef __cplusplus
extern "C" {
Expand Down