summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-02-01 17:57:04 -0800
committerEric Laurent <elaurent@google.com>2013-02-01 17:57:04 -0800
commit201fc9c9feb4765a12bc39e95d25f3aa1deb8ffe (patch)
treefc83fba00c9101d552f794021b3f551cd947673a /services
parent7acd13defdb3f33b2e266f1ef8f3ac85285c5e27 (diff)
downloadframeworks_av-201fc9c9feb4765a12bc39e95d25f3aa1deb8ffe.zip
frameworks_av-201fc9c9feb4765a12bc39e95d25f3aa1deb8ffe.tar.gz
frameworks_av-201fc9c9feb4765a12bc39e95d25f3aa1deb8ffe.tar.bz2
AudioFlinger: fix RecordThread initial device
A regression was introduced when the audio device enums where modified for a 32 bit representation: the device passed when constructing a RecordThread was still the concatenation of input device and output device bit fields on one 32 bit value which is not possible anymore. The fix consists in modifying the RecordThread constructor to accept separate values for input and output devices. Change-Id: I81fb5f4718428b54251e65d74b86e198ce15193e
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp6
-rw-r--r--services/audioflinger/Threads.cpp5
-rw-r--r--services/audioflinger/Threads.h3
3 files changed, 8 insertions, 6 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 5f5b041..89e9b52 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1600,14 +1600,14 @@ audio_io_handle_t AudioFlinger::openInput(audio_module_handle_t module,
// Start record thread
// RecorThread require both input and output device indication to forward to audio
// pre processing modules
- audio_devices_t device = (*pDevices) | primaryOutputDevice_l();
-
thread = new RecordThread(this,
input,
reqSamplingRate,
reqChannels,
id,
- device, teeSink);
+ primaryOutputDevice_l(),
+ *pDevices,
+ teeSink);
mRecordThreads.add(id, thread);
ALOGV("openInput() created record thread: ID %d thread %p", id, thread);
if (pSamplingRate != NULL) *pSamplingRate = reqSamplingRate;
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 744a7df..af0dccc 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -3545,9 +3545,10 @@ AudioFlinger::RecordThread::RecordThread(const sp<AudioFlinger>& audioFlinger,
uint32_t sampleRate,
audio_channel_mask_t channelMask,
audio_io_handle_t id,
- audio_devices_t device,
+ audio_devices_t outDevice,
+ audio_devices_t inDevice,
const sp<NBAIO_Sink>& teeSink) :
- ThreadBase(audioFlinger, id, AUDIO_DEVICE_NONE, device, RECORD),
+ ThreadBase(audioFlinger, id, outDevice, inDevice, RECORD),
mInput(input), mResampler(NULL), mRsmpOutBuffer(NULL), mRsmpInBuffer(NULL),
// mRsmpInIndex and mInputBytes set by readInputParameters()
mReqChannelCount(popcount(channelMask)),
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index 06a1c8c..a1abcde 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -698,7 +698,8 @@ public:
uint32_t sampleRate,
audio_channel_mask_t channelMask,
audio_io_handle_t id,
- audio_devices_t device,
+ audio_devices_t outDevice,
+ audio_devices_t inDevice,
const sp<NBAIO_Sink>& teeSink);
virtual ~RecordThread();