Merge tag 'v0.3' into debian
authorAntonio Ospite <ospite@studenti.unina.it>
Fri, 6 Dec 2013 16:52:09 +0000 (17:52 +0100)
committerAntonio Ospite <ospite@studenti.unina.it>
Fri, 6 Dec 2013 16:52:09 +0000 (17:52 +0100)
Release v0.3

ChangeLog
Makefile
README
kinect_fetch_fw
kinect_upload_fw/Makefile
kinect_upload_fw/endian.c
kinect_upload_fw/kinect_upload_fw.c

index 328da27..bb7db37 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,54 @@
+2013-12-06 17:46:39 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * ChangeLog: refresh for v0.3 (HEAD, tag: v0.3, master)
+
+2013-12-06 17:45:36 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * Makefile: remove a trailing space
+
+2013-12-06 17:43:22 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * Makefile: don't create the empty dir /lib/firmware/kinect
+
+2013-12-06 17:42:43 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * kinect_upload_fw/Makefile: fix double spacing
+
+2013-12-06 17:36:12 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * kinect_upload_fw/endian.c: fix warning and rename a function
+
+2013-11-19 16:16:18 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * README: reword and re-indent some paragraphs (origin/master, origin/HEAD)
+
+2013-11-19 16:02:39 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * Makefile: misc fixes
+
+2012-02-23 22:48:22 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * kinect_upload_fw: initialize 'transferred' before USB transfers
+
+2012-02-03 13:12:01 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * README: acknowledge Steven Toth's sponsorship
+
+2011-12-28 12:17:52 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * kinect_fetch_fw: mention that p7zip-full >= 9.20 is needed
+
+2011-12-28 12:14:06 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * README: mention reloading udev rules
+
+2011-11-27 12:16:20 +0100  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * Add ChangeLog for v0.2 (tag: v0.2)
+
 2011-11-27 10:23:30 +0100  Antonio Ospite  <ospite@studenti.unina.it>
 
-       * kinect_fetch_fw: tell where we are getting the firmware from (HEAD, origin/master, origin/HEAD, master)
+       * kinect_fetch_fw: tell where we are getting the firmware from
 
 2011-11-27 10:11:51 +0100  Antonio Ospite  <ospite@studenti.unina.it>
 
 
 2011-10-12 12:13:34 +0200  Antonio Ospite  <ospite@studenti.unina.it>
 
-       * Add ChangeLog for v0.1 (v0.1)
+       * Add ChangeLog for v0.1 (tag: v0.1)
 
 2011-10-06 14:49:01 +0200  Antonio Ospite  <ospite@studenti.unina.it>
 
index 70ad841..b3b755d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,13 @@
 all:
-       make -C kinect_upload_fw 
+       $(MAKE) -C kinect_upload_fw 
 
 install:
-       make -C kinect_upload_fw install
+       $(MAKE) -C kinect_upload_fw install
        install -d $(DESTDIR)/lib/udev/rules.d
        install -m 644 contrib/55-kinect_audio.rules.in $(DESTDIR)/lib/udev/rules.d/55-kinect_audio.rules
-       
-       # We prare the firmware location, but it should be downloaded at
-       # package installation time
-       install -d $(DESTDIR)/lib/firmware/kinect
 
-clean: 
-       make -C kinect_upload_fw clean
+clean:
+       $(MAKE) -C kinect_upload_fw clean
 
 changelog:
        git log --pretty="format:%ai  %aN  <%aE>%n%n%x09* %s%d%n" > ChangeLog
diff --git a/README b/README
index 306e480..9e9bf1a 100644 (file)
--- a/README
+++ b/README
@@ -1,15 +1,15 @@
 kinect-audio-setup makes audio input from the Microsoft Kinect Sensor
 device work on GNU/Linux systems.
 
-When the Kinect is first plugged in the USB port it shows up as a
-generic USB device with a bulk endpoint; after uploading a certain
+When the Kinect is first plugged in the USB port it shows up as
+generic USB device with a bulk endpoint; after uploading a certain
 firmware a reenumeration takes place and a USB Audio Class (UAC) device
 becomes available.
 
 kinect-audio-setup provides tools to download the firmware off the net
-at installation time —since it is not redistributable—, and it sets up
-udev rules to call the firmware loader when the device is plugged in to
-finally get the USB Audio Class device.
+at installation time —since the firmware is not redistributable—, and it
+sets up udev rules to call the firmware loader when the device is
+plugged in to finally get the USB Audio Class device.
 
 Note that for all the magic to happen automatically pulseaudio >= 1.0 is
 needed, as it contains the kinect-audio.conf profile which fixes audio
@@ -38,8 +38,15 @@ Then run the firmware fetcher script (remember this is only needed
 once):
 
   # ./kinect_fetch_fw /lib/firmware/kinect
