From 17caa5da426906f3856c37629399777aa7c5e7c3 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Tue, 24 Sep 2019 08:18:03 -0400 Subject: alexa-voiceagent-service: Add patch to update audio device configuration Add patch to update audio device configuration to work with PipeWire changes to Auto SDK gstreamer output code. Bug-AGL: SPEC-2761 Change-Id: If7d1058a190bd91bd68151a5b54dc84db05a55bc Signed-off-by: Scott Murray (cherry picked from commit d46451a0bf7e7bb133b17b4ee22c0a241f4132dc) --- .../0003-update-audio-device-configuration.patch | 197 +++++++++++++++++++++ .../alexa-voiceagent-service_git.bb | 1 + 2 files changed, 198 insertions(+) create mode 100644 meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0003-update-audio-device-configuration.patch (limited to 'meta-speech-framework/meta-aac/recipes-apis') diff --git a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0003-update-audio-device-configuration.patch b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0003-update-audio-device-configuration.patch new file mode 100644 index 00000000..ede3d533 --- /dev/null +++ b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0003-update-audio-device-configuration.patch @@ -0,0 +1,197 @@ +Update audio device configuration + +Rework the audio output device configuration to match the expectations +of the PipeWire output sink configuration in the gstreamer output code. +Currently, this means that the role is being stored as the device name +so the gstreamer code can use it when setting up the output sink +properties. + +Upstream-Status: Pending + +Signed-off-by: Scott Murray + +diff --git a/platforms/agl/alexa-voiceagent-service/src/plugins/aasb-client/config/AASBConfigProviderImpl.cpp b/platforms/agl/alexa-voiceagent-service/src/plugins/aasb-client/config/AASBConfigProviderImpl.cpp +index 83d0341..b51185c 100644 +--- a/src/plugins/aasb-client/config/AASBConfigProviderImpl.cpp ++++ b/src/plugins/aasb-client/config/AASBConfigProviderImpl.cpp +@@ -97,25 +97,25 @@ AASBConfigProviderImpl::AudioIOConfiguration AASBConfigProviderImpl::getAudioIOC + + // Output devices + if(!m_ttsOutputDevice.empty()) +- audioConfig.ttsOutputDevice = m_audio->openAHLChannel(m_ttsOutputDevice); ++ audioConfig.ttsOutputDevice = m_audio->openChannel(m_ttsOutputDevice); + + if(!m_musicOutputDevice.empty()) +- audioConfig.musicOutputDevice = m_audio->openAHLChannel(m_musicOutputDevice); ++ audioConfig.musicOutputDevice = m_audio->openChannel(m_musicOutputDevice); + + if(!m_notificationOutputDevice.empty()) +- audioConfig.notificationOutputDevice = m_audio->openAHLChannel(m_notificationOutputDevice); ++ audioConfig.notificationOutputDevice = m_audio->openChannel(m_notificationOutputDevice); + + if(!m_alarmOutputDevice.empty()) +- audioConfig.alarmOutputDevice = m_audio->openAHLChannel(m_alarmOutputDevice); ++ audioConfig.alarmOutputDevice = m_audio->openChannel(m_alarmOutputDevice); + + if(!m_earconOutputDevice.empty()) +- audioConfig.earconOutputDevice = m_audio->openAHLChannel(m_earconOutputDevice); ++ audioConfig.earconOutputDevice = m_audio->openChannel(m_earconOutputDevice); + + if(!m_communicationOutputDevice.empty()) +- audioConfig.communicationOutputDevice = m_audio->openAHLChannel(m_communicationOutputDevice); ++ audioConfig.communicationOutputDevice = m_audio->openChannel(m_communicationOutputDevice); + + if(!m_ringtoneOutputDevice.empty()) +- audioConfig.ringtoneOutputDevice = m_audio->openAHLChannel(m_ringtoneOutputDevice); ++ audioConfig.ringtoneOutputDevice = m_audio->openChannel(m_ringtoneOutputDevice); + + return audioConfig; + } +@@ -585,4 +585,4 @@ void AASBConfigProviderImpl::logCurrentConfiguration() { + } + + } // namespace alexa +-} // namespace agl +\ No newline at end of file ++} // namespace agl +diff --git a/src/plugins/audio/Audio.cpp b/src/plugins/audio/Audio.cpp +index d662a06..1b2fa9d 100644 +--- a/src/plugins/audio/Audio.cpp ++++ b/src/plugins/audio/Audio.cpp +@@ -13,8 +13,6 @@ + * permissions and limitations under the License. + */ + +-#include +- + #include + + #include "Audio.h" +@@ -22,7 +20,7 @@ + namespace agl { + namespace audio { + +-/// Shortcut to reach logging level. ++// Shortcut to reach logging level. + using Level = agl::common::interfaces::ILogger::Level; + + using namespace agl::common::interfaces; +@@ -31,68 +29,30 @@ static std::string TAG = "agl::audio::Audio"; + + std::shared_ptr