summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-mixer.h
diff options
context:
space:
mode:
authorTanu Kaskinen <tanu.kaskinen@digia.com>2011-03-11 13:34:24 +0200
committerTanu Kaskinen <tanu.kaskinen@digia.com>2011-03-11 13:34:24 +0200
commit4842077a1e62af4f6be22fc5479a0a3eef7e6045 (patch)
tree4f2b4fa89db3f14f4839bc2159eec0a4d8414c66 /src/modules/alsa/alsa-mixer.h
parent4cd90d9e32ca9a23e3c0f7615974ea0c55ff3e49 (diff)
alsa-mixer: Add DecibelFix section to the profile set config file format.
This commit only implements the parser, the decibel fix data is not yet used for anything.
Diffstat (limited to 'src/modules/alsa/alsa-mixer.h')
-rw-r--r--src/modules/alsa/alsa-mixer.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/modules/alsa/alsa-mixer.h b/src/modules/alsa/alsa-mixer.h
index 0fcfc0a4..75da1389 100644
--- a/src/modules/alsa/alsa-mixer.h
+++ b/src/modules/alsa/alsa-mixer.h
@@ -46,6 +46,7 @@ typedef struct pa_alsa_path pa_alsa_path;
typedef struct pa_alsa_path_set pa_alsa_path_set;
typedef struct pa_alsa_mapping pa_alsa_mapping;
typedef struct pa_alsa_profile pa_alsa_profile;
+typedef struct pa_alsa_decibel_fix pa_alsa_decibel_fix;
typedef struct pa_alsa_profile_set pa_alsa_profile_set;
typedef struct pa_alsa_port_data pa_alsa_port_data;
@@ -266,9 +267,26 @@ struct pa_alsa_profile {
pa_idxset *output_mappings;
};
+struct pa_alsa_decibel_fix {
+ pa_alsa_profile_set *profile_set;
+
+ char *name; /* Alsa volume element name. */
+ long min_step;
+ long max_step;
+
+ /* An array that maps alsa volume element steps to decibels. The steps can
+ * be used as indices to this array, after substracting min_step from the
+ * real value.
+ *
+ * The values are actually stored as integers representing millibels,
+ * because that's the format the alsa API uses. */
+ long *db_values;
+};
+
struct pa_alsa_profile_set {
pa_hashmap *mappings;
pa_hashmap *profiles;
+ pa_hashmap *decibel_fixes;
pa_bool_t auto_profiles;
pa_bool_t probed:1;
@@ -276,6 +294,7 @@ struct pa_alsa_profile_set {
void pa_alsa_mapping_dump(pa_alsa_mapping *m);
void pa_alsa_profile_dump(pa_alsa_profile *p);
+void pa_alsa_decibel_fix_dump(pa_alsa_decibel_fix *db_fix);
pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel_map *bonus);
void pa_alsa_profile_set_probe(pa_alsa_profile_set *ps, const char *dev_id, const pa_sample_spec *ss, unsigned default_n_fragments, unsigned default_fragment_size_msec);