No sound from internal speakers snd_hda ALC880

hello

after searching through the forum, I tried the tips but I still cant be any sound from internal speakers on FreeBSD 8
I have a realtek high definition audio sound card

here is the result of [cmd=]cat /dev/sndstat[/cmd]

Code:
pcm0 : <HDA Realtek ALC880 PCM #0 Digital>(play/rec) default
pcm1 : <HDA Realtek ALC880 PCM #1 Analog>(rec)
pcm2 : <HDA Realtek ALC880 PCM #2 Analog>(rec)

here is the verbose boot output :

Code:
hdac0: Probing codec #0...
hdac0: HDA Codec #0: Unknown Codec
hdac0:  HDA Codec ID: 0x10573055
hdac0:        Vendor: 0x1057
hdac0:        Device: 0x3055
hdac0:      Revision: 0x07
hdac0:      Stepping: 0x00
hdac0: PCI Subvendor: 0x10a71734
hdac0:  Found modem FG nid=1 startnode=2 endnode=38 total=36
hdac0: Probing codec #1...
hdac0: HDA Codec #1: Realtek ALC880
hdac0:  HDA Codec ID: 0x10ec0880
hdac0:        Vendor: 0x10ec
hdac0:        Device: 0x0880
hdac0:      Revision: 0x08
hdac0:      Stepping: 0x00
hdac0: PCI Subvendor: 0x10a71734
hdac0:  Found audio FG nid=1 startnode=2 endnode=34 total=32
hdac0: 
hdac0: Processing modem FG cad=0 nid=1...
hdac0: 
hdac0: Processing audio FG cad=1 nid=1...
hdac0: GPIO: 0x40000002 NumGPIO=2 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdac0:  nid 20 0x01014010 as  1 seq  0      Line-out  Jack jack  1 loc  1 color   Green misc 0
hdac0:  nid 21 0x01011012 as  1 seq  2      Line-out  Jack jack  1 loc  1 color   Black misc 0
hdac0:  nid 22 0x01016011 as  1 seq  1      Line-out  Jack jack  1 loc  1 color  Orange misc 0
hdac0:  nid 23 0x01012014 as  1 seq  4      Line-out  Jack jack  1 loc  1 color    Grey misc 0
hdac0:  nid 24 0x01a19830 as  3 seq  0           Mic  Jack jack  1 loc  1 color    Pink misc 8
hdac0:  nid 25 0x02a19c40 as  4 seq  0           Mic  Jack jack  1 loc  2 color    Pink misc 12
hdac0:  nid 26 0x01813031 as  3 seq  1       Line-in  Jack jack  1 loc  1 color    Blue misc 0
hdac0:  nid 27 0x02014c20 as  2 seq  0      Line-out  Jack jack  1 loc  2 color   Green misc 12
hdac0:  nid 28 0x411111f0 as 15 seq  0       Speaker  None jack  1 loc  1 color   Black misc 1
hdac0: Patching widget caps nid=29 0x00400000 -> 0x00700000
hdac0:  nid 30 0x0144111e as  1 seq 14     SPDIF-out  Jack jack  4 loc  1 color   Black misc 1
hdac0:  nid 31 0x01c46150 as  5 seq  0      SPDIF-in  Jack jack  4 loc  1 color  Orange misc 1
hdac0: Patched pins configuration:
hdac0:  nid 20 0x01014010 as  1 seq  0      Line-out  Jack jack  1 loc  1 color   Green misc 0
hdac0:  nid 21 0x01011012 as  1 seq  2      Line-out  Jack jack  1 loc  1 color   Black misc 0
hdac0:  nid 22 0x01016011 as  1 seq  1      Line-out  Jack jack  1 loc  1 color  Orange misc 0
hdac0:  nid 23 0x01012014 as  1 seq  4      Line-out  Jack jack  1 loc  1 color    Grey misc 0
hdac0:  nid 24 0x01a19830 as  3 seq  0           Mic  Jack jack  1 loc  1 color    Pink misc 8
hdac0:  nid 25 0x02a19c40 as  4 seq  0           Mic  Jack jack  1 loc  2 color    Pink misc 12
hdac0:  nid 26 0x01813031 as  3 seq  1       Line-in  Jack jack  1 loc  1 color    Blue misc 0
hdac0:  nid 27 0x02014c20 as  2 seq  0      Line-out  Jack jack  1 loc  2 color   Green misc 12
hdac0:  nid 28 0x411111f0 as 15 seq  0       Speaker  None jack  1 loc  1 color   Black misc 1 [DISABLED]
hdac0:  nid 30 0x0144111e as  1 seq 14     SPDIF-out  Jack jack  4 loc  1 color   Black misc 1
hdac0:  nid 31 0x01c46150 as  5 seq  0      SPDIF-in  Jack jack  4 loc  1 color  Orange misc 1

