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

Commit 376740fd authored by François Gaffie's avatar François Gaffie Committed by Mikhail Naganov
Browse files

[AudioPolicy][EngineConfigurable] Cleanup warn / error logs



-Add remote submix in legacy address as criterion type value
-Add volume curves for all device cat for rerouting/patch streams
-Silent reset input device

Test: build
Bug:

Change-Id: I3578f9a05899f20847c123477451f1eb97ed5cee
Signed-off-by: default avatarFrançois Gaffie <francois.gaffie@renault.com>

[AudioPolicy][Engine] Add remote submix in legacy address

Bug:
Test: build

Change-Id: Ic00e892a03c3b6f6ce3748ea1eb02452bf01c23f
Signed-off-by: default avatarFrançois Gaffie <francois.gaffie@renault.com>
parent 15811d35
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -193,20 +193,52 @@
        <name>rerouting</name>
        <indexMin>0</indexMin>
        <indexMax>1</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_HEADSET">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_EARPIECE">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_HEARING_AID">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>

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

</volumeGroups>
+32 −0
Original line number Diff line number Diff line
@@ -193,20 +193,52 @@
        <name>rerouting</name>
        <indexMin>0</indexMin>
        <indexMax>1</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_HEADSET">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_EARPIECE">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_HEARING_AID">
            <point>0,0</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>

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

</volumeGroups>
+6 −1
Original line number Diff line number Diff line
@@ -22,7 +22,12 @@
            <value literal="0" numerical="1"/>
        </values>
    </criterion_type>
    <criterion_type name="InputDevicesAddressesType" type="inclusive"/>
    <criterion_type name="InputDevicesAddressesType" type="inclusive">
        <values>
            <!-- legacy remote submix -->
            <value literal="0" numerical="1"/>
        </values>
    </criterion_type>
    <criterion_type name="AndroidModeType" type="exclusive"/>
    <criterion_type name="BooleanType" type="exclusive">
        <values>
+7 −4
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ status_t Element<audio_source_t>::setIdentifier(audio_source_t identifier)
        return BAD_VALUE;
    }
    mIdentifier = identifier;
    ALOGD("%s: InputSource %s identifier 0x%X", __FUNCTION__, getName().c_str(), identifier);
    ALOGV("%s: InputSource %s identifier 0x%X", __FUNCTION__, getName().c_str(), identifier);
    return NO_ERROR;
}

@@ -46,15 +46,18 @@ status_t Element<audio_source_t>::setIdentifier(audio_source_t identifier)
template <>
status_t Element<audio_source_t>::set(audio_devices_t devices)
{
    if (devices != AUDIO_DEVICE_NONE) {
        devices |= AUDIO_DEVICE_BIT_IN;
    if (devices == AUDIO_DEVICE_NONE) {
        // Reset
        mApplicableDevices = devices;
        return NO_ERROR;
    }
    devices |= AUDIO_DEVICE_BIT_IN;
    if (!audio_is_input_device(devices)) {
        ALOGE("%s: trying to set an invalid device 0x%X for input source %s",
              __FUNCTION__, devices, getName().c_str());
        return BAD_VALUE;
    }
    ALOGD("%s: 0x%X for input source %s", __FUNCTION__, devices, getName().c_str());
    ALOGV("%s: 0x%X for input source %s", __FUNCTION__, devices, getName().c_str());
    mApplicableDevices = devices;
    return NO_ERROR;
}
+5 −4
Original line number Diff line number Diff line
@@ -73,10 +73,11 @@ private:
    Element(const Element &object);
    Element &operator=(const Element &object);

    std::string mName; /**< Unique literal Identifier of a policy base element*/
    audio_source_t mIdentifier; /**< Unique numerical Identifier of a policy base element*/

    audio_devices_t mApplicableDevices; /**< Applicable input device for this input source. */
    const std::string mName; /**< Unique literal Identifier of a policy base element*/
    /** Unique numerical Identifier of a policy base element */
    audio_source_t mIdentifier = AUDIO_SOURCE_DEFAULT;
    /** Applicable input device for this input source. */
    audio_devices_t mApplicableDevices = AUDIO_DEVICE_NONE;
};

typedef Element<audio_source_t> InputSource;
Loading