-rw-r--r-- | audio_hw.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -69,15 +69,9 @@ #define PORT_I2S 0 #define PORT_SPDIF 1 #define PORT_PCM 2 -/* number of frames per period */ -#define DEFAULT_PERIOD_SIZE 1024 + #define DEFAULT_CAPTURE_PERIOD_SIZE 1024 -//static unsigned PERIOD_SIZE = DEFAULT_PERIOD_SIZE; static unsigned CAPTURE_PERIOD_SIZE = DEFAULT_CAPTURE_PERIOD_SIZE; -/* number of periods for low power playback */ -#define PLAYBACK_PERIOD_COUNT 4 -/* number of periods for capture */ -#define CAPTURE_PERIOD_COUNT 4 /* minimum sleep time in out_write() when write threshold is not reached */ #define MIN_WRITE_SLEEP_US 5000 @@ -735,7 +729,8 @@ static size_t out_get_buffer_size(const struct audio_stream *stream) if (out->config.rate == 96000) size = PERIOD_SIZE * 2; else - size = PERIOD_SIZE; + // bug_id - 158018, modify size value from PERIOD_SIZE to (PERIOD_SIZE * PLAYBACK_PERIOD_COUNT) + size = PERIOD_SIZE * PLAYBACK_PERIOD_COUNT; } size = ((size + 15) / 16) * 16; return size * audio_stream_out_frame_size((struct audio_stream_out *)stream); |