aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordvdli <dvdli@google.com>2020-10-28 17:37:19 +0800
committerdvdli <dvdli@google.com>2020-10-28 17:37:19 +0800
commit1e75a165df625396afd68bbc68a59c517727c3e6 (patch)
tree3af9ed8f027f6a4b8a973560c6a281927d0542a5 /include
parent5688a7a7b125e9bd3e3f81f8a30f3425bf71d42d (diff)
AOSP CL "pcm: add support to set silence_size"
https://android.googlesource.com/platform/external/tinyalsa/+/e25fe0b50ea717a9f347dcb927d396e8772e6362 commit e25fe0b50ea717a9f347dcb927d396e8772e6362 author Maneet Singh <mmaneetsingh@nvidia.com> pcm: add support to set silence_size Tinyalsa always set silence_size to zero. Add support to set this pcm software parameter as required. Bug: 20226809 Bug: 20300203 Change-Id: I25de43623dc04bf5a3ad4c6573bc2b8dad1eec5e
Diffstat (limited to 'include')
-rw-r--r--include/tinyalsa/pcm.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/tinyalsa/pcm.h b/include/tinyalsa/pcm.h
index 5191882..f32e11d 100644
--- a/include/tinyalsa/pcm.h
+++ b/include/tinyalsa/pcm.h
@@ -202,13 +202,15 @@ struct pcm_config {
unsigned int period_count;
/** The sample format of a PCM */
enum pcm_format format;
- /* Values to use for the ALSA start, stop and silence thresholds. Setting
- * any one of these values to 0 will cause the default tinyalsa values to be
- * used instead. Tinyalsa defaults are as follows.
+ /* Values to use for the ALSA start, stop and silence thresholds, and
+ * silence size. Setting any one of these values to 0 will cause the
+ * default tinyalsa values to be used instead.
+ * Tinyalsa defaults are as follows.
*
* start_threshold : period_count * period_size
* stop_threshold : period_count * period_size
* silence_threshold : 0
+ * silence_size : 0
*/
/** The minimum number of frames required to start the PCM */
unsigned int start_threshold;
@@ -216,6 +218,9 @@ struct pcm_config {
unsigned int stop_threshold;
/** The minimum number of frames to silence the PCM */
unsigned int silence_threshold;
+ /** The number of frames to overwrite the playback buffer when the playback underrun is greater
+ * than the silence threshold */
+ unsigned int silence_size;
};
/** Enumeration of a PCM's hardware parameters.