diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioSystem.h | 12 | ||||
-rw-r--r-- | include/media/IAudioFlinger.h | 2 | ||||
-rw-r--r-- | include/media/mediarecorder.h | 4 |
3 files changed, 15 insertions, 3 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index d0ccc50..6816ed5 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -45,6 +45,7 @@ public: ENFORCED_AUDIBLE = 7, // Sounds that cannot be muted by user and must be routed to speaker DTMF = 8, TTS = 9, + FM = 10, NUM_STREAM_TYPES }; @@ -221,6 +222,7 @@ public: size_t* buffSize); static status_t setVoiceVolume(float volume); + static status_t setFmVolume(float volume); // return the number of audio frames written by AudioFlinger to audio HAL and // audio dsp to DAC since the output on which the specificed stream is playing @@ -251,9 +253,10 @@ public: DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 0x100, DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER = 0x200, DEVICE_OUT_AUX_DIGITAL = 0x400, + DEVICE_OUT_FM = 0x800, DEVICE_OUT_DEFAULT = 0x8000, DEVICE_OUT_ALL = (DEVICE_OUT_EARPIECE | DEVICE_OUT_SPEAKER | DEVICE_OUT_WIRED_HEADSET | - DEVICE_OUT_WIRED_HEADPHONE | DEVICE_OUT_BLUETOOTH_SCO | DEVICE_OUT_BLUETOOTH_SCO_HEADSET | + DEVICE_OUT_WIRED_HEADPHONE | DEVICE_OUT_FM | DEVICE_OUT_BLUETOOTH_SCO | DEVICE_OUT_BLUETOOTH_SCO_HEADSET | DEVICE_OUT_BLUETOOTH_SCO_CARKIT | DEVICE_OUT_BLUETOOTH_A2DP | DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER | DEVICE_OUT_AUX_DIGITAL | DEVICE_OUT_DEFAULT), DEVICE_OUT_ALL_A2DP = (DEVICE_OUT_BLUETOOTH_A2DP | DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | @@ -268,11 +271,13 @@ public: DEVICE_IN_AUX_DIGITAL = 0x200000, DEVICE_IN_VOICE_CALL = 0x400000, DEVICE_IN_BACK_MIC = 0x800000, + DEVICE_IN_FM_RX = 0x1000000, + DEVICE_IN_FM_RX_A2DP = 0x2000000, DEVICE_IN_DEFAULT = 0x80000000, DEVICE_IN_ALL = (DEVICE_IN_COMMUNICATION | DEVICE_IN_AMBIENT | DEVICE_IN_BUILTIN_MIC | DEVICE_IN_BLUETOOTH_SCO_HEADSET | DEVICE_IN_WIRED_HEADSET | DEVICE_IN_AUX_DIGITAL | - DEVICE_IN_VOICE_CALL | DEVICE_IN_BACK_MIC | DEVICE_IN_DEFAULT) + DEVICE_IN_VOICE_CALL | DEVICE_IN_BACK_MIC | DEVICE_IN_FM_RX | DEVICE_IN_FM_RX_A2DP | DEVICE_IN_DEFAULT) }; // device connection states used for setDeviceConnectionState() @@ -376,6 +381,7 @@ public: static bool isOutputDevice(audio_devices device); static bool isInputDevice(audio_devices device); static bool isA2dpDevice(audio_devices device); + static bool isFmDevice(audio_devices device); static bool isBluetoothScoDevice(audio_devices device); static bool isLowVisibility(stream_type stream); static bool isOutputChannel(uint32_t channel); @@ -454,6 +460,8 @@ public: static const char *keyFormat; static const char *keyChannels; static const char *keyFrameCount; + static const char *keyFmOn; + static const char *keyFmOff; String8 toString(); diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h index c147632..78d9a19 100644 --- a/include/media/IAudioFlinger.h +++ b/include/media/IAudioFlinger.h @@ -134,6 +134,8 @@ public: virtual status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, int output) = 0; virtual unsigned int getInputFramesLost(int ioHandle) = 0; + + virtual status_t setFmVolume(float volume) = 0; }; diff --git a/include/media/mediarecorder.h b/include/media/mediarecorder.h index bc14096..38502e1 100644 --- a/include/media/mediarecorder.h +++ b/include/media/mediarecorder.h @@ -44,7 +44,9 @@ enum audio_source { AUDIO_SOURCE_VOICE_CALL = 4, AUDIO_SOURCE_CAMCORDER = 5, AUDIO_SOURCE_VOICE_RECOGNITION = 6, - AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_RECOGNITION, + AUDIO_SOURCE_FM_RX = 7, + AUDIO_SOURCE_FM_RX_A2DP = 8, + AUDIO_SOURCE_MAX = AUDIO_SOURCE_FM_RX_A2DP, AUDIO_SOURCE_LIST_END // must be last - used to validate audio source type }; |