Bug 12070

Summary: Hda-intel audio input not working since 2.6.26 kernel
Product: Drivers Reporter: Tommaso Pasini (tommaso.pasini)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED UNREPRODUCIBLE    
Severity: normal CC: alan, michael.wiktowy, tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.2 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: The output of alsa-info.sh run on 2.6.25 kernel, working
The output of alsa-info.sh run on 2.6.26 kernel, not working
Errors loading the modules on 2.6.28-rc6
Dmesg output after trying to load the modules on 2.6.28-rc6
2.6.28-rc6 config
2.6.28-rc6 config (right one)

Description Tommaso Pasini 2008-11-20 12:27:52 UTC
Latest working kernel version: 2.6.25
Earliest failing kernel version: 2.6.26
Distribution: Gentoo
Problem Description:

All kernel versions up to 2.6.25 worked flawlessly; starting from 2.6.26 I'm unable to use the microphone, internal or plugged-in.

I tried many configurations:
* gentoo-sources 2.6.26 with in-kernel drivers built as modules
* gentoo-sources 2.6.27 with in-kernel drivers built as modules
* gentoo-sources 2.6.27 with in-kernel drivers built-in
* vanilla 2.6.27 with in-kernel drivers built as modules
* gentoo-sources 2.6.27 with external drivers (1.0.18)

I tried upgrading all alsa-* packages up to 1.0.18, but still I cannot hear anything.

Audio Controller (rev 02)
        Subsystem: ASUSTeK Computer Inc. Device 1213
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at febfc000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [50] Power Management version 2
        Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0
Enable-
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Kernel driver in use: HDA Intel
        Kernel modules: snd-hda-intel

