[SCM] mustang-plug/master: Fix firmware update for Mustang III, IV and V.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Fri Nov 16 14:27:51 UTC 2012


The following commit has been merged in the master branch:
commit 2b6a544d4037ef9b804862d51603ede4407e377e
Author: Alessio Treglia <alessio at debian.org>
Date:   Fri Nov 16 14:27:22 2012 +0000

    Fix firmware update for Mustang III, IV and V.
    
    Patch taken from upstream VCS.

diff --git a/debian/patches/1001-firmware_mustange_III_to_V.patch b/debian/patches/1001-firmware_mustange_III_to_V.patch
new file mode 100644
index 0000000..8fd13df
--- /dev/null
+++ b/debian/patches/1001-firmware_mustange_III_to_V.patch
@@ -0,0 +1,52 @@
+Description: Fix firmware update for Mustang III, IV and V.
+Origin: upstream, https://bitbucket.org/piorekf/plug/changeset/15dba9c8
+---
+ plug/mainwindow.cpp |    2 +-
+ plug/mustang.cpp    |   10 +++++++---
+ plug/mustang.h      |    3 ++-
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+--- mustang-plug.orig/plug/mainwindow.cpp
++++ mustang-plug/plug/mainwindow.cpp
+@@ -664,7 +664,7 @@ void MainWindow::update_firmware()
+     QString filename;
+     int ret = 0;
+ 
+-    QMessageBox::information(this, "Prepare", "Please power off the amplifier, then power it back on while holding \"Save\" button.<br>After pressing \"OK\" choose firmware file and then update will begin.<br>It will take about one minute. You will be notified when it's finished.");
++    QMessageBox::information(this, "Prepare", "Please power off the amplifier, then power it back on while holding down:<ul><li>The \"Save\" button (Mustang I and II)</li><li>The Data Wheel (Mustang III, IV and IV)</li></ul>After pressing \"OK\" choose firmware file and then update will begin.It will take about one minute. You will be notified when it's finished.");
+ 
+     filename = QFileDialog::getOpenFileName(this, tr("Open..."), QDir::homePath(), tr("Mustang firmware (*.upd)"));
+     if(filename.isEmpty())
+--- mustang-plug.orig/plug/mustang.cpp
++++ mustang-plug/plug/mustang.cpp
+@@ -1286,11 +1286,15 @@ int Mustang::update(char *filename)
+             return ret;
+ 
+         // get handle for the device
+-        amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, USB_UPDATE_PID);
++        amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, OLD_USB_UPDATE_PID);
+         if(amp_hand == NULL)
+         {
+-            libusb_exit(NULL);
+-            return -100;
++            amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, NEW_USB_UPDATE_PID);
++            if(amp_hand == NULL)
++            {
++                libusb_exit(NULL);
++                return -100;
++            }
+         }
+ 
+         // detach kernel driver
+--- mustang-plug.orig/plug/mustang.h
++++ mustang-plug/plug/mustang.h
+@@ -17,7 +17,8 @@
+ 
+ // amp's VID and PID while in update mode
+ #define USB_UPDATE_VID 0x1ed8
+-#define USB_UPDATE_PID 0x0006
++#define OLD_USB_UPDATE_PID 0x0006  //Mustang I and II
++#define NEW_USB_UPDATE_PID 0x0007  //Mustang III, IV, V
+ 
+ // for USB communication
+ #define TMOUT 500
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6564181
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+1001-firmware_mustange_III_to_V.patch

-- 
mustang-plug packaging



More information about the pkg-multimedia-commits mailing list