<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Copyright (c) 2014, The Linux Foundation. All rights reserved.         -->
<!--                                                                        -->
<!-- Redistribution and use in source and binary forms, with or without     -->
<!-- modification, are permitted provided that the following conditions are -->
<!-- met:                                                                   -->
<!--     * Redistributions of source code must retain the above copyright   -->
<!--       notice, this list of conditions and the following disclaimer.    -->
<!--     * Redistributions in binary form must reproduce the above          -->
<!--       copyright notice, this list of conditions and the following      -->
<!--       disclaimer in the documentation and/or other materials provided  -->
<!--       with the distribution.                                           -->
<!--     * Neither the name of The Linux Foundation nor the names of its    -->
<!--       contributors may be used to endorse or promote products derived  -->
<!--       from this software without specific prior written permission.    -->
<!--                                                                        -->
<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED           -->
<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF   -->
<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
<!-- ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF   -->
<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        -->
<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,  -->
<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                          -->
<audio_platform_info>
    <acdb_ids>
        <device name="SND_DEVICE_OUT_VOICE_SPEAKER" acdb_id="14"/>
        <device name="SND_DEVICE_OUT_VOICE_MUSIC_TX" acdb_id="3"/>
        <device name="SND_DEVICE_OUT_VOICE_SPEAKER_HFP" acdb_id="14"/>
        <device name="SND_DEVICE_IN_VOICE_REC_MIC" acdb_id="41"/>
        <device name="SND_DEVICE_OUT_VOICE_HAC_HANDSET" acdb_id="201"/>
        <device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC" acdb_id="19"/>
        <device name="SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET" acdb_id="14"/>
        <device name="SND_DEVICE_IN_VOICE_TTY_VCO_HANDSET_MIC" acdb_id="19"/>
        <device name="SND_DEVICE_IN_HEADSET_MIC" acdb_id="4"/>
        <device name="SND_DEVICE_OUT_HEADPHONES" acdb_id="9"/>
        <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES" acdb_id="603"/>
        <device name="SND_DEVICE_OUT_SPEAKER_SAFE_AND_HEADPHONES" acdb_id="603"/>
        <device name="SND_DEVICE_IN_VOICE_REC_DMIC_STEREO" acdb_id="505"/>
        <device name="SND_DEVICE_IN_VOICE_REC_MIC_AEC_NS" acdb_id="114"/>
        <device name="SND_DEVICE_IN_HEADSET_MIC_AEC" acdb_id="130"/>
        <device name="SND_DEVICE_IN_UNPROCESSED_MIC" acdb_id="143"/>
        <device name="SND_DEVICE_IN_UNPROCESSED_STEREO_MIC" acdb_id="144"/>
        <device name="SND_DEVICE_IN_UNPROCESSED_THREE_MIC" acdb_id="145"/>
        <device name="SND_DEVICE_IN_UNPROCESSED_QUAD_MIC" acdb_id="146"/>
        <device name="SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC" acdb_id="65"/>
        <device name="SND_DEVICE_IN_BT_SCO_MIC_NREC" acdb_id="122"/>
        <device name="SND_DEVICE_IN_BT_SCO_MIC_WB_NREC" acdb_id="123"/>
    </acdb_ids>
    <backend_names>
        <device name="SND_DEVICE_OUT_SPEAKER" backend="speaker" interface="QUAT_MI2S_RX"/>
        <device name="SND_DEVICE_OUT_VOICE_SPEAKER" backend="speaker" interface="QUAT_MI2S_RX"/>
        <device name="SND_DEVICE_OUT_SPEAKER_REVERSE" backend="speaker" interface="QUAT_MI2S_RX"/>
        <device name="SND_DEVICE_OUT_SPEAKER_SAFE" backend="speaker" interface="QUAT_MI2S_RX"/>
        <device name="SND_DEVICE_OUT_SPEAKER_PROTECTED" backend="speaker" interface="QUAT_MI2S_RX"/>
        <device name="SND_DEVICE_OUT_VOICE_SPEAKER_HFP" backend="speaker" interface="QUAT_MI2S_RX"/>
        <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES" backend="speaker-and-headphones" interface="QUAT_MI2S_RX-and-SLIMBUS_0_RX"/>
        <device name="SND_DEVICE_OUT_SPEAKER_SAFE_AND_HEADPHONES" backend="speaker-and-headphones" interface="QUAT_MI2S_RX-and-SLIMBUS_0_RX"/>
        <device name="SND_DEVICE_OUT_SPEAKER_AND_LINE" backend="speaker-and-headphones" interface="QUAT_MI2S_RX-and-SLIMBUS_0_RX"/>
        <device name="SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET" backend="speaker" interface="QUAT_MI2S_RX"/>
        <device name="SND_DEVICE_OUT_SPEAKER_AND_BT_SCO" backend="speaker-and-bt-sco" interface="QUAT_MI2S_RX-and-AUX_PCM_RX"/>
        <device name="SND_DEVICE_OUT_SPEAKER_AND_BT_SCO_WB" backend="speaker-and-bt-sco-wb" interface="QUAT_MI2S_RX-and-AUX_PCM_RX"/>
    </backend_names>
    <config_params>
        <param key="input_mic_max_count" value="3"/>
        <param key="snd_card_name" value="msm8996-tasha"/>
    </config_params>
    <gain_db_to_level_mapping>
        <gain_level_map db="-62.4" level="15"/>
        <gain_level_map db="-42.4" level="14"/>
        <gain_level_map db="-41.4" level="13"/>
        <gain_level_map db="-40.4" level="12"/>
        <gain_level_map db="-39.1" level="11"/>
        <gain_level_map db="-28.9" level="10"/>
        <gain_level_map db="-27.4" level="9"/>
        <gain_level_map db="-25.5" level="8"/>
        <gain_level_map db="-23" level="7"/>
        <gain_level_map db="-20" level="6"/>
        <gain_level_map db="-17" level="5"/>
        <gain_level_map db="-14.5" level="4"/>
        <gain_level_map db="-12" level="3"/>
        <gain_level_map db="-8.7" level="2"/>
        <gain_level_map db="0" level="1"/>
    </gain_db_to_level_mapping>
    <pcm_ids>
       <usecase name="USECASE_AUDIO_RECORD_LOW_LATENCY" type="in" id="19" />
       <usecase name="USECASE_AUDIO_PLAYBACK_ULL" type="out" id="19" />
       <usecase name="USECASE_AUDIO_RECORD_MMAP" type="in" id="18" />
       <usecase name="USECASE_AUDIO_PLAYBACK_MMAP" type="out" id="18" />
       <usecase name="USECASE_INCALL_MUSIC_UPLINK" type="out" id="32" />
    </pcm_ids>
    <!-- Mandatory microphone characteristics include: device_id, type,     -->
    <!-- address, location, group, index_in_the_group, directionality,      -->
    <!-- num_frequency_responses, frequencies and responses.                -->
    <!-- Optional microphone characteristics include: Sensitivity, max_spl, -->
    <!-- min_spl, orientation and geometric_location. If missing they will  -->
    <!-- be populated as unknown.                                           -->
    <microphone_characteristics>
        <microphone device_id="builtin_mic_1" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="bottom" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
            group="0" index_in_the_group="0" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="93"
            frequencies="97.16 102.92 109.02 115.48 122.32 129.57 137.25 145.38 153.99 163.12 172.78 183.02 193.87 205.35 217.52 230.41 244.06 258.52 273.84 290.07 307.26 325.46 344.75 365.17 386.81 409.73 434.01 459.73 486.97 515.82 546.39 578.76 613.06 649.38 687.86 728.62 771.79 817.52 865.96 917.28 971.63 1029.20 1090.18 1154.78 1223.21 1295.69 1372.46 1453.78 1539.93 1631.17 1727.83 1830.21 1938.65 2053.53 2175.20 2304.09 2440.62 2585.23 2738.42 2900.68 3072.56 3254.62 3447.47 3651.74 3868.12 4097.32 4340.10 4597.27 4869.68 5158.22 5463.87 5787.62 6130.56 6493.82 6878.60 7286.18 7717.92 8175.23 8659.64 9172.76 9716.28 10292.01 10901.84 11547.82 12232.07 12956.87 13724.61 14537.84 15399.27 16311.73 17278.26 18302.06 19386.53"
            responses="-0.80 -0.80 -1.00 -1.10 -0.80 -0.80 -0.70 -0.70 -0.70 -0.70 -0.60 -0.90 -1.10 -1.10 -1.20 -1.00 -1.30 -1.30 -1.40 -1.40 -1.20 -0.70 -0.10 0.80 1.20 0.50 -0.80 -2.00 -2.60 -2.70 -1.90 -0.40 0.70 0.60 0.20 -0.10 0.30 0.20 1.90 1.50 0.00 -0.60 -0.90 -0.10 -0.50 0.90 -0.20 1.00 1.30 1.30 2.90 1.90 1.40 3.10 1.10 -7.00 -0.20 1.00 2.10 -1.60 0.90 -1.70 1.40 0.80 -0.50 -0.40 0.50 1.20 0.40 -0.50 3.80 4.70 -2.20 -0.60 3.40 5.60 -2.50 3.30 6.30 8.80 6.30 11.20 15.20 16.80 19.40 22.30 24.30 18.00 18.00 18.60 17.30 15.20 15.70"
            sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 -1.0 0.0" geometric_location="0.0485 0.0 0.0038" />
        <microphone device_id="builtin_mic_2" type="AUDIO_DEVICE_IN_BACK_MIC" address="back" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
            group="0" index_in_the_group="1" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="93"
            frequencies="97.16 102.92 109.02 115.48 122.32 129.57 137.25 145.38 153.99 163.12 172.78 183.02 193.87 205.35 217.52 230.41 244.06 258.52 273.84 290.07 307.26 325.46 344.75 365.17 386.81 409.73 434.01 459.73 486.97 515.82 546.39 578.76 613.06 649.38 687.86 728.62 771.79 817.52 865.96 917.28 971.63 1029.20 1090.18 1154.78 1223.21 1295.69 1372.46 1453.78 1539.93 1631.17 1727.83 1830.21 1938.65 2053.53 2175.20 2304.09 2440.62 2585.23 2738.42 2900.68 3072.56 3254.62 3447.47 3651.74 3868.12 4097.32 4340.10 4597.27 4869.68 5158.22 5463.87 5787.62 6130.56 6493.82 6878.60 7286.18 7717.92 8175.23 8659.64 9172.76 9716.28 10292.01 10901.84 11547.82 12232.07 12956.87 13724.61 14537.84 15399.27 16311.73 17278.26 18302.06 19386.53"
            responses="-1.30 -1.30 -1.40 -1.50 -1.10 -1.10 -1.20 -1.30 -1.30 -1.30 -1.20 -1.50 -1.60 -1.40 -1.30 -0.90 -0.80 -0.60 -0.40 -0.40 -0.40 -0.60 -0.90 -1.50 -1.80 -1.80 -0.70 -0.20 -0.10 -0.60 -1.20 -1.40 -0.80 -0.90 -1.30 -1.30 -1.80 -1.30 -1.00 0.00 0.00 -0.30 -1.00 -0.60 0.10 0.10 1.10 2.20 1.90 0.80 2.20 2.60 3.00 2.50 1.70 5.40 5.60 6.40 5.00 3.50 6.00 6.40 7.70 8.50 7.60 4.30 7.10 7.10 7.00 9.60 6.60 6.40 10.00 8.10 6.90 9.30 6.80 9.30 6.40 9.70 9.90 9.70 12.00 10.90 13.10 12.60 13.20 13.50 12.00 9.90 11.70 13.90 15.90"
            sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 0.0 -1.0" geometric_location="0.0347 0.135 0.0" />
        <microphone device_id="builtin_mic_3" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="top" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
            group="0" index_in_the_group="2" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="93"
            frequencies="97.16 102.92 109.02 115.48 122.32 129.57 137.25 145.38 153.99 163.12 172.78 183.02 193.87 205.35 217.52 230.41 244.06 258.52 273.84 290.07 307.26 325.46 344.75 365.17 386.81 409.73 434.01 459.73 486.97 515.82 546.39 578.76 613.06 649.38 687.86 728.62 771.79 817.52 865.96 917.28 971.63 1029.20 1090.18 1154.78 1223.21 1295.69 1372.46 1453.78 1539.93 1631.17 1727.83 1830.21 1938.65 2053.53 2175.20 2304.09 2440.62 2585.23 2738.42 2900.68 3072.56 3254.62 3447.47 3651.74 3868.12 4097.32 4340.10 4597.27 4869.68 5158.22 5463.87 5787.62 6130.56 6493.82 6878.60 7286.18 7717.92 8175.23 8659.64 9172.76 9716.28 10292.01 10901.84 11547.82 12232.07 12956.87 13724.61 14537.84 15399.27 16311.73 17278.26 18302.06 19386.53"
            responses="0.50 0.50 0.50 0.50 0.40 0.30 0.70 0.60 0.60 0.60 0.50 0.50 0.60 0.30 0.10 0.20 0.20 0.60 0.70 0.90 1.10 1.20 1.30 1.30 1.30 0.90 0.10 -0.80 -0.10 0.90 1.60 1.70 1.60 0.90 0.50 0.20 0.20 0.50 0.40 -0.20 0.00 1.70 1.70 1.40 0.70 0.40 1.60 0.80 2.40 3.20 2.90 1.80 3.00 2.90 4.50 3.90 2.20 6.00 7.80 6.70 5.40 5.00 6.90 7.00 7.70 9.50 8.30 5.10 7.40 7.40 7.40 9.50 6.60 6.60 10.30 7.90 6.70 9.70 6.90 8.80 6.50 9.40 9.10 9.00 10.70 9.60 11.00 9.90 11.30 13.60 13.20 12.40 15.40"
            sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 0.0 1.0" geometric_location="0.0314 0.1362 0.0073" />
    </microphone_characteristics>
    <!-- TODO: Fake channel mapping data, need to populate with actual data -->
    <snd_devices>
        <input_snd_device>
            <input_snd_device_mic_mapping>
                <snd_dev in_snd_device="SND_DEVICE_IN_HANDSET_MIC">
                    <mic_info mic_device_id="builtin_mic_1"
                        channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
                </snd_dev>
                <snd_dev in_snd_device="SND_DEVICE_IN_HANDSET_DMIC_AEC_NS">
                    <mic_info mic_device_id="builtin_mic_1"
                        channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
                    <mic_info mic_device_id="builtin_mic_2"
                        channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
                </snd_dev>
                <snd_dev in_snd_device="SND_DEVICE_IN_VOICE_DMIC_TMUS">
                    <mic_info mic_device_id="builtin_mic_1"
                        channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
                    <mic_info mic_device_id="builtin_mic_3"
                        channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT"/>
                </snd_dev>
                <snd_dev in_snd_device="SND_DEVICE_IN_VOICE_REC_MIC">
                    <mic_info mic_device_id="builtin_mic_1"
                        channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT"/>
                    <mic_info mic_device_id="builtin_mic_3"
                        channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
                </snd_dev>
                <snd_dev in_snd_device="SND_DEVICE_IN_THREE_MIC">
                    <mic_info mic_device_id="builtin_mic_1"
                        channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
                    <mic_info mic_device_id="builtin_mic_2"
                        channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
                    <mic_info mic_device_id="builtin_mic_3"
                        channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT"/>
                </snd_dev>
            </input_snd_device_mic_mapping>
        </input_snd_device>
    </snd_devices>

</audio_platform_info>