cat /proc/asound/cards
 0 [Intel ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xfebfc000 irq 16

cat /proc/asound/devices
  0: [ 0] : control
  1: : sequencer
  4: [ 0- 0]: hardware dependent
  5: [ 0- 1]: hardware dependent
 16: [ 0- 0]: digital audio playback
 17: [ 0- 1]: digital audio playback
 22: [ 0- 6]: digital audio playback
 24: [ 0- 0]: digital audio capture
 30: [ 0- 6]: digital audio capture
 33: : timer

amixer scontents
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 27 [87%] [-6.00dB] [on]
  Front Right: Playback 27 [87%] [-6.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 27 [87%] [6.00dB] [on]
  Front Right: Playback 27 [87%] [6.00dB] [on]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 31
  Mono: Capture [on]
  Front Left: Playback 27 [87%] [6.00dB] [on]
  Front Right: Playback 27 [87%] [6.00dB] [on]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 2 [67%]
  Front Right: 2 [67%]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 15
  Front Left: Capture 13 [87%] [19.50dB] [on]
  Front Right: Capture 13 [87%] [19.50dB] [on]
Simple mixer control 'Mix',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [off]
Simple mixer control 'Caller ID',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Digital',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 120
  Front Left: Capture 99 [82%] [19.50dB]
  Front Right: Capture 99 [82%] [19.50dB]
Simple mixer control 'External Amplifier',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Off-hook',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

Using git-bisect on the kernel tree I found the offending revision:

5d5d5f43f1b835c375de9bd270cce030d16e2871 is first bad commit
commit 5d5d5f43f1b835c375de9bd270cce030d16e2871
Author: Takashi Iwai <tiwai@suse.de>
Date: Tue Feb 12 12:11:36 2008 +0100

    [ALSA] hda-codec - Implement auto-mic jack sensing on Samsung laptops
    
    Implemented the auto-mic jack sensing for Samsung laptops with AD1986A
    codec chip (model=laptop-eapd).
    
    The hardware uses pin 0x1d and 0x1f for the internal and external
    mics, respectively.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

:040000 040000 bdedbeceda4a6afc6c37302784be18523ca37b65 6b023b54ab4ef9cee8cefae779899ec88f16a356 M sound 

This bug is already reported on ALSA (https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4228) and Gentoo bugzilla (https://bugs.gentoo.org/show_bug.cgi?id=235732).

The gentoo dev kindly contacted Takashi Iwai, who asked to open a bugreport here, attaching the output of alsa-info.sh run on both (working and not working) kernels.
Comment 1 Tommaso Pasini 2008-11-20 12:29:04 UTC
Created attachment 18954 [details]
The output of alsa-info.sh run on 2.6.25 kernel, working
Comment 2 Tommaso Pasini 2008-11-20 12:29:24 UTC
Created attachment 18955 [details]
The output of alsa-info.sh run on 2.6.26 kernel, not working
Comment 3 Tommaso Pasini 2008-11-20 12:40:05 UTC
The patch mentioned can be found here http://thread.gmane.org/gmane.linux.alsa.devel/50989/focus=51457
Comment 4 Takashi Iwai 2008-11-20 17:39:33 UTC
Could you try the latest sound-2.6.git?  I added a fix patch there.
    git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git

The alsa-driver snapshot tarball is found at
    ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-snapshot.tar.gz
Comment 5 Tommaso Pasini 2008-11-21 07:16:59 UTC
It works fine on 2.6.26.8 and on 2.6.27.7, but it doesn't work on 2.6.28-rc6: it compiles fine but I'm unable to load the modules, I get errors like

WARNING: Error inserting snd_hwdep (/lib/modules/2.6.28-rc6/kernel/sound/acore/snd-hwdep.ko): Unknown symbol in module, or unknown parameter (see dmesg)

And on dmesg

snd_hwdep: Unknown symbol snd_info_register
snd_hwdep: Unknown symbol snd_info_create_module_entry
snd_hwdep: Unknown symbol snd_info_free_entry
snd_hwdep: Unknown symbol snd_unregister_oss_device
snd_hwdep: Unknown symbol snd_verbose_printk
snd_hwdep: Unknown symbol snd_register_oss_device
snd_hwdep: Unknown symbol snd_ctl_register_ioctl
snd_hwdep: Unknown symbol snd_card_file_add
snd_hwdep: Unknown symbol snd_iprintf
snd_hwdep: Unknown symbol snd_major
snd_hwdep: Unknown symbol snd_unregister_device
snd_hwdep: Unknown symbol snd_device_new
snd_hwdep: Unknown symbol snd_ctl_unregister_ioctl
snd_hwdep: Unknown symbol snd_lookup_oss_minor_data
snd_hwdep: Unknown symbol snd_lookup_minor_data
snd_hwdep: Unknown symbol snd_card_file_remove
snd_hwdep: Unknown symbol snd_register_device_for_dev

Similar problems for snd, snd_timer, snd_seq, snd_pcm, snd_hda_intel
Comment 6 Tommaso Pasini 2008-11-21 07:17:40 UTC
Created attachment 18962 [details]
Errors loading the modules on 2.6.28-rc6
Comment 7 Tommaso Pasini 2008-11-21 07:18:21 UTC
Created attachment 18963 [details]
Dmesg output after trying to load the modules on 2.6.28-rc6
Comment 8 Takashi Iwai 2008-11-21 07:25:06 UTC
I guess you didn't remove the all sound realted drivers beforehand.
Or, the same modules are found doubly in /lib/modules/$VERSION.  Remove the old files.
Comment 9 Tommaso Pasini 2008-11-22 06:41:59 UTC
No, the /lib/modules/2.6.28-rc6 directory was completely new, and I de-selected the "sound card support" option, under "drivers" in menuconfig.
Maybe it has something to deal with the fact that 'make install' overwrote the scripts installed by gentoo, but how can I tell?
Tell me what else I can do, I'll do my best.
Comment 10 Tommaso Pasini 2008-11-22 06:42:46 UTC
Created attachment 18966 [details]
2.6.28-rc6 config
Comment 11 Tommaso Pasini 2008-11-22 06:43:39 UTC
Created attachment 18967 [details]
2.6.28-rc6 config (right one)
Comment 12 Michael Wiktowy 2012-02-05 19:28:27 UTC
I don't mean to necro-post but this bug best describes a problem that I have been having on my hardware as well.

More details are found int he Fedora Bugzilla report:
https://bugzilla.redhat.com/show_bug.cgi?id=696219

My Hardware is in a System 76 Starling netbook.

lspci -vvv output:
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)
	Subsystem: QUANTA Computer Inc Device 1777
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 43
	Region 0: Memory at 94340000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [50] Power Management version 2
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee0300c  Data: 4171
	Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
			ExtTag- RBE- FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
		LnkCap:	Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0 <64ns, L1 <1us
			ClockPM- Surprise- LLActRep- BwNot-
		LnkCtl:	ASPM Disabled; Disabled- Retrain- CommClk-
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
	Capabilities: [100 v1] Virtual Channel
		Caps:	LPEVC=0 RefClk=100ns PATEntryBits=1
		Arb:	Fixed- WRR32- WRR64- WRR128-
		Ctrl:	ArbSelect=Fixed
		Status:	InProgress-
		VC0:	Caps:	PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
			Arb:	Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
			Ctrl:	Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
			Status:	NegoPending- InProgress-
		VC1:	Caps:	PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
			Arb:	Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
			Ctrl:	Enable- ID=0 ArbSelect=Fixed TC/VC=00
			Status:	NegoPending- InProgress-
	Capabilities: [130 v1] Root Complex Link
		Desc:	PortNumber=0f ComponentID=02 EltType=Config
		Link0:	Desc:	TargetPort=00 TargetComponent=02 AssocRCRB- LinkType=MemMapped LinkValid+
			Addr:	00000000fed1c000
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd-hda-intel
Comment 13 Takashi Iwai 2013-11-19 08:42:37 UTC
Does the issue still exist on 3.12 kernel?  The codebase has been totally rewritten, so the old test isn't valid any longer.
Comment 14 Tommaso Pasini 2013-11-23 14:45:53 UTC
(In reply to Takashi Iwai from comment #13)
> Does the issue still exist on 3.12 kernel?  The codebase has been totally
> rewritten, so the old test isn't valid any longer.

I'm sorry but I can't help, the laptop that was afflicted by this bug isn't working anymore.
Comment 15 Takashi Iwai 2013-11-25 08:39:19 UTC
OK, let's close then.  Thanks for updates.