+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>
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
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
+a 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
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.
#
# 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
-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
#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");
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);
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);
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)) {
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)) {
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));
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);
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));