diff options
-rw-r--r-- | apps/plugin.c | 2 | ||||
-rw-r--r-- | apps/plugin.h | 6 | ||||
-rw-r--r-- | firmware/kernel/thread.c | 1 | ||||
-rw-r--r-- | firmware/target/arm/rk27xx/usb-drv-rk27xx.c | 40 | ||||
-rw-r--r-- | lib/rbcodec/codecs/codecs.h | 4 |
5 files changed, 29 insertions, 24 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index d0e6ade547..8edc773239 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -697,6 +697,7 @@ static const struct plugin_api rockbox_api = { | |||
697 | #endif | 697 | #endif |
698 | plugin_get_buffer, | 698 | plugin_get_buffer, |
699 | plugin_get_audio_buffer, /* defined in plugin.c */ | 699 | plugin_get_audio_buffer, /* defined in plugin.c */ |
700 | plugin_release_audio_buffer, /* defined in plugin.c */ | ||
700 | plugin_tsr, /* defined in plugin.c */ | 701 | plugin_tsr, /* defined in plugin.c */ |
701 | plugin_get_current_filename, | 702 | plugin_get_current_filename, |
702 | #if defined(DEBUG) || defined(SIMULATOR) | 703 | #if defined(DEBUG) || defined(SIMULATOR) |
@@ -804,7 +805,6 @@ static const struct plugin_api rockbox_api = { | |||
804 | 805 | ||
805 | /* new stuff at the end, sort into place next time | 806 | /* new stuff at the end, sort into place next time |
806 | the API gets incompatible */ | 807 | the API gets incompatible */ |
807 | plugin_release_audio_buffer, /* defined in plugin.c */ | ||
808 | }; | 808 | }; |
809 | 809 | ||
810 | static int plugin_buffer_handle; | 810 | static int plugin_buffer_handle; |
diff --git a/apps/plugin.h b/apps/plugin.h index 1ed1c041d1..8b8481b6ac 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -160,12 +160,12 @@ void* plugin_get_buffer(size_t *buffer_size); | |||
160 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 160 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
161 | 161 | ||
162 | /* increase this every time the api struct changes */ | 162 | /* increase this every time the api struct changes */ |
163 | #define PLUGIN_API_VERSION 230 | 163 | #define PLUGIN_API_VERSION 231 |
164 | 164 | ||
165 | /* update this to latest version if a change to the api struct breaks | 165 | /* update this to latest version if a change to the api struct breaks |
166 | backwards compatibility (and please take the opportunity to sort in any | 166 | backwards compatibility (and please take the opportunity to sort in any |
167 | new function which are "waiting" at the end of the function table) */ | 167 | new function which are "waiting" at the end of the function table) */ |
168 | #define PLUGIN_MIN_API_VERSION 230 | 168 | #define PLUGIN_MIN_API_VERSION 231 |
169 | 169 | ||
170 | /* plugin return codes */ | 170 | /* plugin return codes */ |
171 | /* internal returns start at 0x100 to make exit(1..255) work */ | 171 | /* internal returns start at 0x100 to make exit(1..255) work */ |
@@ -843,6 +843,7 @@ struct plugin_api { | |||
843 | #endif | 843 | #endif |
844 | void* (*plugin_get_buffer)(size_t *buffer_size); | 844 | void* (*plugin_get_buffer)(size_t *buffer_size); |
845 | void* (*plugin_get_audio_buffer)(size_t *buffer_size); | 845 | void* (*plugin_get_audio_buffer)(size_t *buffer_size); |
846 | void (*plugin_release_audio_buffer)(void); | ||
846 | void (*plugin_tsr)(bool (*exit_callback)(bool reenter)); | 847 | void (*plugin_tsr)(bool (*exit_callback)(bool reenter)); |
847 | char* (*plugin_get_current_filename)(void); | 848 | char* (*plugin_get_current_filename)(void); |
848 | #if defined(DEBUG) || defined(SIMULATOR) | 849 | #if defined(DEBUG) || defined(SIMULATOR) |
@@ -976,7 +977,6 @@ struct plugin_api { | |||
976 | 977 | ||
977 | /* new stuff at the end, sort into place next time | 978 | /* new stuff at the end, sort into place next time |
978 | the API gets incompatible */ | 979 | the API gets incompatible */ |
979 | void (*plugin_release_audio_buffer)(void); | ||
980 | }; | 980 | }; |
981 | 981 | ||
982 | /* plugin header */ | 982 | /* plugin header */ |
diff --git a/firmware/kernel/thread.c b/firmware/kernel/thread.c index b916c3b521..bbd610122b 100644 --- a/firmware/kernel/thread.c +++ b/firmware/kernel/thread.c | |||
@@ -289,6 +289,7 @@ should_switch_tasks(struct thread_entry *thread) | |||
289 | return THREAD_OK | THREAD_SWITCH; | 289 | return THREAD_OK | THREAD_SWITCH; |
290 | #else | 290 | #else |
291 | return THREAD_OK; | 291 | return THREAD_OK; |
292 | (void)thread; | ||
292 | #endif /* HAVE_PRIORITY_SCHEDULING */ | 293 | #endif /* HAVE_PRIORITY_SCHEDULING */ |
293 | } | 294 | } |
294 | 295 | ||
diff --git a/firmware/target/arm/rk27xx/usb-drv-rk27xx.c b/firmware/target/arm/rk27xx/usb-drv-rk27xx.c index 9380f54193..badc3ab5ed 100644 --- a/firmware/target/arm/rk27xx/usb-drv-rk27xx.c +++ b/firmware/target/arm/rk27xx/usb-drv-rk27xx.c | |||
@@ -79,28 +79,32 @@ struct endpoint_t { | |||
79 | struct semaphore complete; /* semaphore for blocking transfers */ | 79 | struct semaphore complete; /* semaphore for blocking transfers */ |
80 | }; | 80 | }; |
81 | 81 | ||
82 | #define EP_INIT(_type, _dir, _alloced, _buf, _len, _cnt, _block) \ | ||
83 | { .type = (_type), .dir = (_dir), .allocated = (_alloced), .buf = (_buf), \ | ||
84 | .len = (_len), .cnt = (_cnt), .block = (_block) } | ||
85 | |||
82 | static struct endpoint_t ctrlep[2] = { | 86 | static struct endpoint_t ctrlep[2] = { |
83 | {USB_ENDPOINT_XFER_CONTROL, DIR_OUT, true, NULL, 0, 0, true, {0, 0, 0}}, | 87 | EP_INIT(USB_ENDPOINT_XFER_CONTROL, DIR_OUT, true, NULL, 0, 0, true), |
84 | {USB_ENDPOINT_XFER_CONTROL, DIR_IN, true, NULL, 0, 0, true, {0, 0, 0}} | 88 | EP_INIT(USB_ENDPOINT_XFER_CONTROL, DIR_IN, true, NULL, 0, 0, true), |
85 | }; | 89 | }; |
86 | 90 | ||
87 | static struct endpoint_t endpoints[16] = { | 91 | static struct endpoint_t endpoints[16] = { |
88 | {USB_ENDPOINT_XFER_CONTROL, 3, true, NULL, 0, 0, true, {0, 0, 0}}, /* stub */ | 92 | EP_INIT(USB_ENDPOINT_XFER_CONTROL, 3, true, NULL, 0, 0, true ), /* stub */ |
89 | {USB_ENDPOINT_XFER_BULK, DIR_OUT, false, NULL, 0, 0, false, {0, 0, 0}}, /* BOUT1 */ | 93 | EP_INIT(USB_ENDPOINT_XFER_BULK, DIR_OUT, false, NULL, 0, 0, false ), /* BOUT1 */ |
90 | {USB_ENDPOINT_XFER_BULK, DIR_IN, false, NULL, 0, 0, false, {0, 0, 0}}, /* BIN2 */ | 94 | EP_INIT(USB_ENDPOINT_XFER_BULK, DIR_IN, false, NULL, 0, 0, false ), /* BIN2 */ |
91 | {USB_ENDPOINT_XFER_INT, DIR_IN, false, NULL, 0, 0, false, {0, 0, 0}}, /* IIN3 */ | 95 | EP_INIT(USB_ENDPOINT_XFER_INT, DIR_IN, false, NULL, 0, 0, false ), /* IIN3 */ |
92 | {USB_ENDPOINT_XFER_BULK, DIR_OUT, false, NULL, 0, 0, false, {0, 0, 0}}, /* BOUT4 */ | 96 | EP_INIT(USB_ENDPOINT_XFER_BULK, DIR_OUT, false, NULL, 0, 0, false ), /* BOUT4 */ |
93 | {USB_ENDPOINT_XFER_BULK, DIR_IN, false, NULL, 0, 0, false, {0, 0, 0}}, /* BIN5 */ | 97 | EP_INIT(USB_ENDPOINT_XFER_BULK, DIR_IN, false, NULL, 0, 0, false ), /* BIN5 */ |
94 | {USB_ENDPOINT_XFER_INT, DIR_IN, false, NULL, 0, 0, false, {0, 0, 0}}, /* IIN6 */ | 98 | EP_INIT(USB_ENDPOINT_XFER_INT, DIR_IN, false, NULL, 0, 0, false ), /* IIN6 */ |
95 | {USB_ENDPOINT_XFER_BULK, DIR_OUT, false, NULL, 0, 0, false, {0, 0, 0}}, /* BOUT7 */ | 99 | EP_INIT(USB_ENDPOINT_XFER_BULK, DIR_OUT, false, NULL, 0, 0, false ), /* BOUT7 */ |
96 | {USB_ENDPOINT_XFER_BULK, DIR_IN, false, NULL, 0, 0, false, {0, 0, 0}}, /* BIN8 */ | 100 | EP_INIT(USB_ENDPOINT_XFER_BULK, DIR_IN, false, NULL, 0, 0, false ), /* BIN8 */ |
97 | {USB_ENDPOINT_XFER_INT, DIR_IN, false, NULL, 0, 0, false, {0, 0, 0}}, /* IIN9 */ | 101 | EP_INIT(USB_ENDPOINT_XFER_INT, DIR_IN, false, NULL, 0, 0, false ), /* IIN9 */ |
98 | {USB_ENDPOINT_XFER_BULK, DIR_OUT, false, NULL, 0, 0, false, {0, 0, 0}}, /* BOUT10 */ | 102 | EP_INIT(USB_ENDPOINT_XFER_BULK, DIR_OUT, false, NULL, 0, 0, false ), /* BOUT10 */ |
99 | {USB_ENDPOINT_XFER_BULK, DIR_IN, false, NULL, 0, 0, false, {0, 0, 0}}, /* BIN11 */ | 103 | EP_INIT(USB_ENDPOINT_XFER_BULK, DIR_IN, false, NULL, 0, 0, false ), /* BIN11 */ |
100 | {USB_ENDPOINT_XFER_INT, DIR_IN, false, NULL, 0, 0, false, {0, 0, 0}}, /* IIN12 */ | 104 | EP_INIT(USB_ENDPOINT_XFER_INT, DIR_IN, false, NULL, 0, 0, false ), /* IIN12 */ |
101 | {USB_ENDPOINT_XFER_BULK, DIR_OUT, false, NULL, 0, 0, false, {0, 0, 0}}, /* BOUT13 */ | 105 | EP_INIT(USB_ENDPOINT_XFER_BULK, DIR_OUT, false, NULL, 0, 0, false ), /* BOUT13 */ |
102 | {USB_ENDPOINT_XFER_BULK, DIR_IN, false, NULL, 0, 0, false, {0, 0, 0}}, /* BIN14 */ | 106 | EP_INIT(USB_ENDPOINT_XFER_BULK, DIR_IN, false, NULL, 0, 0, false ), /* BIN14 */ |
103 | {USB_ENDPOINT_XFER_INT, DIR_IN, false, NULL, 0, 0, false, {0, 0, 0}}, /* IIN15 */ | 107 | EP_INIT(USB_ENDPOINT_XFER_INT, DIR_IN, false, NULL, 0, 0, false ), /* IIN15 */ |
104 | }; | 108 | }; |
105 | 109 | ||
106 | static void setup_received(void) | 110 | static void setup_received(void) |
diff --git a/lib/rbcodec/codecs/codecs.h b/lib/rbcodec/codecs/codecs.h index 4ac5d283dd..afe33f0a5c 100644 --- a/lib/rbcodec/codecs/codecs.h +++ b/lib/rbcodec/codecs/codecs.h | |||
@@ -72,12 +72,12 @@ | |||
72 | #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ | 72 | #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ |
73 | 73 | ||
74 | /* increase this every time the api struct changes */ | 74 | /* increase this every time the api struct changes */ |
75 | #define CODEC_API_VERSION 46 | 75 | #define CODEC_API_VERSION 47 |
76 | 76 | ||
77 | /* update this to latest version if a change to the api struct breaks | 77 | /* update this to latest version if a change to the api struct breaks |
78 | backwards compatibility (and please take the opportunity to sort in any | 78 | backwards compatibility (and please take the opportunity to sort in any |
79 | new function which are "waiting" at the end of the function table) */ | 79 | new function which are "waiting" at the end of the function table) */ |
80 | #define CODEC_MIN_API_VERSION 46 | 80 | #define CODEC_MIN_API_VERSION 47 |
81 | 81 | ||
82 | /* reasons for calling codec main entrypoint */ | 82 | /* reasons for calling codec main entrypoint */ |
83 | enum codec_entry_call_reason { | 83 | enum codec_entry_call_reason { |