Loading services/audiopolicy/common/managerdefinitions/include/HwModule.h +4 −2 Original line number Diff line number Diff line Loading @@ -89,10 +89,12 @@ public: status_t addProfile(const sp<IOProfile> &profile); status_t addOutputProfile(const std::string& name, const audio_config_t *config, audio_devices_t device, const String8& address); audio_devices_t device, const String8& address, audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE); status_t removeOutputProfile(const std::string& name); status_t addInputProfile(const std::string& name, const audio_config_t *config, audio_devices_t device, const String8& address); audio_devices_t device, const String8& address, audio_input_flags_t flags = AUDIO_INPUT_FLAG_NONE); status_t removeInputProfile(const std::string& name); audio_module_handle_t getHandle() const { return mHandle; } Loading services/audiopolicy/common/managerdefinitions/src/HwModule.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -59,12 +59,13 @@ std::string HwModule::getTagForDevice(audio_devices_t device, const String8 &add } status_t HwModule::addOutputProfile(const std::string& name, const audio_config_t *config, audio_devices_t device, const String8& address) audio_devices_t device, const String8& address, audio_output_flags_t flags) { sp<IOProfile> profile = new OutputProfile(name); profile->addAudioProfile(new AudioProfile(config->format, config->channel_mask, config->sample_rate)); profile->setFlags(flags); sp<DeviceDescriptor> devDesc = new DeviceDescriptor(device, getTagForDevice(device), address.c_str()); Loading Loading @@ -128,11 +129,13 @@ status_t HwModule::removeOutputProfile(const std::string& name) } status_t HwModule::addInputProfile(const std::string& name, const audio_config_t *config, audio_devices_t device, const String8& address) audio_devices_t device, const String8& address, audio_input_flags_t flags) { sp<IOProfile> profile = new InputProfile(name); profile->addAudioProfile(new AudioProfile(config->format, config->channel_mask, config->sample_rate)); profile->setFlags(flags); sp<DeviceDescriptor> devDesc = new DeviceDescriptor(device, getTagForDevice(device), address.c_str()); Loading services/audiopolicy/managerdefault/AudioPolicyManager.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -3638,9 +3638,13 @@ status_t AudioPolicyManager::registerPolicyMixes(const Vector<AudioMix>& mixes) outputConfig.channel_mask = AUDIO_CHANNEL_OUT_STEREO; inputConfig.channel_mask = AUDIO_CHANNEL_IN_STEREO; rSubmixModule->addOutputProfile(address.c_str(), &outputConfig, AUDIO_DEVICE_OUT_REMOTE_SUBMIX, address); AUDIO_DEVICE_OUT_REMOTE_SUBMIX, address, audio_is_linear_pcm(outputConfig.format) ? AUDIO_OUTPUT_FLAG_NONE : AUDIO_OUTPUT_FLAG_DIRECT); rSubmixModule->addInputProfile(address.c_str(), &inputConfig, AUDIO_DEVICE_IN_REMOTE_SUBMIX, address); AUDIO_DEVICE_IN_REMOTE_SUBMIX, address, audio_is_linear_pcm(inputConfig.format) ? AUDIO_INPUT_FLAG_NONE : AUDIO_INPUT_FLAG_DIRECT); if ((res = setDeviceConnectionStateInt(deviceTypeToMakeAvailable, AUDIO_POLICY_DEVICE_STATE_AVAILABLE, Loading Loading
services/audiopolicy/common/managerdefinitions/include/HwModule.h +4 −2 Original line number Diff line number Diff line Loading @@ -89,10 +89,12 @@ public: status_t addProfile(const sp<IOProfile> &profile); status_t addOutputProfile(const std::string& name, const audio_config_t *config, audio_devices_t device, const String8& address); audio_devices_t device, const String8& address, audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE); status_t removeOutputProfile(const std::string& name); status_t addInputProfile(const std::string& name, const audio_config_t *config, audio_devices_t device, const String8& address); audio_devices_t device, const String8& address, audio_input_flags_t flags = AUDIO_INPUT_FLAG_NONE); status_t removeInputProfile(const std::string& name); audio_module_handle_t getHandle() const { return mHandle; } Loading
services/audiopolicy/common/managerdefinitions/src/HwModule.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -59,12 +59,13 @@ std::string HwModule::getTagForDevice(audio_devices_t device, const String8 &add } status_t HwModule::addOutputProfile(const std::string& name, const audio_config_t *config, audio_devices_t device, const String8& address) audio_devices_t device, const String8& address, audio_output_flags_t flags) { sp<IOProfile> profile = new OutputProfile(name); profile->addAudioProfile(new AudioProfile(config->format, config->channel_mask, config->sample_rate)); profile->setFlags(flags); sp<DeviceDescriptor> devDesc = new DeviceDescriptor(device, getTagForDevice(device), address.c_str()); Loading Loading @@ -128,11 +129,13 @@ status_t HwModule::removeOutputProfile(const std::string& name) } status_t HwModule::addInputProfile(const std::string& name, const audio_config_t *config, audio_devices_t device, const String8& address) audio_devices_t device, const String8& address, audio_input_flags_t flags) { sp<IOProfile> profile = new InputProfile(name); profile->addAudioProfile(new AudioProfile(config->format, config->channel_mask, config->sample_rate)); profile->setFlags(flags); sp<DeviceDescriptor> devDesc = new DeviceDescriptor(device, getTagForDevice(device), address.c_str()); Loading
services/audiopolicy/managerdefault/AudioPolicyManager.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -3638,9 +3638,13 @@ status_t AudioPolicyManager::registerPolicyMixes(const Vector<AudioMix>& mixes) outputConfig.channel_mask = AUDIO_CHANNEL_OUT_STEREO; inputConfig.channel_mask = AUDIO_CHANNEL_IN_STEREO; rSubmixModule->addOutputProfile(address.c_str(), &outputConfig, AUDIO_DEVICE_OUT_REMOTE_SUBMIX, address); AUDIO_DEVICE_OUT_REMOTE_SUBMIX, address, audio_is_linear_pcm(outputConfig.format) ? AUDIO_OUTPUT_FLAG_NONE : AUDIO_OUTPUT_FLAG_DIRECT); rSubmixModule->addInputProfile(address.c_str(), &inputConfig, AUDIO_DEVICE_IN_REMOTE_SUBMIX, address); AUDIO_DEVICE_IN_REMOTE_SUBMIX, address, audio_is_linear_pcm(inputConfig.format) ? AUDIO_INPUT_FLAG_NONE : AUDIO_INPUT_FLAG_DIRECT); if ((res = setDeviceConnectionStateInt(deviceTypeToMakeAvailable, AUDIO_POLICY_DEVICE_STATE_AVAILABLE, Loading