gta4xl-common: use stock audio configs
* fixes audio recording and headphones
* also fix audio hal denials
Change-Id: I09bdb2c6e182a9625ea17d60292e2dcb2d787ca4
diff --git a/config/audio/audio_policy_configuration_sec.xml b/config/audio/audio_policy_configuration_sec.xml
deleted file mode 100644
index 6009ce6..0000000
--- a/config/audio/audio_policy_configuration_sec.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
- <globalConfiguration speaker_drc_enabled="false"/>
-
- <modules>
- <module name="primary" halVersion="3.0">
- <attachedDevices>
- <item>Speaker</item>
- <item>Built-In Mic</item>
- <item>Built-In Back Mic</item>
- <!--<item>Built-In 2 Mic</item>-->
- <item>Telephony Rx</item>
- </attachedDevices>
-
- <defaultOutputDevice>Speaker</defaultOutputDevice>
-
- <mixPorts>
- <mixPort name="primary-out" flags="AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_DEEP_BUFFER" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- </mixPort>
-
- <mixPort name="fast" flags="AUDIO_OUTPUT_FLAG_FAST" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- </mixPort>
-
- <mixPort name="hdmi" flags="AUDIO_OUTPUT_FLAG_MULTI_CH" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1"/>
- </mixPort>
-
- <mixPort name="mmap_no_irq_out" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_MMAP_NOIRQ" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- </mixPort>
-
- <mixPort name="compressed_offload" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING" role="source">
- <profile name="" format="AUDIO_FORMAT_MP3"
- samplingRates="11025,16000,22050,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
- </mixPort>
-
- <mixPort name="primary-in" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
- </mixPort>
-
- <mixPort name="mmap_no_irq_in" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
- </mixPort>
- </mixPorts>
-
- <devicePorts>
- <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink" address="">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- </devicePort>
- <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- </devicePort>
- <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- </devicePort>
- <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- </devicePort>
- <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- </devicePort>
- <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- </devicePort>
- <devicePort tagName="Aux Device Out" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="44100,48000,64000,88200,96000,128000,176400,192000"
- channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
- </devicePort>
-
- <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
- </devicePort>
- <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
- </devicePort>
- <!--<devicePort tagName="Built-In 2 Mic" type="AUDIO_DEVICE_IN_2MIC" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
- </devicePort>-->
- <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
- </devicePort>
- <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
- </devicePort>
- <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
- </devicePort>
- <devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
- </devicePort>
- <devicePort tagName="Aux Device In" type="AUDIO_DEVICE_IN_AUX_DIGITAL" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
- </devicePort>
- </devicePorts>
-
- <routes>
- <route sink="Speaker" type="mix"
- sources="primary-out,fast,mmap_no_irq_out"/>
- <route sink="Wired Headset" type="mix"
- sources="primary-out,fast,compressed_offload,mmap_no_irq_out"/>
- <route sink="Wired Headphones" type="mix"
- sources="primary-out,fast,compressed_offload,mmap_no_irq_out"/>
- <route sink="BT SCO" type="mix"
- sources="primary-out,fast"/>
- <route sink="BT SCO Headset" type="mix"
- sources="primary-out,fast"/>
- <route sink="BT SCO Car Kit" type="mix"
- sources="primary-out,fast"/>
- <route sink="Aux Device Out" type="mix"
- sources="hdmi"/>
-
- <!--<route sink="primary-in" type="mix"
- sources="Built-In Mic,Built-In Back Mic,Built-In 2 Mic,Wired Headset Mic,BT SCO Headset Mic,Telephony Rx,FM Tuner,Aux Device In"/>-->
-
- <route sink="mmap_no_irq_in" type="mix"
- sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/>
- </routes>
- </module>
-
- <xi:include href="a2dp_in_audio_policy_configuration.xml"/>
- <xi:include href="hearing_aid_audio_policy_configuration.xml"/>
- <!--<xi:include href="playback_record_audio_policy_configuration.xml"/>-->
- <xi:include href="r_submix_audio_policy_configuration.xml"/>
- <!--<xi:include href="tms_audio_policy_configuration.xml"/>-->
- <xi:include href="usb_audio_policy_configuration.xml"/>
-
- <xi:include href="audio_policy_volumes.xml"/>
- <xi:include href="default_volume_tables.xml"/>
- <xi:include href="/vendor/etc/bluetooth_audio_policy_configuration.xml"/>
- </modules>
-</audioPolicyConfiguration>
diff --git a/config/audio/audio_policy_volumes_sec.xml b/config/audio/audio_policy_volumes_sec.xml
deleted file mode 100644
index 3eb451e..0000000
--- a/config/audio/audio_policy_volumes_sec.xml
+++ /dev/null
@@ -1,278 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-
-<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
- <!-- Part of audio_policy_volumes.xml -->
- <volumes>
- <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_HEADSET">
- <point>0,-4200</point>
- <point>33,-2800</point>
- <point>66,-1400</point>
- <point>100,0</point>
- </volume>
- <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_SPEAKER">
- <point>0,-2400</point>
- <point>33,-1600</point>
- <point>66,-800</point>
- <point>100,0</point>
- </volume>
- <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_EARPIECE">
- <point>0,-2400</point>
- <point>33,-1600</point>
- <point>66,-800</point>
- <point>100,0</point>
- </volume>
- <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_HEADSET">
- <point>1,-3000</point>
- <point>33,-2600</point>
- <point>66,-2200</point>
- <point>100,-1800</point>
- </volume>
- <volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="DEFAULT_SYSTEM_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="DEFAULT_SYSTEM_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_SPEAKER">
- <point>1,-2970</point>
- <point>33,-2010</point>
- <point>66,-1020</point>
- <point>100,0</point>
- </volume>
- <volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="DEFAULT_DEVICE_CATEGORY_EARPIECE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="DEFAULT_DEVICE_CATEGORY_SPEAKER_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_SPEAKER">
- <point>1,-2970</point>
- <point>33,-2010</point>
- <point>66,-1020</point>
- <point>100,0</point>
- </volume>
- <volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="DEFAULT_DEVICE_CATEGORY_EARPIECE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_SPEAKER">
- <point>1,-2970</point>
- <point>33,-2010</point>
- <point>66,-1020</point>
- <point>100,0</point>
- </volume>
- <volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="DEFAULT_DEVICE_CATEGORY_EARPIECE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_HEADSET">
- <point>0,-4200</point>
- <point>33,-2800</point>
- <point>66,-1400</point>
- <point>100,0</point>
- </volume>
- <volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_SPEAKER">
- <point>0,-2400</point>
- <point>33,-1600</point>
- <point>66,-800</point>
- <point>100,0</point>
- </volume>
- <volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_EARPIECE">
- <point>0,-4200</point>
- <point>33,-2800</point>
- <point>66,-1400</point>
- <point>100,0</point>
- </volume>
- <volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_HEADSET">
- <point>1,-3000</point>
- <point>33,-2600</point>
- <point>66,-2200</point>
- <point>100,-1800</point>
- </volume>
- <volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="DEFAULT_SYSTEM_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="DEFAULT_SYSTEM_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_HEADSET">
- <point>1,-3000</point>
- <point>33,-2600</point>
- <point>66,-2200</point>
- <point>100,-1800</point>
- </volume>
- <volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="DEFAULT_SYSTEM_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="DEFAULT_SYSTEM_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="SILENT_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="SILENT_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="SILENT_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="SILENT_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="DEFAULT_DEVICE_CATEGORY_SPEAKER_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_FM_RADIO" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_FM_RADIO" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_FM_RADIO" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_FM_RADIO" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_VIDEO_CALL" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_VIDEO_CALL" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_VIDEO_CALL" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_VIDEO_CALL" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_SEC_VOICE_COMMUNICATION" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_SEC_VOICE_COMMUNICATION" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_SEC_VOICE_COMMUNICATION" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_SEC_VOICE_COMMUNICATION" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_VOICENOTE" deviceCategory="DEVICE_CATEGORY_HEADSET"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_VOICENOTE" deviceCategory="DEVICE_CATEGORY_SPEAKER"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_VOICENOTE" deviceCategory="DEVICE_CATEGORY_EARPIECE"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- <volume stream="AUDIO_STREAM_VOICENOTE" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
- ref="FULL_SCALE_VOLUME_CURVE"/>
- </volumes>
- <!-- Part of default_volume_tables.xml -->
- <volumes>
- <reference name="FULL_SCALE_VOLUME_CURVE">
- <!-- Full Scale reference Volume Curve -->
- <point>0,0</point>
- <point>100,0</point>
- </reference>
- <reference name="SILENT_VOLUME_CURVE">
- <point>0,-9600</point>
- <point>100,-9600</point>
- </reference>
- <reference name="DEFAULT_SYSTEM_VOLUME_CURVE">
- <!-- Default System reference Volume Curve -->
- <point>1,-2400</point>
- <point>33,-1800</point>
- <point>66,-1200</point>
- <point>100,-600</point>
- </reference>
- <reference name="DEFAULT_MEDIA_VOLUME_CURVE">
- <!-- Default Media reference Volume Curve -->
- <point>1,-5800</point>
- <point>20,-4000</point>
- <point>60,-1700</point>
- <point>100,0</point>
- </reference>
- <reference name="DEFAULT_DEVICE_CATEGORY_HEADSET_VOLUME_CURVE">
- <!--Default Volume Curve -->
- <point>1,-4950</point>
- <point>33,-3350</point>
- <point>66,-1700</point>
- <point>100,0</point>
- </reference>
- <reference name="DEFAULT_DEVICE_CATEGORY_SPEAKER_VOLUME_CURVE">
- <!-- Default is Speaker Media Volume Curve -->
- <point>1,-5800</point>
- <point>20,-4000</point>
- <point>60,-1700</point>
- <point>100,0</point>
- </reference>
- <reference name="DEFAULT_DEVICE_CATEGORY_EARPIECE_VOLUME_CURVE">
- <!--Default Volume Curve -->
- <point>1,-4950</point>
- <point>33,-3350</point>
- <point>66,-1700</point>
- <point>100,0</point>
- </reference>
- <reference name="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE">
- <!-- Default is Ext Media System Volume Curve -->
- <point>1,-5800</point>
- <point>20,-4000</point>
- <point>60,-2100</point>
- <point>100,-1000</point>
- </reference>
- <reference name="DEFAULT_HEARING_AID_VOLUME_CURVE">
- <!-- Default Hearing Aid Volume Curve -->
- <point>1,-12700</point>
- <point>20,-8000</point>
- <point>60,-4000</point>
- <point>100,0</point>
- </reference>
- </volumes>
-</audioPolicyConfiguration>
diff --git a/platform/config.mk b/platform/config.mk
index ea6b07f..0850d00 100644
--- a/platform/config.mk
+++ b/platform/config.mk
@@ -9,10 +9,6 @@
frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml
-PRODUCT_COPY_FILES += \
- $(PLATFORM_PATH)/config/audio/audio_policy_configuration_sec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
- $(PLATFORM_PATH)/config/audio/audio_policy_volumes_sec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml
-
### BLUETOOTH
PRODUCT_COPY_FILES += \
hardware/samsung_slsi/libbt/conf/bt_did.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/bt_did.conf \
diff --git a/proprietary-files-vendor.txt b/proprietary-files-vendor.txt
index 4bce036..b58e6fa 100644
--- a/proprietary-files-vendor.txt
+++ b/proprietary-files-vendor.txt
@@ -4,6 +4,10 @@
vendor/etc/audio_effects.xml
vendor/etc/audio_effects_common.conf
vendor/etc/audio_effects_sec.xml
+vendor/etc/audio_policy_configuration.xml
+vendor/etc/audio_policy_configuration_sec.xml
+vendor/etc/audio_policy_volumes.xml
+vendor/etc/audio_policy_volumes_sec.xml
vendor/etc/default_volume_tables.xml
vendor/etc/hearing_aid_audio_policy_configuration.xml
vendor/etc/mixer_paths.xml
diff --git a/sepolicy/vendor/hal_audio_default.te b/sepolicy/vendor/hal_audio_default.te
index 63878b3..e54c9a6 100644
--- a/sepolicy/vendor/hal_audio_default.te
+++ b/sepolicy/vendor/hal_audio_default.te
@@ -1,10 +1,11 @@
# hal_audio_default.te
allow hal_audio_default efs_file:dir search;
-allow hal_audio_default sec_efs_file:dir search;
allow hal_audio_default imei_efs_file:dir search;
allow hal_audio_default imei_efs_file:file r_file_perms;
+r_dir_file(hal_audio_default, sec_efs_file);
+
allow hal_audio_default omr_file:dir search;
get_prop(hal_audio_default, vendor_radio_prop);
diff --git a/sepolicy/vendor/kernel.te b/sepolicy/vendor/kernel.te
index 8faf2cc..0ba2950 100644
--- a/sepolicy/vendor/kernel.te
+++ b/sepolicy/vendor/kernel.te
@@ -4,7 +4,7 @@
r_dir_file(kernel, sysfs_sec_key);
-allow kernel device:dir { add_name write };
+allow kernel device:dir { add_name write remove_name };
allow kernel device:chr_file { create setattr getattr };
r_dir_file(kernel, efs_file);