Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f03a3a6f authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge changes I188f11e9,I6e77dc2c into qt-dev

* changes:
  audiopolicy: remove double call to attach / getModuleForDeviceType
  audiopolicy: audioflinger: manage stream patch volume
parents 24ba1c40 993f390f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1238,8 +1238,8 @@ status_t AudioFlinger::setStreamVolume(audio_stream_type_t stream, float value,
    if (output == AUDIO_IO_HANDLE_NONE) {
        return BAD_VALUE;
    }
    ALOG_ASSERT(stream != AUDIO_STREAM_PATCH || value == 1.0,
        "attempt to change AUDIO_STREAM_PATCH volume");
    LOG_ALWAYS_FATAL_IF(stream == AUDIO_STREAM_PATCH && value != 1.0f,
                        "AUDIO_STREAM_PATCH must have full scale volume");

    AutoMutex lock(mLock);
    VolumeInterface *volumeInterface = getVolumeInterface_l(output);
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@

namespace android {


/**
 * VolumeSource is the discriminent for volume management on an output.
 * It used to be the stream type by legacy, it may be host volume group or a volume curves if
+15 −0
Original line number Diff line number Diff line
@@ -166,5 +166,20 @@ limitations under the License.
            <Attributes> <Flags value="AUDIO_FLAG_BEACON"/> </Attributes>
        </AttributesGroup>
    </ProductStrategy>

    <!-- Routing Strategy rerouting may be removed as following media??? -->
    <ProductStrategy name="rerouting">
        <AttributesGroup streamType="AUDIO_STREAM_REROUTING" volumeGroup="rerouting">
            <Attributes></Attributes>
        </AttributesGroup>
    </ProductStrategy>

    <!-- Patch stream needs full scale volume, define it otherwise switch to default... -->
    <ProductStrategy name="patch">
        <AttributesGroup streamType="AUDIO_STREAM_PATCH" volumeGroup="patch">
            <Attributes></Attributes>
        </AttributesGroup>
    </ProductStrategy>

</ProductStrategies>
+21 −0
Original line number Diff line number Diff line
@@ -188,5 +188,26 @@
            <point>100,0</point>
        </volume>
    </volumeGroup>

    <volumeGroup>
        <name>rerouting</name>
        <indexMin>0</indexMin>
        <indexMax>1</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_HEADSET">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>

    <volumeGroup>
        <name>patch</name>
        <indexMin>0</indexMin>
        <indexMax>1</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_HEADSET">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>

</volumeGroups>
+14 −0
Original line number Diff line number Diff line
@@ -166,5 +166,19 @@ limitations under the License.
            <Attributes> <Flags value="AUDIO_FLAG_BEACON"/> </Attributes>
        </AttributesGroup>
    </ProductStrategy>

    <!-- Routing Strategy rerouting may be removed as following media??? -->
    <ProductStrategy name="rerouting">
        <AttributesGroup streamType="AUDIO_STREAM_REROUTING" volumeGroup="rerouting">
            <Attributes></Attributes>
        </AttributesGroup>
    </ProductStrategy>

    <!-- Patch stream needs full scale volume, define it otherwise switch to default... -->
    <ProductStrategy name="patch">
        <AttributesGroup streamType="AUDIO_STREAM_PATCH" volumeGroup="patch">
            <Attributes></Attributes>
        </AttributesGroup>
    </ProductStrategy>
</ProductStrategies>
Loading