Date: Sun, 18 Jul 2010 21:30:09 GMT From: Aragon Gouveia <aragon@phat.za.net> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/148411: New port: audio/madfufw M-Audio DFU Firmware for USB sound devices Message-ID: <201007182130.o6ILU900031992@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/148411; it has been noted by GNATS. From: Aragon Gouveia <aragon@phat.za.net> To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/148411: New port: audio/madfufw M-Audio DFU Firmware for USB sound devices Date: Sun, 18 Jul 2010 23:20:06 +0200 This is a multi-part message in MIME format. --------------020706040208030304070002 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I've made some refinements that should be included in this port please. Patch attached. Thanks! --------------020706040208030304070002 Content-Type: text/plain; name="madfufw.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="madfufw.txt" --- Makefile.orig 2010-07-18 22:57:59.000000000 +0200 +++ Makefile 2010-07-18 23:13:08.000000000 +0200 @@ -27,16 +27,22 @@ SUB_FILES= maudio-devd.conf pkg-message NO_BUILD= yes +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 800064 +BROKEN= port requires FreeBSD 8.x +.endif + do-install: @${MKDIR} ${LOCALBASE}/share/maudio && \ ${INSTALL_DATA} ${WRKSRC}/ma003101.bin ${WRKSRC}/ma004103.bin \ ${WRKSRC}/ma005101.bin ${WRKSRC}/ma006100.bin \ ${WRKSRC}/ma008100.bin ${LOCALBASE}/share/maudio - @${INSTALL_SCRIPT} ${WRKDIR}/maudio-devd.conf ${LOCALBASE}/etc/devd + @${INSTALL_DATA} ${WRKDIR}/maudio-devd.conf ${LOCALBASE}/etc/devd post-install: @${ECHO_MSG} "" @${CAT} ${PKGMESSAGE} @${ECHO_MSG} "" -.include <bsd.port.mk> +.include <bsd.port.post.mk> --- files/maudio-devd.conf.in.orig 2010-07-18 22:58:49.000000000 +0200 +++ files/maudio-devd.conf.in 2010-07-18 22:59:40.000000000 +0200 @@ -4,3 +4,10 @@ match "product" "0x280[34568]"; action "%%PREFIX%%/etc/rc.d/maudio start $device-name $product"; }; + +attach 100 { + match "device-name" "uaudio[0-9]+"; + match "vendor" "0x0763"; + match "product" "0x2006"; + action "/usr/local/etc/rc.d/maudio mixer $device-name"; +}; --- files/maudio.in.orig 2010-07-18 22:59:00.000000000 +0200 +++ files/maudio.in 2010-07-18 23:02:06.000000000 +0200 @@ -33,6 +33,8 @@ required_modules="uhub/uaudio" required_dirs=$firmware_dir required_files=$command +extra_commands="mixer" +mixer_cmd="maudio_mixer" maudio_start() { @@ -71,7 +73,7 @@ firmware=${firmware_dir}/ma008100.bin ;; *) - err 1 "Unknown product ID" 1>&2 + err 1 "Unknown product ID" ;; esac @@ -79,4 +81,18 @@ /usr/sbin/usbconfig -d ${dev} reset } +maudio_mixer() +{ + local dev + + if [ -z "${1}" ]; then + err 1 "No device specified" + fi + + dev="/dev/mixer$( echo ${1} |sed -E 's/^[a-z]+([0-9]+)$/\1/' )" + if [ -r ${dev} ]; then + mixer -f ${dev} vol 100 pcm 100 + fi +} + run_rc_command $* --------------020706040208030304070002--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007182130.o6ILU900031992>