[PC-BSD Testing] no sound in 9.1-RC2
N V
vans9 at yandex.ru
Fri Oct 26 05:33:28 PDT 2012
On 26 октября 2012 00:22:39 Kris Moore wrote:
> On 10/25/2012 15:51, Hans Ruhe wrote:
> > Hi James,
> >
> > In the Control Panel there is the sound config icon, where you can
> > find the correct soundcard for your system. I had to find out too, but
> > after choosing the correct configuration it worked very well :-)
> >
> > Best regards,
> >
> > Hans
> >
> > 2012/10/25 James T. Nixon III <james at ixsystems.com
> > <mailto:james at ixsystems.com>>
> >
> > Hey guise,
> >
> > A few of us are experiencing issues with sound. Has this been
> > discovered already?
> >
> > --james
> > _______________________________________________
> > Testing mailing list
> > Testing at lists.pcbsd.org <mailto:Testing at lists.pcbsd.org>
> > http://lists.pcbsd.org/mailman/listinfo/testing
> >
> > _______________________________________________
> > Testing mailing list
> > Testing at lists.pcbsd.org
> > http://lists.pcbsd.org/mailman/listinfo/testing
>
> I did find an issue with this from devd calling sound-dev-changed.sh
> during system bootup. To fix grab this file:
>
> # svn co
> svn://svn.pcbsd.org/pcbsd/current/overlays/desktop-overlay/usr/local/share/
> pcbsd/scripts/sound-dev-changed.sh # mv sound-dev-changed.sh
> /usr/local/share/pcbsd/scripts/sound-dev-changed.sh
> # chmod 755 /usr/local/share/pcbsd/scripts/sound-dev-changed.sh
Hi.
I've improved the script one step further, possibly. It set default_unit to
the last play capable device previously. Now it just checks if newly attached
device is playback capable and if it is sets default_sound_unit.
default_sound_unit havn't been restored properly upon detach previously,
because default_sound_unit has been set to the device that doesn't
disappear/destroy upon detach. So, seems this should solve two possible
problems in one shot. :) I have to note again: this script/patch may be ugly
or rough.
Patch (against pcbsd/current/overlays/desktop-overlay/):
Index: etc/devd.conf
===================================================================
--- etc/devd.conf (revision 19958)
+++ etc/devd.conf (working copy)
@@ -271,3 +271,3 @@
match "cdev" "mixer[0-9]+";
- action "sleep 2 ; /usr/local/share/pcbsd/scripts/sound-dev-changed.sh
add";
+ action "sleep 2 ; /usr/local/share/pcbsd/scripts/sound-dev-changed.sh
add $cdev";
};
@@ -279,3 +279,3 @@
match "cdev" "mixer[0-9]+";
- action "sleep 2 ; /usr/local/share/pcbsd/scripts/sound-dev-changed.sh
del";
+ action "sleep 2 ; /usr/local/share/pcbsd/scripts/sound-dev-changed.sh
del $cdev";
};
Index: usr/local/share/pcbsd/scripts/sound-dev-changed.sh
===================================================================
--- usr/local/share/pcbsd/scripts/sound-dev-changed.sh (revision 19958)
+++ usr/local/share/pcbsd/scripts/sound-dev-changed.sh (working copy)
@@ -4,2 +4,3 @@
action=$1
+cdev=$2
@@ -17,2 +18,3 @@
# pcm-oss plugin configuration
+# generated by ${0}
@@ -70,6 +72,12 @@
- # Get the last pcm device so we can make it the default
- newDev=`cat /dev/sndstat | grep play | egrep -o 'pcm[0-9]+' | tail -n 1`
- dNum=`echo $newDev | sed 's|pcm||g'`
- sysctl hw.snd.default_unit=$dNum
+ mixerNum=`echo ${cdev} | egrep -o '[0-9]+'`
+
+ # Can new dev play?
+ cat /dev/sndstat | grep pcm${mixerNum} | grep -q play
+ if [ $? -ne 0 ] ; then
+ return
+ fi
+
+ # make new device the default one
+ sysctl hw.snd.default_unit=$mixerNum
}
P.S. If I attach the file instead of copying it's contents into the message
body will it reach the list?
Regards,
Vans.
More information about the Testing
mailing list