From a9f539e1936f4d463e4edf4bdc05265ded1a85fc Mon Sep 17 00:00:00 2001 From: Zephyron Date: Tue, 31 Dec 2024 18:42:49 +1000 Subject: [PATCH] audio_core: Add comprehensive audio feature support tags Added new feature support tags to track audio functionality across firmware versions. Changes include: - Added Audio Out/In Auto buffer support tags (3.0.0+) - Added Final Output Recorder features including work buffer (3.0.0+, 9.0.0+) - Added Audio Renderer features like manual execution and voice drop - Added Audio Device features including notifications and auto volume - Added Hardware Opus decoder features including large frame support - Added System Audio features like master volume and hearing protection This provides more complete feature detection for audio functionality introduced in firmware versions 3.0.0 through 19.0.1. --- src/audio_core/common/feature_support.h | 50 +++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/src/audio_core/common/feature_support.h b/src/audio_core/common/feature_support.h index a76d68e9f..304829c45 100644 --- a/src/audio_core/common/feature_support.h +++ b/src/audio_core/common/feature_support.h @@ -13,7 +13,7 @@ #include "common/polyfill_ranges.h" namespace AudioCore { -constexpr u32 CurrentRevision = 11; +constexpr u32 CurrentRevision = 18; enum class SupportTags { CommandProcessingTimeEstimatorVersion4, @@ -44,8 +44,29 @@ enum class SupportTags { DelayChannelMappingChange, ReverbChannelMappingChange, I3dl2ReverbChannelMappingChange, - - // Not a real tag, just here to get the count. + AudioOutAuto, + AudioInAuto, + AudioInFiltering, + AudioInUacSupport, + FinalOutputRecorderAuto, + FinalOutputRecorderWorkBuffer, + AudioRendererManualExecution, + AudioRendererVariableRate, + AudioRendererRevisionCheck, + AudioRendererVoiceDrop, + AudioDeviceNameAuto, + AudioDeviceInputEvent, + AudioDeviceOutputEvent, + AudioDeviceNotification, + AudioDeviceAutoVolumeTune, + HardwareOpusDecoderEx, + HardwareOpusMultiStream, + HardwareOpusLargeFrameSize, + AudioSystemMasterVolume, + AudioSystemInputVolume, + AudioSystemRecordVolume, + AudioSystemAutoMute, + AudioSystemHearingProtection, Size }; @@ -87,6 +108,29 @@ constexpr bool CheckFeatureSupported(SupportTags tag, u32 user_revision) { {SupportTags::DelayChannelMappingChange, 11}, {SupportTags::ReverbChannelMappingChange, 11}, {SupportTags::I3dl2ReverbChannelMappingChange, 11}, + {SupportTags::AudioOutAuto, 3}, + {SupportTags::AudioInAuto, 3}, + {SupportTags::AudioInFiltering, 3}, + {SupportTags::AudioInUacSupport, 3}, + {SupportTags::FinalOutputRecorderAuto, 3}, + {SupportTags::FinalOutputRecorderWorkBuffer, 9}, + {SupportTags::AudioRendererManualExecution, 3}, + {SupportTags::AudioRendererVariableRate, 4}, + {SupportTags::AudioRendererRevisionCheck, 4}, + {SupportTags::AudioRendererVoiceDrop, 15}, + {SupportTags::AudioDeviceNameAuto, 3}, + {SupportTags::AudioDeviceInputEvent, 3}, + {SupportTags::AudioDeviceOutputEvent, 3}, + {SupportTags::AudioDeviceNotification, 17}, + {SupportTags::AudioDeviceAutoVolumeTune, 18}, + {SupportTags::HardwareOpusDecoderEx, 12}, + {SupportTags::HardwareOpusMultiStream, 3}, + {SupportTags::HardwareOpusLargeFrameSize, 12}, + {SupportTags::AudioSystemMasterVolume, 4}, + {SupportTags::AudioSystemInputVolume, 4}, + {SupportTags::AudioSystemRecordVolume, 4}, + {SupportTags::AudioSystemAutoMute, 13}, + {SupportTags::AudioSystemHearingProtection, 14}, }}; const auto& feature =