Hi, I ran into this bug as I was attempting to work around another bug related to snd-intel8x0's ac97_clock parameter (and the fact that it isn't determined/measured correctly at boot-up). When the system (a T30 laptop) returns from hibernate, the ac97_clock=48000 module option does not carry over and it gets reset to some random value, resulting in audio output with higher pitch (and literally faster playback). The (ugly) fix I came up with was to do an "alsa force-reload" after thawing, and that's when I ran into this bug.
Anyway, here's the patch for it. Eduard
--- /usr/sbin/alsa 2012-08-26 11:58:19.000000000 -0400
+++ alsa 2013-05-27 23:47:11.000000000 -0400
@@ -46,12 +46,11 @@
echo_procs_using_sound()
{
- for i in /proc/[0-9]*/fd/* ; do
- var="$(readlink $i)"
- if test x"$var" != x"${var#/dev/snd/pcm}" ; then
- IFS=/; set -- $i; unset IFS; echo $3
+ echo $(for f in /dev/snd/*; do
+ if test -c "$f"; then
+ fuser "$f" 2>/dev/null
fi
- done
+ done | tr ' ' '\n' | sort -u)
}
# $* [PID]...
signature.asc
Description: OpenPGP digital signature

