[PATCH 5/5] mmdevapi: Take the wave format validation code from the tests.