I added this to /etc/sysctl.conf:

Code:
hw.snd.default_unit=0

I also added this under device.hints :
Code:
hint.hdac.0.cad0.nid20.config="as=1"
hint.hdac.0.cad0.nid21.config="as=2"

I played around with this changing values, but it had no effect

The sound is working fine from the headphone jack, but nothing from the internal speakers
(I also noticed that the /dev/sndstat remains unchanged)

I'm sure it is a redirection issue, but how to make the sound default output to internal speakers ?
 
Maybe this:

Code:
hint.hdac.0.cad0.nid20.config="as=1 seq=15 device=Headphones"
hint.hdac.0.cad0.nid28.config="as=1 seq=0 conn=Fixed"
 
exactly, this is what I was intrigued about.
On my verbose boot, it says :
Code:
hdac0:  nid 28 0x411111f0 as 15 seq  0       Speaker  None jack

"None" ?
Ok, I will try what you suggested
thanks
 
OK, so before trying the tips above, I found something weird.
My built-in microphone is redirected to the built-in speaker, so it acts like a microphone amplifier (if I talk near the mic, I can hear it from the speaker)

On my laptop, there is also a built-in modem :

Code:
hdac0: Processing modem FG cad=0 nid=1...

and this corresponds to the internal windows modem (cad0)
so I have to use cad1.nid28, instead of cad0.nid28 (cad1= the sound card)

when I use cad1, the phenomenon above vanishes (which is fine)
I tried hundreds and thousands of combinations:
Code:
hint.hdac.0.cad1.nid28.config="as=1 seq=0 device=Speaker conn=Fixed"
hint.hdac.0.cad1.nid28.config="as=2 seq=1 device=Speaker conn=Fixed"
hint.hdac.0.cad1.nid28.config="as=3 seq=2 device=Speaker conn=Fixed"
hint.hdac.0.cad1.nid28.config="as=5 seq=15 device=Speaker conn=Fixed"
hint.hdac.0.cad1.nid28.config="as=X seq=0 device=Speaker conn=Fixed"
........
.....

but I'm still unable to get the sound from the built-in speaker :
Code:
hdac0: hdac_audio_as_parse: Duplicate pin 0 (28) in association 1!Disabling association

maybe I should touch the gpio settings ?
or maybe, the speaker is not really attached to pin28 but to a different pin
 
I see several problems here:

1. Mixing analog and diginal outputs within one association - not a good idea:
Code:
hint.hdac.0.cad1.nid28.config="as=6 seq=0"
2. This codec has only 4 stereo DACs. As soon as all of them used for 7.1 output - there is just no resources for speaker or anything else. All that possible to configure without deconfiguring that 7.1 is audio redirection to the front connector:
Code:
hint.hdac.0.cad1.nid27.config="as=1 seq=15 device=Headphones"
3. I see nothing alike to Speaker in this configuration. According to CODEC specification, pin 28 is input-only - it can't be a speaker.
 
by the way, I don't use those SPDIF out and Line in, they can also be redirected to the speaker instead
 
Speaker is not detected because your laptop vendor haven't bothered to write proper configuration to the CODEC. Now that configuration looks more like one from desktop -- I haven't yet seen laptops with 7.1 output.

SPDIFs use digital "DACs". They can't be reused for analog connectors.
 
