[Alsa-user] Regarding Bug ID 0002475 (Power off shows "acpi_power_off called" and hangs)
Brought to you by:
perex
From: Khelben B. <eye...@gm...> - 2007-11-26 13:21:14
|
Hello. I post to ask if there is any progress on this bug ? I saw the bug some time ago but it still exists on 2.6.24-rc2 and it is annoying to run "rmmod snd-hda-intel" before i need to power off the machine. My motherboard is not the same as the original poster's. Mine is the Asus P5AD2 Premium and my codec is the Cmedia CMI9880 I run slackware too like the original poster but it is coincidence since i reproduced it in debian 32bit and sabayon 64bit too. I guess not many people have this issue that is why it hasn't been resolved till now. So i tried to bisect the kernel to see which commit causes it. I remember that the last working kernel was 2.6.13. I had the impression that 2.6.14-rc1 introduced the bug so i bisected the changes from 2.6.13 to 2.6.14-rc1 with no success of course because the bug was actually introduced in 2.6.14-rc2 (i guess i remembered wrong). I bisected the changes from 2.6.14-rc1 to 2.6.14-rc2 and git showed the patch i include as "alsa-faulty-2.6.14-rc1-rc2.diff" to be the cause. I compiled two kernels. One the vanilla 2.6.14-rc1 and one with this patch applied and indeed it is the patch that causes the problem. Then, i tried to remove the changes from the 2.6.24-rc2 i run now. Some hunks of code didn't exist in 2.6.24-rc2, so i tried what existed. I tried all the hunks one by one to see if maybe only a part of the patch breaks the driver and indeed only one hunk is the problematic. --- hda_intel.c.orig 2007-11-26 11:49:00.000000000 +0200 +++ hda_intel.c 2007-11-26 15:00:37.000000000 +0200 @@ -1004,10 +1004,11 @@ /* upper BDL address */ azx_sd_writel(azx_dev, SD_BDLPU, upper_32bit(azx_dev->bdl_addr)); - /* enable the position buffer */ - if (!(azx_readl(chip, DPLBASE) & ICH6_DPLBASE_ENABLE)) - azx_writel(chip, DPLBASE, - (u32)chip->posbuf.addr |ICH6_DPLBASE_ENABLE); + if (chip->position_fix == POS_FIX_POSBUF) { + /* enable the position buffer */ + if (! (azx_readl(chip, DPLBASE) & ICH6_DPLBASE_ENABLE)) + azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr | ICH6_DPLBASE_ENABLE); + } /* set the interrupt enable bits in the descriptor control register */ azx_sd_writel(azx_dev, SD_CTL, The above is the patch to make poweroff work again in 2.6.24-rc2. I don't understand what the azx_readl,azx_writel functions do, but with this patch applied everything works ok. Can Mr. Takashi Iwai or anyone else that has knowledge about this, see if this patch i include is correct or not and if it is correct to include it in the kernel ? Thank you for your time. |