Home
last modified time | relevance | path

Searched refs:AudioSystem (Results 1 – 25 of 108) sorted by relevance

12345

/frameworks/base/media/java/android/media/
DAudioDeviceInfo.java487 return EXT_TO_INT_DEVICE_MAPPING.get(deviceType, AudioSystem.DEVICE_NONE); in convertDeviceTypeToInternalDevice()
501 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_EARPIECE, TYPE_BUILTIN_EARPIECE); in INT_TO_EXT_DEVICE_MAPPING.put()
502 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPEAKER, TYPE_BUILTIN_SPEAKER); in INT_TO_EXT_DEVICE_MAPPING.put()
503 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADSET, TYPE_WIRED_HEADSET); in INT_TO_EXT_DEVICE_MAPPING.put()
504 … INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE, TYPE_WIRED_HEADPHONES); in INT_TO_EXT_DEVICE_MAPPING.put()
505 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO, TYPE_BLUETOOTH_SCO); in INT_TO_EXT_DEVICE_MAPPING.put()
506 … INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET, TYPE_BLUETOOTH_SCO); in INT_TO_EXT_DEVICE_MAPPING.put()
507 … INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT, TYPE_BLUETOOTH_SCO); in INT_TO_EXT_DEVICE_MAPPING.put()
508 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, TYPE_BLUETOOTH_A2DP); in INT_TO_EXT_DEVICE_MAPPING.put()
509 …INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, TYPE_BLUETOOTH_A2D… in INT_TO_EXT_DEVICE_MAPPING.put()
[all …]
DAudioAttributes.java968 case AudioSystem.STREAM_VOICE_CALL: in setInternalLegacyStreamType()
971 case AudioSystem.STREAM_SYSTEM_ENFORCED: in setInternalLegacyStreamType()
974 case AudioSystem.STREAM_SYSTEM: in setInternalLegacyStreamType()
977 case AudioSystem.STREAM_RING: in setInternalLegacyStreamType()
980 case AudioSystem.STREAM_MUSIC: in setInternalLegacyStreamType()
983 case AudioSystem.STREAM_ALARM: in setInternalLegacyStreamType()
986 case AudioSystem.STREAM_NOTIFICATION: in setInternalLegacyStreamType()
989 case AudioSystem.STREAM_BLUETOOTH_SCO: in setInternalLegacyStreamType()
993 case AudioSystem.STREAM_DTMF: in setInternalLegacyStreamType()
996 case AudioSystem.STREAM_TTS: in setInternalLegacyStreamType()
[all …]
DAudioManager.java352 public static final int STREAM_VOICE_CALL = AudioSystem.STREAM_VOICE_CALL;
354 public static final int STREAM_SYSTEM = AudioSystem.STREAM_SYSTEM;
356 public static final int STREAM_RING = AudioSystem.STREAM_RING;
358 public static final int STREAM_MUSIC = AudioSystem.STREAM_MUSIC;
360 public static final int STREAM_ALARM = AudioSystem.STREAM_ALARM;
362 public static final int STREAM_NOTIFICATION = AudioSystem.STREAM_NOTIFICATION;
366 public static final int STREAM_BLUETOOTH_SCO = AudioSystem.STREAM_BLUETOOTH_SCO;
370 public static final int STREAM_SYSTEM_ENFORCED = AudioSystem.STREAM_SYSTEM_ENFORCED;
372 public static final int STREAM_DTMF = AudioSystem.STREAM_DTMF;
376 public static final int STREAM_TTS = AudioSystem.STREAM_TTS;
[all …]
DHwAudioSource.java109 return AudioSystem.SUCCESS; in playerSetAuxEffectSendLevel()
134 mNativeHandle = AudioSystem.startAudioSource( in start()
153 AudioSystem.stopAudioSource(mNativeHandle); in stop()
DMediaSyncEvent.java33 public static final int SYNC_EVENT_NONE = AudioSystem.SYNC_EVENT_NONE;
42 AudioSystem.SYNC_EVENT_PRESENTATION_COMPLETE;
/frameworks/av/media/libaudioclient/
DAudioSystem.cpp40 Mutex AudioSystem::gLock;
41 Mutex AudioSystem::gLockErrorCallbacks;
42 Mutex AudioSystem::gLockAPS;
43 sp<IAudioFlinger> AudioSystem::gAudioFlinger;
44 sp<AudioSystem::AudioFlingerClient> AudioSystem::gAudioFlingerClient;
45 std::set<audio_error_callback> AudioSystem::gAudioErrorCallbacks;
46 dynamic_policy_callback AudioSystem::gDynPolicyCallback = NULL;
47 record_config_callback AudioSystem::gRecordConfigCallback = NULL;
51 sp<AudioSystem::CaptureStateListener> gSoundTriggerCaptureStateListener = nullptr;
54 const sp<IAudioFlinger> AudioSystem::get_audio_flinger() in get_audio_flinger()
[all …]
DAudioEffect.cpp122 const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger(); in set()
191 AudioSystem::acquireAudioSessionId(mSessionId, mClientPid, mClientUid); in set()
204 AudioSystem::releaseAudioSessionId(mSessionId, mClientPid); in ~AudioEffect()
460 const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); in queryNumberEffects()
467 const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); in queryEffect()
477 const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); in getEffectDescriptor()
486 const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); in queryDefaultPreProcessing()
493 const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); in newEffectUniqueId()
506 const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); in addSourceDefaultEffect()
538 const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); in addStreamDefaultEffect()
[all …]
/frameworks/base/services/core/java/com/android/server/audio/
DAudioDeviceInventory.java33 import android.media.AudioSystem;
122 + MediaMetrics.SEPARATOR + AudioSystem.getDeviceName(value.mDeviceType))
193 + " (" + AudioSystem.getDeviceName(mDeviceType) in toString()
243 + " (" + AudioSystem.getDeviceName(keyType) in dump()
261 AudioSystem.DEVICE_STATE_AVAILABLE, in onRestoreDevices()
292 final @AudioSystem.AudioFormatNativeEnumForBtCodec int a2dpCodec = btInfo.getCodec(); in onSetA2dpSinkConnectionState()
296 + " codec=" + AudioSystem.audioFormatToString(a2dpCodec) in onSetA2dpSinkConnectionState()
301 .set(MediaMetrics.Property.ENCODING, AudioSystem.audioFormatToString(a2dpCodec)) in onSetA2dpSinkConnectionState()
310 final String key = DeviceInfo.makeDeviceListKey(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, in onSetA2dpSinkConnectionState()
328 mDeviceBroker.postSetVolumeIndexOnDevice(AudioSystem.STREAM_MUSIC, in onSetA2dpSinkConnectionState()
[all …]
DAudioSystemAdapter.java21 import android.media.AudioSystem;
51 return AudioSystem.setDeviceConnectionState(device, state, deviceAddress, deviceName, in setDeviceConnectionState()
62 return AudioSystem.getDeviceConnectionState(device, deviceAddress); in getDeviceConnectionState()
75 return AudioSystem.handleDeviceConfigChange(device, deviceAddress, deviceName, in handleDeviceConfigChange()
86 return AudioSystem.setPreferredDeviceForStrategy(strategy, device); in setPreferredDeviceForStrategy()
95 return AudioSystem.removePreferredDeviceForStrategy(strategy); in removePreferredDeviceForStrategy()
104 return AudioSystem.setParameters(keyValuePairs); in setParameters()
113 return AudioSystem.isMicrophoneMuted(); in isMicrophoneMuted()
125 return AudioSystem.muteMicrophone(on); in muteMicrophone()
133 return AudioSystem.setCurrentImeUid(uid); in setCurrentImeUid()
[all …]
DAudioService.java78 import android.media.AudioSystem;
233 return mPlatformType == AudioSystem.PLATFORM_VOICE; in isPlatformVoice()
237 return mPlatformType == AudioSystem.PLATFORM_TELEVISION; in isPlatformTelevision()
309 private int mMode = AudioSystem.MODE_NORMAL;
355 AudioSystem.STREAM_VOICE_CALL, // STREAM_VOICE_CALL
356 AudioSystem.STREAM_RING, // STREAM_SYSTEM
357 AudioSystem.STREAM_RING, // STREAM_RING
358 AudioSystem.STREAM_MUSIC, // STREAM_MUSIC
359 AudioSystem.STREAM_ALARM, // STREAM_ALARM
360 AudioSystem.STREAM_RING, // STREAM_NOTIFICATION
[all …]
DAudioServiceEvents.java21 import android.media.AudioSystem;
68 .append(AudioSystem.modeToString(mRequestedMode)) in eventToString()
72 .append(AudioSystem.modeToString(mActualMode)) in eventToString()
93 AudioSystem.modeToString(mRequestedMode)) in logMetricEvent()
94 .set(MediaMetrics.Property.MODE, AudioSystem.modeToString(mActualMode)) in logMetricEvent()
120 .append(" state:").append(AudioSystem.deviceStateToString(mState.mState)) in eventToString()
141 .append(AudioSystem.forceUseUsageToString(mUsage)) in eventToString()
142 .append(", ").append(AudioSystem.forceUseConfigToString(mConfig)) in eventToString()
292 AudioSystem.streamToString(mStream)) in logMetricEvent()
303 AudioSystem.streamToString(mStream)) in logMetricEvent()
[all …]
DAudioDeviceBroker.java29 import android.media.AudioSystem;
136 mForcedUseForComm = AudioSystem.FORCE_NONE; in init()
162 AudioSystem.setParameters( in onAudioServerDied()
163 "BT_SCO=" + (mForcedUseForComm == AudioSystem.FORCE_BT_SCO ? "on" : "off")); in onAudioServerDied()
164 onSetForceUse(AudioSystem.FOR_COMMUNICATION, mForcedUseForComm, in onAudioServerDied()
166 onSetForceUse(AudioSystem.FOR_RECORD, mForcedUseForComm, in onAudioServerDied()
210 AudioSystem.FOR_MEDIA, in setBluetoothA2dpOn_Async()
211 mBluetoothA2dpEnabled ? AudioSystem.FORCE_NONE : AudioSystem.FORCE_NO_BT_A2DP, in setBluetoothA2dpOn_Async()
236 if (mForcedUseForComm == AudioSystem.FORCE_BT_SCO) { in updateSpeakerphoneOn()
237 setForceUse_Async(AudioSystem.FOR_RECORD, AudioSystem.FORCE_NONE, eventSource); in updateSpeakerphoneOn()
[all …]
DRotationHelper.java21 import android.media.AudioSystem;
98 AudioSystem.setParameters("rotation=0"); in publishRotation()
101 AudioSystem.setParameters("rotation=90"); in publishRotation()
104 AudioSystem.setParameters("rotation=180"); in publishRotation()
107 AudioSystem.setParameters("rotation=270"); in publishRotation()
DBtHelper.java31 import android.media.AudioSystem;
159 private final @AudioSystem.AudioFormatNativeEnumForBtCodec int mCodec;
162 this(btDevice, -1, AudioSystem.AUDIO_FORMAT_DEFAULT); in BluetoothA2dpDeviceInfo()
179 public @AudioSystem.AudioFormatNativeEnumForBtCodec int getCodec() { in getCodec()
250 ? AudioSystem.FORCE_NONE : AudioSystem.FORCE_NO_BT_A2DP; in onAudioServerDiedRestoreA2dp()
251 mDeviceBroker.setForceUse_Async(AudioSystem.FOR_MEDIA, forMed, "onAudioServerDied()"); in onAudioServerDiedRestoreA2dp()
284 /*package*/ synchronized @AudioSystem.AudioFormatNativeEnumForBtCodec int getA2dpCodec( in getA2dpCodec()
287 return AudioSystem.AUDIO_FORMAT_DEFAULT; in getA2dpCodec()
291 return AudioSystem.AUDIO_FORMAT_DEFAULT; in getA2dpCodec()
295 return AudioSystem.AUDIO_FORMAT_DEFAULT; in getA2dpCodec()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/audio/
DNoOpAudioSystemAdapter.java21 import android.media.AudioSystem;
54 return AudioSystem.AUDIO_STATUS_OK; in setDeviceConnectionState()
59 return AudioSystem.AUDIO_STATUS_OK; in getDeviceConnectionState()
65 return AudioSystem.AUDIO_STATUS_OK; in handleDeviceConfigChange()
71 return AudioSystem.AUDIO_STATUS_OK; in setPreferredDeviceForStrategy()
76 return AudioSystem.AUDIO_STATUS_OK; in removePreferredDeviceForStrategy()
81 return AudioSystem.AUDIO_STATUS_OK; in setParameters()
92 return AudioSystem.AUDIO_STATUS_ERROR; in muteMicrophone()
95 return AudioSystem.AUDIO_STATUS_OK; in muteMicrophone()
100 return AudioSystem.AUDIO_STATUS_OK; in setCurrentImeUid()
/frameworks/base/media/tests/AudioPolicyTest/src/com/android/audiopolicytest/
DAudioProductStrategyTest.java23 import android.media.AudioSystem;
53 if (streamType == AudioSystem.STREAM_DEFAULT) { in testGetProductStrategies()
84 assertEquals(AudioSystem.STREAM_MUSIC, in testAudioAttributesFromStreamTypes()
93 assertEquals("stream " + AudioSystem.streamToString(streamType) + "(" in testAudioAttributesFromStreamTypes()
96 + AudioSystem.streamToString(streamTypeFromAttributes) + "(" in testAudioAttributesFromStreamTypes()
134 assertEquals(AudioSystem.STREAM_MUSIC, in testAudioAttributesFromStreamTypes()
157 assertNotEquals(streamTypeFromUsage, AudioSystem.STREAM_DEFAULT); in testAudioAttributesToStreamTypes()
183 if (streamTypeFromAps == AudioSystem.STREAM_DEFAULT) { in testAudioAttributesToStreamTypes()
188 streamTypeFromUsage, AudioSystem.STREAM_MUSIC); in testAudioAttributesToStreamTypes()
191 + AudioSystem.streamToString(streamTypeFromUsage) in testAudioAttributesToStreamTypes()
[all …]
DAudioVolumeGroupTest.java22 import android.media.AudioSystem;
101 if (avgStreamType == AudioSystem.STREAM_DEFAULT) { in testGetVolumeGroups()
116 + AudioSystem.streamToString(avgStreamType) + "(" in testGetVolumeGroups()
126 + AudioSystem.streamToString(avgStreamType) + "(" + avgStreamType + ")", in testGetVolumeGroups()
DAudioManagerTest.java25 import android.media.AudioSystem;
88 if (strategyStreamType != AudioSystem.STREAM_DEFAULT) { in testGetAndValidateProductStrategies()
149 if (avgStreamType == AudioSystem.STREAM_DEFAULT) { in testGetAndValidateVolumeGroups()
165 + AudioSystem.streamToString(avgStreamType) + "(" in testGetAndValidateVolumeGroups()
174 + AudioSystem.streamToString(avgStreamType) + "(" + avgStreamType + ")", in testGetAndValidateVolumeGroups()
297 if (avgStreamType == AudioSystem.STREAM_DEFAULT) { in testVolumeGroupCallback()
/frameworks/av/services/audiopolicy/service/
DAudioPolicyClientImpl.cpp32 sp<IAudioFlinger> af = AudioSystem::get_audio_flinger(); in loadHwModule()
48 sp<IAudioFlinger> af = AudioSystem::get_audio_flinger(); in openOutput()
60 sp<IAudioFlinger> af = AudioSystem::get_audio_flinger(); in openDuplicateOutput()
70 sp<IAudioFlinger> af = AudioSystem::get_audio_flinger(); in closeOutput()
80 sp<IAudioFlinger> af = AudioSystem::get_audio_flinger(); in suspendOutput()
91 sp<IAudioFlinger> af = AudioSystem::get_audio_flinger(); in restoreOutput()
108 sp<IAudioFlinger> af = AudioSystem::get_audio_flinger(); in openInput()
119 sp<IAudioFlinger> af = AudioSystem::get_audio_flinger(); in closeInput()
137 sp<IAudioFlinger> af = AudioSystem::get_audio_flinger(); in invalidateStream()
155 String8 result = AudioSystem::getParameters(io_handle, keys); in getParameters()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/volume/
DEventsTest.java22 import android.media.AudioSystem;
132 {Events.EVENT_ACTIVE_STREAM_CHANGED, new Object[]{AudioSystem.STREAM_ACCESSIBILITY}, in data()
137 new Object[]{AudioSystem.STREAM_MUSIC, Events.ICON_STATE_MUTE}, in data()
142 new Object[]{AudioSystem.STREAM_MUSIC, /* volume */ 0}, in data()
147 new Object[]{AudioSystem.STREAM_MUSIC, /* volume */ 1}, in data()
152 new Object[]{AudioSystem.STREAM_MUSIC, /* volume */ 0}, in data()
156 new Object[]{AudioSystem.STREAM_MUSIC, /* volume */ 0}, in data()
160 new Object[]{AudioSystem.STREAM_MUSIC, /* volume */ 0}, in data()
164 new Object[]{AudioSystem.STREAM_MUSIC, /* volume */ 0}, in data()
169 new Object[]{AudioSystem.STREAM_MUSIC, /* volume */ 1}, in data()
/frameworks/base/core/jni/
Dandroid_media_AudioSystem.cpp204 class JNIAudioPortCallback: public AudioSystem::AudioPortCallback
351 return (jint) check_AudioSystem_Command(AudioSystem::muteMicrophone(on)); in android_media_AudioSystem_muteMicrophone()
358 AudioSystem::isMicrophoneMuted(&state); in android_media_AudioSystem_isMicrophoneMuted()
366 AudioSystem::isStreamActive((audio_stream_type_t) stream, &state, inPastMs); in android_media_AudioSystem_isStreamActive()
375 AudioSystem::isStreamActiveRemotely((audio_stream_type_t) stream, &state, inPastMs); in android_media_AudioSystem_isStreamActiveRemotely()
383 AudioSystem::isSourceActive((audio_source_t) source, &state); in android_media_AudioSystem_isSourceActive()
390 return AudioSystem::newAudioUniqueId(AUDIO_UNIQUE_ID_USE_SESSION); in android_media_AudioSystem_newAudioSessionId()
396 int id = AudioSystem::newAudioUniqueId(AUDIO_UNIQUE_ID_USE_CLIENT); in android_media_AudioSystem_newAudioPlayerId()
403 int id = AudioSystem::newAudioUniqueId(AUDIO_UNIQUE_ID_USE_CLIENT); in android_media_AudioSystem_newAudioRecorderId()
418 int status = check_AudioSystem_Command(AudioSystem::setParameters(c_keyValuePairs8)); in android_media_AudioSystem_setParameters()
[all …]
/frameworks/base/media/java/android/media/audiopolicy/
DAudioMix.java26 import android.media.AudioSystem;
278 private int mDeviceSystemType = AudioSystem.DEVICE_NONE;
421 int rate = AudioSystem.getPrimaryOutputSamplingRate(); in build()
427 if ((mDeviceSystemType != AudioSystem.DEVICE_NONE) in build()
428 && (mDeviceSystemType != AudioSystem.DEVICE_OUT_REMOTE_SUBMIX) in build()
429 && (mDeviceSystemType != AudioSystem.DEVICE_IN_REMOTE_SUBMIX)) { in build()
444 mDeviceSystemType = AudioSystem.DEVICE_OUT_REMOTE_SUBMIX; in build()
446 mDeviceSystemType = AudioSystem.DEVICE_IN_REMOTE_SUBMIX; in build()
/frameworks/base/services/core/jni/
Dcom_android_server_soundtrigger_middleware_ExternalCaptureStateTracker.cpp48 class Listener : public AudioSystem::CaptureStateListener {
72 sp<AudioSystem::CaptureStateListener> listener(new Listener(env, obj)); in connect()
74 AudioSystem::registerSoundTriggerCaptureStateListener(listener); in connect()
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbAlsaDevice.java20 import android.media.AudioSystem;
194 ? AudioSystem.DEVICE_OUT_USB_HEADSET in updateWiredDeviceConnectionState()
195 : AudioSystem.DEVICE_OUT_USB_DEVICE; in updateWiredDeviceConnectionState()
214 int device = mIsInputHeadset ? AudioSystem.DEVICE_IN_USB_HEADSET in updateWiredDeviceConnectionState()
215 : AudioSystem.DEVICE_IN_USB_DEVICE; in updateWiredDeviceConnectionState()
/frameworks/av/services/audioflinger/
DPlaybackTracks.h86 virtual status_t start(AudioSystem::sync_event_t event = AudioSystem::SYNC_EVENT_NONE,
226 void triggerEvents(AudioSystem::sync_event_t type);
330 virtual status_t start(AudioSystem::sync_event_t event =
331 AudioSystem::SYNC_EVENT_NONE,
409 virtual status_t start(AudioSystem::sync_event_t event =
410 AudioSystem::SYNC_EVENT_NONE,

12345