diff options
author | Glenn Kasten <gkasten@google.com> | 2012-08-07 14:10:40 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-08-21 14:39:58 -0700 |
commit | 937956eb1f26a559a46fe733eae705aa217bea44 (patch) | |
tree | a1b0cac509d9b9c94b2bb5e0a99ebc0ac1738b25 /audio | |
parent | e567f6aeca41d340c7b108e6df13ae3317fff9be (diff) | |
download | device_samsung_tuna-937956eb1f26a559a46fe733eae705aa217bea44.zip device_samsung_tuna-937956eb1f26a559a46fe733eae705aa217bea44.tar.gz device_samsung_tuna-937956eb1f26a559a46fe733eae705aa217bea44.tar.bz2 |
Triple buffer if SRC enabled
Bug: 6881638
Change-Id: I76255c2cd5845671c2342e22932c692342257208
Diffstat (limited to 'audio')
-rw-r--r-- | audio/audio_hw.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 8ae519c..b841c57 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -180,6 +180,11 @@ */ #ifdef PLAYBACK_MMAP #define PLAYBACK_SHORT_PERIOD_COUNT 4 +/* If sample rate converter is required, then use triple-buffering to + * help mask the variance in cycle times. Otherwise use double-buffering. + */ +#elif DEFAULT_OUT_SAMPLING_RATE != MM_FULL_POWER_SAMPLING_RATE +#define PLAYBACK_SHORT_PERIOD_COUNT 3 #else #define PLAYBACK_SHORT_PERIOD_COUNT 2 #endif @@ -297,6 +302,7 @@ enum tty_modes { TTY_MODE_FULL }; +/* deep buffer */ struct pcm_config pcm_config_mm = { .channels = 2, .rate = MM_FULL_POWER_SAMPLING_RATE, @@ -307,6 +313,7 @@ struct pcm_config pcm_config_mm = { .avail_min = DEEP_BUFFER_LONG_PERIOD_SIZE, }; +/* low latency */ struct pcm_config pcm_config_tones = { .channels = 2, .rate = MM_FULL_POWER_SAMPLING_RATE, |