Home | History | Annotate | Download | only in audio

Lines Matching refs:lap

69     struct legacy_audio_policy *lap = to_lap(pol);
70 return lap->apm->setDeviceConnectionState(
81 const struct legacy_audio_policy *lap = to_clap(pol);
82 return (audio_policy_dev_state_t)lap->apm->getDeviceConnectionState(
89 struct legacy_audio_policy *lap = to_lap(pol);
91 lap->apm->setPhoneState((int) state);
106 struct legacy_audio_policy *lap = to_lap(pol);
107 lap->apm->setForceUse((AudioSystem::force_use)usage,
116 const struct legacy_audio_policy *lap = to_clap(pol);
117 return (audio_policy_forced_cfg_t)lap->apm->getForceUse(
126 struct legacy_audio_policy *lap = to_lap(pol);
127 lap->apm->setSystemProperty("ro.camera.sound.forced", can_mute ? "0" : "1");
132 const struct legacy_audio_policy *lap = to_clap(pol);
133 return lap->apm->initCheck();
144 struct legacy_audio_policy *lap = to_lap(pol);
147 return lap->apm->getOutput((AudioSystem::stream_type)stream,
156 struct legacy_audio_policy *lap = to_lap(pol);
157 return lap->apm->startOutput(output, (AudioSystem::stream_type)stream,
164 struct legacy_audio_policy *lap = to_lap(pol);
165 return lap->apm->stopOutput(output, (AudioSystem::stream_type)stream,
172 struct legacy_audio_policy *lap = to_lap(pol);
173 lap->apm->releaseOutput(output);
182 struct legacy_audio_policy *lap = to_lap(pol);
183 return lap->apm->getInput((int) inputSource, sampling_rate, (int) format, channelMask,
189 struct legacy_audio_policy *lap = to_lap(pol);
190 return lap->apm->startInput(input);
195 struct legacy_audio_policy *lap = to_lap(pol);
196 return lap->apm->stopInput(input);
201 struct legacy_audio_policy *lap = to_lap(pol);
202 lap->apm->releaseInput(input);
209 struct legacy_audio_policy *lap = to_lap(pol);
210 lap->apm->initStreamVolume((AudioSystem::stream_type)stream, index_min,
218 struct legacy_audio_policy *lap = to_lap(pol);
219 return lap->apm->setStreamVolumeIndex((AudioSystem::stream_type)stream,
228 const struct legacy_audio_policy *lap = to_clap(pol);
229 return lap->apm->getStreamVolumeIndex((AudioSystem::stream_type)stream,
239 struct legacy_audio_policy *lap = to_lap(pol);
240 return lap->apm->setStreamVolumeIndex((AudioSystem::stream_type)stream,
250 const struct legacy_audio_policy *lap = to_clap(pol);
251 return lap->apm->getStreamVolumeIndex((AudioSystem::stream_type)stream,
259 const struct legacy_audio_policy *lap = to_clap(pol);
260 return lap->apm->getStrategyForStream((AudioSystem::stream_type)stream);
266 const struct legacy_audio_policy *lap = to_clap(pol);
267 return lap->apm->getDevicesForStream((AudioSystem::stream_type)stream);
273 struct legacy_audio_policy *lap = to_lap(pol);
274 return lap->apm->getOutputForEffect(desc);
284 struct legacy_audio_policy *lap = to_lap(pol);
285 return lap->apm->registerEffect(desc, io, strategy, session, id);
290 struct legacy_audio_policy *lap = to_lap(pol);
291 return lap->apm->unregisterEffect(id);
296 struct legacy_audio_policy *lap = to_lap(pol);
297 return lap->apm->setEffectEnabled(id, enabled);
303 const struct legacy_audio_policy *lap = to_clap(pol);
304 return lap->apm->isStreamActive((int) stream, in_past_ms);
310 const struct legacy_audio_policy *lap = to_clap(pol);
311 return lap->apm->isStreamActiveRemotely((int) stream, in_past_ms);
316 const struct legacy_audio_policy *lap = to_clap(pol);
317 return lap->apm->isSourceActive(source);
322 const struct legacy_audio_policy *lap = to_clap(pol);
323 return lap->apm->dump(fd);
329 const struct legacy_audio_policy *lap = to_clap(pol);
330 return lap->apm->isOffloadSupported(*info);
338 struct legacy_audio_policy *lap;
344 lap = (struct legacy_audio_policy *)calloc(1, sizeof(*lap));
345 if (!lap)
348 lap->policy.set_device_connection_state = ap_set_device_connection_state;
349 lap->policy.get_device_connection_state = ap_get_device_connection_state;
350 lap->policy.set_phone_state = ap_set_phone_state;
351 lap->policy.set_ringer_mode = ap_set_ringer_mode;
352 lap->policy.set_force_use = ap_set_force_use;
353 lap->policy.get_force_use = ap_get_force_use;
354 lap->policy.set_can_mute_enforced_audible =
356 lap->policy.init_check = ap_init_check;
357 lap->policy.get_output = ap_get_output;
358 lap->policy.start_output = ap_start_output;
359 lap->policy.stop_output = ap_stop_output;
360 lap->policy.release_output = ap_release_output;
361 lap->policy.get_input = ap_get_input;
362 lap->policy.start_input = ap_start_input;
363 lap->policy.stop_input = ap_stop_input;
364 lap->policy.release_input = ap_release_input;
365 lap->policy.init_stream_volume = ap_init_stream_volume;
366 lap->policy.set_stream_volume_index = ap_set_stream_volume_index;
367 lap->policy.get_stream_volume_index = ap_get_stream_volume_index;
368 lap->policy.set_stream_volume_index_for_device = ap_set_stream_volume_index_for_device;
369 lap->policy.get_stream_volume_index_for_device = ap_get_stream_volume_index_for_device;
370 lap->policy.get_strategy_for_stream = ap_get_strategy_for_stream;
371 lap->policy.get_devices_for_stream = ap_get_devices_for_stream;
372 lap->policy.get_output_for_effect = ap_get_output_for_effect;
373 lap->policy.register_effect = ap_register_effect;
374 lap->policy.unregister_effect = ap_unregister_effect;
375 lap->policy.set_effect_enabled = ap_set_effect_enabled;
376 lap->policy.is_stream_active = ap_is_stream_active;
377 lap->policy.is_stream_active_remotely = ap_is_stream_active_remotely;
378 lap->policy.is_source_active = ap_is_source_active;
379 lap->policy.dump = ap_dump;
380 lap->policy.is_offload_supported = ap_is_offload_supported;
382 lap->service = service;
383 lap->aps_ops = aps_ops;
384 lap->service_client =
386 if (!lap->service_client) {
391 lap->apm = createAudioPolicyManager(lap->service_client);
392 if (!lap->apm) {
397 *ap = &lap->policy;
401 delete lap->service_client;
403 free(lap);
411 struct legacy_audio_policy *lap = to_lap(ap);
413 if (!lap)
416 if (lap->apm)
417 destroyAudioPolicyManager(lap->apm);
418 if (lap->service_client)
419 delete lap->service_client;
420 free(lap);