greybus: audio: Register CPorts for specific directions
authorMark Greer <mgreer@animalcreek.com>
Sat, 27 Feb 2016 00:04:36 +0000 (17:04 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 29 Feb 2016 21:37:39 +0000 (13:37 -0800)
commit4a8e519902e73c833fb57f69bc194c2274dcdc30
tree75e885bc2b56ed37c6d8ca454256fa855641dbe1
parent611924dd72594200ac55957b4e68b0a65bab143b
greybus: audio: Register CPorts for specific directions

Currently, it is assumed that all audio data CPorts registered on
APB1 are used for transmitting audio data.  That may not always be
true like when a microphone is connected but no speakers.  Also,
the current special protocol lacks a way to tell APB1 whether the CPort
being registered is for transmitting, receiving, or both.

Fix by adding a 'direction' field to the register and unregister CPort
requests and define bits indicating which direction (or both) audio
data will go on that CPort.

Signed-off-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/audio_apbridgea.c
drivers/staging/greybus/audio_apbridgea.h
drivers/staging/greybus/audio_codec.c
drivers/staging/greybus/audio_codec.h