Merge "alsa: fix resampler logic" into jb-mr1
diff --git a/alsa_sound/ALSADevice.cpp b/alsa_sound/ALSADevice.cpp
index 4892dfe..cc8bc1a 100644
--- a/alsa_sound/ALSADevice.cpp
+++ b/alsa_sound/ALSADevice.cpp
@@ -1507,7 +1507,7 @@
         } else if ((devices & AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET ||
                     devices & AudioSystem::DEVICE_OUT_DGTL_DOCK_HEADSET) &&
                     devices & AudioSystem::DEVICE_OUT_SPEAKER) {
-             return strdup(SND_USE_CASE_DEV_PROXY_RX_SPEAKER); /* PROXY RX */
+             return strdup(SND_USE_CASE_DEV_USB_PROXY_RX_SPEAKER); /* USB PROXY RX + SPEAKER */
         } else if ((devices & AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET) ||
                   (devices & AudioSystem::DEVICE_OUT_DGTL_DOCK_HEADSET)) {
              return strdup(SND_USE_CASE_DEV_USB_PROXY_RX); /* PROXY RX */
diff --git a/alsa_sound/AudioHardwareALSA.cpp b/alsa_sound/AudioHardwareALSA.cpp
index 682c79f..ddef052 100755
--- a/alsa_sound/AudioHardwareALSA.cpp
+++ b/alsa_sound/AudioHardwareALSA.cpp
@@ -1036,29 +1036,20 @@
 
     status_t err = BAD_VALUE;
 #ifdef QCOM_OUTPUT_FLAGS_ENABLED
-    if (flags & AUDIO_OUTPUT_FLAG_LPA) {
+    if (flags & (AUDIO_OUTPUT_FLAG_LPA | AUDIO_OUTPUT_FLAG_TUNNEL)) {
+        int type = !(flags & AUDIO_OUTPUT_FLAG_LPA); //0 for LPA, 1 for tunnel
         AudioSessionOutALSA *out = new AudioSessionOutALSA(this, devices, *format, *channels,
-                                                           *sampleRate, 0, &err);
+                                                           *sampleRate, type, &err);
         if(err != NO_ERROR) {
+            mLock.unlock();
             delete out;
             out = NULL;
-        }
-        if (status) *status = err;
-        return out;
-    }
-
-    if (flags & AUDIO_OUTPUT_FLAG_TUNNEL) {
-        AudioSessionOutALSA *out = new AudioSessionOutALSA(this, devices, *format, *channels,
-                                                           *sampleRate, 1, &err);
-        if(err != NO_ERROR) {
-            delete out;
-            out = NULL;
+            mLock.lock();
         }
         if (status) *status = err;
         return out;
     }
 #endif
-
     AudioStreamOutALSA *out = 0;
     ALSAHandleList::iterator it;
 
@@ -1724,13 +1715,19 @@
         }
 
 #ifdef QCOM_SSR_ENABLED
