Skip to content

Commit

Permalink
Update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
andixlm committed Dec 11, 2014
1 parent 0e8913f commit 25baa26
Show file tree
Hide file tree
Showing 4 changed files with 312 additions and 0 deletions.
2 changes: 2 additions & 0 deletions patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ PATCHES=(
'frameworks/opt/net/wifi frameworks_opt_net_wifi.patch'
'frameworks/opt/telephony frameworks_opt_telephony.patch'
'hardware/broadcom/libbt hardware_broadcom_libbt.patch'
'packages/apps/AudioFX packages_apps_AudioFX.patch'
'packages/services/Telephony packages_services_Telephony.patch'
'system/core system_core.patch'
'vendor/cm vendor_cm.patch'
)

while [ "x${PATCHES[COUNT]}" != "x" ]
Expand Down
33 changes: 33 additions & 0 deletions patches/frameworks_av.patch
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,36 @@ index 25a77d0..3881994 100644
--
1.9.3 (Apple Git-50)


From bf53c48383092b0de7f7e15958511f70b218074b Mon Sep 17 00:00:00 2001
From: Pawit Pornkitprasan <[email protected]>
Date: Wed, 10 Dec 2014 17:38:10 +0700
Subject: [PATCH 6/6] AudioFlinger: i9082: HACK: force audio to 48 KHz

Let surfaceflinger do all the resampling instead of the audio HAL

Don't know if it fixes anything, but worth a try

