greybus: audio: Add topology parser for GB codec
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Wed, 13 Jan 2016 21:07:51 +0000 (14:07 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 14 Jan 2016 00:41:36 +0000 (16:41 -0800)
commit6339d2322c47f4b8ebabf9daf0130328ed72648b
treeadc601e095d625334fdf81fc38508dd73c9ed631
parent2a70e49f9183d72287e84ac4d6a4080e3f2a6475
greybus: audio: Add topology parser for GB codec

For each GB codec module inserted, DAPM widgets, kcontrols, routes
and DAIs can be fetched through greybus in a binary chunk and parsed
locally to create & populate DAPM graph for the specific module.

It is required by each codec module to populate a minimum set of
kcontrols with fixed names to support basic audio usecase.
To support advanced features of codec module, the same can be polpulated
with existing topology parser. However, to use them for different usecase
separate mechanism (may be via MSP) is required to inform userspace about
their configuration value & enable/disable sequence.

ToDos:
Currently, support for enumerated kcontrol/dapm control is hardcoded.
Need to add complete logic within the parser.

Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Signed-off-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/Makefile
drivers/staging/greybus/audio_codec.c
drivers/staging/greybus/audio_codec.h
drivers/staging/greybus/audio_topology.c [new file with mode: 0644]