Skip to content

Commit

Permalink
Revert "sdm845-common: Add Dolby Support"
Browse files Browse the repository at this point in the history
This reverts commit 5d69acc.
  • Loading branch information
RahulGorai0206 committed Feb 16, 2024
1 parent 1ccd52f commit 3a54f7e
Show file tree
Hide file tree
Showing 32 changed files with 12 additions and 1,108 deletions.
2 changes: 0 additions & 2 deletions BoardConfigCommon.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ TARGET_BOARD_PLATFORM := sdm845

# Audio
TARGET_PROVIDES_AUDIO_EXTNS := true
TARGET_EXCLUDES_AUDIOFX := true
AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := true

# Filesystem
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
Expand Down
21 changes: 5 additions & 16 deletions audio/audio_effects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@
<library name="audiosphere" path="libasphere.so"/>
<library name="shoebox" path="libshoebox.so"/>
<library name="dirac" path="libdirac.so"/>
<!--DOLBY DAP-->
<library name="dap" path="libswdap.so"/>
<!--DOLBY GAME-->
<library name="gamedap" path="libswgamedap.so"/>
<!--DOLBY VQE-->
<library name="vqe" path="libswvqe.so"/>
<!--DOLBY END-->
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
Expand Down Expand Up @@ -97,26 +90,22 @@
<effect name="audiosphere" library="audiosphere" uuid="184e62ab-2d19-4364-9d1b-c0a40733866c"/>
<effect name="shoebox" library="shoebox" uuid="1eab784c-1a36-4b2a-b7fc-e34c44cab89e"/>
<effect name="dirac" library="dirac" uuid="e069d9e0-8329-11df-9168-0002a5d5c51b"/>
<!--DOLBY DAP-->
<effect name="dap" library="dap" uuid="9d4921da-8225-4f29-aefa-39537a04bcaa"/>
<!--DOLBY GAME-->
<effect name="gamedap" library="gamedap" uuid="3783c334-d3a0-4d13-874f-0032e5fb80e2"/>
<!--DOLBY VQE-->
<effect name="vqe" library="vqe" uuid="64a0f614-7fa4-48b8-b081-d59dc954616f"/>
<!--DOLBY END-->
</effects>
<postprocess>
<stream type="system">
</stream>
<stream type="music">
<apply effect="music_helper"/>
</stream>
<stream type="ring">
<apply effect="ring_helper"/>
</stream>
<stream type="alarm">
<apply effect="alarm_helper"/>
</stream>
<stream type="voice_call">
<apply effect="voice_helper"/>
</stream>
<stream type="notification">
<apply effect="notification_helper"/>
</stream>
</postprocess>
<preprocess>
Expand Down
9 changes: 0 additions & 9 deletions audio/audio_policy_configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800,384000"
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"/>
<profile name="" format="AUDIO_FORMAT_AC3"
samplingRates="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"/>
<profile name="" format="AUDIO_FORMAT_E_AC3"
samplingRates="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"/>
<profile name="" format="AUDIO_FORMAT_E_AC3_JOC"
samplingRates="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="compressed_offload" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
Expand Down
2 changes: 0 additions & 2 deletions configs/media_codecs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,4 @@ Only the three quirks included above are recognized at this point:
<MediaCodec name="OMX.google.opus.decoder" type="audio/opus" update="true" rank="100"/>
</Decoders>
<Include href="media_codecs_google_video.xml" />
<!-- Dolby Audio -->
<Include href="media_codecs_dolby_audio.xml" />
</MediaCodecs>
8 changes: 2 additions & 6 deletions extract-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,11 @@ function blob_fixup() {
vendor/lib/camera/components/com.qti.node.watermark.so)
grep -q "libpiex_shim.so" "${2}" || ${PATCHELF} --add-needed "libpiex_shim.so" "${2}"
;;

