Loading services/audiopolicy/managerdefault/Devices.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -241,7 +241,7 @@ void DeviceDescriptor::toAudioPortConfig(struct audio_port_config *dstConfig, // without the test? // without the test? // This has been demonstrated to NOT be true (at start up) // This has been demonstrated to NOT be true (at start up) // ALOG_ASSERT(mModule != NULL); // ALOG_ASSERT(mModule != NULL); dstConfig->ext.device.hw_module = mModule != NULL ? mModule->mHandle : NULL; dstConfig->ext.device.hw_module = mModule != 0 ? mModule->mHandle : AUDIO_IO_HANDLE_NONE; strncpy(dstConfig->ext.device.address, mAddress.string(), AUDIO_DEVICE_MAX_ADDRESS_LEN); strncpy(dstConfig->ext.device.address, mAddress.string(), AUDIO_DEVICE_MAX_ADDRESS_LEN); } } Loading services/audiopolicy/managerdefault/IOProfile.cpp +10 −2 Original line number Original line Diff line number Diff line Loading @@ -46,9 +46,17 @@ bool IOProfile::isCompatibleProfile(audio_devices_t device, const bool isRecordThread = mType == AUDIO_PORT_TYPE_MIX && mRole == AUDIO_PORT_ROLE_SINK; const bool isRecordThread = mType == AUDIO_PORT_TYPE_MIX && mRole == AUDIO_PORT_ROLE_SINK; ALOG_ASSERT(isPlaybackThread != isRecordThread); ALOG_ASSERT(isPlaybackThread != isRecordThread); if (device != AUDIO_DEVICE_NONE && mSupportedDevices.getDevice(device, address) == 0) { if (device != AUDIO_DEVICE_NONE) { // just check types if multiple devices are selected if (popcount(device & ~AUDIO_DEVICE_BIT_IN) > 1) { if ((mSupportedDevices.types() & device) != device) { return false; } } else if (mSupportedDevices.getDevice(device, address) == 0) { return false; return false; } } } if (samplingRate == 0) { if (samplingRate == 0) { return false; return false; Loading Loading
services/audiopolicy/managerdefault/Devices.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -241,7 +241,7 @@ void DeviceDescriptor::toAudioPortConfig(struct audio_port_config *dstConfig, // without the test? // without the test? // This has been demonstrated to NOT be true (at start up) // This has been demonstrated to NOT be true (at start up) // ALOG_ASSERT(mModule != NULL); // ALOG_ASSERT(mModule != NULL); dstConfig->ext.device.hw_module = mModule != NULL ? mModule->mHandle : NULL; dstConfig->ext.device.hw_module = mModule != 0 ? mModule->mHandle : AUDIO_IO_HANDLE_NONE; strncpy(dstConfig->ext.device.address, mAddress.string(), AUDIO_DEVICE_MAX_ADDRESS_LEN); strncpy(dstConfig->ext.device.address, mAddress.string(), AUDIO_DEVICE_MAX_ADDRESS_LEN); } } Loading
services/audiopolicy/managerdefault/IOProfile.cpp +10 −2 Original line number Original line Diff line number Diff line Loading @@ -46,9 +46,17 @@ bool IOProfile::isCompatibleProfile(audio_devices_t device, const bool isRecordThread = mType == AUDIO_PORT_TYPE_MIX && mRole == AUDIO_PORT_ROLE_SINK; const bool isRecordThread = mType == AUDIO_PORT_TYPE_MIX && mRole == AUDIO_PORT_ROLE_SINK; ALOG_ASSERT(isPlaybackThread != isRecordThread); ALOG_ASSERT(isPlaybackThread != isRecordThread); if (device != AUDIO_DEVICE_NONE && mSupportedDevices.getDevice(device, address) == 0) { if (device != AUDIO_DEVICE_NONE) { // just check types if multiple devices are selected if (popcount(device & ~AUDIO_DEVICE_BIT_IN) > 1) { if ((mSupportedDevices.types() & device) != device) { return false; } } else if (mSupportedDevices.getDevice(device, address) == 0) { return false; return false; } } } if (samplingRate == 0) { if (samplingRate == 0) { return false; return false; Loading