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

Commit 40736eae authored by Ari Hausman-Cohen's avatar Ari Hausman-Cohen Committed by Jaesung Chung
Browse files

Separate out stub audio policy configuration

Refactors the default stub module config into a separate xml file
so it can be included by other audio policy configurations.

Bug: 37999350
Change-Id: I7516f909c312379b4eecfb648b5a5c8779e31990
(cherry picked from commit 5105cbbe1f7065e8a7937df0bdbc8063803dcdd9)
parent 9ee3885b
Loading
Loading
Loading
Loading
+3 −32
Original line number Diff line number Diff line
@@ -16,37 +16,8 @@

<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
    <modules>
        <module name="stub" halVersion="2.0">
            <attachedDevices>
                <item>Default Out</item>
                <item>Default In</item>
            </attachedDevices>
            <defaultOutputDevice>Default Out</defaultOutputDevice>
            <mixPorts>
                <mixPort name="stub output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                </mixPort>

                <mixPort name="stub input" role="sink">
                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
                </mixPort>
            </mixPorts>
            <devicePorts>
                <devicePort tagName="Default Out" type="AUDIO_DEVICE_OUT_STUB" role="sink">
                </devicePort>

                <devicePort tagName="Default In" type="AUDIO_DEVICE_IN_STUB" role="source">
                </devicePort>
            </devicePorts>
            <routes>
                <route type="mix" sink="Default Out" sources="stub output"/>

                <route type="mix" sink="stub input" sources="Default In"/>
            </routes>

        </module>
        <!-- Stub Audio HAL -->
        <xi:include href="stub_audio_policy_configuration.xml"/>

        <!-- Remote Submix Audio HAL -->
        <xi:include href="r_submix_audio_policy_configuration.xml"/>
+46 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2017 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<module name="stub" halVersion="2.0">
  <attachedDevices>
    <item>Default Out</item>
    <item>Default In</item>
  </attachedDevices>
  <defaultOutputDevice>Default Out</defaultOutputDevice>
  <mixPorts>
    <mixPort name="stub output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
      <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
               samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
    </mixPort>

    <mixPort name="stub input" role="sink">
      <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
               samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
    </mixPort>
  </mixPorts>
  <devicePorts>
    <devicePort tagName="Default Out" type="AUDIO_DEVICE_OUT_STUB" role="sink">
    </devicePort>

    <devicePort tagName="Default In" type="AUDIO_DEVICE_IN_STUB" role="source">
    </devicePort>
  </devicePorts>
  <routes>
    <route type="mix" sink="Default Out" sources="stub output"/>

    <route type="mix" sink="stub input" sources="Default In"/>
  </routes>
</module>