summaryrefslogtreecommitdiff
path: root/cras/src/server/cras_volume_curve.h
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2021-08-03 14:20:19 +0000
committerAndrew Walbran <qwandor@google.com>2021-08-03 14:20:19 +0000
commit8dce65084f73d40bb081312769a24b4bd533f667 (patch)
treee2118ad5dbee0370c6ab114bb3974cd9f09a2251 /cras/src/server/cras_volume_curve.h
parentbcf1f249f11b6865cff3f0d3f0ae5801e67e0e7e (diff)
downloadadhd-master.tar.gz
This repository will be removed from the manifest change, but Treehugger seems unable to test the manifest change, so this change first removes all files so we can test that instead. Bug: 190503456 Test: m crosvm Change-Id: I133ef3bd8b39035a68113c4da8fe4c637a40daac
Diffstat (limited to 'cras/src/server/cras_volume_curve.h')
-rw-r--r--cras/src/server/cras_volume_curve.h57
1 files changed, 0 insertions, 57 deletions
diff --git a/cras/src/server/cras_volume_curve.h b/cras/src/server/cras_volume_curve.h
deleted file mode 100644
index c3b0ee66..00000000
--- a/cras/src/server/cras_volume_curve.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef CRAS_VOLUME_CURVE_H_
-#define CRAS_VOLUME_CURVE_H_
-
-#define MAX_VOLUME 100
-#define NUM_VOLUME_STEPS (MAX_VOLUME + 1) /* 0-100 inclusive. */
-
-/* Holds the function that converts from a volume index to a dBFS value. */
-struct cras_volume_curve {
- /* Function to convert from index to dBFS value.
- * Args:
- * curve - A curve from cras_volume_curve_create_* functions.
- * volume - The volume level from 0 to 100.
- * Returns:
- * The volume to apply in dB * 100. This value will normally be
- * negative and is means dB down from full scale.
- */
- long (*get_dBFS)(const struct cras_volume_curve *curve, size_t volume);
-};
-
-/* Creates a system-default volume curve. The default curve maps one volume step
- * to 1 dB down.
- * Returns null on error, or the new volume curve on success.
- */
-struct cras_volume_curve *cras_volume_curve_create_default();
-
-/* Creates a volume curve with a specified max volume and step.
- * Args:
- * max_volume - Maximum volume allowed in dBFS.
- * volume_step - Number of dB to change for one volume tick.
- */
-struct cras_volume_curve *
-cras_volume_curve_create_simple_step(long max_volume, long volume_step);
-
-/* Creates a volume curve with each step's dB value called out.
- * Args:
- * dB_values - Each element specifies what the volume should be set to (in
- * dB) for the volume at that index.
- * Returns:
- * A volume curve pointer that should be passed to
- * cras_volume_curve_destroy() when it is no longer needed. If there is an
- * error NULL will be returned.
- */
-struct cras_volume_curve *
-cras_volume_curve_create_explicit(long dB_values[101]);
-
-/* Destroys a curve created with cras_volume_curve_create_*.
- * Args:
- * curve - The curve to destroy.
- */
-void cras_volume_curve_destroy(struct cras_volume_curve *curve);
-
-#endif /* CRAS_VOLUME_CURVE_H_ */