Loading services/audiopolicy/common/managerdefinitions/src/IOProfile.cpp +12 −7 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #define LOG_TAG "APM::IOProfile" //#define LOG_NDEBUG 0 #include <system/audio-base.h> #include "IOProfile.h" #include "HwModule.h" #include "AudioGain.h" Loading Loading @@ -66,19 +67,23 @@ bool IOProfile::isCompatibleProfile(audio_devices_t device, audio_format_t myUpdatedFormat = format; audio_channel_mask_t myUpdatedChannelMask = channelMask; uint32_t myUpdatedSamplingRate = samplingRate; if (isRecordThread) { if (checkCompatibleAudioProfile( myUpdatedSamplingRate, myUpdatedChannelMask, myUpdatedFormat) != NO_ERROR) { return false; } } else { const struct audio_port_config config = { .config_mask = AUDIO_PORT_CONFIG_ALL & ~AUDIO_PORT_CONFIG_GAIN, .sample_rate = samplingRate, .channel_mask = channelMask, .format = format, }; if (isRecordThread) { if ((flags & AUDIO_INPUT_FLAG_MMAP_NOIRQ) != 0) { if (checkExactAudioProfile(&config) != NO_ERROR) { return false; } } else if (checkCompatibleAudioProfile( myUpdatedSamplingRate, myUpdatedChannelMask, myUpdatedFormat) != NO_ERROR) { return false; } } else { if (checkExactAudioProfile(&config) != NO_ERROR) { return false; } Loading Loading
services/audiopolicy/common/managerdefinitions/src/IOProfile.cpp +12 −7 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #define LOG_TAG "APM::IOProfile" //#define LOG_NDEBUG 0 #include <system/audio-base.h> #include "IOProfile.h" #include "HwModule.h" #include "AudioGain.h" Loading Loading @@ -66,19 +67,23 @@ bool IOProfile::isCompatibleProfile(audio_devices_t device, audio_format_t myUpdatedFormat = format; audio_channel_mask_t myUpdatedChannelMask = channelMask; uint32_t myUpdatedSamplingRate = samplingRate; if (isRecordThread) { if (checkCompatibleAudioProfile( myUpdatedSamplingRate, myUpdatedChannelMask, myUpdatedFormat) != NO_ERROR) { return false; } } else { const struct audio_port_config config = { .config_mask = AUDIO_PORT_CONFIG_ALL & ~AUDIO_PORT_CONFIG_GAIN, .sample_rate = samplingRate, .channel_mask = channelMask, .format = format, }; if (isRecordThread) { if ((flags & AUDIO_INPUT_FLAG_MMAP_NOIRQ) != 0) { if (checkExactAudioProfile(&config) != NO_ERROR) { return false; } } else if (checkCompatibleAudioProfile( myUpdatedSamplingRate, myUpdatedChannelMask, myUpdatedFormat) != NO_ERROR) { return false; } } else { if (checkExactAudioProfile(&config) != NO_ERROR) { return false; } Loading