diff options
| author | 2023-09-07 20:53:48 +0100 | |
|---|---|---|
| committer | 2023-09-07 20:53:48 +0100 | |
| commit | 4baaaf6a99ad763958bbc0ffa6d30ce75309f80a (patch) | |
| tree | 2594a4bdfefae0ef640dff868a6a229b176b714b /src/audio_core/adsp | |
| parent | Merge pull request #11428 from Kelebek1/adsp_rework (diff) | |
| download | yuzu-4baaaf6a99ad763958bbc0ffa6d30ce75309f80a.tar.gz yuzu-4baaaf6a99ad763958bbc0ffa6d30ce75309f80a.tar.xz yuzu-4baaaf6a99ad763958bbc0ffa6d30ce75309f80a.zip | |
Do not reset the command buffer command count each time
Diffstat (limited to 'src/audio_core/adsp')
4 files changed, 9 insertions, 16 deletions
diff --git a/src/audio_core/adsp/apps/audio_renderer/audio_renderer.cpp b/src/audio_core/adsp/apps/audio_renderer/audio_renderer.cpp index 3da342ea3..2e549bc6f 100644 --- a/src/audio_core/adsp/apps/audio_renderer/audio_renderer.cpp +++ b/src/audio_core/adsp/apps/audio_renderer/audio_renderer.cpp | |||
| @@ -88,8 +88,13 @@ MailboxMessage AudioRenderer::Receive(Direction dir, bool block) { | |||
| 88 | return mailbox.Receive(dir, block); | 88 | return mailbox.Receive(dir, block); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | void AudioRenderer::SetCommandBuffer(s32 session_id, CommandBuffer& buffer) noexcept { | 91 | void AudioRenderer::SetCommandBuffer(s32 session_id, CpuAddr buffer, u64 size, u64 time_limit, |
| 92 | command_buffers[session_id] = buffer; | 92 | u64 applet_resource_user_id, bool reset) noexcept { |
| 93 | command_buffers[session_id].buffer = buffer; | ||
| 94 | command_buffers[session_id].size = size; | ||
| 95 | command_buffers[session_id].time_limit = time_limit; | ||
| 96 | command_buffers[session_id].applet_resource_user_id = applet_resource_user_id; | ||
| 97 | command_buffers[session_id].reset_buffer = reset; | ||
| 93 | } | 98 | } |
| 94 | 99 | ||
| 95 | u32 AudioRenderer::GetRemainCommandCount(s32 session_id) const noexcept { | 100 | u32 AudioRenderer::GetRemainCommandCount(s32 session_id) const noexcept { |
diff --git a/src/audio_core/adsp/apps/audio_renderer/audio_renderer.h b/src/audio_core/adsp/apps/audio_renderer/audio_renderer.h index b225e10fb..3f5b7dca2 100644 --- a/src/audio_core/adsp/apps/audio_renderer/audio_renderer.h +++ b/src/audio_core/adsp/apps/audio_renderer/audio_renderer.h | |||
| @@ -75,7 +75,8 @@ public: | |||
| 75 | void Send(Direction dir, MailboxMessage message); | 75 | void Send(Direction dir, MailboxMessage message); |
| 76 | MailboxMessage Receive(Direction dir, bool block = true); | 76 | MailboxMessage Receive(Direction dir, bool block = true); |
| 77 | 77 | ||
| 78 | void SetCommandBuffer(s32 session_id, CommandBuffer& buffer) noexcept; | 78 | void SetCommandBuffer(s32 session_id, CpuAddr buffer, u64 size, u64 time_limit, |
| 79 | u64 applet_resource_user_id, bool reset) noexcept; | ||
| 79 | u32 GetRemainCommandCount(s32 session_id) const noexcept; | 80 | u32 GetRemainCommandCount(s32 session_id) const noexcept; |
| 80 | void ClearRemainCommandCount(s32 session_id) noexcept; | 81 | void ClearRemainCommandCount(s32 session_id) noexcept; |
| 81 | u64 GetRenderingStartTick(s32 session_id) const noexcept; | 82 | u64 GetRenderingStartTick(s32 session_id) const noexcept; |
diff --git a/src/audio_core/adsp/apps/audio_renderer/command_list_processor.cpp b/src/audio_core/adsp/apps/audio_renderer/command_list_processor.cpp index acbc9100c..24e4d0496 100644 --- a/src/audio_core/adsp/apps/audio_renderer/command_list_processor.cpp +++ b/src/audio_core/adsp/apps/audio_renderer/command_list_processor.cpp | |||
| @@ -37,11 +37,6 @@ u32 CommandListProcessor::GetRemainingCommandCount() const { | |||
| 37 | return command_count - processed_command_count; | 37 | return command_count - processed_command_count; |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | void CommandListProcessor::SetBuffer(const CpuAddr buffer, const u64 size) { | ||
| 41 | commands = reinterpret_cast<u8*>(buffer + sizeof(Renderer::CommandListHeader)); | ||
| 42 | commands_buffer_size = size; | ||
| 43 | } | ||
| 44 | |||
| 45 | Sink::SinkStream* CommandListProcessor::GetOutputSinkStream() const { | 40 | Sink::SinkStream* CommandListProcessor::GetOutputSinkStream() const { |
| 46 | return stream; | 41 | return stream; |
| 47 | } | 42 | } |
diff --git a/src/audio_core/adsp/apps/audio_renderer/command_list_processor.h b/src/audio_core/adsp/apps/audio_renderer/command_list_processor.h index 9d6fe1851..4e5fb793e 100644 --- a/src/audio_core/adsp/apps/audio_renderer/command_list_processor.h +++ b/src/audio_core/adsp/apps/audio_renderer/command_list_processor.h | |||
| @@ -57,14 +57,6 @@ public: | |||
| 57 | u32 GetRemainingCommandCount() const; | 57 | u32 GetRemainingCommandCount() const; |
| 58 | 58 | ||
| 59 | /** | 59 | /** |
| 60 | * Set the command buffer. | ||
| 61 | * | ||
| 62 | * @param buffer - The buffer to use. | ||
| 63 | * @param size - The size of the buffer. | ||
| 64 | */ | ||
| 65 | void SetBuffer(CpuAddr buffer, u64 size); | ||
| 66 | |||
| 67 | /** | ||
| 68 | * Get the stream for this command list. | 60 | * Get the stream for this command list. |
| 69 | * | 61 | * |
| 70 | * @return The stream associated with this command list. | 62 | * @return The stream associated with this command list. |