[Galaxy Tab 2 7" Android Development] Tsjoklat:
Updated configuration patches

I have separated the "config update" patch into four separate parts:

1) cm-11-p31xx-audio_policy_conf-20140804-1-signed.zip

This patch adds support for P3100 voice input. The P3100 has telephony capabilities, so I thought these might be necessary for those additional inputs. This has been synced with the latest audio_policy with audio.r_submix.default for casting. If you have a P3100, then this patch might be useful. Requires testing.

--- audio_policy.conf.orig	2014-08-02 17:26:04.000000000 +0200
+++ audio_policy.conf	2014-08-04 21:25:32.419976909 +0200
@@ -5,7 +5,7 @@
global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
default_output_device AUDIO_DEVICE_OUT_SPEAKER
- attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX
+ attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_VOICE_CALL
}

# audio hardware module section: contains descriptors for all audio hw modules present on the
@@ -42,7 +42,7 @@
sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
- devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET
+ devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_FM|AUDIO_DEVICE_IN_VOICE_CALL
}
}
}

2) cm-11-p31xx-gps_conf-20140804-1-signed.zip

This patch adds additional gps configuration settings found on stock 4.2.2 rom.

diff -ru orig/gps.xml etc/gps.xml
--- orig/gps.xml	2008-02-28 17:33:46.000000000 +0100
+++ etc/gps.xml	2014-08-02 23:29:50.334534037 +0200
@@ -50,6 +50,8 @@
SensorsPowerSave="false"
SensorsLog="false"

+ AssertEnabled="false"
+ SensorsBaroEnable="false"
/>

<gll

3) cm-11-p31xx-media_conf-20140804-1-signed.zip

This patch adds hardware decoding support for wvc1 and wmv video codecs. In addition, video profiles for QVGA and time lapse QVGA are added.

--- orig/media_codecs.xml	2008-02-28 17:33:46.000000000 +0100
+++ etc/media_codecs.xml	2014-08-02 22:53:06.506535754 +0200
@@ -81,16 +81,62 @@
<Type name="video/mp4v-es" />
<Type name="video/3gpp" />
<Type name="video/avc" />
+ <Type name="video/wvc1" />
+ <Type name="video/x-ms-wmv" />
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
</MediaCodec>

+ <MediaCodec name="OMX.SEC.wmv7.dec" type="video/x-ms-wmv7" />
+ <MediaCodec name="OMX.SEC.wmv8.dec" type="video/x-ms-wmv8" />
+ <MediaCodec name="OMX.SEC.h263sr.dec" type="video/sorenson" />
+ <MediaCodec name="OMX.SEC.mp43.dec" type="video/mp43" />
+ <!-- Audio Software -->
+ <MediaCodec name="OMX.SEC.amr.dec">
+ <Type name="audio/amr-wb" />
+ <Type name="audio/3gpp" />
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+
+ <MediaCodec name="OMX.SEC.mp3.dec" type="audio/mpeg" >
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+
+ <MediaCodec name="OMX.SEC.mp3.dec" type="audio/mpeg-L1" >
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+
+ <MediaCodec name="OMX.SEC.mp3.dec" type="audio/mpeg-L2" >
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+
+ <MediaCodec name="OMX.SEC.aac.dec" type="audio/mp4a-latm" >
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.flac.dec" type="audio/flac" >
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.wma.dec" type="audio/x-ms-wma" >
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+
<MediaCodec name="OMX.google.mp3.decoder" type="audio/mpeg" />
<MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp" />
<MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb" />
<MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm" />
- <MediaCodec name="OMX.google.g711.alaw.decoder" type="audio/g711-alaw" />
- <MediaCodec name="OMX.google.g711.mlaw.decoder" type="audio/g711-mlaw" />
+ <MediaCodec name="OMX.google.g711.alaw.decoder" type="audio/g711-alaw">
+ <Quirk name="decoder-lies-about-samplingrate" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.g711.mlaw.decoder" type="audio/g711-mlaw">
+ <Quirk name="decoder-lies-about-samplingrate" />
+ </MediaCodec>
<MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis" />

<MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" />
@@ -133,7 +179,7 @@
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
</MediaCodec>
-
+ <MediaCodec name="OMX.SEC.aac.enc" type="audio/mp4a-latm" />
<MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp" />
<MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb" />
<MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm" />
diff -ru orig/media_profiles.xml etc/media_profiles.xml
--- orig/media_profiles.xml	2008-02-28 17:33:46.000000000 +0100
+++ etc/media_profiles.xml	2014-07-29 21:36:46.000000000 +0200
@@ -130,6 +130,19 @@
channels="1" />
</EncoderProfile>

+ <EncoderProfile quality="qvga" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="768000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="192000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
<EncoderProfile quality="480p" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="3078000"
@@ -207,6 +220,23 @@
channels="1" />
</EncoderProfile>

+ <EncoderProfile quality="timelapseqvga" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="768000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!--
+ The Audio part of the profile will not be used since time lapse mode
+ does not capture audio
+ -->
+ <Audio codec="aac"
+ bitRate="192000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
<EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="3078000"

4) cm-11-p31xx-wpa_supplicant_conf-20140804-1-signed.zip

This patch contains additional wpa supplicant parameters found on 4.2.2 stock rom

--- orig/wifi/wpa_supplicant.conf	2008-02-28 17:33:46.000000000 +0100
+++ etc/wifi/wpa_supplicant.conf	2014-07-29 21:36:46.000000000 +0200
@@ -3,7 +3,14 @@
eapol_version=1
ap_scan=1
fast_reauth=1
+okc=1
p2p_listen_reg_class=81
p2p_listen_channel=1
-p2p_oper_reg_class=115
-p2p_oper_channel=48
+p2p_oper_reg_class=81
+p2p_oper_channel=1
+device_name=SAMSUNG_MOBILE
+manufacturer=SAMSUNG_ELECTRONICS
+model_name=SAMSUNG_MOBILE
+model_number=2013
+serial_number=19691101
+autoscan=exponential:8:128