OSDN Git Service

android/hal-audio: Fix audio with large omtu value
authorAndrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Mon, 3 Feb 2014 16:55:47 +0000 (17:55 +0100)
committerSzymon Janc <szymon.janc@gmail.com>
Mon, 3 Feb 2014 20:53:08 +0000 (21:53 +0100)
commitf4a6021a4da9941633ad46810077766e8763987a
tree98c46f639043ce4d33c561fd54bac8446879bebf
parentf68715ecd45c8271718a6e75a197d309abec3d0a
android/hal-audio: Fix audio with large omtu value

This patch fixes media packet construction with devices which use large
omtu value. In such cases it's possible that we will try to fit more
than 15 SBC frames in single media packet (which is maximum possible
value as it's encoded using 4 bits) which will cause frame counter to
wrap around and provide incorrect data to SBC encoder.

This behaviour was seen on UPF with one of carkit devices which set
omtu=2688.
android/hal-audio.c