diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index 6fe0c7f..a4722cb 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -104,12 +104,10 @@
     static status_t getOutputLatency(uint32_t* latency,
             audio_stream_type_t stream);
     static status_t getSamplingRate(audio_io_handle_t output,
-                                          audio_stream_type_t streamType,
                                           uint32_t* samplingRate);
     // returns the number of frames per audio HAL write buffer. Corresponds to
     // audio_stream->get_buffer_size()/audio_stream_frame_size()
     static status_t getFrameCount(audio_io_handle_t output,
-                                  audio_stream_type_t stream,
                                   size_t* frameCount);
     // returns the audio output stream latency in ms. Corresponds to
     // audio_stream_out->get_latency()
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index eafb3ad..15b32ff 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -242,11 +242,10 @@
         return PERMISSION_DENIED;
     }
 
-    return getSamplingRate(output, streamType, samplingRate);
+    return getSamplingRate(output, samplingRate);
 }
 
 status_t AudioSystem::getSamplingRate(audio_io_handle_t output,
-                                      audio_stream_type_t streamType,
                                       uint32_t* samplingRate)
 {
     OutputDescriptor *outputDesc;
@@ -265,13 +264,11 @@
         gLock.unlock();
     }
     if (*samplingRate == 0) {
-        ALOGE("AudioSystem::getSamplingRate failed for output %d stream type %d",
-                output, streamType);
+        ALOGE("AudioSystem::getSamplingRate failed for output %d", output);
         return BAD_VALUE;
     }
 
-    ALOGV("getSamplingRate() streamType %d, output %d, sampling rate %u", streamType, output,
-            *samplingRate);
+    ALOGV("getSamplingRate() output %d, sampling rate %u", output, *samplingRate);
 
     return NO_ERROR;
 }
@@ -289,11 +286,10 @@
         return PERMISSION_DENIED;
     }
 
-    return getFrameCount(output, streamType, frameCount);
+    return getFrameCount(output, frameCount);
 }
 
 status_t AudioSystem::getFrameCount(audio_io_handle_t output,
-                                    audio_stream_type_t streamType,
                                     size_t* frameCount)
 {
     OutputDescriptor *outputDesc;
@@ -310,13 +306,11 @@
         gLock.unlock();
     }
     if (*frameCount == 0) {
-        ALOGE("AudioSystem::getFrameCount failed for output %d stream type %d",
-                output, streamType);
+        ALOGE("AudioSystem::getFrameCount failed for output %d", output);
         return BAD_VALUE;
     }
 
-    ALOGV("getFrameCount() streamType %d, output %d, frameCount %d", streamType, output,
-            *frameCount);
+    ALOGV("getFrameCount() output %d, frameCount %d", output, *frameCount);
 
     return NO_ERROR;
 }
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index fa8e5c3..e6827ee 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -649,7 +649,7 @@
     if (isOffloaded_l()) {
         if (mOutput != AUDIO_IO_HANDLE_NONE) {
             uint32_t sampleRate = 0;
-            status_t status = AudioSystem::getSamplingRate(mOutput, mStreamType, &sampleRate);
+            status_t status = AudioSystem::getSamplingRate(mOutput, &sampleRate);
             if (status == NO_ERROR) {
                 mSampleRate = sampleRate;
             }
@@ -889,16 +889,16 @@
     }
 
     size_t afFrameCount;
-    status = AudioSystem::getFrameCount(output, mStreamType, &afFrameCount);
+    status = AudioSystem::getFrameCount(output, &afFrameCount);
     if (status != NO_ERROR) {
-        ALOGE("getFrameCount(output=%d, streamType=%d) status %d", output, mStreamType, status);
+        ALOGE("getFrameCount(output=%d) status %d", output, status);
         goto release;
     }
 
     uint32_t afSampleRate;
-    status = AudioSystem::getSamplingRate(output, mStreamType, &afSampleRate);
+    status = AudioSystem::getSamplingRate(output, &afSampleRate);
     if (status != NO_ERROR) {
-        ALOGE("getSamplingRate(output=%d, streamType=%d) status %d", output, mStreamType, status);
+        ALOGE("getSamplingRate(output=%d) status %d", output, status);
         goto release;
     }
 
