OSDN Git Service

am e88fe446: am b4b0608b: Merge "legacy audio policy: check string parameters before...
[android-x86/hardware-libhardware_legacy.git] / audio / A2dpAudioInterface.cpp
index 57c23bb..4ab52ba 100644 (file)
@@ -38,7 +38,7 @@ static const char *sA2dpWakeLock = "A2dpOutputStream";
 //    AudioHardwareInterface* hw = 0;
 //
 //    hw = AudioHardwareInterface::create();
-//    LOGD("new A2dpAudioInterface(hw: %p)", hw);
+//    ALOGD("new A2dpAudioInterface(hw: %p)", hw);
 //    hw = new A2dpAudioInterface(hw);
 //    return hw;
 //}
@@ -63,7 +63,7 @@ status_t A2dpAudioInterface::initCheck()
 AudioStreamOut* A2dpAudioInterface::openOutputStream(
         uint32_t devices, int *format, uint32_t *channels, uint32_t *sampleRate, status_t *status)
 {
-    if (!AudioSystem::isA2dpDevice((AudioSystem::audio_devices)devices)) {
+    if (!audio_is_a2dp_out_device(devices)) {
         ALOGV("A2dpAudioInterface::openOutputStream() open HW device: %x", devices);
         return mHardwareInterface->openOutputStream(devices, format, channels, sampleRate, status);
     }
@@ -239,7 +239,7 @@ status_t A2dpAudioInterface::A2dpAudioStreamOut::set(
     uint32_t lChannels = pChannels ? *pChannels : 0;
     uint32_t lRate = pRate ? *pRate : 0;
 
-    LOGD("A2dpAudioStreamOut::set %x, %d, %d, %d\n", device, lFormat, lChannels, lRate);
+    ALOGD("A2dpAudioStreamOut::set %x, %d, %d, %d\n", device, lFormat, lChannels, lRate);
 
     // fix up defaults
     if (lFormat == 0) lFormat = format();
@@ -301,7 +301,7 @@ ssize_t A2dpAudioInterface::A2dpAudioStreamOut::write(const void* buffer, size_t
         while (remaining > 0 && retries) {
             status = a2dp_write(mData, buffer, remaining);
             if (status < 0) {
-                LOGE("a2dp_write failed err: %d\n", status);
+                ALOGE("a2dp_write failed err: %d\n", status);
                 goto Error;
             }
             if (status == 0) {
@@ -338,7 +338,7 @@ status_t A2dpAudioInterface::A2dpAudioStreamOut::init()
     if (!mData) {
         status_t status = a2dp_init(44100, 2, &mData);
         if (status < 0) {
-            LOGE("a2dp_init failed err: %d\n", status);
+            ALOGE("a2dp_init failed err: %d\n", status);
             mData = NULL;
             return status;
         }
@@ -398,7 +398,7 @@ status_t A2dpAudioInterface::A2dpAudioStreamOut::setParameters(const String8& ke
     }
     key = AudioParameter::keyRouting;
     if (param.getInt(key, device) == NO_ERROR) {
-        if (AudioSystem::isA2dpDevice((AudioSystem::audio_devices)device)) {
+        if (audio_is_a2dp_out_device(device)) {
             mDevice = device;
             status = NO_ERROR;
         } else {
@@ -448,7 +448,7 @@ status_t A2dpAudioInterface::A2dpAudioStreamOut::setAddress(const char* address)
 
 status_t A2dpAudioInterface::A2dpAudioStreamOut::setBluetoothEnabled(bool enabled)
 {
-    LOGD("setBluetoothEnabled %d", enabled);
+    ALOGD("setBluetoothEnabled %d", enabled);
 
     Mutex::Autolock lock(mLock);