snd_hda: no speaker sound on HP 2133

lissyara

Member

Reaction score: 5
Messages: 41

With default settings, no sound using builtin speaker/headphones
adding:
Code:
hp2133$ grep hint.hdac /boot/loader.conf
hint.hdac.0.cad0.nid17.config="as=1 seq=15"
hint.hdac.0.cad0.nid22.config="as=1 seq=0"
hp2133$
iI have sound using headphones.

Log insert headphone jack:
Code:
Nov 10 14:38:41 hp2133 kernel: hdaa0: Unsolicited response 44000000
Nov 10 14:38:41 hp2133 kernel: hdaa0: Pin sense: nid=17 sense=0xffffffff (connected)
Nov 10 14:38:41 hp2133 kernel: pcm0: Redirect output to: headphones
Nov 10 14:38:41 hp2133 kernel: hdaa0: Setting amplifier nid=17 index=0 out mute=0/0 vol=0/0
Nov 10 14:38:41 hp2133 kernel: hdaa0: Setting amplifier nid=22 index=0 out mute=1/1 vol=0/0
Nov 10 14:38:41 hp2133 kernel: pcm0: Playback channel set is: Front Left, Front Right,
Nov 10 14:38:41 hp2133 kernel: pcm0: Playback channel matrix is: 2.0 (connected)
Log remove headphone jack:
Code:
Nov 10 14:38:52 hp2133 kernel: hdaa0: Unsolicited response 44000000
Nov 10 14:38:52 hp2133 kernel: hdaa0: Pin sense: nid=17 sense=0x7fffffff (disconnected)
Nov 10 14:38:52 hp2133 kernel: pcm0: Redirect output to: main
Nov 10 14:38:52 hp2133 kernel: hdaa0: Setting amplifier nid=17 index=0 out mute=1/1 vol=0/0
Nov 10 14:38:52 hp2133 kernel: hdaa0: Setting amplifier nid=22 index=0 out mute=0/0 vol=0/0
Nov 10 14:38:52 hp2133 kernel: pcm0: Playback channel set is: Front Left, Front Right,
Nov 10 14:38:52 hp2133 kernel: pcm0: Playback channel matrix is: 2.0 (unknown)
Full dmesg: http://lissyara.su/patch/dmesg.boot.hp2133.txt
Code:
hp2133$ cat /dev/sndstat
FreeBSD Audio Driver (32bit 2009061500/i386)
Installed devices:
pcm0: <Analog Devices AD1984A (Analog 2.0+HP/2.0)> on hdaa0  (1p:1v/1r:1v) default
  snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
  [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
  interrupts 25936, underruns 0, feed 25936, ready 0 [b:4096/2048/2|bs:4096/2048/2]
  channel flags=0x2100<BUSY,HAS_VCHAN>
  {userland} -> feeder_mixer(0x00200010) -> {hardware}
  pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
  interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:65536/2048/32]
  channel flags=0x10000000<VIRTUAL>
  {userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
  [pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
  interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096 [b:4096/2048/2|bs:4096/2048/2]
  channel flags=0x2100<BUSY,HAS_VCHAN>
  {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
  pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
  interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0]
  channel flags=0x10000000<VIRTUAL>
  {hardware} -> feeder_root(0x00000000) -> {userland}
pcm1: <Analog Devices AD1984A (Front Analog Mic)> on hdaa0  (0p:0v/1r:1v)
  snddev flags=0x2e3<SIMPLEX,AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
  [pcm1:record:dsp1.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
  interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096 [b:4096/2048/2|bs:4096/2048/2]
  channel flags=0x2100<BUSY,HAS_VCHAN>
  {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
  pcm1:record:dsp1.r0[pcm1:virtual:dsp1.vr0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
  interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0]
  channel flags=0x10000000<VIRTUAL>
  {hardware} -> feeder_root(0x00000000) -> {userland}

File Versions:
$FreeBSD: releng/10.2/sys/dev/sound/pcm/vchan.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/sound.c 243459 2012-11-23 15:31:00Z mav $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/sndstat.c 248381 2013-03-16 17:57:00Z joel $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/mixer.c 271193 2014-09-06 15:24:48Z mav $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/feeder_volume.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/feeder_rate.c 209193 2010-06-15 07:06:54Z avg $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/feeder_mixer.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/feeder_matrix.c 243138 2012-11-16 07:05:57Z mav $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/feeder_format.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/feeder_eq.c 209193 2010-06-15 07:06:54Z avg $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/feeder_chain.c 283950 2015-06-03 15:32:43Z hselasky $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/feeder.c 227293 2011-11-07 06:44:47Z ed $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/dsp.c 283192 2015-05-21 07:48:06Z hselasky $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/channel.c 283950 2015-06-03 15:32:43Z hselasky $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/buffer.c 243450 2012-11-23 13:43:51Z mav $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/ac97_patch.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.2/sys/dev/sound/pcm/ac97.c 227293 2011-11-07 06:44:47Z ed $
$FreeBSD: releng/10.2/sys/dev/sound/pci/hda/hdacc.c 281963 2015-04-25 01:11:33Z rpaulo $
$FreeBSD: releng/10.2/sys/dev/sound/pci/hda/hdac.c 281963 2015-04-25 01:11:33Z rpaulo $
$FreeBSD: releng/10.2/sys/dev/sound/pci/hda/hdaa_patches.c 281963 2015-04-25 01:11:33Z rpaulo $
$FreeBSD: releng/10.2/sys/dev/sound/pci/hda/hdaa.c 283609 2015-05-27 13:23:02Z hselasky $
$FreeBSD: releng/10.2/sys/dev/sound/pci/via8233.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.2/sys/dev/sound/pci/ich.c 216518 2010-12-18 14:21:28Z tijl $
$FreeBSD: releng/10.2/sys/dev/sound/pci/es137x.c 254263 2013-08-12 23:30:01Z scottl $
$FreeBSD: releng/10.2/sys/dev/sound/pci/csapcm.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.2/sys/dev/sound/pci/csa.c 254263 2013-08-12 23:30:01Z scottl $
$FreeBSD: releng/10.2/sys/dev/sound/pci/cmi.c 254263 2013-08-12 23:30:01Z scottl $
$FreeBSD: releng/10.2/sys/dev/sound/isa/sndbuf_dma.c 193640 2009-06-07 19:12:08Z ariff $

iI think, problem with mute=1
Code:
hdaa0: nid: 22
hdaa0: Name: pin: Speaker (Fixed)
hdaa0: Widget cap: 0x0040058d PWR UNSOL STEREO
hdaa0: Association: 0 (0x0001)
hdaa0: Pin cap: 0x00010037 ISC TRQD PDC OUT IN EAPD
hdaa0: Pin config: 0x92174110
hdaa0: Pin control: 0x00000040 OUT
hdaa0: EAPD: 0x00000002
hdaa0: Output amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
hdaa0: Connections: 1
hdaa0: + <- nid=11 [audio mixer]
How I can change to mute=0?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,182
Messages: 29,471

Have a look at the snd_hda(4) man page. There are a lot of different HDA (hardware) implementations and you may need to "re-route" some of the outputs.
 
OP
OP
lissyara

lissyara

Member

Reaction score: 5
Messages: 41

Very informative =))

I read man snd_hda, and result is:
Code:
hint.hdac.0.cad0.nid17.config="as=1 seq=15"
hint.hdac.0.cad0.nid22.config="as=1 seq=0"
play headphone. but, need speaker.
 

shepper

Aspiring Daemon

Reaction score: 263
Messages: 771

I'm assuming you are using an HP 2133. If you web search "HP 2133 Sound FreeBSD" you can find reports to the FreeBSD Mailing lists. This has been a problem on this netbook since the days of FreeBSD 7.2. It apparently has an amplifer that normally gets nid11. None of the mailing posts had success although I just skimmed them. I also found some posts where the oss drivers were used. The oss drivers did not support the internal speakers either.

moderators: the bb code editor was a PITA today.
 
OP
OP
lissyara

lissyara

Member

Reaction score: 5
Messages: 41

iI write to mail list in 2008 year (when get it netbook)... every year I try resolving the problem...
7 years - no happy =0
--
In internet, I find one people, why write about success work speaker, in PC-BSD, but, no config, no answer from it =(
 
OP
OP
lissyara

lissyara

Member

Reaction score: 5
Messages: 41

So, I have disk with Parted Magic 6.2.
  1. I boot from it.
  2. shutdown it.
  3. Boot from local hard drive (FreeBSD 10.2, i386) speaker works, without changes in loader.conf (headphones not work with empty loader.conf)
With
Code:
hint.hdac.0.cad0.nid17.config="as=1 seq=15"
hint.hdac.0.cad0.nid22.config="as=1 seq=0"
correct work headphones/speaker

I unplug power cord, unplug battery, plug battery, plug cord and speaker not work. Need boot Parted Magic 6.2 =(

I try diff dmesg(8) with hw.snd.verbose=4 for speaker work and for not, no changes.

========
I think, snd_hda(4) not see some parameters. but, it see and can change Linux/Windows
 
OP
OP
lissyara

lissyara

Member

Reaction score: 5
Messages: 41

I try save sysctl -a for both variant and diff it. No changes for sound or hda between it
 

shepper

Aspiring Daemon

Reaction score: 263
Messages: 771

Just out of curiosity, what happens if you boot with ACPI disabled? Does the BIOS have any power saving settings for the sound amplifier?
 

Juha Nurmela

Well-Known Member

Reaction score: 121
Messages: 401

I have a different HP. Different chipsets too, so disregard the exact numbers.

You might try another approach: I have speakers as /dev/pcm1 and headphones as /dev/pcm0. Would have liked the mic to sit with the speakers, but that did not work, whatever I did. Maybe just didn't try hard enough.

Juha


Code:
# pcm0: left edge, headphones/mic, builtin mikes too
hint.hdaa.0.nid15.config="as=1 seq=0 device=Line-out"
hint.hdaa.0.nid11.config="as=2 seq=14 device=Line-in"
hint.hdaa.0.nid12.config="as=2 seq=15 device=Mic"
hint.pcm.0.rec.autosrc=0
hint.pcm.0.eq=1

# pcm1: builtin speakers
hint.hdaa.0.nid13.config="as=3 seq=0 device=Monitor"
hint.pcm.1.eq=1

# pcm2,3: dock, line-out/line-in ?
hint.hdaa.0.nid10.config="as=4 seq=0 device=Line-out"
hint.hdaa.0.nid14.config="as=5 seq=0 device=Line-in"
 
OP
OP
lissyara

lissyara

Member

Reaction score: 5
Messages: 41

Just out of curiosity, what happens if you boot with ACPI disabled? Does the BIOS have any power saving settings for the sound amplifier?
It's HP. BIOS have 3 (!) setting values =))

About ACPI, I can try it in Monday. Laptop stays on work
 

shepper

Aspiring Daemon

Reaction score: 263
Messages: 771

Juha,

There are some odd things about your configuration. Usually device=Monitor is used to describe a built in Mic on the Monitor. Mislabeling it does not affect gpio assignments. Most people with laptops want sound from the speakers to be muted when they plug in the headphones. For that to happen, nid13 will need to be in the same association as nid15.

For future documentation, I would recommend starting another thread and posting the make/model of your laptop, your goals in configuring it and the output of the following
# cat /dev/sndstat and
# sysctl dev.hdac.0.pindump=1 followed by
$ dmesg
 
OP
OP
lissyara

lissyara

Member

Reaction score: 5
Messages: 41

boot with acpi disabled - panic in begin boot:
Code:
ioapic0: Assumung intbase of 0
ioapic1: Assumung intbase of 24
panic: interrupt from missing bus
 
Top