Big refactoring, splitting device/codec logic, and adding code to get
sound working on the STM32F4Discovery.