-        //Check if SSR is supported by reading system property
-        char ssr_enabled[6] = "false";
-        property_get("ro.qc.sdk.audio.ssr",ssr_enabled,"0");
-        if (strncmp("true", ssr_enabled, 4)) {
-            if (status) *status = err;
-            ALOGE("openInputStream: FAILED:%d. Surround sound recording is not supported",*status);
-            return in;
+        if (6 == it->channels) {
+            if (!strncmp(it->useCase, SND_USE_CASE_VERB_HIFI_REC, strlen(SND_USE_CASE_VERB_HIFI_REC))
+                || !strncmp(it->useCase, SND_USE_CASE_VERB_HIFI_REC_COMPRESSED, strlen(SND_USE_CASE_VERB_HIFI_REC_COMPRESSED))
+                || !strncmp(it->useCase, SND_USE_CASE_MOD_CAPTURE_MUSIC, strlen(SND_USE_CASE_MOD_CAPTURE_MUSIC))
+                || !strncmp(it->useCase, SND_USE_CASE_MOD_CAPTURE_MUSIC_COMPRESSED, strlen(SND_USE_CASE_MOD_CAPTURE_MUSIC_COMPRESSED))) {
+                //Check if SSR is supported by reading system property
+                char ssr_enabled[6] = "false";
+                property_get("ro.qc.sdk.audio.ssr",ssr_enabled,"0");
+                if (strncmp("true", ssr_enabled, 4)) {
+                    if (status) *status = err;
+                    ALOGE("openInputStream: FAILED:%d. Surround sound recording is not supported",*status);
+                }
+            }
         }
 #endif
         err = mALSADevice->open(&(*it));
diff --git a/alsa_sound/AudioHardwareALSA.h b/alsa_sound/AudioHardwareALSA.h
index 33a29ae..fe52bb5 100644
--- a/alsa_sound/AudioHardwareALSA.h
+++ b/alsa_sound/AudioHardwareALSA.h
@@ -80,18 +80,21 @@
 #define PLAYBACK_LOW_LATENCY_MEASURED  42000
 #ifdef TARGET_8974
 #define DEFAULT_IN_BUFFER_SIZE 512
+#define MIN_CAPTURE_BUFFER_SIZE_PER_CH   512
+#define VOIP_BUFFER_SIZE_8K    512
+#define VOIP_BUFFER_SIZE_16K   1024
 #else
 #define DEFAULT_IN_BUFFER_SIZE 320
-#endif
 #define MIN_CAPTURE_BUFFER_SIZE_PER_CH   320
+#define VOIP_BUFFER_SIZE_8K    320
+#define VOIP_BUFFER_SIZE_16K   640
+#endif
 #define MAX_CAPTURE_BUFFER_SIZE_PER_CH   2048
 #define FM_BUFFER_SIZE        1024
 
 #define VOIP_SAMPLING_RATE_8K 8000
 #define VOIP_SAMPLING_RATE_16K 16000
 #define VOIP_DEFAULT_CHANNEL_MODE  1
-#define VOIP_BUFFER_SIZE_8K    320
-#define VOIP_BUFFER_SIZE_16K   640
 #define VOIP_BUFFER_MAX_SIZE   VOIP_BUFFER_SIZE_16K
 #define VOIP_PLAYBACK_LATENCY      6400
 #define VOIP_RECORD_LATENCY        6400
@@ -566,6 +569,7 @@
     static void *       eventThreadWrapper(void *me);
     void                eventThreadEntry();
     void                reset();
+    status_t            drainAndPostEOS_l();
 
     //Structure to hold mem buffer information
     class BuffersAllocated {
diff --git a/alsa_sound/AudioPolicyManagerALSA.cpp b/alsa_sound/AudioPolicyManagerALSA.cpp
index 5eaa55f..a305195 100644
--- a/alsa_sound/AudioPolicyManagerALSA.cpp
+++ b/alsa_sound/AudioPolicyManagerALSA.cpp
@@ -441,7 +441,12 @@
     }
 
     // change routing is necessary
-    setOutputDevice(mPrimaryOutput, newDevice, force, delayMs);
+    // Update devices for all outputs(direct, tunnel, and hdmi, etc) instead of updating only for mPrimaryOutput
+    for (size_t i = 0; i < mOutputs.size(); i++) {
+        audio_io_handle_t output = mOutputs.keyAt(i);
+        audio_devices_t newDevice = getNewDevice(output, false /*fromCache*/);
+        setOutputDevice(output, newDevice, (newDevice != AUDIO_DEVICE_NONE));
+    }
 
     // if entering in call state, handle special case of active streams
     // pertaining to sonification strategy see handleIncallSonification()
diff --git a/alsa_sound/AudioSessionOut.cpp b/alsa_sound/AudioSessionOut.cpp
index bb6c9ee..30eacdf 100644
--- a/alsa_sound/AudioSessionOut.cpp
+++ b/alsa_sound/AudioSessionOut.cpp
@@ -61,7 +61,7 @@
 #define KILL_EVENT_THREAD 1
 #define BUFFER_COUNT 4
 #define LPA_BUFFER_SIZE 256*1024
-#define TUNNEL_BUFFER_SIZE 256*1024
+#define TUNNEL_BUFFER_SIZE 240*1024
 #define TUNNEL_METADATA_SIZE 64
 #define MONO_CHANNEL_MODE 1
 
@@ -276,17 +276,16 @@
     ALOGV("write Empty Queue size() = %d, Filled Queue size() = %d mReached EOS %d, mEosEventReceived %d bytes %d",
          mEmptyQueue.size(),mFilledQueue.size(), mReachedEOS, mEosEventReceived, bytes);
 
-    if(mFilledQueue.empty() && !bytes) {
+    mEosEventReceived = false;
+    mReachedEOS = false;
+
+    if (!bytes) {
         mReachedEOS = true;
-//        mEosEventReceived = true;
-        ALOGV("mObserver: posting EOS ignored");
-  //      mObserver->postEOS(0);
     }
 
     //1.) Dequeue the buffer from empty buffer queue. Copy the data to be
     //    written into the buffer. Then Enqueue the buffer to the filled
     //    buffer queue
-    mEmptyQueueMutex.lock();
 
    if (mSkipWrite && (mEmptyQueue.size() == BUFFER_COUNT)) {
        ALOGV("reducing mSkipWrite by 1 in write");
@@ -294,7 +293,6 @@
        if(mSkipWrite == false){
             ALOGV("mSkipWrite is false now write bytes %d", bytes);
             if( bytes && lbuffer[(lbuflength/sizeof(int))] == 0){
-                 mEmptyQueueMutex.unlock();
                  ALOGV("skipping buffer in write %d", lbuffer[(lbuflength/sizeof(int))]);
                  return 0;
             } else {
@@ -302,7 +300,6 @@
             }
         } else {
             //we have not skipped as many buffers as seeks
-             mEmptyQueueMutex.unlock();
              ALOGV("returning from write since we have not skipped enough mSkipWrite %d",
                  mSkipWrite);
              return 0;
@@ -320,7 +317,6 @@
     BuffersAllocated buf = *it;
 
     mEmptyQueue.erase(it);
-    mEmptyQueueMutex.unlock();
 
     memset(buf.memBuf, 0, mAlsaHandle->handle->period_size);
     if((!strncmp(mAlsaHandle->useCase, SND_USE_CASE_VERB_HIFI_TUNNEL,
@@ -332,10 +328,26 @@
         memcpy(buf.memBuf, &mOutputMetadataTunnel, mOutputMetadataLength);
         ALOGD("Copy Metadata = %d, bytes = %d", mOutputMetadataLength, bytes);
 
-        if(bytes == 0) {
-          err = pcm_write(mAlsaHandle->handle, buf.memBuf, mAlsaHandle->handle->period_size);
-          buf.bytesToWrite = bytes;
-          return err;
+        if (bytes == 0) {
+            buf.bytesToWrite = 0;
+            err = pcm_write(mAlsaHandle->handle, buf.memBuf, mAlsaHandle->handle->period_size);
+
+            //bad part is !err does not guarantee pcm_write succeeded!
+            if (!err) { //mReachedEOS is already set
+                /*
+                 * This workaround is needed to ensure EOS from the event thread
+                 * is posted when the first (only) buffer given to the driver
+                 * is a zero length buffer. Note that the compressed driver
+                 * does not interrupt the timer fd if the EOS buffer was queued
+                 * after a buffer with valid data (full or partial). So we
+                 * only need to do this in this special case.
+                 */
+                if (mFilledQueue.empty()) {
+                    mFilledQueue.push_back(buf);
+                }
+            }
+
+            return err;
         }
     }
     ALOGV("PCM write before memcpy start");
@@ -358,9 +370,7 @@
         mReachedEOS = true;
     }
 
-    mFilledQueueMutex.lock();
     mFilledQueue.push_back(buf);
-    mFilledQueueMutex.unlock();
     return err;
 }
 
@@ -481,70 +491,29 @@
             pfd[0].revents = 0;
             ALOGV("After an event occurs");
 
-            mFilledQueueMutex.lock();
-            if (mFilledQueue.empty()) {
-                ALOGV("Filled queue is empty");
-                mFilledQueueMutex.unlock();
-                continue;
-            }
-            // Transfer a buffer that was consumed by the driver from filled queue
-            // to empty queue
-
-            BuffersAllocated buf = *(mFilledQueue.begin());
-            mFilledQueue.erase(mFilledQueue.begin());
-            ALOGV("mFilledQueue %d", mFilledQueue.size());
-            mLock.lock();
-            bool lReachedEOS = mReachedEOS;
-            mLock.unlock();
-
-            //Post EOS in case the filled queue is empty and EOS is reached.
-            if (mFilledQueue.empty() && lReachedEOS) {
-                 mSkipEOS = false;
-                 mFilledQueueMutex.unlock();
-                 if (mObserver != NULL) {
-                     if((!strncmp(mAlsaHandle->useCase, SND_USE_CASE_VERB_HIFI_TUNNEL,
-                             strlen(SND_USE_CASE_VERB_HIFI_TUNNEL))) ||
-                             (!strncmp(mAlsaHandle->useCase, SND_USE_CASE_MOD_PLAY_TUNNEL,
-                             strlen(SND_USE_CASE_MOD_PLAY_TUNNEL)))) {
-                         ALOGD("Audio Drain DONE ++");
-                         if ( ioctl(mAlsaHandle->handle->fd, SNDRV_COMPRESS_DRAIN) < 0 ) {
-                             ALOGE("Audio Drain failed");
-                             mSkipEOS = true;
-                         }
-                         ALOGD("Audio Drain DONE --");
-                     }
-                     if(mSkipEOS == false) {
-
-                         mLock.lock();
-                         lReachedEOS = mReachedEOS;
-                         mLock.unlock();
-
-                         ALOGV("Posting the EOS to the observer player %p depending on mReachedEOS %d", \
-                             mObserver, lReachedEOS);
-
-                         if(lReachedEOS) {
-                             ALOGV("mObserver: posting EOS from eventcallback");
-                             //TODO: potential issue here since flush can reset this
-                             mEosEventReceived = true;
-                             mObserver->postEOS(0);
-                         } else {
-                             ALOGV("Ignored EOS posting since Reached EOS was reset");
-                         }
-                     }
+            {
+                Mutex::Autolock _l(mLock);
+                if (mFilledQueue.empty()) {
+                    ALOGV("Filled queue is empty"); //only time this would be valid is after a flush?
+                    continue;
                 }
-            } else {
-                mFilledQueueMutex.unlock();
-            }
+                // Transfer a buffer that was consumed by the driver from filled queue
+                // to empty queue
 
-            mEmptyQueueMutex.lock();
-            mEmptyQueue.push_back(buf);
+                BuffersAllocated buf = *(mFilledQueue.begin());
+                mFilledQueue.erase(mFilledQueue.begin());
+                ALOGV("mFilledQueue %d", mFilledQueue.size());
 
-            if (mSkipWrite) {
+                mEmptyQueue.push_back(buf);
+                mWriteCv.signal();
                 ALOGV("Reset mSkipwrite in eventthread entry");
                 mSkipWrite = false;
+
+                //Post EOS in case the filled queue is empty and EOS is reached.
+                if (mFilledQueue.empty() && mReachedEOS) {
+                    drainAndPostEOS_l();
+                }
             }
-            mEmptyQueueMutex.unlock();
-            mWriteCv.signal();
         }
     }
 
@@ -679,8 +648,6 @@
     ALOGV("AudioSessionOutALSA flush");
     int err;
     {
-        Mutex::Autolock autoLockEmptyQueue(mEmptyQueueMutex);
-        Mutex::Autolock autoLockFilledQueue(mFilledQueueMutex);
         // 1.) Clear the Empty and Filled buffer queue
         mEmptyQueue.clear();
         mFilledQueue.clear();
@@ -695,6 +662,7 @@
 
     ALOGV("Transferred all the buffers from Filled queue to "
           "Empty queue to handle seek paused %d, skipwrite %d", mPaused, mSkipWrite);
+    ALOGV("Set mReachedEOS to false and mEosEventReceived to false");
     mReachedEOS = false;
     mEosEventReceived = false;
     mSkipEOS = false;
@@ -851,25 +819,21 @@
     ALOGV("isBufferAvailable Empty Queue size() = %d, Filled Queue size() = %d ",
           mEmptyQueue.size(),mFilledQueue.size());
     *isAvail = false;
-    mEmptyQueueMutex.lock();
+
     if (mSkipWrite && (mEmptyQueue.size() == BUFFER_COUNT)) {
         mSkipWrite = false;
     }
     // 1.) Wait till a empty buffer is available in the Empty buffer queue
-    if (mEmptyQueue.empty()) {
+    while (mEmptyQueue.empty()) {
         ALOGV("Write: waiting on mWriteCv");
-        mLock.unlock();
-        mWriteCv.wait(mEmptyQueueMutex);
-        mLock.lock();
+        mWriteCv.wait(mLock);
         if (mSkipWrite) {
             ALOGV("Write: Flushing the previous write buffer");
             mSkipWrite = false;
-            mEmptyQueueMutex.unlock();
             return NO_ERROR;
         }
         ALOGV("isBufferAvailable: received a signal to wake up");
     }
-    mEmptyQueueMutex.unlock();
 
     *isAvail = true;
     return NO_ERROR;
@@ -1016,4 +980,62 @@
             bytes, mAlsaHandle->handle->period_size);
 }
 
+status_t AudioSessionOutALSA::drainAndPostEOS_l()
+{
+    if (!mFilledQueue.empty()) {
+        ALOGD("drainAndPostEOS called without empty mFilledQueue");
+        return INVALID_OPERATION;
+    }
+
+    if (!mReachedEOS) {
+        ALOGD("drainAndPostEOS called without mReachedEOS set");
+        return INVALID_OPERATION;
+    }
+
+    if (mEosEventReceived) {
+        ALOGD("drainAndPostEOS called after mEosEventReceived");
+        return INVALID_OPERATION;
+    }
+
+    mSkipEOS = false;
+    if ((!strncmp(mAlsaHandle->useCase, SND_USE_CASE_VERB_HIFI_TUNNEL,
+                  strlen(SND_USE_CASE_VERB_HIFI_TUNNEL))) ||
+       (!strncmp(mAlsaHandle->useCase, SND_USE_CASE_MOD_PLAY_TUNNEL,
+                  strlen(SND_USE_CASE_MOD_PLAY_TUNNEL)))) {
+        ALOGD("Audio Drain DONE ++");
+        mLock.unlock(); //to allow flush()
+        int ret = ioctl(mAlsaHandle->handle->fd, SNDRV_COMPRESS_DRAIN);
+        mLock.lock();
+
+        if (ret < 0 ) {
+            ALOGE("Audio Drain failed with errno %s", strerror(errno));
+            switch (ret) {
+            case -EINTR: //interrupted by flush
+            case -EWOULDBLOCK: //no writes given, drain would block indefintely
+              mSkipEOS = true;
+              break;
+            default:
+              mSkipEOS = false;
+              break;
+            }
+        }
+        ALOGD("Audio Drain DONE --");
+    }
+
+    if (mSkipEOS == false) {
+        ALOGV("Posting the EOS to the observer player %p depending on mReachedEOS %d", \
+              mObserver, mReachedEOS);
+        mEosEventReceived = true;
+        if (mObserver != NULL) {
+          ALOGV("mObserver: posting EOS from eventcallback");
+          mLock.unlock();
+          mObserver->postEOS(0);
+          mLock.lock();
+        };
+    } else {
+      ALOGD("Ignored EOS posting since mSkipEOS is false");
+    }
+    return OK;
+}
+
 }       // namespace android_audio_legacy
diff --git a/alsa_sound/AudioUsbALSA.cpp b/alsa_sound/AudioUsbALSA.cpp
index 609e77c..24b85d1 100644
--- a/alsa_sound/AudioUsbALSA.cpp
+++ b/alsa_sound/AudioUsbALSA.cpp
@@ -11,7 +11,7 @@
       copyright notice, this list of conditions and the following
       disclaimer in the documentation and/or other materials provided
       with the distribution.
-    * Neither the name of Code Aurora Forum, Inc. nor the names of its
+    * Neither the name of The Linux Foundation nor the names of its
       contributors may be used to endorse or promote products derived
       from this software without specific prior written permission.
 
diff --git a/alsa_sound/AudioUsbALSA.h b/alsa_sound/AudioUsbALSA.h
index d408d1e..0596dba 100644
--- a/alsa_sound/AudioUsbALSA.h
+++ b/alsa_sound/AudioUsbALSA.h
@@ -11,7 +11,7 @@
       copyright notice, this list of conditions and the following
       disclaimer in the documentation and/or other materials provided
       with the distribution.
-    * Neither the name of Code Aurora Forum, Inc. nor the names of its
+    * Neither the name of The Linux Foundation nor the names of its
       contributors may be used to endorse or promote products derived
       from this software without specific prior written permission.
 
diff --git a/alsa_sound/audio_hw_hal.cpp b/alsa_sound/audio_hw_hal.cpp
index 9e0f72f..48db8b9 100644
--- a/alsa_sound/audio_hw_hal.cpp
+++ b/alsa_sound/audio_hw_hal.cpp
@@ -859,7 +859,7 @@
             hal_api_version: HARDWARE_HAL_API_VERSION,
             id: AUDIO_HARDWARE_MODULE_ID,
             name: "QCOM Audio HW HAL",
-            author: "Code Aurora Forum",
+            author: "The Linux Foundation",
             methods: &qcom_audio_module_methods,
             dso : NULL,
             reserved : {0},
diff --git a/alsa_sound/audio_policy_hal.cpp b/alsa_sound/audio_policy_hal.cpp
index 557b2c3..41b6a9a 100644
--- a/alsa_sound/audio_policy_hal.cpp
+++ b/alsa_sound/audio_policy_hal.cpp
@@ -447,7 +447,7 @@
             version_minor: 0,
             id: AUDIO_POLICY_HARDWARE_MODULE_ID,
             name: "QCOM Audio Policy HAL",
-            author: "Code Aurora Forum",
+            author: "The Linux Foundation",
             methods: &qcom_ap_module_methods,
             dso : NULL,
             reserved : {0},
diff --git a/libalsa-intf/alsa_audio.h b/libalsa-intf/alsa_audio.h
index eb04181..39947a3 100644
--- a/libalsa-intf/alsa_audio.h
+++ b/libalsa-intf/alsa_audio.h
@@ -1,6 +1,6 @@
 /*
 ** Copyright 2010, The Android Open-Source Project
-** Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+** Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
diff --git a/libalsa-intf/alsa_mixer.c b/libalsa-intf/alsa_mixer.c
index 81817d9..9a36405 100644
--- a/libalsa-intf/alsa_mixer.c
+++ b/libalsa-intf/alsa_mixer.c
@@ -1,6 +1,6 @@
 /*
 ** Copyright 2010, The Android Open-Source Project
-** Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+** Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
diff --git a/libalsa-intf/alsa_pcm.c b/libalsa-intf/alsa_pcm.c
index 4f55437..eb33a0f 100644
--- a/libalsa-intf/alsa_pcm.c
+++ b/libalsa-intf/alsa_pcm.c
@@ -1,6 +1,6 @@
 /*
 ** Copyright 2010, The Android Open-Source Project
-** Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+** Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
diff --git a/libalsa-intf/alsa_ucm.c b/libalsa-intf/alsa_ucm.c
index 26ac1ed..2a02500 100644
--- a/libalsa-intf/alsa_ucm.c
+++ b/libalsa-intf/alsa_ucm.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2013, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@
  *     copyright notice, this list of conditions and the following
  *     disclaimer in the documentation and/or other materials provided
  *     with the distribution.
- *   * Neither the name of Code Aurora Forum, Inc. nor the names of its
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
@@ -761,6 +761,12 @@
 
     verb_list = uc_mgr->card_ctxt_ptr->use_case_verb_list;
     verb_index = uc_mgr->card_ctxt_ptr->current_verb_index;
+
+    if (verb_index < 0) {
+        ALOGE("Invalid verb_index %d", verb_index);
+        return -EINVAL;
+    }
+
     if (ctrl_list_type == CTRL_LIST_VERB) {
         ctrl_list =
             uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].verb_ctrls;
@@ -773,9 +779,9 @@
     } else {
         ctrl_list = NULL;
     }
-    if((verb_index < 0) ||
-      (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, SND_UCM_END_OF_LIST, 3)) ||
-      (ctrl_list == NULL) || (ctrl_list[index].case_name == NULL)) {
+
+    if (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, SND_UCM_END_OF_LIST, 3) ||
+       (ctrl_list == NULL) || (ctrl_list[index].case_name == NULL)) {
         ALOGE("Invalid current verb value: %s - %d",
                 uc_mgr->card_ctxt_ptr->current_verb, verb_index);
         return -EINVAL;
diff --git a/libalsa-intf/alsaucm_test.c b/libalsa-intf/alsaucm_test.c
index e7d927d..04d3868 100644
--- a/libalsa-intf/alsaucm_test.c
+++ b/libalsa-intf/alsaucm_test.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@
  *     copyright notice, this list of conditions and the following
  *     disclaimer in the documentation and/or other materials provided
  *     with the distribution.
- *   * Neither the name of Code Aurora Forum, Inc. nor the names of its
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/libalsa-intf/amix.c b/libalsa-intf/amix.c
index 40f3807..b425ed5 100644
--- a/libalsa-intf/amix.c
+++ b/libalsa-intf/amix.c
@@ -1,6 +1,6 @@
 /*
 ** Copyright 2010, The Android Open-Source Project
-** Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+** Copyright (c) 2011, The Linux Foundation. All rights reserved.
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
diff --git a/libalsa-intf/aplay.c b/libalsa-intf/aplay.c
index 62a58fa..4a3897f 100644
--- a/libalsa-intf/aplay.c
+++ b/libalsa-intf/aplay.c
@@ -1,6 +1,6 @@
 /*
 ** Copyright 2010, The Android Open-Source Project
-** Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+** Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
diff --git a/libalsa-intf/arec.c b/libalsa-intf/arec.c
index 8f74fe8..a941545 100644
--- a/libalsa-intf/arec.c
+++ b/libalsa-intf/arec.c
@@ -1,6 +1,6 @@
 /*
 ** Copyright 2010, The Android Open-Source Project
-** Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+** Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
diff --git a/libalsa-intf/msm8960_use_cases.h b/libalsa-intf/msm8960_use_cases.h
index a9c9210..b1309ca 100644
--- a/libalsa-intf/msm8960_use_cases.h
+++ b/libalsa-intf/msm8960_use_cases.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2013, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@
  *     copyright notice, this list of conditions and the following
  *     disclaimer in the documentation and/or other materials provided
  *     with the distribution.
- *   * Neither the name of Code Aurora Forum, Inc. nor the names of its
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
@@ -284,6 +284,7 @@
 #define SND_USE_CASE_DEV_SPDIF_SPEAKER_ANC_HEADSET "SPDIF Speaker ANC Headset"
 #define SND_USE_CASE_DEV_DUMMY_TX "Dummy Tx"
 #define SND_USE_CASE_DEV_PROXY_RX_SPEAKER     "PROXY Rx Speaker"
+#define SND_USE_CASE_DEV_USB_PROXY_RX_SPEAKER     "USB PROXY Rx Speaker"
 #define SND_USE_CASE_DEV_PROXY_RX_HANDSET     "PROXY Rx Earpiece"
 #define SND_USE_CASE_DEV_PROXY_RX_HEADSET     "PROXY Rx Headphones"
 #define SND_USE_CASE_DEV_PROXY_RX_ANC_HEADSET     "PROXY Rx ANC Headset"
diff --git a/mm-audio/adec-aac/sw/test/omx_aac_dec_test.c b/mm-audio/adec-aac/sw/test/omx_aac_dec_test.c
index f627deb..e591cdd 100755
--- a/mm-audio/adec-aac/sw/test/omx_aac_dec_test.c
+++ b/mm-audio/adec-aac/sw/test/omx_aac_dec_test.c
@@ -1,6 +1,6 @@
 
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -9,7 +9,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/adec-amr/sw/test/omx_amr_dec_test.c b/mm-audio/adec-amr/sw/test/omx_amr_dec_test.c
index f66e8a0..2ce7896 100755
--- a/mm-audio/adec-amr/sw/test/omx_amr_dec_test.c
+++ b/mm-audio/adec-amr/sw/test/omx_amr_dec_test.c
@@ -1,6 +1,6 @@
 
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -9,7 +9,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/adec-amrwb/sw/test/omx_amrwb_dec_test.c b/mm-audio/adec-amrwb/sw/test/omx_amrwb_dec_test.c
index 2e7c0fb..5e9d748 100755
--- a/mm-audio/adec-amrwb/sw/test/omx_amrwb_dec_test.c
+++ b/mm-audio/adec-amrwb/sw/test/omx_amrwb_dec_test.c
@@ -1,6 +1,6 @@
 
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -9,7 +9,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/adec-mp3/sw/test/omx_mp3_dec_test.c b/mm-audio/adec-mp3/sw/test/omx_mp3_dec_test.c
index 466cd62..31931d7 100755
--- a/mm-audio/adec-mp3/sw/test/omx_mp3_dec_test.c
+++ b/mm-audio/adec-mp3/sw/test/omx_mp3_dec_test.c
@@ -1,6 +1,6 @@
 
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -9,7 +9,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-aac/qdsp6/inc/Map.h b/mm-audio/aenc-aac/qdsp6/inc/Map.h
index 7486e7c..aac96fd 100755
--- a/mm-audio/aenc-aac/qdsp6/inc/Map.h
+++ b/mm-audio/aenc-aac/qdsp6/inc/Map.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-aac/qdsp6/inc/aenc_svr.h b/mm-audio/aenc-aac/qdsp6/inc/aenc_svr.h
index 287d501..72bfebe 100755
--- a/mm-audio/aenc-aac/qdsp6/inc/aenc_svr.h
+++ b/mm-audio/aenc-aac/qdsp6/inc/aenc_svr.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-aac/qdsp6/inc/omx_aac_aenc.h b/mm-audio/aenc-aac/qdsp6/inc/omx_aac_aenc.h
index ba496b0..276eaa3 100755
--- a/mm-audio/aenc-aac/qdsp6/inc/omx_aac_aenc.h
+++ b/mm-audio/aenc-aac/qdsp6/inc/omx_aac_aenc.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-aac/qdsp6/src/aenc_svr.c b/mm-audio/aenc-aac/qdsp6/src/aenc_svr.c
index 08cba01..a7c2a42 100755
--- a/mm-audio/aenc-aac/qdsp6/src/aenc_svr.c
+++ b/mm-audio/aenc-aac/qdsp6/src/aenc_svr.c
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-aac/qdsp6/src/omx_aac_aenc.cpp b/mm-audio/aenc-aac/qdsp6/src/omx_aac_aenc.cpp
index d1c48f8..874a4eb 100755
--- a/mm-audio/aenc-aac/qdsp6/src/omx_aac_aenc.cpp
+++ b/mm-audio/aenc-aac/qdsp6/src/omx_aac_aenc.cpp
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-aac/qdsp6/test/omx_aac_enc_test.c b/mm-audio/aenc-aac/qdsp6/test/omx_aac_enc_test.c
index f622d85..c3e4b0a 100755
--- a/mm-audio/aenc-aac/qdsp6/test/omx_aac_enc_test.c
+++ b/mm-audio/aenc-aac/qdsp6/test/omx_aac_enc_test.c
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-amrnb/qdsp6/inc/Map.h b/mm-audio/aenc-amrnb/qdsp6/inc/Map.h
index 7486e7c..aac96fd 100755
--- a/mm-audio/aenc-amrnb/qdsp6/inc/Map.h
+++ b/mm-audio/aenc-amrnb/qdsp6/inc/Map.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-amrnb/qdsp6/inc/aenc_svr.h b/mm-audio/aenc-amrnb/qdsp6/inc/aenc_svr.h
index 9bb26ff..782641b 100755
--- a/mm-audio/aenc-amrnb/qdsp6/inc/aenc_svr.h
+++ b/mm-audio/aenc-amrnb/qdsp6/inc/aenc_svr.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-amrnb/qdsp6/inc/omx_amr_aenc.h b/mm-audio/aenc-amrnb/qdsp6/inc/omx_amr_aenc.h
index 683799f..4b89765 100755
--- a/mm-audio/aenc-amrnb/qdsp6/inc/omx_amr_aenc.h
+++ b/mm-audio/aenc-amrnb/qdsp6/inc/omx_amr_aenc.h
@@ -1,6 +1,6 @@
 /*--------------------------------------------------------------------------
 
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -9,7 +9,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-amrnb/qdsp6/src/aenc_svr.c b/mm-audio/aenc-amrnb/qdsp6/src/aenc_svr.c
index a524015..199358f 100755
--- a/mm-audio/aenc-amrnb/qdsp6/src/aenc_svr.c
+++ b/mm-audio/aenc-amrnb/qdsp6/src/aenc_svr.c
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-amrnb/qdsp6/src/omx_amr_aenc.cpp b/mm-audio/aenc-amrnb/qdsp6/src/omx_amr_aenc.cpp
index fce18c5..90dd8c6 100755
--- a/mm-audio/aenc-amrnb/qdsp6/src/omx_amr_aenc.cpp
+++ b/mm-audio/aenc-amrnb/qdsp6/src/omx_amr_aenc.cpp
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-amrnb/qdsp6/test/omx_amr_enc_test.c b/mm-audio/aenc-amrnb/qdsp6/test/omx_amr_enc_test.c
index 288a8a7..a3c91b1 100755
--- a/mm-audio/aenc-amrnb/qdsp6/test/omx_amr_enc_test.c
+++ b/mm-audio/aenc-amrnb/qdsp6/test/omx_amr_enc_test.c
@@ -1,6 +1,6 @@
 
 /*--------------------------------------------------------------------------
-Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -9,7 +9,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-evrc/qdsp6/inc/Map.h b/mm-audio/aenc-evrc/qdsp6/inc/Map.h
index 7486e7c..aac96fd 100755
--- a/mm-audio/aenc-evrc/qdsp6/inc/Map.h
+++ b/mm-audio/aenc-evrc/qdsp6/inc/Map.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-evrc/qdsp6/inc/aenc_svr.h b/mm-audio/aenc-evrc/qdsp6/inc/aenc_svr.h
index 84a56ff..46f40ee 100755
--- a/mm-audio/aenc-evrc/qdsp6/inc/aenc_svr.h
+++ b/mm-audio/aenc-evrc/qdsp6/inc/aenc_svr.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-evrc/qdsp6/inc/omx_evrc_aenc.h b/mm-audio/aenc-evrc/qdsp6/inc/omx_evrc_aenc.h
index 33e71c4..fa83230 100755
--- a/mm-audio/aenc-evrc/qdsp6/inc/omx_evrc_aenc.h
+++ b/mm-audio/aenc-evrc/qdsp6/inc/omx_evrc_aenc.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-evrc/qdsp6/src/aenc_svr.c b/mm-audio/aenc-evrc/qdsp6/src/aenc_svr.c
index f684b48..2128718 100755
--- a/mm-audio/aenc-evrc/qdsp6/src/aenc_svr.c
+++ b/mm-audio/aenc-evrc/qdsp6/src/aenc_svr.c
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-evrc/qdsp6/src/omx_evrc_aenc.cpp b/mm-audio/aenc-evrc/qdsp6/src/omx_evrc_aenc.cpp
index de56858..09c5bfb 100755
--- a/mm-audio/aenc-evrc/qdsp6/src/omx_evrc_aenc.cpp
+++ b/mm-audio/aenc-evrc/qdsp6/src/omx_evrc_aenc.cpp
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-evrc/qdsp6/test/omx_evrc_enc_test.c b/mm-audio/aenc-evrc/qdsp6/test/omx_evrc_enc_test.c
index a85f9a6..e01759e 100755
--- a/mm-audio/aenc-evrc/qdsp6/test/omx_evrc_enc_test.c
+++ b/mm-audio/aenc-evrc/qdsp6/test/omx_evrc_enc_test.c
@@ -1,6 +1,6 @@
 
 /*--------------------------------------------------------------------------
-Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -9,7 +9,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-qcelp13/qdsp6/inc/Map.h b/mm-audio/aenc-qcelp13/qdsp6/inc/Map.h
index 7486e7c..aac96fd 100755
--- a/mm-audio/aenc-qcelp13/qdsp6/inc/Map.h
+++ b/mm-audio/aenc-qcelp13/qdsp6/inc/Map.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-qcelp13/qdsp6/inc/aenc_svr.h b/mm-audio/aenc-qcelp13/qdsp6/inc/aenc_svr.h
index 25d65f4..940d863 100755
--- a/mm-audio/aenc-qcelp13/qdsp6/inc/aenc_svr.h
+++ b/mm-audio/aenc-qcelp13/qdsp6/inc/aenc_svr.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-qcelp13/qdsp6/inc/omx_qcelp13_aenc.h b/mm-audio/aenc-qcelp13/qdsp6/inc/omx_qcelp13_aenc.h
index c87748a..c547809 100755
--- a/mm-audio/aenc-qcelp13/qdsp6/inc/omx_qcelp13_aenc.h
+++ b/mm-audio/aenc-qcelp13/qdsp6/inc/omx_qcelp13_aenc.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-qcelp13/qdsp6/src/aenc_svr.c b/mm-audio/aenc-qcelp13/qdsp6/src/aenc_svr.c
index 3bc846a..b39f625 100755
--- a/mm-audio/aenc-qcelp13/qdsp6/src/aenc_svr.c
+++ b/mm-audio/aenc-qcelp13/qdsp6/src/aenc_svr.c
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-qcelp13/qdsp6/src/omx_qcelp13_aenc.cpp b/mm-audio/aenc-qcelp13/qdsp6/src/omx_qcelp13_aenc.cpp
index a6d0e9a..a93f14f 100755
--- a/mm-audio/aenc-qcelp13/qdsp6/src/omx_qcelp13_aenc.cpp
+++ b/mm-audio/aenc-qcelp13/qdsp6/src/omx_qcelp13_aenc.cpp
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -8,7 +8,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.
diff --git a/mm-audio/aenc-qcelp13/qdsp6/test/omx_qcelp13_enc_test.c b/mm-audio/aenc-qcelp13/qdsp6/test/omx_qcelp13_enc_test.c
index 64a39c8..5c59349 100755
--- a/mm-audio/aenc-qcelp13/qdsp6/test/omx_qcelp13_enc_test.c
+++ b/mm-audio/aenc-qcelp13/qdsp6/test/omx_qcelp13_enc_test.c
@@ -1,6 +1,6 @@
 
 /*--------------------------------------------------------------------------
-Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved.
+Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -9,7 +9,7 @@
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
-    * Neither the name of Code Aurora nor
+    * Neither the name of The Linux Foundation nor
       the names of its contributors may be used to endorse or promote
       products derived from this software without specific prior written
       permission.