So I tried the :
Code:
hint.hdac.0.cad1.nid27.config="as=1 seq=15 device=Headphones"

The sounds comes properly from the headphone jack. I also tried :
hint.pcm.0.config="gpio0" (then gpio1, gpio2)
Still nothing from speakers.

It seems strange that the vendor didn't include the proper codec configuration. The laptop is an AMILO 1450. You can find its datasheet on this:

http://www.e-prime.eu/download/FSC_AMILO_M1450.pdf
 
I was thinking about installing directly OSS drivers
or recompile OSS sources and install it, not sure whether that would help
 
I tried to install the OSS sources but it failed to start compiling
I gave up after correcting the errors

I'm sure if a BIOS upgrade can fix this sound issue
 
here is the verbose log from linux (using snd-hda intel as driver):

Code:
Node 0x1c [Pin Complex] wcaps 0x400001: Stereo
  Pincap 0x0820: IN
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
Node 0x1d [Pin Complex] wcaps 0x400000: Mono
  Pincap 0x0820: IN
  Pin Default 0x411111f1: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x1
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:

0x1c ???
isn't that the pin28 ?

it's saying "NO_PRESENCE" , however the built-in speakers work perfectly under linux
 
"NO_PRESENCE" most likely mean that pin has no connection sensing support. It is fine. As I have told before - I think pin28 has nothing related with your built-in speakers.

You should carefully look on pins configuration reported there. There can be a clue about which pins Linux uses for output.
 
yes, there must surely be a clue in this verbose logs

but the ALSA's snd-hda-intel , is it the same as snd_hda driver ? (at least, were they built using the same source code ? )
 
ixterm said:
but the ALSA's snd-hda-intel , is it the same as snd_hda driver ? (at least, were they built using the same source code ? )
Not at all. At most they're based on the same standard - HDA.
 
I noticed that ALSA is available under the ports collection

so maybe I can try to install alsa to see if it supports the sound card properly................
 
ixterm said:
I noticed that ALSA is available under the ports collection

so maybe I can try to install alsa to see if it supports the sound card properly................
The ALSA in ports is a userland compatibility layer to make Linux sound applications work on FreeBSD that already has working sound. It will not help with driver issues.
 
I have been also fighting with this problem a lot without success. Mine is a Amilo M6450 and also headphones works fine and speaker is missing. Also with ALSA works, and BIOS upgrade does nothing.
 
