--- 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 + +.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 +.include --- 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 $*