Loading media/libaaudio/src/client/AudioStreamInternal.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,10 @@ aaudio_result_t AudioStreamInternal::open(const AudioStreamBuilder &builder) { request.getConfiguration().setDirection(getDirection()); request.getConfiguration().setSharingMode(getSharingMode()); request.getConfiguration().setUsage(getUsage()); request.getConfiguration().setContentType(getContentType()); request.getConfiguration().setInputPreset(getInputPreset()); request.getConfiguration().setBufferCapacity(builder.getBufferCapacity()); mServiceStreamHandle = mServiceInterface.openStream(request, configurationOutput); Loading @@ -131,6 +135,10 @@ aaudio_result_t AudioStreamInternal::open(const AudioStreamBuilder &builder) { setDeviceId(configurationOutput.getDeviceId()); setSharingMode(configurationOutput.getSharingMode()); setUsage(configurationOutput.getUsage()); setContentType(configurationOutput.getContentType()); setInputPreset(configurationOutput.getInputPreset()); // Save device format so we can do format conversion and volume scaling together. mDeviceFormat = configurationOutput.getFormat(); Loading media/libaaudio/src/core/AudioStream.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,8 @@ aaudio_result_t AudioStream::open(const AudioStreamBuilder& builder) mDeviceId, mPerformanceMode, (isDataCallbackSet() ? "ON" : "OFF"), mFramesPerDataCallback); ALOGI("open() usage = %d, contentType = %d, inputPreset = %d", mUsage, mContentType, mInputPreset); return AAUDIO_OK; } Loading media/libaaudio/src/core/AudioStream.h +22 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,7 @@ protected: /** * This should not be called after the open() call. * TODO for multiple setters: assert(mState == AAUDIO_STREAM_STATE_UNINITIALIZED) */ void setSampleRate(int32_t sampleRate) { mSampleRate = sampleRate; Loading Loading @@ -468,6 +469,27 @@ protected: return mPeriodNanoseconds.load(std::memory_order_acquire); } /** * This should not be called after the open() call. */ void setUsage(aaudio_usage_t usage) { mUsage = usage; } /** * This should not be called after the open() call. */ void setContentType(aaudio_content_type_t contentType) { mContentType = contentType; } /** * This should not be called after the open() call. */ void setInputPreset(aaudio_input_preset_t inputPreset) { mInputPreset = inputPreset; } private: std::mutex mStreamLock; Loading services/oboeservice/AAudioServiceEndpoint.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -55,11 +55,15 @@ std::string AAudioServiceEndpoint::dump() const { result << " Direction: " << ((getDirection() == AAUDIO_DIRECTION_OUTPUT) ? "OUTPUT" : "INPUT") << "\n"; result << " Requested Device Id: " << mRequestedDeviceId << "\n"; result << " Device Id: " << getDeviceId() << "\n"; result << " Sample Rate: " << getSampleRate() << "\n"; result << " Channel Count: " << getSamplesPerFrame() << "\n"; result << " Frames Per Burst: " << mFramesPerBurst << "\n"; result << " Usage: " << getUsage() << "\n"; result << " ContentType: " << getContentType() << "\n"; result << " InputPreset: " << getInputPreset() << "\n"; result << " Reference Count: " << mOpenCount << "\n"; result << " Requested Device Id: " << mRequestedDeviceId << "\n"; result << " Device Id: " << getDeviceId() << "\n"; result << " Connected: " << mConnected.load() << "\n"; result << " Registered Streams:" << "\n"; result << AAudioServiceStreamShared::dumpHeader() << "\n"; Loading services/oboeservice/AAudioServiceEndpointMMAP.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,9 @@ aaudio_result_t AAudioServiceEndpointMMAP::open(const aaudio::AAudioStreamReques .flags = AUDIO_FLAG_LOW_LATENCY, .tags = "" }; ALOGV("open() MMAP attributes.usage = %d, content_type = %d, source = %d", attributes.usage, attributes.content_type, attributes.source); mMmapClient.clientUid = request.getUserId(); mMmapClient.clientPid = request.getProcessId(); mMmapClient.packageName.setTo(String16("")); Loading Loading
media/libaaudio/src/client/AudioStreamInternal.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,10 @@ aaudio_result_t AudioStreamInternal::open(const AudioStreamBuilder &builder) { request.getConfiguration().setDirection(getDirection()); request.getConfiguration().setSharingMode(getSharingMode()); request.getConfiguration().setUsage(getUsage()); request.getConfiguration().setContentType(getContentType()); request.getConfiguration().setInputPreset(getInputPreset()); request.getConfiguration().setBufferCapacity(builder.getBufferCapacity()); mServiceStreamHandle = mServiceInterface.openStream(request, configurationOutput); Loading @@ -131,6 +135,10 @@ aaudio_result_t AudioStreamInternal::open(const AudioStreamBuilder &builder) { setDeviceId(configurationOutput.getDeviceId()); setSharingMode(configurationOutput.getSharingMode()); setUsage(configurationOutput.getUsage()); setContentType(configurationOutput.getContentType()); setInputPreset(configurationOutput.getInputPreset()); // Save device format so we can do format conversion and volume scaling together. mDeviceFormat = configurationOutput.getFormat(); Loading
media/libaaudio/src/core/AudioStream.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,8 @@ aaudio_result_t AudioStream::open(const AudioStreamBuilder& builder) mDeviceId, mPerformanceMode, (isDataCallbackSet() ? "ON" : "OFF"), mFramesPerDataCallback); ALOGI("open() usage = %d, contentType = %d, inputPreset = %d", mUsage, mContentType, mInputPreset); return AAUDIO_OK; } Loading
media/libaaudio/src/core/AudioStream.h +22 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,7 @@ protected: /** * This should not be called after the open() call. * TODO for multiple setters: assert(mState == AAUDIO_STREAM_STATE_UNINITIALIZED) */ void setSampleRate(int32_t sampleRate) { mSampleRate = sampleRate; Loading Loading @@ -468,6 +469,27 @@ protected: return mPeriodNanoseconds.load(std::memory_order_acquire); } /** * This should not be called after the open() call. */ void setUsage(aaudio_usage_t usage) { mUsage = usage; } /** * This should not be called after the open() call. */ void setContentType(aaudio_content_type_t contentType) { mContentType = contentType; } /** * This should not be called after the open() call. */ void setInputPreset(aaudio_input_preset_t inputPreset) { mInputPreset = inputPreset; } private: std::mutex mStreamLock; Loading
services/oboeservice/AAudioServiceEndpoint.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -55,11 +55,15 @@ std::string AAudioServiceEndpoint::dump() const { result << " Direction: " << ((getDirection() == AAUDIO_DIRECTION_OUTPUT) ? "OUTPUT" : "INPUT") << "\n"; result << " Requested Device Id: " << mRequestedDeviceId << "\n"; result << " Device Id: " << getDeviceId() << "\n"; result << " Sample Rate: " << getSampleRate() << "\n"; result << " Channel Count: " << getSamplesPerFrame() << "\n"; result << " Frames Per Burst: " << mFramesPerBurst << "\n"; result << " Usage: " << getUsage() << "\n"; result << " ContentType: " << getContentType() << "\n"; result << " InputPreset: " << getInputPreset() << "\n"; result << " Reference Count: " << mOpenCount << "\n"; result << " Requested Device Id: " << mRequestedDeviceId << "\n"; result << " Device Id: " << getDeviceId() << "\n"; result << " Connected: " << mConnected.load() << "\n"; result << " Registered Streams:" << "\n"; result << AAudioServiceStreamShared::dumpHeader() << "\n"; Loading
services/oboeservice/AAudioServiceEndpointMMAP.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,9 @@ aaudio_result_t AAudioServiceEndpointMMAP::open(const aaudio::AAudioStreamReques .flags = AUDIO_FLAG_LOW_LATENCY, .tags = "" }; ALOGV("open() MMAP attributes.usage = %d, content_type = %d, source = %d", attributes.usage, attributes.content_type, attributes.source); mMmapClient.clientUid = request.getUserId(); mMmapClient.clientPid = request.getProcessId(); mMmapClient.packageName.setTo(String16("")); Loading