At Tue, 2 Dec 2003 09:31:32 +0100,
Karsten Wiese wrote:
> 
> Hi Takashi,
> 
> Please commit this to reenable usx2yloader hotplugging:
> >>>
> Index: alsa-tools/usx2yloader/tascam_fw
> ===================================================================
> RCS file: /cvsroot/alsa/alsa-tools/usx2yloader/tascam_fw,v
> retrieving revision 1.1
> diff -u -r1.1 tascam_fw
> --- alsa-tools/usx2yloader/tascam_fw  23 Sep 2003 14:16:23 -0000      1.1
> +++ alsa-tools/usx2yloader/tascam_fw  2 Dec 2003 07:46:08 -0000
> @@ -3,7 +3,7 @@
>  # load the firmware into Tascam USB devices
>  
>  FIRMWARE=
> -FIRMWAREDIR=/usr/local/share/alsa/firmware
> +FIRMWAREDIR=/usr/local/share/alsa/firmware/usx2yloader
>  FLAGS=
>  LOADER=/sbin/fxload
>  LOADERFIRMWARE=$FIRMWAREDIR/tascam_loader.ihx
> <<<
> 
> Later there should also be some magic to (not) include the "/local" substring, 
> I don't know yet how to do that; anybody?

fixed on cvs.
tascam_fw and tascam_fpga will be generated via configure script now.
the diff is attached below.  please give a try.


Takashi
Index: alsa-tools/usx2yloader/.cvsignore
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-tools/usx2yloader/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- alsa-tools/usx2yloader/.cvsignore   8 Sep 2003 11:07:43 -0000       1.1
+++ alsa-tools/usx2yloader/.cvsignore   2 Dec 2003 09:59:10 -0000       1.2
@@ -12,3 +12,5 @@
 depcomp
 .deps
 autom4te.cache
+tascam_fpga
+tascam_fw
Index: alsa-tools/usx2yloader/Makefile.am
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-tools/usx2yloader/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- alsa-tools/usx2yloader/Makefile.am  25 Nov 2003 17:35:01 -0000      1.6
+++ alsa-tools/usx2yloader/Makefile.am  2 Dec 2003 09:59:11 -0000       1.7
@@ -9,7 +9,7 @@
 
 usx2yloader_SOURCES = usx2yloader.c
 
-EXTRA_DIST = depcomp tascam_fw.usermap tascam_fw tascam_fpga
+EXTRA_DIST = depcomp tascam_fw.usermap tascam_fw.in tascam_fpga.in
 
 hotplug_files = tascam_fw.usermap tascam_fw tascam_fpga
 hotplugdir = /etc/hotplug/usb
Index: alsa-tools/usx2yloader/configure.in
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-tools/usx2yloader/configure.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- alsa-tools/usx2yloader/configure.in 25 Nov 2003 16:44:31 -0000      1.3
+++ alsa-tools/usx2yloader/configure.in 2 Dec 2003 09:59:11 -0000       1.4
@@ -8,4 +8,4 @@
 CFLAGS="$CFLAGS $ALSA_CFLAGS"
 LDFLAGS="$LDFLAGS $ALSA_LIBS"
 
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile tascam_fpga tascam_fw)
Index: alsa-tools/usx2yloader/tascam_fpga.in
===================================================================
RCS file: alsa-tools/usx2yloader/tascam_fpga.in
diff -N alsa-tools/usx2yloader/tascam_fpga.in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ alsa-tools/usx2yloader/tascam_fpga.in       2 Dec 2003 09:59:11 -0000       1.1
@@ -0,0 +1,18 @@
+#!/bin/sh
+# load the firmware into Tascam USB devices (FPGA design)
+
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
+
[EMAIL PROTECTED]@/usx2yloader
+
+if [ -x /usr/bin/logger ]; then
+       /usr/bin/logger -t $0 "calling $LOADER for $DEVICE"
+fi
+$LOADER
[EMAIL PROTECTED]@/us428control &
+if [ -x /usr/bin/logger ]; then
+       /usr/bin/logger -t $0 "leaving"
+fi
+
+exit 0
Index: alsa-tools/usx2yloader/tascam_fw.in
===================================================================
RCS file: alsa-tools/usx2yloader/tascam_fw.in
diff -N alsa-tools/usx2yloader/tascam_fw.in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ alsa-tools/usx2yloader/tascam_fw.in 2 Dec 2003 09:59:11 -0000       1.1
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# load the firmware into Tascam USB devices
+
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
+
+FIRMWARE=
[EMAIL PROTECTED]@/alsa/firmware/usx2yloader
+FLAGS=
+LOADER=/sbin/fxload
+LOADERFIRMWARE=$FIRMWAREDIR/tascam_loader.ihx
+
+case $PRODUCT in
+1604/8000/*)
+       FIRMWARE=$FIRMWAREDIR/us428fw.ihx
+       ;;
+1604/8004/*)
+       FIRMWARE=$FIRMWAREDIR/us224fw.ihx
+       ;;
+1604/8006/*)
+       FIRMWARE=$FIRMWAREDIR/us122fw.ihx
+       ;;
+*)
+       if [ -x /usr/bin/logger ]; then
+               /usr/bin/logger -t $0 "unknown product $PRODUCT"
+       fi
+       exit 1
+esac
+
+# missing loader firmware?
+if [ ! -r $LOADERFIRMWARE ]; then
+       if [ -x /usr/bin/logger ]; then
+               /usr/bin/logger -t $0 "missing $LOADERFIRMWARE ??"
+       fi
+       exit 1
+fi
+
+# missing firmware?
+if [ ! -r $FIRMWARE ]; then
+       if [ -x /usr/bin/logger ]; then
+               /usr/bin/logger -t $0 "missing $FIRMWARE for $PRODUCT ??"
+       fi
+       exit 1
+fi
+
+# missing loader?
+if [ ! -x $LOADER ]; then
+       if [ -x /usr/bin/logger ]; then
+               /usr/bin/logger -t $0 "missing $LOADER ??"
+       fi
+       exit 1
+fi
+
+if [ -x /usr/bin/logger ]; then
+       /usr/bin/logger -t $0 "load $FIRMWARE for $PRODUCT to $DEVICE"
+fi
+$LOADER $FLAGS -s $LOADERFIRMWARE -I $FIRMWARE
+
+exit 0

Reply via email to