summaryrefslogtreecommitdiffstats
path: root/CrespoParts
diff options
context:
space:
mode:
authorKalimochoAz <calimochoazucarado@gmail.com>2012-01-12 21:21:06 +0100
committerKalimochoAz <calimochoazucarado@gmail.com>2012-01-12 21:21:06 +0100
commit1702e13347bef848b9b3a70b50c9e6019148f250 (patch)
tree78f8f6d05b71c6aabdc3509e0bedd958ae0a95f5 /CrespoParts
parent472352ed57a466d1616ceb595863413731505873 (diff)
downloaddevice_samsung_crespo-1702e13347bef848b9b3a70b50c9e6019148f250.zip
device_samsung_crespo-1702e13347bef848b9b3a70b50c9e6019148f250.tar.gz
device_samsung_crespo-1702e13347bef848b9b3a70b50c9e6019148f250.tar.bz2
Remove Sound settings from crespoparts
Since we are moving them to DSPManager Change-Id: Ib40d45be59a7b5f17f49f50dc29ffdefe3abde69
Diffstat (limited to 'CrespoParts')
-rw-r--r--CrespoParts/res/values/strings.xml31
-rwxr-xr-xCrespoParts/res/xml/sound_preferences.xml68
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java2
-rwxr-xr-xCrespoParts/src/com/cyanogenmod/settings/device/SoundFragmentActivity.java98
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/Startup.java1
5 files changed, 0 insertions, 200 deletions
diff --git a/CrespoParts/res/values/strings.xml b/CrespoParts/res/values/strings.xml
index a1d2386..74793bc 100644
--- a/CrespoParts/res/values/strings.xml
+++ b/CrespoParts/res/values/strings.xml
@@ -19,37 +19,6 @@
<string name="color_green_title">Green</string>
<string name="color_blue_title">Blue</string>
- <!-- WM8994 Control Settings -->
- <string name="general_sound_title">Sound</string>
- <!-- Categories -->
- <string name="category_wm8994_internal_speaker">Internal Speaker Configuration</string>
- <string name="category_wm8994_signal_processing">Signal Processing</string>
- <string name="category_wm8994_headphone_amp">Headphone Amplifier</string>
- <string name="category_wm8994_codec_optimization">Codec Optimization</string>
- <string name="category_wm8994_dac_config">Digital/Analog Converter Settings</string>
- <string name="category_wm8994_analog_path">Analog Path Configuration</string>
- <string name="category_wm8994_mic_settings">Microphone Settings</string>
- <!-- Titles/Summaries -->
- <string name="wm8994_settings_title_head">Sound Settings</string>
- <string name="wm8994_settings_title_subhead">Sound Settings</string>
- <string name="wm8994_settings_summary_head">Advanced control of the WM8994 sound processor hardware</string>
- <string name="pref_wm8994_control_enable_title">Enable WM8994 Control</string>
- <string name="pref_wm8994_control_enable_summary">Enable advanced controls for the WM8994 sound processor hardware</string>
- <string name="pref_wm8994_speaker_tuning_title">Tune speaker for music</string>
- <string name="pref_wm8994_speaker_tuning_summary">Reconfigures the hardware EQ to get more bass and balanced sound</string>
- <string name="pref_wm8994_mono_downmix_title">Mono downmix</string>
- <string name="pref_wm8994_mono_downmix_summary">Downmix stereo sound to mono (for stereo outputs, such as headphones)</string>
- <string name="pref_wm8994_stereo_expansion_title">Stereo expansion</string>
- <string name="pref_wm8994_stereo_expansion_summary">"Expand" stereo sound via digital signal processing</string>
- <string name="pref_wm8994_dac_direct_title">D/AC direct</string>
- <string name="pref_wm8994_dac_direct_summary">Access digital/analog converter directly, bypassing the channel mixer. Produces cleaner audio (lower signal-to-noise ratio)</string>
- <string name="pref_wm8994_dac_osr128_title">Hi-fi playback</string>
- <string name="pref_wm8994_dac_osr128_summary">Digital-to-analog converter 128x oversampling -- cleaner sound when playing music</string>
- <string name="pref_wm8994_adc_osr128_title">Hi-fi recording</string>
- <string name="pref_wm8994_adc_osr128_summary">Analog-to-digital converter 128x oversampling -- increases quality of recordings</string>
- <string name="pref_wm8994_fll_tuning_title">Tuned audio clock</string>
- <string name="pref_wm8994_fll_tuning_summary">Use tuned WM8994 audio clock source -- improves quality of sound</string>
-
<string name="category_touchkey_title">Touch Keys</string>
<string name="touchkey_notification_title_head">Backlight Notifications</string>
<string name="touchkey_notification_summary_head">The touch key backlights will turn on when there is a notification.</string>
diff --git a/CrespoParts/res/xml/sound_preferences.xml b/CrespoParts/res/xml/sound_preferences.xml
deleted file mode 100755
index f1007c6..0000000
--- a/CrespoParts/res/xml/sound_preferences.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
- android:title="@string/app_name">
-
- <CheckBoxPreference android:key="pref_wm8994_control_enable"
- android:title="@string/pref_wm8994_control_enable_title"
- android:summary="@string/pref_wm8994_control_enable_summary" />
-
- <!-- Internal speaker options -->
- <PreferenceCategory android:key="wm8994_internal_speaker_category"
- android:title="@string/category_wm8994_internal_speaker">
-
- <CheckBoxPreference android:key="pref_wm8994_speaker_tuning"
- android:title="@string/pref_wm8994_speaker_tuning_title"
- android:summary="@string/pref_wm8994_speaker_tuning_summary"
- android:dependency="pref_wm8994_control_enable" />
-
- </PreferenceCategory>
-
- <!-- Signal Processing -->
- <PreferenceCategory android:key="wm8994_signal_processing_category"
- android:title="@string/category_wm8994_signal_processing">
-
- <CheckBoxPreference android:key="pref_wm8994_mono_downmix"
- android:title="@string/pref_wm8994_mono_downmix_title"
- android:summary="@string/pref_wm8994_mono_downmix_summary"
- android:dependency="pref_wm8994_control_enable" />
-
- <CheckBoxPreference android:key="pref_wm8994_stereo_expansion"
- android:title="@string/pref_wm8994_stereo_expansion_title"
- android:summary="@string/pref_wm8994_stereo_expansion_summary"
- android:dependency="pref_wm8994_control_enable" />
-
- </PreferenceCategory>
-
- <!-- D/AC, A/DC -->
- <PreferenceCategory android:key="wm8994_dac_config_category"
- android:title="@string/category_wm8994_dac_config">
-
- <CheckBoxPreference android:key="pref_wm8994_dac_direct"
- android:title="@string/pref_wm8994_dac_direct_title"
- android:summary="@string/pref_wm8994_dac_direct_summary"
- android:dependency="pref_wm8994_control_enable" />
-
- <CheckBoxPreference android:key="pref_wm8994_dac_osr128"
- android:title="@string/pref_wm8994_dac_osr128_title"
- android:summary="@string/pref_wm8994_dac_osr128_summary"
- android:dependency="pref_wm8994_control_enable" />
-
- <CheckBoxPreference android:key="pref_wm8994_adc_osr128"
- android:title="@string/pref_wm8994_adc_osr128_title"
- android:summary="@string/pref_wm8994_adc_osr128_summary"
- android:dependency="pref_wm8994_control_enable" />
-
- </PreferenceCategory>
-
- <!-- Codec settings -->
- <PreferenceCategory android:key="wm8994_codec_optimization_category"
- android:title="@string/category_wm8994_codec_optimization">
-
- <CheckBoxPreference android:key="pref_wm8994_fll_tuning"
- android:title="@string/pref_wm8994_fll_tuning_title"
- android:summary="@string/pref_wm8994_fll_tuning_summary"
- android:dependency="pref_wm8994_control_enable" />
-
- </PreferenceCategory>
-
-</PreferenceScreen>
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
index 00a6bb8..19e76e4 100644
--- a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
@@ -71,8 +71,6 @@ public class DeviceSettings extends Activity {
GeneralFragmentActivity.class, null);
mTabsAdapter.addTab(bar.newTab().setText(R.string.display_title),
DisplayFragmentActivity.class, null);
- mTabsAdapter.addTab(bar.newTab().setText(R.string.sound_title),
- SoundFragmentActivity.class, null);
if (savedInstanceState != null) {
bar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0));
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/SoundFragmentActivity.java b/CrespoParts/src/com/cyanogenmod/settings/device/SoundFragmentActivity.java
deleted file mode 100755
index 77b76e6..0000000
--- a/CrespoParts/src/com/cyanogenmod/settings/device/SoundFragmentActivity.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2011 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.cyanogenmod.settings.device;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.preference.CheckBoxPreference;
-import android.preference.Preference;
-import android.preference.PreferenceActivity;
-import android.preference.PreferenceFragment;
-import android.preference.PreferenceManager;
-import android.preference.PreferenceScreen;
-import android.util.Log;
-
-import com.cyanogenmod.settings.device.R;
-
-public class SoundFragmentActivity extends PreferenceFragment {
-
- public static final String aOptionControl[][] = {
- {"/sys/class/misc/voodoo_sound_control/enable","pref_wm8994_control_enable"},
- {"/sys/class/misc/voodoo_sound/speaker_tuning","pref_wm8994_speaker_tuning"},
- {"/sys/class/misc/voodoo_sound/mono_downmix","pref_wm8994_mono_downmix"},
- {"/sys/class/misc/voodoo_sound/stereo_expansion","pref_wm8994_stereo_expansion"},
- {"/sys/class/misc/voodoo_sound/dac_direct","pref_wm8994_dac_direct"},
- {"/sys/class/misc/voodoo_sound/dac_osr128","pref_wm8994_dac_osr128"},
- {"/sys/class/misc/voodoo_sound/adc_osr128","pref_wm8994_adc_osr128"},
- {"/sys/class/misc/voodoo_sound/fll_tuning","pref_wm8994_fll_tuning"}
- };
- private static final Integer iTotalOptions = aOptionControl.length;
- private CheckBoxPreference cbpStatus[] = new CheckBoxPreference[iTotalOptions];
-
- // Misc
- private static final String PREF_ENABLED = "1";
- private static final String TAG = "CrespoParts_WM8994ControlSound";
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- addPreferencesFromResource(R.xml.sound_preferences);
-
- PreferenceScreen prefSet = getPreferenceScreen();
-
- Integer iPosition;
- for(iPosition=0;iPosition<iTotalOptions;iPosition++) {
- if (isSupported(aOptionControl[iPosition][0])) {
- cbpStatus[iPosition] = (CheckBoxPreference) prefSet.findPreference(aOptionControl[iPosition][1]);
- cbpStatus[iPosition].setChecked(PREF_ENABLED.equals(Utils.readOneLine(aOptionControl[iPosition][0])));
- }
- }
- }
-
- @Override
- public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
-
- Integer iPosition;
- String boxValue;
- for(iPosition=0;iPosition<iTotalOptions;iPosition++) {
- if (preference == cbpStatus[iPosition]) {
- Log.d(TAG,"Procesando Salida: " + aOptionControl[iPosition][1] + " .. " + aOptionControl[iPosition][0]);
- boxValue = cbpStatus[iPosition].isChecked() ? "1" : "0";
- Utils.writeValue(aOptionControl[iPosition][0], boxValue);
- }
- }
-
- return true;
- }
-
- public static boolean isSupported(String FILE) {
- return Utils.fileExists(FILE);
- }
-
- public static void restore(Context context) {
-
- Integer iPosition;
- for(iPosition=0;iPosition<iTotalOptions;iPosition++) {
- if (isSupported(aOptionControl[iPosition][0])) {
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- Utils.writeValue(aOptionControl[iPosition][0], sharedPrefs.getBoolean(aOptionControl[iPosition][1], PREF_ENABLED.equals(Utils.readOneLine(aOptionControl[iPosition][0]))));
- }
- }
- }
-}
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java b/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java
index 0ed5911..9019d65 100644
--- a/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java
@@ -12,7 +12,6 @@ public class Startup extends BroadcastReceiver {
ColorTuningPreference.restore(context);
GammaTuningPreference.restore(context);
TouchKeyBacklightTimeout.restore(context);
- SoundFragmentActivity.restore(context);
if (Hspa.isSupported()) {
Hspa.restore(context);
}