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

Commit d3b79ff2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "audio-hal-7"

* changes:
  Add Audio Policy Manager config files for HAL V7.0
  Temporarily disable Audio HAL V7 modules
  Add Audio HAL V7
parents 7c11c559 8f262df7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ cc_library_shared {
        "libaudiohal@4.0",
        "libaudiohal@5.0",
        "libaudiohal@6.0",
//        "libaudiohal@7.0",
    ],

    shared_libs: [
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ namespace {
/** Supported HAL versions, in order of preference.
 */
const char* sAudioHALVersions[] = {
    "7.0",
    "6.0",
    "5.0",
    "4.0",
+17 −0
Original line number Diff line number Diff line
@@ -116,3 +116,20 @@ cc_library_shared {
    ]
}

cc_library_shared {
    enabled: false,
    name: "libaudiohal@7.0",
    defaults: ["libaudiohal_default"],
    shared_libs: [
        "android.hardware.audio.common@7.0",
        "android.hardware.audio.common@7.0-util",
        "android.hardware.audio.effect@7.0",
        "android.hardware.audio@7.0",
    ],
    cflags: [
        "-DMAJOR_VERSION=7",
        "-DMINOR_VERSION=0",
        "-include common/all-versions/VersionMacro.h",
    ]
}
+44 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!-- A2dp Audio HAL Audio Policy Configuration file -->
<module name="a2dp" halVersion="2.0">
    <mixPorts>
        <mixPort name="a2dp output" role="source"/>
        <mixPort name="a2dp input" role="sink">
            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                     samplingRates="44100 48000"
                     channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
        </mixPort>
    </mixPorts>
    <devicePorts>
        <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink">
            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                     samplingRates="44100"
                     channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
        </devicePort>
        <devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink">
            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                     samplingRates="44100"
                     channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
        </devicePort>
        <devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink">
            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                     samplingRates="44100"
                     channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
        </devicePort>
        <devicePort tagName="BT A2DP In" type="AUDIO_DEVICE_IN_BLUETOOTH_A2DP" role="source">
            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                     samplingRates="44100 48000"
                     channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
        </devicePort>
    </devicePorts>
    <routes>
        <route type="mix" sink="BT A2DP Out"
               sources="a2dp output"/>
        <route type="mix" sink="BT A2DP Headphones"
               sources="a2dp output"/>
        <route type="mix" sink="BT A2DP Speaker"
               sources="a2dp output"/>
        <route type="mix" sink="a2dp input"
               sources="BT A2DP In"/>
    </routes>
</module>
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!-- Bluetooth Input Audio HAL Audio Policy Configuration file -->
<module name="a2dp" halVersion="2.0">
    <mixPorts>
        <mixPort name="a2dp input" role="sink">
            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                     samplingRates="44100 48000"
                     channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
        </mixPort>
    </mixPorts>
    <devicePorts>
        <devicePort tagName="BT A2DP In" type="AUDIO_DEVICE_IN_BLUETOOTH_A2DP" role="source">
            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                     samplingRates="44100 48000"
                     channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
        </devicePort>
    </devicePorts>
    <routes>
        <route type="mix" sink="a2dp input"
               sources="BT A2DP In"/>
    </routes>
</module>
Loading