Lines Matching refs:strategy

303     // pertaining to sonification strategy see handleIncallSonification()
311 // store previous phone state for management of sonification strategy below
362 // latency of any output where either strategy is active.
386 // pertaining to sonification strategy see handleIncallSonification()
546 routing_strategy strategy = getStrategy((AudioSystem::stream_type)stream);
547 audio_devices_t device = getDeviceForStrategy(strategy, false /*fromCache*/);
760 routing_strategy strategy = getStrategy(stream);
761 bool shouldWait = (strategy == STRATEGY_SONIFICATION) ||
762 (strategy == STRATEGY_SONIFICATION_RESPECTFUL);
1159 // the strategy the stream belongs to.
1215 routing_strategy strategy = getStrategy(AudioSystem::MUSIC);
1216 audio_devices_t device = getDeviceForStrategy(strategy, false /*fromCache*/);
1228 uint32_t strategy,
1247 ALOGV("registerEffect() effect %s, io %d, strategy %d session %d id %d",
1248 desc->name, io, strategy, session, id);
1254 pDesc->mStrategy = (routing_strategy)strategy;
2322 void AudioPolicyManagerBase::checkOutputForStrategy(routing_strategy strategy)
2324 audio_devices_t oldDevice = getDeviceForStrategy(strategy, true /*fromCache*/);
2325 audio_devices_t newDevice = getDeviceForStrategy(strategy, false /*fromCache*/);
2330 ALOGV("checkOutputForStrategy() strategy %d, moving from output %d to output %d",
2331 strategy, srcOutputs[0], dstOutputs[0]);
2332 // mute strategy while moving tracks from one output to another
2335 if (desc->isStrategyActive(strategy)) {
2336 setStrategyMute(strategy, true, srcOutputs[i]);
2337 setStrategyMute(strategy, false, srcOutputs[i], MUTE_TIME_MS, newDevice);
2341 // Move effects associated to this strategy from previous output to new output
2342 if (strategy == STRATEGY_MEDIA) {
2360 // Move tracks associated to this strategy from previous output to new output
2362 if (getStrategy((AudioSystem::stream_type)i) == strategy) {
2446 // 1: the strategy enforced audible is active on the output:
2447 // use device for strategy enforced audible
2448 // 2: we are in call or the strategy phone is active on the output:
2449 // use device for strategy phone
2450 // 3: the strategy sonification is active on the output:
2451 // use device for strategy sonification
2452 // 4: the strategy "respectful" sonification is active on the output:
2453 // use device for strategy "respectful" sonification
2454 // 5: the strategy media is active on the output:
2455 // use device for strategy media
2456 // 6: the strategy DTMF is active on the output:
2457 // use device for strategy DTMF
2489 AudioPolicyManagerBase::routing_strategy strategy = getStrategy(stream);
2490 devices = getDeviceForStrategy(strategy, true /*fromCache*/);
2497 // stream to strategy mapping
2512 // NOTE: SYSTEM stream uses MEDIA strategy because muting music and switching outputs
2533 audio_devices_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy strategy,
2539 ALOGVV("getDeviceForStrategy() from cache strategy %d, device %x",
2540 strategy, mDeviceForStrategy[strategy]);
2541 return mDeviceForStrategy[strategy];
2544 switch (strategy) {
2568 // when off call, DTMF strategy follows the same rules as MEDIA strategy
2576 // for phone strategy, we first consider the forced use and then the available devices by order
2580 if (!isInCall() || strategy != STRATEGY_DTMF) {
2592 // when not in a phone call, phone strategy should route STREAM_VOICE_CALL to A2DP
2626 // when not in a phone call, phone strategy should route STREAM_VOICE_CALL to
2667 // strategy STRATEGY_ENFORCED_AUDIBLE uses same routing policy as STRATEGY_SONIFICATION
2672 if ((strategy == STRATEGY_SONIFICATION) ||
2679 // The second device used for sonification is the same as the device used by media strategy
2684 if (strategy != STRATEGY_SONIFICATION) {
2714 if ((device2 == AUDIO_DEVICE_NONE) && (strategy != STRATEGY_SONIFICATION)) {
2737 ALOGW("getDeviceForStrategy() unknown strategy: %d", strategy);
2741 ALOGVV("getDeviceForStrategy() strategy %d, device %x", strategy, device);
2792 ALOGVV("checkDeviceMuteStrategies() %s strategy %d (curDevice %04x) on output %d",
3354 void AudioPolicyManagerBase::setStrategyMute(routing_strategy strategy,
3360 ALOGVV("setStrategyMute() strategy %d, mute %d, output %d", strategy, on, output);
3362 if (getStrategy((AudioSystem::stream_type)stream) == strategy) {
3410 // if the stream pertains to sonification strategy and we are in call we must
3412 // in the device used for phone strategy and play the tone if the selected device does not
3413 // interfere with the device used for phone strategy
3558 bool AudioPolicyManagerBase::AudioOutputDescriptor::isStrategyActive(routing_strategy strategy,
3566 if (((getStrategy((AudioSystem::stream_type)i) == strategy) ||
3567 (NUM_STRATEGIES == strategy)) &&