Comment 53 for bug 459445

Revision history for this message
In , ult (ult-redhat-bugs) wrote :

Confirming the bug. Reproducible every suspend/resume cycle.
My case is :
Logitech C310 webcam
#lsusb
Bus 002 Device 006: ID 046d:081b Logitech, Inc.
#tail -f /var/log/messages
kernel: [13358.103143] ALSA clock.c:218: 7:3:2: cannot set freq 24000 to ep 0x86
kernel: [13358.240523] ALSA clock.c:233: current rate 290 is different from the runtime rate 32000

Latest F14 stock kernel, pulseaudio from repo.
Mic works ok until first suspend, after which no recording is possible. Plug out/in fixes the problem.

Since i have to use custom 2.6.39-rc1+ kernel, i tried it with latest ALSA from git (needs to compile /usr/src/kernels/`uname -r`/linux/include/smp_lock.h, which has been removed, i took it from 13-92.fc14 src), and it triggers new behavior :

Upon coldboot:

1.Recording seemingly possible, but recording indicator is inactive (in pavucontrol it's seen only if "All Streams" is chosen but still inactive) or "stream empty" when trying to playback.
or
2.Recording, but probably with wrong frequency, so playback of recorded sound is pitchshifted and speeded up.

Plug-out/plug-in fixes the problem unreliably. Worst of all even if it does - only before first wakeup from suspend. Then disconnect-reconnect doesn't help anymore.

A dirty workaround prooved to be functional - modules, alsa and pulseaudio have to be stopped and restarted in particular order :

Create executable script 20snd in /usr/lib/pm-utils/sleep.d/
#cat /usr/lib/pm-utils/sleep.d/20snd

#!/bin/sh
#
#I'm logged in as root, so it may require adaptation.
. "${PM_FUNCTIONS}"

case "$1" in
 hibernate|suspend)
killall pulseaudio
/etc/init.d/alsasound stop
#skype hangs on resume if everything sound-related was restarted
killall skype
modprobe -r snd_usb_audio
;;
 thaw|resume)
#kmods u've to reload. my specific are xfi,via. determine your with lsmod.
modprobe -v snd_hda_codec_via
modprobe -v snd_hda_intel
modprobe -v snd_ctxfi
modprobe -v snd snd_hda_codec_via snd_hda_intel snd_hda_codec snd_hwdep ctxfi snd_seq snd_seq_device snd_pcm snd_timer
modprobe -v snd_usb_audio
sleep 1
# /etc/init.d/alsasound start #probably unnecessary
pulseaudio -D
export DISPLAY=:0
#substitute root with your username
su -c - root "gmixer -d" &disown
su -c - root "skype" & disown
;;
    *) exit $NA
  ;;
esac

This fixes it for me.