Loading services/audioflinger/AudioFlinger.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -477,6 +477,13 @@ status_t AudioFlinger::setMode(int mode) return BAD_VALUE; } #ifdef HAS_LGE_STAR_FM_RADIO if (mode == AudioSystem::MODE_FM) { mFmOn = true; } else if (mFmOn) { mFmOn = false; } #endif { // scope for the lock AutoMutex lock(mHardwareLock); mHardwareStatus = AUDIO_HW_SET_MODE; Loading Loading @@ -680,7 +687,7 @@ status_t AudioFlinger::setParameters(int ioHandle, const String8& keyValuePairs) } } #endif #ifdef HAVE_FM_RADIO #if defined(HAVE_FM_RADIO) && !defined(HAS_LGE_STAR_FM_RADIO) AudioParameter param = AudioParameter(keyValuePairs); String8 key = String8(AudioParameter::keyRouting); int device; Loading services/audioflinger/AudioPolicyService.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,16 @@ status_t AudioPolicyService::setDeviceConnectionState(AudioSystem::audio_devices return BAD_VALUE; } #ifdef HAS_LGE_STAR_FM_RADIO if (device & AudioSystem::DEVICE_OUT_FM) { if (state == AudioSystem::DEVICE_STATE_AVAILABLE) { setPhoneState(AudioSystem::MODE_FM); } else { setPhoneState(AudioSystem::MODE_NORMAL); } } #endif LOGV("setDeviceConnectionState() tid %d", gettid()); Mutex::Autolock _l(mLock); return mpPolicyManager->setDeviceConnectionState(device, state, device_address); Loading Loading @@ -325,6 +335,13 @@ status_t AudioPolicyService::setStreamVolumeIndex(AudioSystem::stream_type strea if (!checkPermission()) { return PERMISSION_DENIED; } #ifdef HAS_LGE_STAR_FM_RADIO /* The star's audio HAL has STREAM_FM as 8. The java layer * sends CM's "standard" STREAM_FM as 10, convert it here */ if (stream == AudioSystem::FM) { stream=(AudioSystem::stream_type)8; } #endif if (stream < 0 || stream >= AudioSystem::NUM_STREAM_TYPES) { return BAD_VALUE; } Loading Loading
services/audioflinger/AudioFlinger.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -477,6 +477,13 @@ status_t AudioFlinger::setMode(int mode) return BAD_VALUE; } #ifdef HAS_LGE_STAR_FM_RADIO if (mode == AudioSystem::MODE_FM) { mFmOn = true; } else if (mFmOn) { mFmOn = false; } #endif { // scope for the lock AutoMutex lock(mHardwareLock); mHardwareStatus = AUDIO_HW_SET_MODE; Loading Loading @@ -680,7 +687,7 @@ status_t AudioFlinger::setParameters(int ioHandle, const String8& keyValuePairs) } } #endif #ifdef HAVE_FM_RADIO #if defined(HAVE_FM_RADIO) && !defined(HAS_LGE_STAR_FM_RADIO) AudioParameter param = AudioParameter(keyValuePairs); String8 key = String8(AudioParameter::keyRouting); int device; Loading
services/audioflinger/AudioPolicyService.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,16 @@ status_t AudioPolicyService::setDeviceConnectionState(AudioSystem::audio_devices return BAD_VALUE; } #ifdef HAS_LGE_STAR_FM_RADIO if (device & AudioSystem::DEVICE_OUT_FM) { if (state == AudioSystem::DEVICE_STATE_AVAILABLE) { setPhoneState(AudioSystem::MODE_FM); } else { setPhoneState(AudioSystem::MODE_NORMAL); } } #endif LOGV("setDeviceConnectionState() tid %d", gettid()); Mutex::Autolock _l(mLock); return mpPolicyManager->setDeviceConnectionState(device, state, device_address); Loading Loading @@ -325,6 +335,13 @@ status_t AudioPolicyService::setStreamVolumeIndex(AudioSystem::stream_type strea if (!checkPermission()) { return PERMISSION_DENIED; } #ifdef HAS_LGE_STAR_FM_RADIO /* The star's audio HAL has STREAM_FM as 8. The java layer * sends CM's "standard" STREAM_FM as 10, convert it here */ if (stream == AudioSystem::FM) { stream=(AudioSystem::stream_type)8; } #endif if (stream < 0 || stream >= AudioSystem::NUM_STREAM_TYPES) { return BAD_VALUE; } Loading