[alsa-devel] Fwd: Possible bug in sound/pci/atiixp.c ?

Amir Shamsuddin AmirS2+alsa at gmail.com
Fri Mar 11 12:04:27 CET 2011


My laptop occasionally fails to resume from suspend, and when it does,
I see (only) this error message on screen:

[nnn.nnn] atiixp: codec reset timeout

I had a look at the code where this comes from, and while I'm not sure
it's related to my resume problem, it does (to my untrained eyes) look
like there is a small bug in the function snd_atiixp_aclink_reset in
file sound/pci/atiixp.c:

(lines 500 - 536 in latest git)
static int snd_atiixp_aclink_reset(struct atiixp *chip)
       int timeout;
       timeout = 10;
       while (! (atiixp_read(chip, CMD) & ATI_REG_CMD_ACLINK_ACTIVE)) {
               /* do a hard reset */
               if (--timeout) {
                       snd_printk(KERN_ERR "atiixp: codec reset timeout\n");

Surely the timeout condition should be negated, so the timeout message
and loop break is only hit when 'timeout' reaches zero? ie.

if (! --timeout) {

Or am I missing something?


More information about the Alsa-devel mailing list