diff options
author | Vaibhav Agarwal <vaibhav.agarwal@linaro.org> | 2016-09-01 11:38:39 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-09-02 14:13:39 +0200 |
commit | a695c302b49c8bf10b5336585a533d363d6436db (patch) | |
tree | 5e587e33bf62721aa5f46b602e5fb292f01dc098 /drivers/staging/greybus/greybus_protocols.h | |
parent | 79c222bcb72789456076a26a9bad2acc62cb2cdc (diff) | |
download | op-kernel-dev-a695c302b49c8bf10b5336585a533d363d6436db.zip op-kernel-dev-a695c302b49c8bf10b5336585a533d363d6436db.tar.gz |
greybus: audio: Added jack_type support in topology struct
This patch adds extra field jack_type to gb_audio_topology struct. Also,
it defines bit fields to be used by module while defining it's jack and
jack-button capabilities.
Currently, module can populate a single jack and associated buttons. In
case multiple jacks are supported data routing (say duplicating, etc.)
should be handled within module's FW. It can populate additional mixer
controls to do so.
Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus_protocols.h')
-rw-r--r-- | drivers/staging/greybus/greybus_protocols.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h index c4ef005..b407a26 100644 --- a/drivers/staging/greybus/greybus_protocols.h +++ b/drivers/staging/greybus/greybus_protocols.h @@ -2030,6 +2030,29 @@ struct gb_lights_get_flash_fault_response { #define GB_AUDIO_INVALID_INDEX 0xff +/* enum snd_jack_types */ +#define GB_AUDIO_JACK_HEADPHONE 0x0000001 +#define GB_AUDIO_JACK_MICROPHONE 0x0000002 +#define GB_AUDIO_JACK_HEADSET (GB_AUDIO_JACK_HEADPHONE | \ + GB_AUDIO_JACK_MICROPHONE) +#define GB_AUDIO_JACK_LINEOUT 0x0000004 +#define GB_AUDIO_JACK_MECHANICAL 0x0000008 +#define GB_AUDIO_JACK_VIDEOOUT 0x0000010 +#define GB_AUDIO_JACK_AVOUT (GB_AUDIO_JACK_LINEOUT | \ + GB_AUDIO_JACK_VIDEOOUT) +#define GB_AUDIO_JACK_LINEIN 0x0000020 +#define GB_AUDIO_JACK_OC_HPHL 0x0000040 +#define GB_AUDIO_JACK_OC_HPHR 0x0000080 +#define GB_AUDIO_JACK_MICROPHONE2 0x0000200 +#define GB_AUDIO_JACK_ANC_HEADPHONE (GB_AUDIO_JACK_HEADPHONE | \ + GB_AUDIO_JACK_MICROPHONE | \ + GB_AUDIO_JACK_MICROPHONE2) +/* Kept separate from switches to facilitate implementation */ +#define GB_AUDIO_JACK_BTN_0 0x4000000 +#define GB_AUDIO_JACK_BTN_1 0x2000000 +#define GB_AUDIO_JACK_BTN_2 0x1000000 +#define GB_AUDIO_JACK_BTN_3 0x0800000 + struct gb_audio_pcm { __u8 stream_name[GB_AUDIO_PCM_NAME_MAX]; __le32 formats; /* GB_AUDIO_PCM_FMT_* */ @@ -2120,6 +2143,7 @@ struct gb_audio_topology { __le32 size_controls; __le32 size_widgets; __le32 size_routes; + __le32 jack_type; /* * struct gb_audio_dai dai[num_dais]; * struct gb_audio_control controls[num_controls]; |