vendor/lib/mediadrm/libwvdrmengine.so | vendor/lib64/mediadrm/libwvdrmengine.so | vendor/lib64/libwvhidl.so)
${PATCHELF} --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/libdlbdsservice.so | vendor/lib/libstagefright_soft_ac4dec.so | vendor/lib/libstagefright_soft_ddpdec.so)
"${PATCHELF}" --replace-needed "libstagefright_foundation.so" "libstagefright_foundation-v33.so" "${2}"
;;
vendor/etc/dolby/dax-default.xml)
sed -i "/volume-leveler-enable/ s/true/false/g" "${2}"
;;

esac
}

Expand Down
1 change: 0 additions & 1 deletion parts/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ android_app {
privileged: true,
system_ext_specific: true,

overrides: ["MusicFX"],
static_libs: [
"org.lineageos.settings.resources",
],
Expand Down
29 changes: 2 additions & 27 deletions parts/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,14 @@
</receiver>

<activity
android:name=".dolby.DolbyActivity"
android:name=".dirac.DiracActivity"
android:exported="false"
android:label="@string/dolby_title"
android:theme="@style/Theme.SubSettingsBase">
android:label="@string/dirac_title">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES"/>
</intent-filter>
<intent-filter>
<action android:name="android.media.action.DISPLAY_AUDIO_EFFECT_CONTROL_PANEL" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.CATEGORY_CONTENT_MUSIC" />
</intent-filter>
<meta-data android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.sound" />
<meta-data android:name="com.android.settings.summary_uri"
android:value="content://org.lineageos.settings.device.summary/dolby" />
</activity>

<service
Expand Down Expand Up @@ -103,21 +94,5 @@
android:permission="ThermalService">
</service>

<provider
android:name=".SummaryProvider"
android:authorities="org.lineageos.settings.device.summary">
</provider>

<service
android:name=".dolby.DolbyTileService"
android:exported="true"
android:icon="@drawable/ic_dolby_qs"
android:label="@string/dolby_title"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE"/>
</intent-filter>
</service>

</application>
</manifest>
8 changes: 0 additions & 8 deletions parts/res/drawable/ic_dolby.xml

This file was deleted.

8 changes: 0 additions & 8 deletions parts/res/drawable/ic_dolby_qs.xml

This file was deleted.

81 changes: 0 additions & 81 deletions parts/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,85 +95,4 @@
<item>"0,4,2,0,-2,-2,4"</item>
<item>"2,0,0,-2,-4,0,0"</item>
</string-array>
<!-- Dolby Atmos -->
<string-array name="dolby_profile_entries">
<item>@string/dolby_profile_dynamic</item>
<item>@string/music_headset_scenario_video</item>
<item>@string/music_headset_scenario_music</item>
<item>@string/music_headset_scenario_vocal</item>
</string-array>

<string-array name="dolby_profile_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>8</item>
</string-array>

<string-array name="dolby_preset_entries" translatable="false">
<item>@string/dirac_preset_default</item>
<item>@string/dirac_preset_rock</item>
<item>@string/dirac_preset_jazz</item>
<item>@string/dirac_preset_pop</item>
<item>@string/dirac_preset_classical</item>
<item>@string/dirac_preset_hiphop</item>
<item>@string/dirac_preset_blues</item>
<item>@string/dirac_preset_electronic</item>
<item>@string/dirac_preset_metal</item>
</string-array>

<string-array name="dolby_preset_values">
<!--
<item>0,0,0,0,0,0,0,0,0,0</item>
<item>4,1,-2,-0.25,0,-2,0,-2,0.5,4</item>
<item>0,0,0,-1,-1,-3,-0.5,0,0,0</item>
<item>-2,-0.5,-5,-1,0,0,-0.5,-3,-0.5,0</item>
<item>0,0,0,0,0.5,3,1,6,2,6</item>
<item>3,0,-3,-0.5,-0.5,-3,-0.5,0,0,2</item>
<item>2,2,-6,-2,3,1,0,1,0,2</item>
<item>3,1,-1,0,-0.5,-3,-0.5,0,0,0</item>
<item>2,0,0,-1.25,-1,-4,0,0,0,0</item>
-->
<item>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</item>
<item>60,36,12,-12,-36,-24,-12,-8,-4,-20,-36,-20,-4,-20,-36,-16,4,32,60,60</item>
<item>8,8,8,8,8,0,-8,-8,-8,-24,-40,-20,0,4,8,8,8,8,8,8</item>
<item>-13,-1,11,-25,-61,-29,3,11,19,19,19,15,11,-9,-29,-9,11,15,19,19</item>
<item>-32,-32,-32,-32,-32,-32,-32,-28,-24,-4,16,0,-16,24,64,32,0,32,64,64</item>
<item>52,28,4,-20,-44,-24,-4,-4,-4,-24,-44,-24,-4,0,4,4,4,20,36,36</item>
<item>28,28,28,-36,-100,-68,-36,4,44,28,12,4,-4,4,12,4,-4,12,28,28</item>
<item>50,34,18,2,-14,-6,2,-2,-6,-26,-46,-26,-6,-2,2,2,2,2,2,2</item>
<item>40,24,8,8,8,-4,-16,-12,-8,-32,-56,-24,8,8,8,8,8,8,8,8</item>
</string-array>

<string-array name="dolby_dialogue_entries">
<item>@string/dolby_off</item>
<item>@string/dolby_low</item>
<item>@string/dolby_medium</item>
<item>@string/dolby_high</item>
<item>@string/dolby_max</item>
</string-array>

<string-array name="dolby_dialogue_values">
<item>0</item>
<item>2</item>
<item>6</item>
<item>9</item>
<item>12</item>
</string-array>

<string-array name="dolby_virtualizer_entries">
<item>@string/dolby_off</item>
<item>@string/dolby_low</item>
<item>@string/dolby_medium</item>
<item>@string/dolby_high</item>
<item>@string/dolby_max</item>
</string-array>

<string-array name="dolby_virtualizer_values">
<item>0</item>
<item>4</item>
<item>24</item>
<item>44</item>
<item>64</item>
</string-array>
</resources>
24 changes: 0 additions & 24 deletions parts/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,4 @@
<string name="thermal_dialer">Battery</string>
<string name="thermal_camera">Balance</string>
<string name="thermal_gaming">Performance</string>


<!-- Dolby Atmos -->
<string name="dolby_title">Dolby Atmos</string>
<string name="dolby_enable">Use Dolby Atmos</string>
<string name="dolby_profile_title">Choose a profile</string>
<string name="dolby_preset">Equalizer preset</string>
<string name="dolby_profile_dynamic">Dynamic</string>
<string name="dolby_off">Off</string>
<string name="dolby_on">On</string>
<string name="dolby_low">Low</string>
<string name="dolby_medium">Medium</string>
<string name="dolby_high">High</string>
<string name="dolby_max">Max</string>
<string name="dolby_unknown">Unknown</string>
<string name="dolby_on_with_profile">On (%1$s)</string>
<string name="dolby_category_settings">Settings</string>
<string name="dolby_bass_enhancer">Bass enhancer</string>
<string name="dolby_dialogue_enhancer">Dialogue enhancer</string>
<string name="dolby_virtualizer">Surround virtualizer</string>
<string name="dolby_volume_leveler">Volume leveler</string>
<string name="dolby_connect_headphones">Connect headphones</string>
<string name="dolby_reset_profile">Reset to defaults</string>
<string name="dolby_reset_profile_toast">Succesfully reset settings for %1$s profile</string>
</resources>
68 changes: 0 additions & 68 deletions parts/res/xml/dolby_settings.xml

This file was deleted.

2 changes: 0 additions & 2 deletions parts/src/org/lineageos/settings/BootCompletedReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.lineageos.settings.dirac.DiracUtils;
import org.lineageos.settings.doze.DozeUtils;
import org.lineageos.settings.thermal.ThermalUtils;
import org.lineageos.settings.dolby.DolbyUtils;

public class BootCompletedReceiver extends BroadcastReceiver {

Expand All @@ -38,6 +37,5 @@ public void onReceive(final Context context, Intent intent) {
DiracUtils.initialize();
DozeUtils.checkDozeService(context);
ThermalUtils.startService(context);
DolbyUtils.getInstance(context);
}
}
Loading

0 comments on commit 3a54f7e

Please sign in to comment.