Fix audio route constraints
The audio route of I2S and Dumper are not independent.
The combination RX_I2S -> I2S and CODEC -> DUMPER is invalid because the
codec only accept one clock for input and output.
Refactor AudioRouteController and add a AudioRouteManager class to handle this
logic. Now AudioRouteController only provides basic route setter/getter
to access lower level registers.
AudioRouteManager is responsible for routing and serve CodecFlow and
InputFlow. AudioRouteManager raises exception when an invalid route is
Change the routing calls in InputFlow and CodecFlow to make sure route is
valid before audio action starts. Resets the route when the audio
action is stopped. Resets the route when chameleond resets.
TEST=Change audio route by ./fpga asrc <aout|adump> <rx|rec|gen|str> command.
run audio_AudioBasic* test.
Reviewed-by: Cheng-Yi Chiang <firstname.lastname@example.org>
Commit-Queue: Cheng-Yi Chiang <email@example.com>
Tested-by: Cheng-Yi Chiang <firstname.lastname@example.org>
6 files changed