aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/audio_codec.h
diff options
context:
space:
mode:
authorGravatar Vaibhav Agarwal <vaibhav.sr@gmail.com> 2020-07-09 15:57:18 +0530
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2020-07-29 16:40:08 +0200
commitac40b4d1e409971fe40e69761d0c80ffbbb21938 (patch)
tree60aeeb54bb1b3104d62114254925cf4cdc9f36c3 /drivers/staging/greybus/audio_codec.h
parentstaging: greybus: audio: Update snd_jack FW usage as per new APIs (diff)
downloadlinux-ac40b4d1e409971fe40e69761d0c80ffbbb21938.tar.gz
linux-ac40b4d1e409971fe40e69761d0c80ffbbb21938.tar.bz2
linux-ac40b4d1e409971fe40e69761d0c80ffbbb21938.zip
staging: greybus: audio: Maintain jack list within GB Audio module
As per the current implementation for GB codec driver, a jack list is maintained for each module. And it expects the list to be populated by the snd_soc_jack structure which would require modifications in mainstream code. However, this is not a necessary requirement and the list can be easily maintained within gbaudio_module_info as well. This patch provides the relevant changes for the same. Signed-off-by: Vaibhav Agarwal <vaibhav.sr@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/4ee030af7a8e203f89a6e513313e36f4e2991e5b.1594290158.git.vaibhav.sr@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/greybus/audio_codec.h')
-rw-r--r--drivers/staging/greybus/audio_codec.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
index cb5d271da1a5..af9195eceb3a 100644
--- a/drivers/staging/greybus/audio_codec.h
+++ b/drivers/staging/greybus/audio_codec.h
@@ -106,6 +106,11 @@ enum gbaudio_module_state {
GBAUDIO_MODULE_ON,
};
+struct gbaudio_jack {
+ struct snd_soc_jack jack;
+ struct list_head list;
+};
+
struct gbaudio_module_info {
/* module info */
struct device *dev;
@@ -130,8 +135,8 @@ struct gbaudio_module_info {
int jack_mask;
int button_mask;
int button_status;
- struct snd_soc_jack headset_jack;
- struct snd_soc_jack button_jack;
+ struct gbaudio_jack headset;
+ struct gbaudio_jack button;
/* connection info */
struct gb_connection *mgmt_connection;
@@ -155,6 +160,7 @@ struct gbaudio_module_info {
struct list_head widget_list;
struct list_head ctl_list;
struct list_head widget_ctl_list;
+ struct list_head jack_list;
struct gb_audio_topology *topology;
};