Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

greybus: audio: apbridgea: Remove GET_TX/RX_DELAY message types

The 'AUDIO_APBRIDGEA_TYPE_GET_TX_DELAY' and
'AUDIO_APBRIDGEA_TYPE_GET_RX_DELAY' message types have been
removed from the AP <-> APBrigdeA Audio Protocol so remove
them from the code. Do not coalesce the message type numbers
to prevent compatibility issues between the AP and APBridgeA.

Testing Done: Played music using a speaker module

Signed-off-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>

authored by

Mark Greer and committed by
Greg Kroah-Hartman
ccc57e20 ca9551f6

+2 -40
-16
drivers/staging/greybus/audio_apbridgea.c
··· 84 84 } 85 85 EXPORT_SYMBOL_GPL(gb_audio_apbridgea_set_tx_data_size); 86 86 87 - int gb_audio_apbridgea_get_tx_delay(struct gb_connection *connection, 88 - __u16 i2s_port, __u32 *delay) 89 - { 90 - /* TODO: implement */ 91 - return -EOPNOTSUPP; 92 - } 93 - EXPORT_SYMBOL_GPL(gb_audio_apbridgea_get_tx_delay); 94 - 95 87 int gb_audio_apbridgea_prepare_tx(struct gb_connection *connection, 96 88 __u16 i2s_port) 97 89 { ··· 149 157 GB_APB_REQUEST_AUDIO_CONTROL, true); 150 158 } 151 159 EXPORT_SYMBOL_GPL(gb_audio_apbridgea_set_rx_data_size); 152 - 153 - int gb_audio_apbridgea_get_rx_delay(struct gb_connection *connection, 154 - __u16 i2s_port, __u32 *delay) 155 - { 156 - /* TODO: implement */ 157 - return -EOPNOTSUPP; 158 - } 159 - EXPORT_SYMBOL_GPL(gb_audio_apbridgea_get_rx_delay); 160 160 161 161 int gb_audio_apbridgea_prepare_rx(struct gb_connection *connection, 162 162 __u16 i2s_port)
+2 -20
drivers/staging/greybus/audio_apbridgea.h
··· 47 47 #define AUDIO_APBRIDGEA_TYPE_REGISTER_CPORT 0x02 48 48 #define AUDIO_APBRIDGEA_TYPE_UNREGISTER_CPORT 0x03 49 49 #define AUDIO_APBRIDGEA_TYPE_SET_TX_DATA_SIZE 0x04 50 - #define AUDIO_APBRIDGEA_TYPE_GET_TX_DELAY 0x05 50 + /* 0x05 unused */ 51 51 #define AUDIO_APBRIDGEA_TYPE_PREPARE_TX 0x06 52 52 #define AUDIO_APBRIDGEA_TYPE_START_TX 0x07 53 53 #define AUDIO_APBRIDGEA_TYPE_STOP_TX 0x08 54 54 #define AUDIO_APBRIDGEA_TYPE_SHUTDOWN_TX 0x09 55 55 #define AUDIO_APBRIDGEA_TYPE_SET_RX_DATA_SIZE 0x0a 56 - #define AUDIO_APBRIDGEA_TYPE_GET_RX_DELAY 0x0b 56 + /* 0x0b unused */ 57 57 #define AUDIO_APBRIDGEA_TYPE_PREPARE_RX 0x0c 58 58 #define AUDIO_APBRIDGEA_TYPE_START_RX 0x0d 59 59 #define AUDIO_APBRIDGEA_TYPE_STOP_RX 0x0e ··· 115 115 __le16 size; 116 116 } __packed; 117 117 118 - struct audio_apbridgea_get_tx_delay_request { 119 - struct audio_apbridgea_hdr hdr; 120 - } __packed; 121 - 122 - struct audio_apbridgea_get_tx_delay_response { 123 - struct audio_apbridgea_hdr hdr; 124 - __le16 delay; 125 - } __packed; 126 - 127 118 struct audio_apbridgea_prepare_tx_request { 128 119 struct audio_apbridgea_hdr hdr; 129 120 } __packed; ··· 135 144 struct audio_apbridgea_set_rx_data_size_request { 136 145 struct audio_apbridgea_hdr hdr; 137 146 __le16 size; 138 - } __packed; 139 - 140 - struct audio_apbridgea_get_rx_delay_request { 141 - struct audio_apbridgea_hdr hdr; 142 - } __packed; 143 - 144 - struct audio_apbridgea_get_rx_delay_response { 145 - struct audio_apbridgea_hdr hdr; 146 - __le16 delay; 147 147 } __packed; 148 148 149 149 struct audio_apbridgea_prepare_rx_request {
-4
drivers/staging/greybus/audio_codec.h
··· 260 260 __u8 direction); 261 261 extern int gb_audio_apbridgea_set_tx_data_size(struct gb_connection *connection, 262 262 __u16 i2s_port, __u16 size); 263 - extern int gb_audio_apbridgea_get_tx_delay(struct gb_connection *connection, 264 - __u16 i2s_port, __u32 *delay); 265 263 extern int gb_audio_apbridgea_prepare_tx(struct gb_connection *connection, 266 264 __u16 i2s_port); 267 265 extern int gb_audio_apbridgea_start_tx(struct gb_connection *connection, ··· 270 272 __u16 i2s_port); 271 273 extern int gb_audio_apbridgea_set_rx_data_size(struct gb_connection *connection, 272 274 __u16 i2s_port, __u16 size); 273 - extern int gb_audio_apbridgea_get_rx_delay(struct gb_connection *connection, 274 - __u16 i2s_port, __u32 *delay); 275 275 extern int gb_audio_apbridgea_prepare_rx(struct gb_connection *connection, 276 276 __u16 i2s_port); 277 277 extern int gb_audio_apbridgea_start_rx(struct gb_connection *connection,