Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 184354 - snd-hda-intel silent output with Thinkpad T61 (AD1984)
Summary: snd-hda-intel silent output with Thinkpad T61 (AD1984)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://bugtrack.alsa-project.org/als...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2007-07-05 20:24 UTC by John Stile
Modified: 2007-10-15 02:42 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
config for in-kernel alsa driver (.config-in_kerneal_alsa_driver,58.12 KB, text/plain)
2007-07-05 21:54 UTC, John Stile
Details
config used when installing the gentoo alsa-driver (.config-out_kerneal_alsa_driver,54.71 KB, text/plain)
2007-07-05 21:55 UTC, John Stile
Details
dmesg from in kernel alsa driver (dmesg-in_kerneal_alsa_driver,29.94 KB, text/plain)
2007-07-05 21:56 UTC, John Stile
Details
dmesg from when alsa-driver packaged kernel module accessed (dmesg-out_kerneal_alsa_driver,30.28 KB, text/plain)
2007-07-05 22:27 UTC, John Stile
Details
Updated...config for in-kernel alsa driver (.config-in_kerneal_alsa_driver,58.34 KB, text/plain)
2007-07-06 05:38 UTC, John Stile
Details
Updated...dmesg from in kernel alsa driver (dmesg-in_kerneal_alsa_driver,30.25 KB, text/plain)
2007-07-06 05:39 UTC, John Stile
Details
Updated...dmesg from in kernel alsa driver (dmesg-in_kerneal_alsa_driver,29.23 KB, text/plain)
2007-07-06 06:51 UTC, John Stile
Details
Updated...dmesg from when alsa-driver packaged kernel module accessed (dmesg-out_kerneal_alsa_driver,30.19 KB, text/plain)
2007-07-06 07:16 UTC, John Stile
Details
Updated...config used when installing the gentoo alsa-driver (.config-out_kerneal_alsa_driver,54.79 KB, text/plain)
2007-07-06 07:21 UTC, John Stile
Details
in-kernel alsa driver, as non-module. (dmesg-in_kerneal_alsa_driver_not_module,30.18 KB, text/plain)
2007-07-06 14:46 UTC, John Stile
Details
.config for linux-2.6.22-rc7 with in-kernel-alsa driver, not as module. (.config-linux-2.6.22-rc7_in-kernel-alsa_not-module,59.67 KB, text/plain)
2007-07-06 15:22 UTC, John Stile
Details
dmesg for linux-2.6.22-rc7 with in-kernel-alsa driver, not as module. (dmesg-linux-2.6.22-rc7_in-kernel-alsa_not-module,28.69 KB, text/plain)
2007-07-06 15:23 UTC, John Stile
Details
dmesg for linux-2.6.22-rc7 in-kernel, alsa_as-module (dmesg-linux-2.6.22-rc7_in-kernel-alsa_as-module,28.33 KB, text/plain)
2007-07-06 15:40 UTC, John Stile
Details
.config for linux-2.6.22-rc7 in-kernel, alsa_as-module (.config-linux-2.6.22-rc7_in-kernel-alsa_as-module,59.67 KB, text/plain)
2007-07-06 15:40 UTC, John Stile
Details
Setup Notes for Alsa snd_intel using mercurial alsa-libs, alsa-utils, alsa-driver, alsa-kernel (t61_alsa_setup.20070722.txt,3.75 KB, text/plain)
2007-07-22 17:59 UTC, John Stile
Details
Setup Notes for Alsa snd_intel using mercurial alsa-libs, alsa-utils, alsa-driver, alsa-kernel (t61_alsa_setup.20070722.txt,4.33 KB, text/plain)
2007-07-22 18:16 UTC, John Stile
Details
add support for AD1984 (01_ad1984.patch,16.03 KB, patch)
2007-09-23 22:31 UTC, Daniel Drake (RETIRED)
Details | Diff
dmesg when sound works, nvidia fails with in kernel usb after 01_ad1984.patch (dmesg-2.6.22-r7-01_ad1984.patch-nvidia_failing_with_usb.txt,28.05 KB, text/plain)
2007-09-25 17:21 UTC, John Stile
Details
dmesg when sound works, nvidia works without in kernel usb after 01_ad1984.patch (dmesg-2.6.22-r7-01_ad1984.patch-nvidia_working_without_usb.txt,21.63 KB, text/plain)
2007-09-25 17:22 UTC, John Stile
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Stile 2007-07-05 20:24:19 UTC
The in-kernel driver cannot un-mute the speakers unless a hack is performed, where Andrew Clunis python script sends a tone to an ioctl KIOCSOUND, making the the speakers unmute. After playing his script , I can play sound, but have no volume control.Reference:http://www.klabs.be/~fpiat/linux/debian/Etch_on_Thinkpad_T61.html 