Change-Id: I0113831464f2f64c26a9c93bba8fe6b8229b09b4
---
services/audioflinger/AudioFlinger.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 3881994..036b6c9 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -2236,8 +2236,9 @@ sp<AudioFlinger::RecordThread> AudioFlinger::openInput_l(audio_module_handle_t m
audio_stream_in_t *inStream = NULL;

#ifdef CAPRI_HWC
- ALOGD("Forcing channel mask to mono on capri");
+ ALOGD("Forcing input to mono 48K on capri");
halconfig.channel_mask = AUDIO_CHANNEL_IN_MONO;
+ halconfig.sample_rate = 48000;
#endif

status_t status = inHwHal->open_input_stream(inHwHal, *input, device, &halconfig,
--
1.9.3 (Apple Git-50)

237 changes: 237 additions & 0 deletions patches/packages_apps_AudioFX.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
From 183cb6af393196fbb55191311a3e84299c766903 Mon Sep 17 00:00:00 2001
From: Pawit Pornkitprasan <[email protected]>
Date: Wed, 10 Dec 2014 12:13:16 +0700
Subject: [PATCH] HACK: use values-330dp for values

Fixes crash until proper fix comes out

Change-Id: I0e8e9c3cc141ce943cf601df7f8480ae7743a892
---
res/layout/music_main.xml | 195 ++++++++++++++++++++++++++++++++--------------
1 file changed, 138 insertions(+), 57 deletions(-)

diff --git a/res/layout/music_main.xml b/res/layout/music_main.xml
index ffedd23..da5334f 100644
--- a/res/layout/music_main.xml
+++ b/res/layout/music_main.xml
@@ -15,79 +15,160 @@
-->

<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:custom="http://schemas.android.com/apk/res/org.cyanogenmod.audiofx"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:custom="http://schemas.android.com/apk/res/org.cyanogenmod.audiofx"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">

<TextView
- android:id="@+id/noEffectsTextView"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:ellipsize="marquee"
- android:fadingEdge="horizontal"
- android:layout_gravity="center"
- android:gravity="center"
- android:text="@string/no_effects"
- android:layout_weight="1"
- android:visibility="gone" />
+ android:id="@+id/noEffectsTextView"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:ellipsize="marquee"
+ android:fadingEdge="horizontal"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:text="@string/no_effects"
+ android:layout_weight="1"
+ android:visibility="gone"/>

<org.cyanogenmod.audiofx.widget.InterceptableLinearLayout
- android:id="@+id/contentSoundEffects"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginTop="48dip">
+ android:id="@+id/contentSoundEffects"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_weight="1"
+ android:layout_height="0dp">
+
+ <include
+ layout="@layout/equalizer"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:layout_weight="2"/>
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="20dp"
+ android:background="#cc191919"
+ />
+
+ <TextView
+ android:id="@+id/eq_preset_label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textColor="#ff808080"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:textSize="10sp"
+ android:background="#cc191919"
+ android:text="@string/eq_preset"
+ android:textAllCaps="true"/>

<org.cyanogenmod.audiofx.widget.Gallery
- android:id="@+id/eqPresets"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="11"
- android:padding="0dip"
- android:fadingEdgeLength="70dip"
- android:requiresFadingEdge="horizontal"
- android:gravity="center_vertical"
- android:background="@drawable/preset_bar" />
+ android:id="@+id/eqPresets"
+ android:layout_width="match_parent"
+ android:layout_height="48dip"
+ android:background="#cc191919"
+ android:gravity="center_vertical"/>


- <include layout="@layout/equalizer"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="26" />
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="20dp"
+ />
+
+ <!--<FrameLayout-->
+ <!--android:layout_width="match_parent"-->
+ <!--android:layout_height="0dip"-->
+ <!--android:layout_weight="23">-->
+
+ <!--<com.pheelicks.visualizer.VisualizerView-->
+ <!--android:id="@+id/visualizerView"-->
+ <!--android:layout_width="match_parent"-->
+ <!--android:layout_height="match_parent">-->
+ <!--</com.pheelicks.visualizer.VisualizerView>-->
+
+ <!--<LinearLayout-->
+ <!--android:layout_width="match_parent"-->
+ <!--android:layout_height="0dp"-->
+ <!--android:orientation="vertical"-->
+ <!--android:layout_weight="1">-->

<LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="23"
- android:gravity="center"
- android:orientation="horizontal">
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:orientation="horizontal">
+
+ <Space
+ android:layout_weight="1"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ />

<org.cyanogenmod.audiofx.widget.Knob
- android:id="@+id/bBStrengthKnob"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- custom:label="@string/bass_boost_strength"
- custom:foreground="@drawable/knob" />
+ android:id="@+id/bBStrengthKnob"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ custom:label="@string/bass_boost_strength"
+ custom:foreground="@drawable/knob_large"/>
+
+ <Space
+ android:layout_weight="2"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ />

<org.cyanogenmod.audiofx.widget.Knob
- android:id="@+id/vIStrengthKnob"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="10dip"
- custom:label="@string/virtualizer_strength"
- custom:foreground="@drawable/knob" />
+ android:id="@+id/vIStrengthKnob"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="10dip"
+ custom:label="@string/virtualizer_strength"
+ custom:foreground="@drawable/knob_large"/>
+
+ <Space
+ android:layout_weight="1"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ />
</LinearLayout>

- <Spinner android:id="@+id/prSpinner"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:drawSelectorOnTop="true"
- />
+
+ <!--<View-->
+ <!--android:layout_width="match_parent"-->
+ <!--android:layout_height="1dp"-->
+ <!--android:background="@color/disabled"/>-->
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="20dp"
+ />
+
+ <TextView
+ android:id="@+id/reverb_label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textColor="#ff808080"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:background="#cc191919"
+ android:paddingTop="8dp"
+ android:textSize="10sp"
+ android:text="@string/reverb"
+ android:textAllCaps="true"/>
+
+
+ <org.cyanogenmod.audiofx.widget.Gallery
+ android:id="@+id/reverb_gallery"
+ android:layout_width="match_parent"
+ android:layout_height="40dip"
+ android:background="#cc191919"
+ android:gravity="center_vertical"/>
+
+
+ <!--</FrameLayout>-->

</org.cyanogenmod.audiofx.widget.InterceptableLinearLayout>
</LinearLayout>
--
1.9.3 (Apple Git-50)

40 changes: 40 additions & 0 deletions patches/vendor_cm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 982e181bf6c06a1ea40bc799cada20a2bc04b354 Mon Sep 17 00:00:00 2001
From: Pawit Pornkitprasan <[email protected]>
Date: Wed, 10 Dec 2014 17:35:17 +0700
Subject: [PATCH] sepolicy: allow system apps to access ASEC

Required for Settings to show name/icon of apps on sd card

(permission copied from untrusted_app)

Change-Id: Ib2b3bee4dfb54ad5e45b392fd9bfd65add4a00bf
---
sepolicy/sepolicy.mk | 1 +
sepolicy/system_app.te | 3 +++
2 files changed, 4 insertions(+)
create mode 100644 sepolicy/system_app.te

diff --git a/sepolicy/sepolicy.mk b/sepolicy/sepolicy.mk
index 1a9b343..d916a04 100644
--- a/sepolicy/sepolicy.mk
+++ b/sepolicy/sepolicy.mk
@@ -25,6 +25,7 @@ BOARD_SEPOLICY_UNION += \
su.te \
sysinit.te \
system.te \
+ system_app.te \
ueventd.te \
vold.te \
mac_permissions.xml
diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te
new file mode 100644
index 0000000..05907f1
--- /dev/null
+++ b/sepolicy/system_app.te
@@ -0,0 +1,3 @@
+# ASEC
+allow system_app asec_apk_file:dir { getattr };
+allow system_app asec_apk_file:file r_file_perms;
--
1.9.3 (Apple Git-50)

0 comments on commit 25baa26

Please sign in to comment.