Now I have sound in my internal speakers! The only thing you have to take care is examining carefully your pins. This is the steps I follow to achieve it in my Fujitsu Amilo M6450: first of all, as pointed Mav@, you have to take care mixing out/in pins, as well as digital and analog channels. For my this was fourteen times "guess and try", as pins were not well defined by the manufacturer and output from verbose boot (boot verbose and take a look in /var/run/dmesg.boot) was confusing me all the time.
Code:
hdac0: Processing audio FG cad=1 nid=1...
hdac0: GPIO: 0x40000002 NumGPIO=2 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdac0:  nid 20 0x01014010 as  1 seq  0      Line-out  Jack jack  1 loc  1 color   Green misc 0
hdac0:  nid 21 0x01011012 as  1 seq  2      Line-out  Jack jack  1 loc  1 color   Black misc 0
hdac0:  nid 22 0x01016011 as  1 seq  1      Line-out  Jack jack  1 loc  1 color  Orange misc 0
hdac0:  nid 23 0x01012014 as  1 seq  4      Line-out  Jack jack  1 loc  1 color    Grey misc 0
hdac0:  nid 24 0x01a19830 as  3 seq  0           Mic  Jack jack  1 loc  1 color    Pink misc 8
hdac0:  nid 25 0x02a19c40 as  4 seq  0           Mic  Jack jack  1 loc  2 color    Pink misc 12
hdac0:  nid 26 0x01813031 as  3 seq  1       Line-in  Jack jack  1 loc  1 color    Blue misc 0
hdac0:  nid 27 0x02014c20 as  2 seq  0      Line-out  Jack jack  1 loc  2 color   Green misc 12
hdac0:  nid 28 0x411111f0 as 15 seq  0       Speaker  None jack  1 loc  1 color   Black misc 1
hdac0:  nid 30 0x0144111e as  1 seq 14     SPDIF-out  Jack jack  4 loc  1 color   Black misc 1
hdac0:  nid 31 0x01c46150 as  5 seq  0      SPDIF-in  Jack jack  4 loc  1 color  Orange misc 1
There was not pin 29 and for some reason Speaker pin 28 was [DISABLED]. If you read the man page from snd_hda association as=0 means disabled and as=15 unassociated, but any association to this pin does nothing. I put "hints" in /boot/loader.conf for all the pins, changing from reboot every possible configuration of associations (for example as=1,3,5... for output non digital channels and as=2,4,6.. for input non digital ones). After that you get several PCMs that you can change with [cmd=]sysctl hw.snd.default_unit[/cmd]. At the end I get this from [cmd=]cat /dev/sndstat[/cmd]
Code:
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <HDA Realtek ALC880 PCM #0 Digital> (play/rec) default
pcm1: <HDA Realtek ALC880 PCM #1 Analog> (rec)
pcm2: <HDA Realtek ALC880 PCM #2 Analog> (rec)
And my mixer levels and channels were
Code:
Mixer vol      is currently set to  75:75
Mixer pcm      is currently set to  75:75
Mixer speaker  is currently set to  75:75
Mixer line     is currently set to  75:75
Mixer mic      is currently set to   0:0
Mixer igain    is currently set to   0:0
Mixer monitor  is currently set to  75:75
Recording source: dig1
Probably you can forget the Device type shown in dmesg.boot and consider all line-out as speaker candidates. If you want to reduce the possibilities you can look at the "loc" number (in my verbose "loc 2" was my first guess to consider pin 25 as front mic and pin 27 as Headphones) but this was not my case. Next I tried with the color specs with success: as the Speaker pin 28 was defined black I tried with the other black, pin 21, for the internal speaker. By the same argument, pin 20 green could be the Headphone instead of pin 27, so finally tried this in /boot/loader.conf
Code:
snd_hda_load="YES"
hint.hdac.0.cad1.nid20.config="as=1 seq=15 device=Headphones"
hint.hdac.0.cad1.nid21.config="as=1 seq=0"
and voila! Now I have sound in my internal speaker and headphones, and headphones mutes
the speaker. This is my patched pins
Code:
hdac0: Patched pins configuration:
hdac0:  nid 20 0x0121401f as  1 seq 15    Headphones  Jack jack  1 loc  1 color   Green misc 0
hdac0:  nid 21 0x01011010 as  1 seq  0      Line-out  Jack jack  1 loc  1 color   Black misc 0
hdac0:  nid 22 0x01016011 as  1 seq  1      Line-out  Jack jack  1 loc  1 color  Orange misc 0
hdac0:  nid 23 0x01012014 as  1 seq  4      Line-out  Jack jack  1 loc  1 color    Grey misc 0
hdac0:  nid 24 0x01a19830 as  3 seq  0           Mic  Jack jack  1 loc  1 color    Pink misc 8
hdac0:  nid 25 0x02a19c40 as  4 seq  0           Mic  Jack jack  1 loc  2 color    Pink misc 12
hdac0:  nid 26 0x01813031 as  3 seq  1       Line-in  Jack jack  1 loc  1 color    Blue misc 0
hdac0:  nid 27 0x02014c20 as  2 seq  0      Line-out  Jack jack  1 loc  2 color   Green misc 12
hdac0:  nid 28 0x411111f0 as 15 seq  0       Speaker  None jack  1 loc  1 color   Black misc 1 [DISABLED]
hdac0:  nid 30 0x0144111e as  1 seq 14     SPDIF-out  Jack jack  4 loc  1 color   Black misc 1
hdac0:  nid 31 0x01c46150 as  5 seq  0      SPDIF-in  Jack jack  4 loc  1 color  Orange misc 1
Now that it works I am willing to configure the mic and other hints, but listening music! Hope this can help you.
 
Back
Top