linux-kernel-test/sound
Paul Bolle 5cd2ad81f9 ALSA: intel8x0m: wait a bit before warm reset check
At every resume a laptop I use prints this message (at KERN_ERR level):
    ALSA sound/pci/intel8x0m.c:904: AC'97 warm reset still in progress? [0x2]

The thing to note here is that 0x2 corresponds to ICH_AC97COLD. Ie, what
seems to be happening is that the register involved indicated a warm
reset for some time (as the ICH_AC97WARM bit was set) but by the time
the warning is printed, and that same register is checked again, that
bit is already cleared and only the ICH_AC97COLD bit is still set.

It turns out a warm reset needs some time to settle, but it is currently
checked right away. The test therefore fails the first time it is done
and schedule_timeout_uninterruptible() will be called. Once we return
from that jiffies is already (far) past end_time on this laptop, so we
exit the loop, print a warning, and exit the function while the warm
reset actually succeeded.

A way to fix this is to call usleep_range() after writing to the
register involved. A handful of tests suggest 500 usecs is a safe value.
(This might punish the "finish cold reset" case, but on this laptop such
a cold reset apparently never happens, so I can't say for sure.)

While we're at it drop the extra single tick from end_time, as it looks
rather silly.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:22:00 +01:00
..
aoa Merge branch 'topic/workq-update' into topic/misc 2010-12-13 09:29:52 +01:00
arm
atmel ALSA: fix invalid hardware.h include in ac97c for AVR32 architecture 2011-01-25 18:07:10 +01:00
core Merge branch 'fix/misc' into topic/misc 2011-03-11 14:48:09 +01:00
drivers ALSA: use linux/io.h to fix compile warnings 2011-02-02 17:49:53 +01:00
i2c sound: don't use flush_scheduled_work() 2010-12-13 09:22:44 +01:00
isa tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
mips
oss Merge branch 'fix/misc' into topic/misc 2011-03-11 14:48:09 +01:00
parisc
pci ALSA: intel8x0m: wait a bit before warm reset check 2011-03-11 15:22:00 +01:00
pcmcia ALSA: use linux/io.h to fix compile warnings 2011-02-02 17:49:53 +01:00
ppc ALSA: powermac - Allow input from microphone on Tumbler 2011-02-28 11:19:17 +01:00
sh sound: sh: ctrl_in/outX to __raw_read/writeX conversion. 2010-10-27 15:53:50 +09:00
soc ASoC: Improve WM8994 digital power sequencing 2011-02-03 20:17:13 +00:00
sparc of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
spi ALSA: AT73C213: Rectify misleading comment. 2010-11-11 02:03:29 +01:00
synth ALSA: emux: Add trivial compat ioctl handler 2010-09-14 16:18:11 +02:00
usb ALSA: usbaudio: implement USB autosuspend 2011-03-11 14:59:29 +01:00
ac97_bus.c sound: Fixed line limit issue in sound/ac97_bus.c 2010-12-06 16:09:49 +01:00
Kconfig
last.c
Makefile
sound_core.c sound: Use sound_register_*() for additional OSS minor devices 2011-03-09 20:10:37 +01:00
sound_firmware.c