summaryrefslogtreecommitdiffstats
path: root/libs/audioflinger/AudioPolicyService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/audioflinger/AudioPolicyService.cpp')
-rw-r--r--libs/audioflinger/AudioPolicyService.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/audioflinger/AudioPolicyService.cpp b/libs/audioflinger/AudioPolicyService.cpp
index ad50a6c..aa2aecf 100644
--- a/libs/audioflinger/AudioPolicyService.cpp
+++ b/libs/audioflinger/AudioPolicyService.cpp
@@ -556,10 +556,12 @@ status_t AudioPolicyService::setVoiceVolume(float volume, int delayMs)
return mAudioCommandThread->voiceVolumeCommand(volume, delayMs);
}
+#ifdef HAVE_FM_RADIO
status_t AudioPolicyService::setFmVolume(float volume, int delayMs)
{
return mAudioCommandThread->fmVolumeCommand(volume, delayMs);
}
+#endif
// ----------- AudioPolicyService::AudioCommandThread implementation ----------
@@ -656,6 +658,7 @@ bool AudioPolicyService::AudioCommandThread::threadLoop()
}
delete data;
}break;
+#ifdef HAVE_FM_RADIO
case SET_FM_VOLUME: {
FmVolumeData *data = (FmVolumeData *)command->mParam;
LOGV("AudioCommandThread() processing set fm volume volume %f", data->mVolume);
@@ -666,6 +669,7 @@ bool AudioPolicyService::AudioCommandThread::threadLoop()
}
delete data;
}break;
+#endif
default:
LOGW("AudioCommandThread() unknown command %d", command->mCommand);
}
@@ -830,6 +834,7 @@ status_t AudioPolicyService::AudioCommandThread::voiceVolumeCommand(float volume
return status;
}
+#ifdef HAVE_FM_RADIO
status_t AudioPolicyService::AudioCommandThread::fmVolumeCommand(float volume, int delayMs)
{
status_t status = NO_ERROR;
@@ -855,7 +860,7 @@ status_t AudioPolicyService::AudioCommandThread::fmVolumeCommand(float volume, i
}
return status;
}
-
+#endif
// insertCommand_l() must be called with mLock held
void AudioPolicyService::AudioCommandThread::insertCommand_l(AudioCommand *command, int delayMs)
@@ -917,9 +922,11 @@ void AudioPolicyService::AudioCommandThread::insertCommand_l(AudioCommand *comma
LOGV("Filtering out volume command on output %d for stream %d", data->mIO, data->mStream);
removedCommands.add(command2);
} break;
+#ifdef HAVE_FM_RADIO
case SET_FM_VOLUME: {
removedCommands.add(command2);
} break;
+#endif
case START_TONE:
case STOP_TONE:
default: