[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
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 @@
// 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 @@
if (deviceEarphoneCount == 1 && deviceCount == deviceEarphoneCount) {
return true;
}
+ */
+ Log.w(TAG, "FIXME: forcing isPatchMixerToEarphone to return false. "
+ + "Software rendering will be used.");
return false;
}