Adding sanity checks for invalid frame sizes

Invalid frame size can cause the audio server to crash due to a
divide-by-zero error. Adding sanity checks to make that issue easier to
diagnose.

Bug: 155646578
Test: Ran CarAudioManagerSystemTest suite which was encountering the
error

Change-Id: Ibc5b8e13738eb8957d21509b7f87ddaf3115cd4a
2 files changed