Loading CleanSpec.mk +7 −1 Original line number Diff line number Diff line Loading @@ -56,4 +56,10 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/) $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/) $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/) $(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-sp/android.hardware.graphics.allocator*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/hw/android.hardware.automotive*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware.automotive*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware.automotive*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.automotive*) $(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore\@1\.1*" -print0 | xargs -0 rm -f) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/android.hardware.tests*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk/android.hardware.tests*) audio/2.0/config/audio_policy_configuration.xsd +4 −4 Original line number Diff line number Diff line Loading @@ -365,10 +365,10 @@ </xs:restriction> </xs:simpleType> <xs:complexType name="profile"> <xs:attribute name="name" type="xs:token" use="required"/> <xs:attribute name="format" type="audioFormat" use="required"/> <xs:attribute name="samplingRates" type="samplingRates" use="required"/> <xs:attribute name="channelMasks" type="channelMask" use="required"/> <xs:attribute name="name" type="xs:token" use="optional"/> <xs:attribute name="format" type="audioFormat" use="optional"/> <xs:attribute name="samplingRates" type="samplingRates" use="optional"/> <xs:attribute name="channelMasks" type="channelMask" use="optional"/> </xs:complexType> <xs:simpleType name="gainMode"> <xs:restriction base="xs:string"> Loading audio/2.0/default/Android.mk +0 −4 Original line number Diff line number Diff line Loading @@ -88,8 +88,4 @@ else LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB) endif ifeq ($(TARGET_USES_BCRADIO_FUTURE_FEATURES),true) LOCAL_CFLAGS += -DTARGET_USES_BCRADIO_FUTURE_FEATURES endif include $(BUILD_EXECUTABLE) audio/2.0/default/Stream.h +7 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,13 @@ using ::android::sp; struct Stream : public IStream, public ParametersUtil { explicit Stream(audio_stream_t* stream); /** 1GiB is the maximum buffer size the HAL client is allowed to request. * This value has been chosen to be under SIZE_MAX and still big enough * for all audio use case. * Keep private for 2.0, put in .hal in 2.1 */ static constexpr uint32_t MAX_BUFFER_SIZE = 2 << 30 /* == 1GiB */; // Methods from ::android::hardware::audio::V2_0::IStream follow. Return<uint64_t> getFrameSize() override; Return<uint64_t> getFrameCount() override; Loading audio/2.0/default/StreamIn.cpp +4 −8 Original line number Diff line number Diff line Loading @@ -346,14 +346,10 @@ Return<void> StreamIn::prepareForReading(uint32_t frameSize, sendError(Result::INVALID_ARGUMENTS); return Void(); } // A message queue asserts if it can not handle the requested buffer, // thus the client has to guess the maximum size it can handle // Choose an arbitrary margin for the overhead of a message queue size_t metadataOverhead = 100000; if (frameSize > (std::numeric_limits<size_t>::max() - metadataOverhead) / framesCount) { ALOGE("Buffer too big: %u*%u bytes can not fit in a message queue", frameSize, framesCount); if (frameSize > Stream::MAX_BUFFER_SIZE / framesCount) { ALOGE("Buffer too big: %u*%u bytes > MAX_BUFFER_SIZE (%u)", frameSize, framesCount, Stream::MAX_BUFFER_SIZE); sendError(Result::INVALID_ARGUMENTS); return Void(); } Loading Loading
CleanSpec.mk +7 −1 Original line number Diff line number Diff line Loading @@ -56,4 +56,10 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/) $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/) $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/) $(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-sp/android.hardware.graphics.allocator*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/hw/android.hardware.automotive*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware.automotive*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware.automotive*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.automotive*) $(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore\@1\.1*" -print0 | xargs -0 rm -f) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/android.hardware.tests*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk/android.hardware.tests*)
audio/2.0/config/audio_policy_configuration.xsd +4 −4 Original line number Diff line number Diff line Loading @@ -365,10 +365,10 @@ </xs:restriction> </xs:simpleType> <xs:complexType name="profile"> <xs:attribute name="name" type="xs:token" use="required"/> <xs:attribute name="format" type="audioFormat" use="required"/> <xs:attribute name="samplingRates" type="samplingRates" use="required"/> <xs:attribute name="channelMasks" type="channelMask" use="required"/> <xs:attribute name="name" type="xs:token" use="optional"/> <xs:attribute name="format" type="audioFormat" use="optional"/> <xs:attribute name="samplingRates" type="samplingRates" use="optional"/> <xs:attribute name="channelMasks" type="channelMask" use="optional"/> </xs:complexType> <xs:simpleType name="gainMode"> <xs:restriction base="xs:string"> Loading
audio/2.0/default/Android.mk +0 −4 Original line number Diff line number Diff line Loading @@ -88,8 +88,4 @@ else LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB) endif ifeq ($(TARGET_USES_BCRADIO_FUTURE_FEATURES),true) LOCAL_CFLAGS += -DTARGET_USES_BCRADIO_FUTURE_FEATURES endif include $(BUILD_EXECUTABLE)
audio/2.0/default/Stream.h +7 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,13 @@ using ::android::sp; struct Stream : public IStream, public ParametersUtil { explicit Stream(audio_stream_t* stream); /** 1GiB is the maximum buffer size the HAL client is allowed to request. * This value has been chosen to be under SIZE_MAX and still big enough * for all audio use case. * Keep private for 2.0, put in .hal in 2.1 */ static constexpr uint32_t MAX_BUFFER_SIZE = 2 << 30 /* == 1GiB */; // Methods from ::android::hardware::audio::V2_0::IStream follow. Return<uint64_t> getFrameSize() override; Return<uint64_t> getFrameCount() override; Loading
audio/2.0/default/StreamIn.cpp +4 −8 Original line number Diff line number Diff line Loading @@ -346,14 +346,10 @@ Return<void> StreamIn::prepareForReading(uint32_t frameSize, sendError(Result::INVALID_ARGUMENTS); return Void(); } // A message queue asserts if it can not handle the requested buffer, // thus the client has to guess the maximum size it can handle // Choose an arbitrary margin for the overhead of a message queue size_t metadataOverhead = 100000; if (frameSize > (std::numeric_limits<size_t>::max() - metadataOverhead) / framesCount) { ALOGE("Buffer too big: %u*%u bytes can not fit in a message queue", frameSize, framesCount); if (frameSize > Stream::MAX_BUFFER_SIZE / framesCount) { ALOGE("Buffer too big: %u*%u bytes > MAX_BUFFER_SIZE (%u)", frameSize, framesCount, Stream::MAX_BUFFER_SIZE); sendError(Result::INVALID_ARGUMENTS); return Void(); } Loading