summaryrefslogtreecommitdiffstats
path: root/libaudio
diff options
context:
space:
mode:
authorDooHyunHwang <dh0421.hwang@samsung.com>2010-10-14 00:22:21 -0700
committerEric Laurent <elaurent@google.com>2010-10-14 08:23:06 -0700
commit974ba148a66cbecc7a787d4bd6031926a9a85504 (patch)
treecff1167d2858e82dd6b393790a4daa11208d1dc9 /libaudio
parentd00d36e5d3fa25020bb094c872da28397bd87978 (diff)
downloaddevice_samsung_crespo-974ba148a66cbecc7a787d4bd6031926a9a85504.zip
device_samsung_crespo-974ba148a66cbecc7a787d4bd6031926a9a85504.tar.gz
device_samsung_crespo-974ba148a66cbecc7a787d4bd6031926a9a85504.tar.bz2
S5PC11X: SOUND: changed amix name for recognition and deleted unused codes
Change-Id: Ia714d2f16205773c7e30db1d9e03aba6b8f08cf7 Signed-off-by: DooHyunHwang <dh0421.hwang@samsung.com>
Diffstat (limited to 'libaudio')
-rwxr-xr-xlibaudio/AudioHardwareALSA.cpp16
-rwxr-xr-xlibaudio/AudioHardwareALSA.h5
2 files changed, 5 insertions, 16 deletions
diff --git a/libaudio/AudioHardwareALSA.cpp b/libaudio/AudioHardwareALSA.cpp
index 770b2b6..b05b979 100755
--- a/libaudio/AudioHardwareALSA.cpp
+++ b/libaudio/AudioHardwareALSA.cpp
@@ -377,16 +377,6 @@ status_t AudioHardwareALSA::setMasterVolume(float volume)
return INVALID_OPERATION;
}
-int AudioHardwareALSA::setMicStatus(int on)
-{
- LOGI("[%s], on=%d", __func__, on);
- ALSAControl *mALSAControl = new ALSAControl();
- status_t ret = mALSAControl->set("Mic Status", on);
- delete mALSAControl;
- return NO_ERROR;
-}
-
-
AudioStreamOut *
AudioHardwareALSA::openOutputStream(
uint32_t devices,
@@ -482,7 +472,6 @@ exit:
// Some information is expected to be available immediately after
// the device is open.
mInput->setDevice(mMode, devices, CAPTURE); /* Tushar - as per modified arch */
- setMicStatus(1);
} else if (in != NULL) {
delete in;
}
@@ -505,7 +494,6 @@ AudioHardwareALSA::closeInputStream(AudioStreamIn* in)
return;
} else {
mInput = 0;
- setMicStatus(0);
}
}
delete in;
@@ -693,7 +681,7 @@ int AudioHardwareALSA::setVoiceRecordGain_l(bool enable)
if (enable != mVrModeEnabled &&
!(enable && (mMode == AudioSystem::MODE_IN_CALL))) {
ALSAControl *alsaControl = new ALSAControl();
- status_t ret = alsaControl->set("Codec Status", enable ? 5 : 4);
+ status_t ret = alsaControl->set("Recognition Control", enable ? RECOGNITION_ON : RECOGNITION_OFF);
delete alsaControl;
mVrModeEnabled = enable;
}
@@ -1566,8 +1554,6 @@ ssize_t AudioStreamInALSA::read(void *buffer, ssize_t bytes)
if (!mPowerLock) {
acquire_wake_lock (PARTIAL_WAKE_LOCK, "AudioInLock");
-// setMicStatus(1);
-
LOGD("Calling setDevice from read@..%d.\n",__LINE__);
ALSAStreamOps::setDevice(mParent->mode(), mDevice, CAPTURE);
mPowerLock = true;
diff --git a/libaudio/AudioHardwareALSA.h b/libaudio/AudioHardwareALSA.h
index c5721c2..dda1087 100755
--- a/libaudio/AudioHardwareALSA.h
+++ b/libaudio/AudioHardwareALSA.h
@@ -45,6 +45,10 @@
#define BUFFER_SZ_CAPTURE (PERIODS_CAPTURE * PERIOD_SZ_CAPTURE)
#define LATENCY_CAPTURE_MS ((BUFFER_SZ_CAPTURE * 1000 / DEFAULT_SAMPLE_RATE) * 1000)
+//Recognition param
+#define RECOGNITION_OFF 0
+#define RECOGNITION_ON 1
+
namespace android
{
@@ -292,7 +296,6 @@ namespace android
virtual size_t getInputBufferSize(uint32_t sampleRate,
int format,
int channelCount);
- virtual int setMicStatus(int on); // To deliver status of input stream(activated or not). If it's activated, doesn't turn off codec.
/** This method creates and opens the audio hardware output stream */
virtual AudioStreamOut* openOutputStream(uint32_t devices,