The alsa-drive package oops with the 2.6.20-gentoo-r8 kernel.
I have installed the following alsa packages:
media-libs/alsa-lib-1.0.14a-r1
media-libs/alsa-oss-1.0.14
media-plugins/gst-plugins-alsa-0.8.11
media-sound/alsa-headers-1.0.14
media-sound/alsa-utils-1.0.14_rc2-r3
media-sound/alsamixergui-0.9.0.1.2-r4

The module snd-hda-intel loads find, but when I try to use it I get a oops:
BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000
 printing eip:
f911c973
*pde = 00000000
Oops: 0000 [#1]
SMP
Modules linked in: ipv6 rtc smapi thinkpad tp_smapi tp_base ibm_acpi usbvideo compat_ioctl32 videodev v4l2_common v4l1_compat pcmcia firmware_class nvidia(P) agpgart wlan_scan_sta ath_rate_sample(F) yenta_socket rsrc_nonstatic pcmcia_core ath_pci(F) wlan ath_hal(P) pcspkr i2c_i801 i2c_core snd_hda_intel snd_pcm snd_timer snd snd_page_alloc eth1394 lpfc megaraid_sas megaraid_mbox megaraid_mm aacraid 3w_9xxx 3w_xxxx mptfc scsi_transport_fc mptspi mptscsih mptbase atp870u dc395x qla1280 dmx3191d sym53c8xx qlogicfas408 aha152x BusLogic aic7xxx aic79xx scsi_transport_spi sg tg3 e1000 nfs lockd sunrpc jfs raid10 raid1 raid0 dm_mirror dm_mod ata_piix ahci libata sbp2 ohci1394 ieee1394 sl811_hcd usbhid ohci_hcd uhci_hcd usb_storage ehci_hcd usbcore
CPU: 0
EIP: 0060:[<f911c973>] Tainted: PF VLI
EFLAGS: 00210297 (2.6.20-gentoo-r8 #11)
eax: f9146c20 ebx: 00000004 ecx: 00000003 edx: f4035e04
esi: 00000000 edi: f4035e5c ebp: f623434c esp: f4035dd0
ds: 007b es: 007b ss: 0068
Process kmixctrl (pid: 12155, ti=f4035000 task=f6278030 task.ti=f4035000)
Stack: f62e8440 f4035e04 bfe47020 f90c416c c167fbe0 bfe47020 f3f8e840 c167fa80
       c167faa0 c167fac0 00000000 f62e84a8 00000000 00000011 00000002 00000000
       00000000 75706e49 6f532074 65637275 00000000 00000000 00000000 00000000
Call Trace:
 [<f90c416c>] <0> [<f90c3d99>] <0> [<c016b75b>] <0> [<c016b9e2>] <0> [<c016ba27>] <0> [<c0102ce6>] <0> =======================
Code: c3 57 56 53 8d 7a 58 c7 42 40 03 00 00 00 c7 42 48 01 00 00 00 8b 08 89 4a 50 8b 4a 54 8b 18 8d 73 ff 39 d9 0f 43 ce 8b 74 c8 04 <ac> aa 84 c0 75 fa 5b 31 c0 5e 5f c3 55 89 c5 57 31 c0 56 89 d7
EIP: [<f911c973>] SS:ESP 0068:f4035dd0
Comment 1 Maarten Bressers (RETIRED) gentoo-dev 2007-07-05 21:14:35 UTC
Could you please post your kernel .config and your dmesg output? Also, can you test this with the latest kernel prepatch 2.6.22-rc7? Thanks
Comment 2 John Stile 2007-07-05 21:54:14 UTC
Created attachment 124013 [details]
config for in-kernel alsa driver
Comment 3 John Stile 2007-07-05 21:55:11 UTC
Created attachment 124014 [details]
config used when installing the gentoo alsa-driver
Comment 4 John Stile 2007-07-05 21:56:03 UTC
Created attachment 124016 [details]
dmesg from in kernel alsa driver
Comment 5 John Stile 2007-07-05 22:27:59 UTC
Created attachment 124018 [details]
dmesg from when alsa-driver packaged kernel module accessed
Comment 6 John Stile 2007-07-05 22:33:08 UTC
I'm afraid I don't know how to test with the latest kernel prepatch 2.6.22-rc7.  I know how to build a kernel, and I have been using genkernel for some time.
Comment 7 Mike Pagano gentoo-dev 2007-07-05 22:39:20 UTC
Here's a link that may help:

http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually
Comment 8 Maarten Bressers (RETIRED) gentoo-dev 2007-07-05 22:58:15 UTC
You're using the hda_intel driver, but in your first .config it's not selected, and in the second I don't see it at all. Try enabling it in your .config: CONFIG_SND_HDA_INTEL=y

When using the hda_intel driver with in-kernel alsa, you should see something like this in your dmesg:
 ALSA device list:
   #0: HDA Intel at 0xfebf8000 irq 22

Please compile your kernel again, and post your new .config and dmesg output.

Btw, please also enable CONFIG_KALLSYMS=y to have more info in your back trace.
Comment 9 John Stile 2007-07-06 05:38:35 UTC
Created attachment 124025 [details]
Updated...config for in-kernel alsa driver
Comment 10 John Stile 2007-07-06 05:39:23 UTC
Created attachment 124026 [details]
Updated...dmesg from in kernel alsa driver
Comment 11 John Stile 2007-07-06 06:51:07 UTC
Created attachment 124030 [details]
Updated...dmesg from in kernel alsa driver

I had to clean out left over files form the alsal-driver package, rebuild reboot a few times to be sure.  no oops's with the in-kernel snd-hda-intel driver, but sound stays perminanly muted.
Comment 12 John Stile 2007-07-06 07:16:26 UTC
Created attachment 124031 [details]
Updated...dmesg from when alsa-driver packaged kernel module accessed
Comment 13 John Stile 2007-07-06 07:21:58 UTC
Created attachment 124033 [details]
Updated...config used when installing the gentoo alsa-driver

You will notice ALSA is not configured in the kernel .config.  If it where, I wouldn't be able to install the alsa-driver package, as it results in the error message telling me that it can't be configured in the kernel.
Comment 14 John Stile 2007-07-06 08:06:37 UTC
(In reply to comment #7)
> Here's a link that may help:
> 
> http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually
> 

Good link.  I know all that stuff, but not sure how to use patch-2.6.22-rc7.bz2 on my linux-2.6.20-gentoo-r8.  I tried to:
cd /usr/src/
rsync -aqz  linux-2.6.20-gentoo-r8/ backup.linux-2.6.20-gentoo-r8.bakup
cd linux/
wget http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.22-rc7.bz2
bunzip2 patch-2.6.22-rc7.bz2
patch -p1 < patch-2.6.22-rc7
which failed on almost every patch.  
Comment 15 Maarten Bressers (RETIRED) gentoo-dev 2007-07-06 10:18:24 UTC
Ok, so in-kernel alsa doesn't oops now, that's good. I see you've selected the SND_HDA_INTEL driver now, also good. I still don't see your sound card being detected in your new dmesg, though. 
Could you compile the following drivers into your kernel, instead of as modules:
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_HDA_INTEL=y
Then reboot and post your new dmesg. There should be a line in it like the one in comment #8.
Another link you might find useful: http://www.gentoo.org/doc/en/alsa-guide.xml

Btw, fastest way to test 2.6.22-rc7 is like this:
# ACCEPT_KEYWORDS="~*" emerge =sys-kernel/vanilla-sources-2.6.22_rc7
(replace the '*' with your arch, or just ignore the msg about invalid ACCEPT_KEYWORDS)
We can try to get gentoo-sources-2.6.20-r8 working first, though.
Comment 16 Daniel Drake (RETIRED) gentoo-dev 2007-07-06 13:54:17 UTC
Modules are fine (it's what the ALSA guide recommends). You won't see the sound card in dmesg but you can get the same info from "cat /proc/asound/cards"
Comment 17 John Stile 2007-07-06 14:46:48 UTC
Created attachment 124052 [details]
in-kernel alsa driver, as non-module.

This dmesg does contain the card:
ALSA device list:
  #0: HDA Intel at 0xfe220000 irq 11
Comment 18 John Stile 2007-07-06 14:48:42 UTC
(In reply to comment #15)
> Ok, so in-kernel alsa doesn't oops now, that's good. I see you've selected the
> SND_HDA_INTEL driver now, also good. I still don't see your sound card being
> detected in your new dmesg, though. 
> Could you compile the following drivers into your kernel, instead of as
> modules:
> CONFIG_SND=y
> CONFIG_SND_TIMER=y
> CONFIG_SND_PCM=y
> CONFIG_SND_OSSEMUL=y
> CONFIG_SND_MIXER_OSS=y
> CONFIG_SND_PCM_OSS=y
> CONFIG_SND_HDA_INTEL=y
> Then reboot and post your new dmesg. There should be a line in it like the one
> in comment #8.
> Another link you might find useful: http://www.gentoo.org/doc/en/alsa-guide.xml
> 
> Btw, fastest way to test 2.6.22-rc7 is like this:
> # ACCEPT_KEYWORDS="~*" emerge =sys-kernel/vanilla-sources-2.6.22_rc7
> (replace the '*' with your arch, or just ignore the msg about invalid
> ACCEPT_KEYWORDS)
> We can try to get gentoo-sources-2.6.20-r8 working first, though.
> 
dmesg of kernel compiled with the options listed above:
http://bugs.gentoo.org/attachment.cgi?id=124052
Comment 19 John Stile 2007-07-06 15:22:16 UTC
Created attachment 124062 [details]
.config for linux-2.6.22-rc7 with in-kernel-alsa driver, not as module.

Even with the 2.6.22-rc7 sound stays muted.
The python script ioctl hack doesn't work with this kernel.
Comment 20 John Stile 2007-07-06 15:23:49 UTC
Created attachment 124063 [details]
dmesg for linux-2.6.22-rc7 with in-kernel-alsa driver, not as module.

sound still muted with in-kernel non-module alsa driver in 2.6.22-rc7
Comment 21 John Stile 2007-07-06 15:40:02 UTC
Created attachment 124065 [details]
dmesg for linux-2.6.22-rc7 in-kernel, alsa_as-module

ioctl hack to unmute does not work
Comment 22 John Stile 2007-07-06 15:40:58 UTC
Created attachment 124067 [details]
.config for linux-2.6.22-rc7 in-kernel, alsa_as-module
Comment 23 Maarten Bressers (RETIRED) gentoo-dev 2007-07-06 16:18:19 UTC
Have you checked with alsamixer if nothing is muted, ie. there are no M's under any channels?

Also, could you please post the output of: cat /proc/interrupts ? Thanks.
Comment 24 John Stile 2007-07-06 17:16:26 UTC
(In reply to comment #23)
> Have you checked with alsamixer if nothing is muted, ie. there are no M's under
> any channels?
> 
> Also, could you please post the output of: cat /proc/interrupts ? Thanks.
> 

I have checked for mute.  

Do you want /proc/interrupts for all 3 versions?  2.6.20 in-kernel, 2.6.20 out-kernel, and 2.6.22-rc7?
Comment 25 Maarten Bressers (RETIRED) gentoo-dev 2007-07-06 18:01:02 UTC
Do they differ? If so, post them all please. If not, pick one :)
Comment 26 Daniel Drake (RETIRED) gentoo-dev 2007-07-06 19:48:02 UTC
Just the most recent one will do, 2.6.22-rc7.
Comment 27 John Stile 2007-07-07 05:57:34 UTC
(In reply to comment #26)
> Just the most recent one will do, 2.6.22-rc7.
> 
This is using the 2.6.22-rc7 with in-kernel alsa drivers as modules.

genx jstile # uname -a
Linux genx 2.6.22-rc7 #2 SMP Fri Jul 6 01:26:49 PDT 2007 i686 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz GenuineIntel GNU/Linux

genx jstile # cat /proc/interrupts
           CPU0       CPU1
  0:      27688          0    XT-PIC-XT        timer
  1:        612          0    XT-PIC-XT        i8042
  2:          0          0    XT-PIC-XT        cascade
  8:          0          0    XT-PIC-XT        rtc
  9:        574          0    XT-PIC-XT        acpi
 10:     200000          0    XT-PIC-XT        uhci_hcd:usb5, yenta, nvidia
 11:      25408          0    XT-PIC-XT        ehci_hcd:usb1, ehci_hcd:usb2, uhci_hcd:usb3, uhci_hcd:usb4, uhci_hcd:usb6, uhci_hcd:usb7, ohci1394, HDA Intel, wifi0
 12:      22159          0    XT-PIC-XT        i8042
 14:         62          0    XT-PIC-XT        ide0
216:         61         56   PCI-MSI-edge      eth0
217:       4707       4712   PCI-MSI-edge      ahci
NMI:          0          0
LOC:         50      27687
ERR:          0
MIS:          0

genx jstile # ls -alF /proc/asound/
total 0
dr-xr-xr-x   4 root root 0 2007-07-06 15:54 ./
dr-xr-xr-x 130 root root 0 2007-07-06 15:47 ../
dr-xr-xr-x   4 root root 0 2007-07-06 15:54 card0/
-r--r--r--   1 root root 0 2007-07-06 15:54 cards
-r--r--r--   1 root root 0 2007-07-06 15:54 devices
lrwxrwxrwx   1 root root 5 2007-07-06 15:54 Intel -> card0/
-r--r--r--   1 root root 0 2007-07-06 15:54 modules
dr-xr-xr-x   2 root root 0 2007-07-06 15:54 oss/
-r--r--r--   1 root root 0 2007-07-06 15:54 pcm
-r--r--r--   1 root root 0 2007-07-06 15:54 timers
-r--r--r--   1 root root 0 2007-07-06 15:54 version
Comment 28 John Stile 2007-07-11 07:33:26 UTC
(In reply to comment #26)
> Just the most recent one will do, 2.6.22-rc7.
> 

Is there anything else I can help with?
Comment 29 Maarten Bressers (RETIRED) gentoo-dev 2007-07-17 19:11:44 UTC
I see you boot your kernel with (among others) these options: 'irqpoll noapic pci=routeirq'. Could you boot your kernel without these please, and again post the output of dmesg and cat /proc/interrupts.

If that doesn't help, you can enable these options in your kernel .config to produce more debugging output: CONFIG_PCI_DEBUG=y and CONFIG_DEBUG_SHIRQ=y. Then repeat the step above. Thanks for your testing.
Comment 30 John Stile 2007-07-22 17:59:29 UTC
Created attachment 125679 [details]
Setup Notes for Alsa snd_intel using mercurial alsa-libs, alsa-utils, alsa-driver, alsa-kernel 

# Setup Notes for Alsa snd_intel using  
#  mercurial 
#  source alsa-libs
#  source alsa-utils
#  source alsa-driver
#  source alsa-kernel
Comment 31 Maarten Bressers (RETIRED) gentoo-dev 2007-07-22 18:15:18 UTC
Does this mean that you've solved the problem by using mercurial alsa? I see the change in your /proc/interrupts. Did you use any of the kernel parameters I suggested? Please alaborate on your previous post.
Comment 32 John Stile 2007-07-22 18:16:09 UTC
Created attachment 125688 [details]
Setup Notes for Alsa snd_intel using mercurial alsa-libs, alsa-utils, alsa-driver, alsa-kernel 

fixed some spelling, and script stuff
Comment 33 John Stile 2007-07-22 18:21:50 UTC
(In reply to comment #31)
> Does this mean that you've solved the problem by using mercurial alsa? I see
> the change in your /proc/interrupts. Did you use any of the kernel parameters I
> suggested? Please alaborate on your previous post.
> 
Yes, I did solve the problem by using mercurial with alsa-driver and 
alsa-kernel.  I built alsa-lib and alsa-utils from a manual download.
I'm a bad debugger... I forgot to try CONFIG_PCI_DEBUG and CONFIG_DEBUG_SHIRQ.
Do I still need to do that?
Comment 34 Maarten Bressers (RETIRED) gentoo-dev 2007-07-22 18:37:31 UTC
Good to hear that you were able to solve the problem. There's no need to test with CONFIG_PCI_DEBUG and CONFIG_DEBUG_SHIRQ at this time. We'll wait till 2.6.23-rc1 is released, then you can test if the in-kernel alsa driver also works for you. If that's the case we can close this bug. 
Comment 35 Daniel Drake (RETIRED) gentoo-dev 2007-07-24 23:06:54 UTC
2.6.23-rc1 is out now. Any chance you can test that kernel, using the ALSA drivers found in the kernel, as opposed to the HG ones?

Thanks!
Comment 36 John Stile 2007-07-25 21:28:37 UTC
(In reply to comment #35)
> 2.6.23-rc1 is out now. Any chance you can test that kernel, using the ALSA
> drivers found in the kernel, as opposed to the HG ones?
> 
> Thanks!
> 
I updated today, but don't see 2.6.23-r1 in my list:

eix sys-kernel/vanilla-sources   
<snip>
...
        (2.6.21)        (~)2.6.21
        (2.6.21.1)      (~)2.6.21.1
        (2.6.21.5)      (~)2.6.21.5
        (2.6.21.6)      2.6.21.6
        (2.6.22)        (~)2.6.22
        (2.6.22.1)      (~)2.6.22.1
Comment 37 Daniel Drake (RETIRED) gentoo-dev 2007-07-25 21:44:36 UTC
It's definitely there (2.6.23-rc1 rather than -r1)

ls /usr/portage/sys-kernel/vanilla-sources/vanilla-sources-2.6.23_rc1.ebuild
Comment 38 Daniel Drake (RETIRED) gentoo-dev 2007-08-05 22:22:19 UTC
Any news here?
Comment 39 Søren Chrestensen 2007-08-19 16:39:08 UTC
I also have the "mute" bug and tested with  newest vanilla sources (_rc3) and it's still there. Using in-kernel alsa builtin and driver as module (hda-intel)

Comment 40 Søren Chrestensen 2007-08-19 17:28:01 UTC
Seems the codec following HD audio on intel ICH8 rev o3 is unsupport or something with current ALSA upstream. I guess that makes it also kinda unsupported within the kernel code. Seems not all HD audio has this problem as intel changed the codec in a rev ( 02->03 maybe?)

I found a bug on Ubuntu naming the same problem i have, with a patch aiming at fixing alsa-driver 1.0.14 but isn't done yet. 
?
It seems the origenal poster didn't have this problem maybe because he had another rev, open new bug maybe?
Comment 41 Maarten Bressers (RETIRED) gentoo-dev 2007-09-18 19:33:21 UTC
John, can you confirm that this problem is fixed for you with the latest development kernel (2.6.23-rc6 as of this writing)?

Soren, can you also please test with the latest development kernel (2.6.23-rc6 as of this writing)? (There have been a number of alsa and hda driver related commits going into the git tree).
Comment 42 John Stile 2007-09-19 04:36:29 UTC
I have build the kernel, and booted, but I'm having a hell of a time dealing with my first 'sandbox violation' trying to build the nvidia driver (or any kernel module for that matter).  I'm reading http://bugday.gentoo.org/sandbox.html.  I'll keep plugging away at it.
Comment 43 Daniel Drake (RETIRED) gentoo-dev 2007-09-19 10:19:39 UTC
sounds like that might be bug #135745, there is no solution currently other than

FEATURES="-sandbox -usersandbox" emerge foo
Comment 44 John Stile 2007-09-19 16:23:57 UTC
I have good news and bad news.
I cant seem to build the nvidia driver, but I don't need it to test the sound.
Incedentally, I found another bug for nvidia:
  http://bugs.gentoo.org/show_bug.cgi?id=186490
I booted to the 2.6.23-rc6 kernel, and logged into the console.
I ran 3 commands:
  amixer  set PCM 100 unmute
  amixer  set Speaker 100 unmute
  play hideseek.mp3
And It Sounds Great. 
Volume buttons don't work, so they aren't hard wired to the card.
amixer application was from source alsa-utils-1.0.14 and not the ebuild
Comment 45 John Stile 2007-09-19 16:39:39 UTC
Sound also works with the alsa-utils-1.0.14 ebuild.
Comment 46 Maarten Bressers (RETIRED) gentoo-dev 2007-09-19 16:49:53 UTC
Ok, so for you this issue is fixed, John? In that case we'll wait for input from Soren before closing this one.
Comment 47 John Stile 2007-09-19 17:10:03 UTC
Yes.  All fixed for me.  Thank you Very much.
Comment 48 Søren Chrestensen 2007-09-23 21:08:55 UTC
Just tried upgrading to vanilla rc7, still no sound. Though my error should be fixed in alsa's HG tree according to https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3343 which seems like my bug.
Comment 49 Daniel Drake (RETIRED) gentoo-dev 2007-09-23 22:31:10 UTC
Created attachment 131740 [details, diff]
add support for AD1984

johnny99, if you have time please apply this patch against a recent gentoo-sources-2.6.22 release and confirm that it fixes the problem for you. I'm pretty sure it will, If so, we can ship it in future gentoo-sources-2.6.22 releases.

Søren, if this doesn't fix it for you then please open a new bug as it sounds like your issue is different.
Comment 50 John Stile 2007-09-23 23:46:11 UTC
Hello Daniel Drake,
I have time.  If you don't mind, how do I apply patch?  I looked at the text of patch "add support or AD1984' but don't understand how to apply this to the
linux-2.6.22-gentoo-r5 source
Comment 51 Mike Pagano gentoo-dev 2007-09-24 00:04:44 UTC
Copy the patch from comment #49 into a file and save in the /usr/src/linux directory or wherever your kernel sources are.

type:

patch -p1 < filename

replacing filename with the name of the patch file.
Then rebuild and install your kernel sources as you normally do.
Comment 52 John Stile 2007-09-24 20:02:20 UTC
The good news is that patch worked on linux-2.6.22-gentoo-r7 source, and it sounds great.  The bad news is that I have some problem with irq's, causing the nvidia driver to not load.  I will debug further tonight, but by disabling all USB support in the kernel and booting with the kernel option acpi_noirq, sound an nvidia are working fine together.
Comment 53 John Stile 2007-09-25 17:21:39 UTC
Created attachment 131883 [details]
dmesg when sound works, nvidia fails with in kernel usb after 01_ad1984.patch

dmesg when sound works, nvidia fails with in kernel usb after 01_ad1984.patch
Comment 54 John Stile 2007-09-25 17:22:46 UTC
Created attachment 131884 [details]
dmesg when sound works, nvidia works without in kernel usb after 01_ad1984.patch

dmesg when sound works, nvidia works without in kernel usb after 01_ad1984.patch
Comment 55 John Stile 2007-09-25 17:32:29 UTC
I added 2 attachments of dmesg output.  

With the 01_ad1984.patch applied to the gentoo-sources-2.6.22-r7, sound works but Nvidia fails if there is USB support in the kernel on this Thinkpad t61.  When I remove all USB support from the kernel, both sound and Nvidia work.  I suspect this is due to an IRQ shuffle.
<A HREF="http://bugs.gentoo.org/attachment.cgi?id=131883">kernel with usb</A>
<A HREF="http://bugs.gentoo.org/attachment.cgi?id=131884">kernel without usb</A>
NOTE:  I was incorrect in stating the kernel option 'acpi_noirq' was required.  It is not required.  The only requirement is to disable USB in the kernel .config.

Is this a problem with the patch or with USB in the 2.6.22 kernel?
Comment 56 Daniel Drake (RETIRED) gentoo-dev 2007-09-25 21:07:11 UTC
So, when USB is enabled in the kernel, nvidia fails both before and after you apply the sound fixing patch? If so, your issue is unrelated to the sound patch and you should file a new bug against the nvidia driver so that it can be dealt with by the appropriate people. If I misunderstood, please explain in more detail.
Comment 57 John Stile 2007-09-25 22:15:35 UTC
Before the patch, usb+nvidia are happy.  
After the patch, usb+nvidia are unhappy.

Comment 58 Daniel Drake (RETIRED) gentoo-dev 2007-09-25 22:50:16 UTC
ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:01:00.0 to 64
NVRM: loading NVIDIA UNIX x86 Kernel Module  100.14.19  Wed Sep 12 14:12:24 PDT 2007

nvidia is using IRQ 16

but above that...
irq 16: nobody cared (try booting with the "irqpoll" option)
Disabling IRQ #16

indicates that lots of interrupts were raised on IRQ 16 that weren't handled by any driver

Ignore the nvidia driver (its closed source and causes a lot of problems and will make any kernel problem be ignored), can you double check that applying/reverting this patch (while USB is enabled) really does make the above "nobody cared" error come and go away? It seems very unlikely that it would have any influence at all. Sometimes these things are caused by reboots as opposed to cold boots etc.

Hmm, just noticed that your sound IRQ changes in the 2 logs:
ALSA device list:
  #0: HDA Intel at 0xfe220000 irq 22

to:
  #0: HDA Intel at 0xfe220000 irq 21

might also be worth keeping an eye on that message as you switch between the patched and unpatched kernels... again, the patch shouldn't have made a difference here.
Comment 59 Randall Wald 2007-10-10 17:13:49 UTC
I've had similar problems with my T61; in particular, it seemed that only the hardware buttons could unmute the system. However, with 2.6.23 and the in-kernel ALSA, everything works properly. (Well, raising or lowering /proc/acpi/ibm/volume doesn't make the sound louder or softer, but that's not important.) I can try to see how my system differs from a broken one, if it would help...
Comment 60 Maarten Bressers (RETIRED) gentoo-dev 2007-10-13 21:18:03 UTC
John, what's the status here? 

Did you examine the things Daniel mentioned in comment #58? Specifically, does using the patch cause problems with your USB, when not using the nVidia module?
Comment 61 Daniel Drake (RETIRED) gentoo-dev 2007-10-14 23:49:28 UTC
this bug is a bit convoluted now, and the ALSA patches are included in 2.6.23. johnny, if you can reproduce your USB problems on 2.6.23 without the binary nvidia driver coming into play at all, please open a new bug report and we'll go from there.
Comment 62 John Stile 2007-10-15 02:42:55 UTC
I built sys-kernel/gentoo-sources-2.6.23, with in-kernel alsa and usb drivers.   Once I add the following to make.conf, I could build the nvidia driver:
FEATURES="-sandbox  -usersandbox"
Booted from 2.6.23-gentoo, alsa works, nvidia works, usb works, but net-wireless/madwifi-ng-0.9.3.2 (-injection kernel_linux) doesn't work.

I couldn't get to the bottom of my 2.6.22-gentoo-r7 alsa-nvidia-usb problems.I got equially lost with 2.6.22-gentoo-r8:  
After patch: Add usb --> nvidia fails, 
No patch:  Add usb --> nvidia works.

Since sys-kernel/gentoo-sources-2.6.23 seems to work, with everything but net-wireless/madwifi-ng-0.9.3.2, I might just wait for that to happen, and stick with no usb on the 2.6.22-gentoo-r7 and 01_ad1984.patch patch.