summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wagantall <mwagantall@cyngn.com>2015-11-20 11:08:17 -0800
committerMatt Wagantall <mwagantall@cyngn.com>2015-11-23 14:00:34 -0800
commit20a4082f56b049962e12e51bf69c8d1d71cea1f2 (patch)
treeeec4f46de19e17cd554f7ff43de7e8b3d6aa16d5
parentf16be798753b4c352676a082f5d98147f40acc53 (diff)
downloadandroid_packages_apps_FMRadio-20a4082f56b049962e12e51bf69c8d1d71cea1f2.tar.gz
android_packages_apps_FMRadio-20a4082f56b049962e12e51bf69c8d1d71cea1f2.tar.bz2
android_packages_apps_FMRadio-20a4082f56b049962e12e51bf69c8d1d71cea1f2.zip
[FM] Temporary: use software rendering for FM-to-earphone playback
The Qualcomm audio HAL does not yet support volume control when direct FM-to-sink patches are created. Force use of software rendering (reading from AudioRecord and writing to AudioTrack) for now, as this has working software volume control. This change is obviously bad for power, as it requires SW involvement in the audio path. The change should be reverted when source HW volume control is available with audio patches. Playback through speaker, BT, and other sinks already go use software rendering and should be unaffected by this change. Change-Id: Ib732c8e8328035d2b3e60b7823446d1d75b3c107
-rw-r--r--src/com/android/fmradio/FmService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/fmradio/FmService.java b/src/com/android/fmradio/FmService.java
index e0f0242..08817fa 100644
--- a/src/com/android/fmradio/FmService.java
+++ b/src/com/android/fmradio/FmService.java
@@ -1676,6 +1676,7 @@ public class FmService extends Service implements FmRecorder.OnRecorderStateChan
// Make sure patches count will not be 0
private boolean isPatchMixerToEarphone(ArrayList<AudioPatch> patches) {
+ /*
int deviceCount = 0;
int deviceEarphoneCount = 0;
for (AudioPatch patch : patches) {
@@ -1698,6 +1699,9 @@ public class FmService extends Service implements FmRecorder.OnRecorderStateChan
if (deviceEarphoneCount == 1 && deviceCount == deviceEarphoneCount) {
return true;
}
+ */
+ Log.w(TAG, "FIXME: forcing isPatchMixerToEarphone to return false. "
+ + "Software rendering will be used.");
return false;
}