Hi all,

I came across this piece of code in the AudioPolicyManager.

float AudioPolicyManagerBase::computeVolume(int stream, int index,
audio_io_handle_t output, uint32_t device)
{
    float volume = 1.0;
    AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
    StreamDescriptor &streamDesc = mStreams[stream];

    if (device == 0) {
        device = outputDesc->device();
    }

    // if volume is not 0 (not muted), force media volume to max on
digital
output
    if (stream == AudioSystem::MUSIC &&
        index != mStreams[stream].mIndexMin &&
        device == AudioSystem::DEVICE_OUT_AUX_DIGITAL) {
        return 1.0;
    }
----
---
----
----
}

The observation is that if the current output device is
AudioSystem::DEVICE_OUT_AUX_DIGITAL, the volume is always forced to
max. I would like to understand the rationale behind this decision.

Is this simply because we want to disallow two points of volume
control when connected to an external digital device (say HDMI TV ) or
are there more benefits than meets the eye?

Thanks.

Arun

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to