Fix bug 4355588
With auto inbanding the fifo didn't reserve the correct size.
Caused failure on fifo wrap.

Change-Id: Ie78e7bef5286f68c6239f79ee2f284fd99bdacc3
diff --git a/rsg_generator.c b/rsg_generator.c
index ed20fef..239795d 100644
--- a/rsg_generator.c
+++ b/rsg_generator.c
@@ -240,9 +240,11 @@
             }
 
             //fprintf(f, "    LOGE(\"add command %s\\n\");\n", api->name);
-            fprintf(f, "    RS_CMD_%s *cmd = static_cast<RS_CMD_%s *>(io->mToCore.reserve(sizeof(RS_CMD_%s)));\n", api->name, api->name, api->name);
             if (hasInlineDataPointers(api)) {
+                fprintf(f, "    RS_CMD_%s *cmd = static_cast<RS_CMD_%s *>(io->mToCore.reserve(dataSize + sizeof(RS_CMD_%s)));\n", api->name, api->name, api->name);
                 fprintf(f, "    uint8_t *payload = (uint8_t *)&cmd[1];\n");
+            } else {
+                fprintf(f, "    RS_CMD_%s *cmd = static_cast<RS_CMD_%s *>(io->mToCore.reserve(sizeof(RS_CMD_%s)));\n", api->name, api->name, api->name);
             }
 
             for (ct2=0; ct2 < api->paramCount; ct2++) {