Rework ADSP into a wrapper for apps

This commit is contained in:
Kelebek1 2023-08-31 15:09:15 +01:00
parent f6879dce96
commit de326e42bb
173 changed files with 1059 additions and 1265 deletions

View file

@ -3,14 +3,18 @@
#pragma once
#include <string>
#include "audio_core/common/common.h"
#include "common/common_types.h"
namespace AudioCore::AudioRenderer {
namespace ADSP {
namespace AudioCore::ADSP::AudioRenderer {
class CommandListProcessor;
}
namespace AudioCore::Renderer {
using namespace ::AudioCore::ADSP;
enum class CommandId : u8 {
/* 0x00 */ Invalid,
/* 0x01 */ DataSourcePcmInt16Version1,
@ -59,14 +63,15 @@ struct ICommand {
* @param processor - The CommandListProcessor processing this command.
* @param string - The string to print into.
*/
virtual void Dump(const ADSP::CommandListProcessor& processor, std::string& string) = 0;
virtual void Dump(const AudioRenderer::CommandListProcessor& processor,
std::string& string) = 0;
/**
* Process this command.
*
* @param processor - The CommandListProcessor processing this command.
*/
virtual void Process(const ADSP::CommandListProcessor& processor) = 0;
virtual void Process(const AudioRenderer::CommandListProcessor& processor) = 0;
/**
* Verify this command's data is valid.
@ -74,7 +79,7 @@ struct ICommand {
* @param processor - The CommandListProcessor processing this command.
* @return True if the command is valid, otherwise false.
*/
virtual bool Verify(const ADSP::CommandListProcessor& processor) = 0;
virtual bool Verify(const AudioRenderer::CommandListProcessor& processor) = 0;
/// Command magic 0xCAFEBABE
u32 magic{};
@ -90,4 +95,4 @@ struct ICommand {
u32 node_id{};
};
} // namespace AudioCore::AudioRenderer
} // namespace AudioCore::Renderer