aboutsummaryrefslogtreecommitdiffstats
path: root/audio/audio_hw.h
diff options
context:
space:
mode:
authormark <mcampbellsmith@gmail.com>2013-06-23 22:19:15 +1000
committermark <mcampbellsmith@gmail.com>2013-06-24 22:52:00 +1000
commit4d50ed1a2d60882d55eccef92407097c7538c53a (patch)
tree9ee68939df15e57f31b14d765bf53bf18f87b933 /audio/audio_hw.h
parentdf677ce27b513c113e70fb059e3899c81a04dd36 (diff)
downloaddevice_samsung_i9305-4d50ed1a2d60882d55eccef92407097c7538c53a.zip
device_samsung_i9305-4d50ed1a2d60882d55eccef92407097c7538c53a.tar.gz
device_samsung_i9305-4d50ed1a2d60882d55eccef92407097c7538c53a.tar.bz2
i9305: user configureable voice/streaming volumes
This uses 4 files to store the voice volume: incall_earpiece, incall_headphone, incall_speaker, incall_bt, and 2 for streaming volume: out_speaker, out_headphone located /data/local/audio. (based on http://review.cyanogenmod.org/#/c/43834 by Scott Brissenden) Change-Id: Ia4d9793786303156895b3f76b9e3a7831848b062 Requires: http://review.cyanogenmod.org/#/c/44098
Diffstat (limited to 'audio/audio_hw.h')
-rw-r--r--audio/audio_hw.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/audio/audio_hw.h b/audio/audio_hw.h
index 4d99bc7..33050c3 100644
--- a/audio/audio_hw.h
+++ b/audio/audio_hw.h
@@ -64,9 +64,18 @@
/* sampling rate when using VX port for wide band */
#define VX_WB_SAMPLING_RATE 16000
-/* product-specific defines */
-#define PRODUCT_DEVICE_PROPERTY "ro.product.device"
-#define PRODUCT_NAME_PROPERTY "ro.product.name"
+#define MAX_NUM_VOLUME_FILES 6
+#define AUDIO_DIR "/data/local/audio"
+
+/* in-call files */
+#define INCALL_EARPIECE "/data/local/audio/incall_earpiece"
+#define INCALL_HEADPHONE "/data/local/audio/incall_headphone"
+#define INCALL_SPEAKER "/data/local/audio/incall_speaker"
+#define INCALL_BT "/data/local/audio/incall_bt"
+
+/* out stream files */
+#define OUT_HEADPHONE "/data/local/audio/out_headphone"
+#define OUT_SPEAKER "/data/local/audio/out_speaker"
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
@@ -104,6 +113,14 @@ enum tty_modes {
TTY_MODE_FULL
};
+char *volume_file[MAX_NUM_VOLUME_FILES] = {
+ INCALL_EARPIECE,
+ INCALL_HEADPHONE,
+ INCALL_SPEAKER,
+ INCALL_BT,
+ OUT_HEADPHONE,
+ OUT_SPEAKER
+};
/* ACDB Device ID macros */
#define DEVICE_HANDSET_RX_ACDB_ID 7 // HANDSET_SPKR
#define DEVICE_HANDSET_TX_ACDB_ID 4 // HANDSET_MIC
@@ -155,6 +172,8 @@ struct mixer_ctls
{
struct mixer_ctl *mixinl_in1l_volume;
struct mixer_ctl *mixinl_in2l_volume;
+ struct mixer_ctl *speaker_volume;
+ struct mixer_ctl *headphone_volume;
};
struct route_setting