summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/audio_codec.h
diff options
context:
space:
mode:
authorMark Greer <mgreer@animalcreek.com>2016-02-27 03:04:36 +0300
committerGreg Kroah-Hartman <gregkh@google.com>2016-03-01 00:37:39 +0300
commit4a8e519902e73c833fb57f69bc194c2274dcdc30 (patch)
tree75e885bc2b56ed37c6d8ca454256fa855641dbe1 /drivers/staging/greybus/audio_codec.h
parent611924dd72594200ac55957b4e68b0a65bab143b (diff)
downloadlinux-4a8e519902e73c833fb57f69bc194c2274dcdc30.tar.xz
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>
Diffstat (limited to 'drivers/staging/greybus/audio_codec.h')
-rw-r--r--drivers/staging/greybus/audio_codec.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
index fc60c36aa040..06312031af35 100644
--- a/drivers/staging/greybus/audio_codec.h
+++ b/drivers/staging/greybus/audio_codec.h
@@ -198,9 +198,11 @@ extern int gb_audio_apbridgea_set_config(struct gb_connection *connection,
__u16 i2s_port, __u32 format,
__u32 rate, __u32 mclk_freq);
extern int gb_audio_apbridgea_register_cport(struct gb_connection *connection,
- __u16 i2s_port, __u16 cportid);
+ __u16 i2s_port, __u16 cportid,
+ __u8 direction);
extern int gb_audio_apbridgea_unregister_cport(struct gb_connection *connection,
- __u16 i2s_port, __u16 cportid);
+ __u16 i2s_port, __u16 cportid,
+ __u8 direction);
extern int gb_audio_apbridgea_set_tx_data_size(struct gb_connection *connection,
__u16 i2s_port, __u16 size);
extern int gb_audio_apbridgea_get_tx_delay(struct gb_connection *connection,