You are not logged in.

#1 2014-02-23 03:25:26

FaulkNet
Member
Registered: 2014-01-26
Posts: 13

[SOLVED]Front panel headphones not working with onboard Intel HD Audio

Okay, I'm an intermediate Linux user—I'm not a complete newbie but I'm not a forum regular either, so please be as verbose and forgiving as you can. About a year and half ago I built a pretty nice Xeon workstation/server, set up Arch and started playing. A few things still aren't working, and I came across one issue that I don't know how to approach because I don't know much about kernel modules and drivers.

I'm running a Supermicro motherboard with integrated Intel HD audio. ALSA is up and running and I have sound through the audio ports in the back, but the headphone and microphone jacks on the front panel of the chassis aren't working. The front panel audio is connected to the motherboard via a cable labeled "HD AUDIO" that is plugged into a header on the motherboard as indicated in the manual, but ALSA doesn't show the headphone and microphone channels in alsaconfig. I'm not sure whether this is a driver issue or an ALSA issue.

I've read through the ALSA page on the Arch Wiki and the section regarding "No headphone sound with onboard Intel sound card" sounded promising.

grep Codec /proc/asound/card0/code*

produces the following output

Codec: Realtek ALC889

but the only entries for that codec in the list of HD Audio modules on the Kernel documentation site don't appear to apply. Still, there were a couple of solutions in other Linux forums that seemed to indicate that setting Kernel module options is a plausible solution. I looked that up in the Arch Wiki Kernel Modules page, but the modprobe.conf doesn't exist by default.

Before I went messing around with modprobe, I thought I'd put out a feeler to see if anyone had advice on how to go about solving this kind of issue. Good explanations about the kernel interface and how modprobe and drivers work would also be useful. I need to start getting a deeper handle on kernel stuff.

Thanks in advance.

Last edited by FaulkNet (2014-03-30 20:05:45)

Offline

#2 2014-02-23 14:15:50

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]Front panel headphones not working with onboard Intel HD Audio

Have you seen this? You probably have the wrong module model loaded for your sound card. Too little information at this point.

lspci -vvvv | grep -A 10 -i audio; amixer; aplay -l; lsmod | grep -i snd

Last edited by emeres (2014-02-23 14:23:09)

Offline

#3 2014-02-25 00:18:32

FaulkNet
Member
Registered: 2014-01-26
Posts: 13

Re: [SOLVED]Front panel headphones not working with onboard Intel HD Audio

Nice, no I hadn't seen that. Thanks for the reference. I'll take it one piece at a time:

$ lspci -vvvv | grep -A 10 -i audio
00:1b.0 Audio device: Intel Corporation C600/X79 series chipset High Definition Audio Controller (rev 06)
	Subsystem: Super Micro Computer Inc Device 062a
	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, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 105
	Region 0: Memory at fb420000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

--
03:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1)
	Subsystem: eVga.com. Corp. Device 2670
	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, Cache Line Size: 64 bytes
	Interrupt: pin B routed to IRQ 36
	Region 0: Memory at fb080000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

I had tried amixer, and it mentions "Front Mic", but alsaconfig didn't show a channel for it by name. If I plug my headphones into it I get some fuzz, so I can only assume it's getting power.