+  # udevadm control --reload-rules
 
 
 The UAC firmware is downloaded from the Microsoft Kinect SDK at
 http://www.kinectforwindows.org, the license of the SDK can be found at
 http://www.kinectforwindows.org/download/EULA.htm
+
+=== Acknowledgements
+
+A special thanks goes to Steven Toth from http://kernellabs.com, who
+kindly sponsored a Kinect to Antonio Ospite and made kinect-audio-setup
+possible in its current form.
index a358327..28a9fe7 100755 (executable)
@@ -12,6 +12,9 @@
 #
 # wget and 7z from p7zip-full are needed, they can be installed with
 #   sudo aptitude install wget p7zip-full
+#
+# NOTE: p7zip-full >= 9.20 is required in order to extract .msi files
+#       correctly
 
 set -e
 
index 2cca6fd..15741d3 100644 (file)
@@ -33,7 +33,7 @@ CFLAGS += -fno-common \
   -Wunsafe-loop-optimizations \
   -Wwrite-strings
 
-CFLAGS  += $(shell pkg-config --cflags libusb-1.0)
+CFLAGS += $(shell pkg-config --cflags libusb-1.0)
 LDLIBS += $(shell pkg-config --libs libusb-1.0)
 
 PREFIX ?= /usr/local
index 89120ca..24c5ccf 100644 (file)
@@ -1,16 +1,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-static int litend(void) {
+static int little_endian(void) {
        int i = 0;
        ((char *) (&i))[0] = 1;
        return (i == 1);
 }
 
-static int bigend(void) {
-       return !litend();
-}
-
 int main(void) {
        printf("#ifndef __ENDIAN_H\n");
        printf("#define __ENDIAN_H\n");
@@ -18,7 +14,7 @@ int main(void) {
        printf("#define __LITTLE_ENDIAN 1234\n");
        printf("#define __BIG_ENDIAN    4321\n");
        printf("#define __BYTE_ORDER __%s_ENDIAN\n",
-              litend() ? "LITTLE" : "BIG");
+              little_endian() ? "LITTLE" : "BIG");
        printf("\n");
        printf("#endif /* __ENDIAN_H */\n");
        exit(0);
index e544df4..b2188d6 100644 (file)
@@ -77,7 +77,7 @@ static void dump_bl_cmd(bootloader_command cmd) {
 static int get_first_reply(void) {
        unsigned char buffer[512];
        int res;
-       int transferred;
+       int transferred = 0;
        res = libusb_bulk_transfer(dev, 0x81, buffer, 512, &transferred, 0);
        if (res != 0 ) {
                LOG("Error reading first reply: %d\ttransferred: %d (expected %d)\n", res, transferred, 0x60);
@@ -101,7 +101,7 @@ static int get_reply(void) {
                unsigned char dump[512];
        } reply;
        int res;
-       int transferred;
+       int transferred = 0;
 
        res = libusb_bulk_transfer(dev, 0x81, reply.dump, 512, &transferred, 0);
        if (res != 0 || transferred != sizeof(status_code)) {
@@ -171,7 +171,7 @@ int main(int argc, char** argv) {
        LOG("About to send: ");
        dump_bl_cmd(cmd);
 
-       int transferred;
+       int transferred = 0;
 
        res = libusb_bulk_transfer(dev, 1, (unsigned char*)&cmd, sizeof(cmd), &transferred, 0);
        if (res != 0 || transferred != sizeof(cmd)) {
@@ -202,6 +202,7 @@ int main(int argc, char** argv) {
                LOG("About to send: ");
                dump_bl_cmd(cmd);
                // Send it off!
+               transferred = 0;
                res = libusb_bulk_transfer(dev, 1, (unsigned char*)&cmd, sizeof(cmd), &transferred, 0);
                if (res != 0 || transferred != sizeof(cmd)) {
                        LOG("Error: res: %d\ttransferred: %d (expected %zu)\n", res, transferred, sizeof(cmd));
@@ -210,6 +211,7 @@ int main(int argc, char** argv) {
                int bytes_sent = 0;
                while (bytes_sent < read) {
                        int to_send = (read - bytes_sent > 512 ? 512 : read - bytes_sent);
+                       transferred = 0;
                        res = libusb_bulk_transfer(dev, 1, &page[bytes_sent], to_send, &transferred, 0);
                        if (res != 0 || transferred != to_send) {
                                LOG("Error: res: %d\ttransferred: %d (expected %d)\n", res, transferred, to_send);
@@ -228,6 +230,7 @@ int main(int argc, char** argv) {
        cmd.cmd = fn_le32(0x04);
        cmd.write_addr = fn_le32(0x00080030);
        dump_bl_cmd(cmd);
+       transferred = 0;
        res = libusb_bulk_transfer(dev, 1, (unsigned char*)&cmd, sizeof(cmd), &transferred, 0);
        if (res != 0 || transferred != sizeof(cmd)) {
                LOG("Error: res: %d\ttransferred: %d (expected %zu)\n", res, transferred, sizeof(cmd));