$ amixer
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 21 [33%] [-43.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 62 [97%] [0.00dB] [on]
  Front Right: Playback 62 [97%] [0.00dB] [on]
Simple mixer control 'Front Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Front Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 62 [97%] [0.00dB] [on]
  Front Right: Playback 62 [97%] [0.00dB] [on]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 62 [97%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 62 [97%] [0.00dB] [on]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Line Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
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 - 46
  Front Left: Capture 28 [61%] [12.00dB] [on]
  Front Right: Capture 28 [61%] [12.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 0 [0%] [-16.00dB] [off]
  Front Right: Capture 0 [0%] [-16.00dB] [off]
Simple mixer control 'Capture',2
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 0 [0%] [-16.00dB] [off]
  Front Right: Capture 0 [0%] [-16.00dB] [off]
Simple mixer control 'Digital',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 120
  Front Left: Capture 60 [50%] [0.00dB]
  Front Right: Capture 60 [50%] [0.00dB]
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Input Source',2
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Rear Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]

aplay was a new one on me...

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC889 Analog [ALC889 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC889 Digital [ALC889 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I had done an lsmod at one point and noticed that plenty of snd_hda modules had been loaded, including snd_hda_intel...

$ lsmod | grep -i snd
snd_hda_codec_hdmi     30162  1 
snd_hda_codec_realtek    41295  1 
snd_hda_intel          37000  2 
snd_hda_codec         150305  3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
snd_hwdep               6340  1 snd_hda_codec
snd_pcm                77645  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc          7210  2 snd_pcm,snd_hda_intel
snd_timer              18726  1 snd_pcm
snd                    59109  11 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec,snd_hda_intel
soundcore               5450  1 snd

And taking a cue from the other post, obviously I don't have a sound.conf yet, nor a modprobe.conf.

$ cat /etc/modprobe.d/sound.conf; cat /etc/modprobe.d/modprobe.conf
cat: /etc/modprobe.d/sound.conf: No such file or directory
cat: /etc/modprobe.d/modprobe.conf: No such file or directory

I'm guessing it's an Arch thing whereby I'm expected to create them myself...

Offline

#4 2014-02-25 02:39:53

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]Front panel headphones not working with onboard Intel HD Audio

Please post also:

$ aplay -L

Skimming through ALC889s datasheet, it is obviously a 10 channel card. Front panel is independent (does not copy main stream) from main (front speakers) channels. So maybe you need to address it deliberately. Check out that intel-alc889a model though. If you have any other audio related applications/configurations like jack, pulseaudio, ~/.asoundrc do mention it.

FaulkNet wrote:

I'm guessing it's an Arch thing whereby I'm expected to create them myself...

It is no fun, unless you get your hands dirty.

Last edited by emeres (2014-02-25 02:40:49)

Offline

#5 2014-02-26 01:22:56

FaulkNet
Member
Registered: 2014-01-26
Posts: 13

Re: [SOLVED]Front panel headphones not working with onboard Intel HD Audio

emeres wrote:

It is no fun, unless you get your hands dirty.

Absolutely—that's why I'm here. :-)

FaulkNet wrote:

I'm guessing it's an Arch thing whereby I'm expected to create them myself...

This was just my way of trying to elicit more information about those files, like whether they had been moved or if I am in fact expected to create them; I'd had a little trouble divining that information for myself. I assume that just creating them and adding the options I need line by line will be sufficient, but I'll look online for some samples.

Here's the output from aplay:

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=PCH
    HDA Intel PCH, ALC889 Analog
    Default Audio Device
sysdefault:CARD=PCH
    HDA Intel PCH, ALC889 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC889 Analog
    Front speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC889 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC889 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC889 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC889 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC889 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC889 Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 3
    HDMI Audio Output

This is getting interesting, but please bear with me if I have to ask questions.

emeres wrote:

Skimming through ALC889s datasheet ... Front panel is independent (does not copy main stream) from main (front speakers) channels.

I looked through the datasheet (which was a very interesting reference, even though a lot of it is over my head) and based on table 59 I see how you could make that determination. Since you sent me the datasheet for the codec (as opposed to the card itself), my big question at the moment is what is the relationship between the codec and the kernel module?

emeres wrote:

So maybe you need to address it deliberately.

That I wouldn't know how to do, but I'll do some reading.

emeres wrote:

Check out that intel-alc889a model though.

I'm guessing this is either a cue to create /etc/modeprobe.d/sound.conf and add something like

options snd-hda-intel model=intel-alc889a

or use modprobe by doing something similar to

$ rmmod snd-hda-intel
$ modprobe snd-hda-intel model=intel-alc889a

although I'm not clear on what the latter actually does, and what the difference is between that and adding the line to a configuration file...

emeres wrote:

If you have any other audio related applications/configurations like jack, pulseaudio, ~/.asoundrc do mention it.

I haven't had any reason to install pulseaudio on this machine, and I had never heard of jack and don't remember ever using ~/.asoundrc to configure ALSA, so things should be pretty pristine.

Thanks for keeping up with me.

Offline

#6 2014-02-26 02:59:29

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]Front panel headphones not working with onboard Intel HD Audio

I hoped there would be a specific device for front panel, that does not seem to be the case. From what I read on your codec, alsa developers would normally build a "majority case" scenario into the driver/module.

FaulkNet wrote:

what is the relationship between the codec and the kernel module?

Most digital electronic devices (at least today) are build upon a central unit, that manages other components. Sound cards are mostly based upon one codec or dsp, which may have different physical versions, but is kept compatible among those, so implementation in end product is easier. Writing a driver for one codec or even one family of codecs and then doing sound card model adjustments is far more efficient, then writing a new driver for every model and variations. Manufacturers datasheets/technical notes/application notes are here a central reference. Kernel modules extend its functionality, in this case for alsa.
I was actually refering to opening statement/general description, hardware features, block and pinout diagrams (figure 1 and 3) and table 1. Normally all of hardware features are implemented, this may vary from one manufacturer to another and different card models as well.
Well, you do have 10 channels, but those extra two are also inputs. Jack detection and retasking are also features (the former might cause troubles). So you either have to use the correct module model or reassign those jacks.
These should clear things up:

man rmmod;man modprobe

Just try it. And if you are still unsuccessful, use hdajackretask from alsa-tools package and reassign jacks (probably those used as microphone ones). Again according to datasheet it is recommended (table 1) to assign LINE2 to front panel, this is probably named otherwise in the driver though.

Offline

#7 2014-02-27 03:13:38

FaulkNet
Member
Registered: 2014-01-26
Posts: 13

Re: [SOLVED]Front panel headphones not working with onboard Intel HD Audio

That was a wonderfully informative response. I had seen the pinout diagrams but now that I look at table 1, this all makes a lot more sense. Alright, I'm going to take some time to digest, read some man pages and wikis, and try a few commands. I really appreciate the explanation regarding codecs—it cleared things up for me significantly and helped me understand where kernel modules sit in all this.

Offline

#8 2014-03-30 19:40:44

FaulkNet
Member
Registered: 2014-01-26
Posts: 13

Re: [SOLVED]Front panel headphones not working with onboard Intel HD Audio

Okay, so I let this thread go cold for a month, but I've been doing a bit of research, and there have been some interesting developments that I wanted to share (and maybe get some feedback on, assuming anyone is still listening).

I consulted a buddy who wrote a utility that used modprobe in an effort to get a bit more information about the difference between permanently installing a module (i.e. registering it to be loaded at boot time) and just loading/unloading it a la carte; I'm still fuzzy in that arena, but I got bold and started trying to unload the snd-hda-intel module in order to reload it with the specific model parameter.

My initial forays into trying to unload/reload the snd-hda-intel module were unsuccessful. Once the system is up, the sound module appears to be extensively employed by the goings-on of the kernel, so simply entering

$ sudo modprobe -r snd_hda_intel

on my system results in the following message:

modprobe: FATAL: Module snd_hda_intel is in use.

Using rmmod basically resulted in the same thing. I started searching for a way to kill the module, and ran across this post in one of the Ubuntu forums. After some trial and error, I managed to execute the following:

$ sudo kill $(lsof -t /dev/snd/*)
$ sudo modprobe -r snd_hda_intel
$ sudo modprobe snd-hda-intel model=intel-alc889a

However, this still didn't solve my problem; I still had no sound in my headphones and alsa didn't show any indication that it's channel assignments had changed.

According to the section in the kernel modules page regarding setting module options, modprobe will try to read any file in the /etc/modprobe.d/ directory with a .conf extension at boot time, so according to the section of the ALSA Arch Wiki on setting the default sound card I created an alsa-base.conf configuration file and added the one-liner

options snd-hda-intel model=intel-alc889a

Unfortunately, after a reboot this appeared to have had no discernable effect on the configuration either. As an interesting side note, while I was researching Linux audio configuration, I came across an interesting article in a Canonical blog entitled Top five wrong ways to fix your audio. According to the author,

David Henningsson wrote:

4. Don’t try different “model” strings

A common way to try to get HDA Intel soundcards to work is to edit /etc/modprobe.d/alsa-base.conf and add the following line:

options snd-hda-intel model=[something]

…where [something] are values you find in some file. Contrary to official documentation, this is in most cases obsolete.

Et cetera... Ultimately I deleted the alsa-base.conf file.

I must say, emeres you have been extremely informative throughout this process. As a last resort, I went about trying to implement this advice:

emeres wrote:

if you are still unsuccessful, use hdajackretask from alsa-tools package and reassign jacks (probably those used as microphone ones). Again according to datasheet it is recommended (table 1) to assign LINE2 to front panel, this is probably named otherwise in the driver though.

For the benefit of whomever might be reading this, here is another Cononical blog post by the same guy I quoted above describing exactly what hda-jack-retask is; there was very little documentation on the tool that I was able to find. I installed the alsa-tools package and did a

$ sudo hdajackretask

The pin IDs in the tool are all in hex, and none of the hex digits appeared to be the decimal equivalents of 14 or 15 (the pin numbers of LINE2 from Table 1 of the datasheet). Still, I figured what the Hell, overrode for pin assignment for pin 0x1b, installed the boot override and restarted the machine...

Voila! Crystal clear sound in my headphones! The jack even kills the speakers when the headset is plugged in! A call to amixer now includes this section:

Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 62 [97%] [0.00dB] [on]
  Front Right: Playback 62 [97%] [0.00dB] [on]

Apparently when you opt to install the boot override, hda-jack-retask places its own hda-jack-retask.conf file in /etc/modprobe.d/, the contents of which point to a file somewhere called hda-jack-retask.fw... I'm assuming any overrides configured in hda-jack-retask are stored there. Anyway, ultimately this was a GUI-based solution, and I still don't understand what that utility does behind the scenes. But I do have a working front panel headphone jack, and that makes me pretty happy.

Thanks for the great info emeres.

Offline

#9 2014-03-30 20:03:14

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]Front panel headphones not working with onboard Intel HD Audio

You are welcome FaulkNet and I am glad you got it working. Last thing you need to do is to mark this thread as solved (edit your first post and change the title).

Offline

#10 2014-03-30 20:06:55

FaulkNet
Member
Registered: 2014-01-26
Posts: 13

Re: [SOLVED]Front panel headphones not working with onboard Intel HD Audio

Hecho! smile

Offline

#11 2016-07-05 20:29:21

bluebay
Member
Registered: 2016-07-05
Posts: 1

Re: [SOLVED]Front panel headphones not working with onboard Intel HD Audio

Hey guys sorry to resume this post but I found an effective way to solve the problem.
Im on an asus k55vd with realtek alc270 with a fresh new debian jessie. My speakers worked fine but the headphones didnt, but the contrary happened if I booted with the jack in. I tried all you said above and more but nothing worked.
In jessie there is no /etc/modprobe.d/alsa-base.conf, the relevant file is /usr/share/alsa/alsa.conf, you need to add this at the end (unfortunately I couldnt find again the post where I read it):

#Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
alias snd-card- snd-hda-intel
alias sound-slot- snd-hda-intel
options snd-hda-intel model=intel-alc270

Hope this helps someone struggling!

Offline

#12 2016-07-05 21:13:37

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED]Front panel headphones not working with onboard Intel HD Audio

bluejay, Welcome to the Arch Linux forums and thank you for a relevant contribution.  I am, however, going to use this opportunity to close this relatively old thread.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

Board footer

Powered by FluxBB