No sound in laptop with FreeBSD 9-RELEASE (Headphones)

This forum discusses issues related to running FreeBSD on notebooks, laptops, and other mobile equipment.

No sound in laptop with FreeBSD 9-RELEASE (Headphones)

Postby zennybsd » 14 Mar 2012, 16:07

I am missing sound in my laptop. I have:

1) In [FILE]/boot/loader.conf[/FILE]
Code: Select all
#for Sound
sound_enable="YES"
snd_hda_load="YES"
snd_uaudio_load="YES"


2) The [FILE]/dev/sndstat[/FILE] shows:

Code: Select all
# cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA Conexant CX20585 PCM #0 Analog> (play/rec) default
pcm1: <HDA Conexant CX20585 PCM #1 Analog> (play/rec)


3)[CMD=]sysctl[/CMD] shows:

Code: Select all
# sysctl hw.snd.default_unit
hw.snd.default_unit: 0


4) [FILE]mixer[/FILE] values are:

Code: Select all
# mixer
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 mic      is currently set to   0:0
Mixer rec      is currently set to  75:75
Recording source: mic


5) The [FILE]hw.snd sysctl[/FILE] tree:

Code: Select all
# sysctl hw.snd
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 45
hw.snd.vpc_autoreset: 1
hw.snd.latency_profile: 1
hw.snd.latency: 7
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1
hw.snd.compat_linux_mmap: 0
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.feeder_rate_quality: 1
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.vpc_mixer_bypass: 1
hw.snd.verbose: 0
hw.snd.maxautovchans: 16
hw.snd.default_unit: 0
hw.snd.version: 2009061500/amd64
hw.snd.default_auto: 1


6) The [FILE]dev.pcm sysctl[/FILE] tree:

Code: Select all
# sysctl dev.pcm
dev.pcm.0.%desc: HDA Conexant CX20585 PCM #0 Analog
dev.pcm.0.%driver: pcm
dev.pcm.0.%parent: hdac0
dev.pcm.0.play.vchans: 1
dev.pcm.0.play.vchanmode: fixed
dev.pcm.0.play.vchanrate: 48000
dev.pcm.0.play.vchanformat: s16le:2.0
dev.pcm.0.rec.vchans: 1
dev.pcm.0.rec.vchanmode: fixed
dev.pcm.0.rec.vchanrate: 48000
dev.pcm.0.rec.vchanformat: s16le:2.0
dev.pcm.0.buffersize: 65536
dev.pcm.0.bitperfect: 0
dev.pcm.1.%desc: HDA Conexant CX20585 PCM #1 Analog
dev.pcm.1.%driver: pcm
dev.pcm.1.%parent: hdac0
dev.pcm.1.play.vchans: 1
dev.pcm.1.play.vchanmode: fixed
dev.pcm.1.play.vchanrate: 48000
dev.pcm.1.play.vchanformat: s16le:2.0
dev.pcm.1.rec.vchans: 1
dev.pcm.1.rec.vchanmode: fixed
dev.pcm.1.rec.vchanrate: 48000
dev.pcm.1.rec.vchanformat: s16le:2.0
dev.pcm.1.buffersize: 65536
dev.pcm.1.bitperfect: 0


I could not figure out what prevents the sound? Thanks!

PS: With FreeBSD8.2, I solved as stated at http://forums.pcbsd.org/showpost.php?p=86074&postcount=2, but [FILE]/usr/ports/sound/oss[/FILE] is missing in FreeBSD9-RELEASE!

UPDATE: The solution posted below (http://forums.freebsd.org/showpost.php?p=172851&postcount=12) works fine. Thanks ring_zero! :-)
zennybsd
Member
 
Posts: 159
Joined: 14 Mar 2011, 14:07

Postby wblock@ » 14 Mar 2012, 16:27

What model of laptop? Does it have an external volume control?
User avatar
wblock@
Old Fart
 
Posts: 10212
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby fonz » 14 Mar 2012, 16:43

zennybsd wrote:With FreeBSD8.2, I solved as stated at http://forums.pcbsd.org/showpost.php?p=86074&postcount=2, but /usr/ports/sound/oss is missing in FreeBSD9-RELEASE.!

Did you mean [port]audio/oss[/port] ([FILE]/usr/ports/audio/oss[/FILE]) by any chance?

Fonz
ΔS>0 ⇒ Entropy is here to stay.

"Lawyer" is just "liar" pronounced in a regional accent.
User avatar
fonz
Giant Locked
 
Posts: 2236
Joined: 16 Nov 2008, 16:32
Location: in dreamland, swooning over a woman I can't have

Postby zennybsd » 14 Mar 2012, 17:11

wblock@ wrote:What model of laptop? Does it have an external volume control?


Does not have external volume control.

The laptop is Toshiba C650D.
zennybsd
Member
 
Posts: 159
Joined: 14 Mar 2011, 14:07

OSS conflicts with FreeBSD driver

Postby zennybsd » 14 Mar 2012, 19:47

I installed oss from the ports, but it shows up an error in [FILE]dmesg[/FILE]:

Code: Select all
osscore: Open Sound System conflicts with FreeBSD driver
osscore: Please remove sound(4) from kernel or unload it
module_register_init: MOD_LOAD (osscore, 0xffffffff81646500, 0) error 16


I added:

Code: Select all
oss_enable="YES"


in [FILE]/etc/rc.conf[/FILE] and

Code: Select all
oss_mod_load="YES"


in [FILE]/boot/loader.conf[/FILE]

I removed

Code: Select all
sound_load="YES"


from [FILE]/boot/loader.conf[/FILE]

:-(
zennybsd
Member
 
Posts: 159
Joined: 14 Mar 2011, 14:07

Not Solved Yet!

Postby zennybsd » 14 Mar 2012, 20:32

Solved without OSS by just changing the default to 1

Code: Select all
# sysctl -w hw.snd.default_unit=1
hw.snd.default_unit: 0 -> 1


:-)

Two issues: :(

1) With above command, sound works only with pc speakers (no sound with headsets when connected nor the pc speakers goes off after headset connected).

2) Every reboot needs the above command to enable sound through speakers.

[FILE]/etc/sysctl.conf[/FILE] is empty with the following lines:

Code: Select all
#  ``sysctl'' to adjust kernel values.  ``man 5 sysct
#

# Uncomment this to prevent users from seeing informa
# are being run under another UID.
#security.bsd.see_other_uids=0


I did not see anything that is reported by sysctl about the sound-related services that is in above file. Where exactly are they stored in FreeBSD9-RELEASE?
zennybsd
Member
 
Posts: 159
Joined: 14 Mar 2011, 14:07

Postby joel@ » 15 Mar 2012, 08:46

Add
Code: Select all
hw.snd.default_unit=1
to [FILE]/etc/sysctl.conf[/FILE]. Reboot.

You don't need to load all the sound modules in [FILE]/boot/loader.conf[/FILE] beginning with FreeBSD 9.0. They are already enabled in the [FILE]GENERIC[/FILE] kernel.
User avatar
joel@
Member
 
Posts: 245
Joined: 27 Sep 2007, 06:42
Location: Arentorp, Sweden

Postby zennybsd » 15 Mar 2012, 09:51

@joel@: Thanks!

That part is fixed, but the headset part still remains the problem (no sound). Any hints?
zennybsd
Member
 
Posts: 159
Joined: 14 Mar 2011, 14:07

Postby Zare » 15 Mar 2012, 12:44

Try appending

Code: Select all
hint.hdac.1.cad0.nid17.config="as=1 seq=15"
hint.hdac.1.cad0.nid20.config="as=2 seq=1"


into [file]/boot/device.hints[/file]. Reboot. If jack auto-sensing still doesn't work, boot verbose and paste here everything [FILE]snd_hda[/FILE] spits out.

BTW, I might be nitpicking, but it would be wiser to use term "integrated speakers", because "PC speaker" is another type of device (BIOS controlled frequency generator, beeper).
Zare
Member
 
Posts: 385
Joined: 16 Nov 2008, 23:05
Location: Split, Dalmatia

Didn't work!

Postby zennybsd » 15 Mar 2012, 16:53

@Zare: Thanks. Appending the two lines didn't work.

Here comes what hda spits out in verbose mode after reboot: http://pastebin.com/tnLV2Jjx
zennybsd
Member
 
Posts: 159
Joined: 14 Mar 2011, 14:07

Postby sim » 30 Mar 2012, 20:10

Hi zennybsd

How are you getting on with this problem? I have what seems to be the same problem on a Lenovo T510, which appears to have the same hardware as you (Conexant CX20585). I've been messing about but without any luck so far. The annoying thing is that I had it working on a previous install on this machine.


I'll keep playing, if I get anywhere I'll report back.

/sim


My stats for reference:

Code: Select all
sim@tma1> cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm1: <NVIDIA GT21x HDA CODEC PCM (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA GT21x HDA CODEC PCM (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA GT21x HDA CODEC PCM (HDMI/DP 8ch)> (play)
pcm4: <Conexant CX20585 HDA CODEC PCM (Right Analog)> (play/rec)
pcm5: <Conexant CX20585 HDA CODEC PCM (Internal Analog)> (play/rec) default


Code: Select all
sim@tma1> sysctl -a |grep -i dev.pcm.*location
dev.pcm.1.%location: nid=5
dev.pcm.2.%location: nid=5
dev.pcm.3.%location: nid=5
dev.pcm.4.%location: nid=25,27
dev.pcm.5.%location: nid=31,35


Code: Select all
hdacc0: <NVIDIA GT21x HDA CODEC> at cad 0 on hdac0
hdaa0: <NVIDIA GT21x HDA CODEC Audio Function Group> at nid 1 on hdacc0
pcm0: <NVIDIA GT21x HDA CODEC PCM (HDMI/DP 8ch)> at nid 5 on hdaa0
hdacc1: <NVIDIA GT21x HDA CODEC> at cad 1 on hdac0
hdaa1: <NVIDIA GT21x HDA CODEC Audio Function Group> at nid 1 on hdacc1
pcm1: <NVIDIA GT21x HDA CODEC PCM (HDMI/DP 8ch)> at nid 5 on hdaa1
hdacc2: <NVIDIA GT21x HDA CODEC> at cad 2 on hdac0
hdaa2: <NVIDIA GT21x HDA CODEC Audio Function Group> at nid 1 on hdacc2
pcm2: <NVIDIA GT21x HDA CODEC PCM (HDMI/DP 8ch)> at nid 5 on hdaa2
hdacc3: <NVIDIA GT21x HDA CODEC> at cad 3 on hdac0
hdaa3: <NVIDIA GT21x HDA CODEC Audio Function Group> at nid 1 on hdacc3
pcm3: <NVIDIA GT21x HDA CODEC PCM (HDMI/DP 8ch)> at nid 5 on hdaa3
hdacc4: <Conexant CX20585 HDA CODEC> at cad 0 on hdac1
hdaa4: <Conexant CX20585 HDA CODEC Audio Function Group> at nid 1 on hdacc4
pcm4: <Conexant CX20585 HDA CODEC PCM (Right Analog)> at nid 25 and 27 on hdaa4
pcm5: <Conexant CX20585 HDA CODEC PCM (Internal Analog)> at nid 31 and 35 on hdaa4
unknown: <Conexant CX20585 HDA CODEC Modem Function Group> at nid 2 on hdacc4 (no driver attached)


Code: Select all
dev.hdaa.4.nid25_config: 0x042110f0 as=15 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.4.nid25_original: 0x042110f0 as=15 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.4.nid27_config: 0x04a110f0 as=15 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.4.nid27_original: 0x04a110f0 as=15 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.4.nid31_config: 0x901701f0 as=15 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.4.nid31_original: 0x901701f0 as=15 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.4.nid35_config: 0x90a601f0 as=15 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.4.nid35_original: 0x90a601f0 as=15 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1


Code: Select all
hdaa4: Original pins configuration:
hdaa4: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa4: 25 042110f0 15 0  Headphones    Jack  1/8     Right      Black   0
hdaa4: 26 61a190f0 15 0  Mic           None  1/8     Ext-Rear   Pink    0
hdaa4: 27 04a110f0 15 0  Mic           Jack  1/8     Right      Black   0
hdaa4: 28 612140f0 15 0  Headphones    None  1/8     Ext-Rear   Green   0
hdaa4: 29 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1
hdaa4: 30 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1
hdaa4: 31 901701f0 15 0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa4: 32 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1
hdaa4: 34 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1
hdaa4: 35 90a601f0 15 0  Mic           Fixed Digital Internal   Unknown 1
hdaa4: Patched pins configuration:
hdaa4: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa4: 25 042110f0 15 0  Headphones    Jack  1/8     Right      Black   0
hdaa4: 26 61a190f0 15 0  Mic           None  1/8     Ext-Rear   Pink    0 DISA
hdaa4: 27 04a110f0 15 0  Mic           Jack  1/8     Right      Black   0
hdaa4: 28 612140f0 15 0  Headphones    None  1/8     Ext-Rear   Green   0 DISA
hdaa4: 29 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1 DISA
hdaa4: 30 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1 DISA
hdaa4: 31 901701f0 15 0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa4: 32 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1 DISA
hdaa4: 34 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1 DISA
hdaa4: 35 90a601f0 15 0  Mic           Fixed Digital Internal   Unknown 1


Code: Select all
sim@tma1> mixer
Mixer vol      is currently set to  95:95
Mixer pcm      is currently set to 100:100
Mixer rec      is currently set to  75:75
Mixer monitor  is currently set to  75:75
Recording source: monitor
There's no place like ~
User avatar
sim
Member
 
Posts: 157
Joined: 18 Nov 2008, 16:01
Location: The Spacetime Continuum

Postby ring_zero » 06 Apr 2012, 04:11

I had the same issue. It drove me up the wall. I just resolved it on my card. It uses the Conexant CX20585 codec as well. Sim, Zennybsd, try adding this to [FILE]/boot/device.hints[/FILE]:
Code: Select all
hint.hdac.0.cad0.nid31.config="as=2 seq=0 device=Speaker"
hint.hdac.0.cad0.nid25.config="as=2 seq=15 device=Headphones"

Then reboot.

This solved the problem for me, hope it works for you as well.

*EDIT*

You need to be using the [FILE]snd_hda[/FILE] module.
Also, you should not need to change [FILE]hw.snd.default_unit[/FILE] after you add this code to [FILE]/boot/device.hints[/FILE], so if you have changed it to "1", change it back to "0".
ring_zero
Junior Member
 
Posts: 67
Joined: 31 Mar 2011, 05:07
Location: US

ring_zero's suggestion works

Postby zennybsd » 10 Apr 2012, 05:50

@ring_zero: Thanks, it works. But I am yet to check with microphone stuff.
zennybsd
Member
 
Posts: 159
Joined: 14 Mar 2011, 14:07

Postby ring_zero » 10 Apr 2012, 05:56

Not sure about the microphone. It should work, but I don't have one to test with. I am glad that it worked for you.
ring_zero
Junior Member
 
Posts: 67
Joined: 31 Mar 2011, 05:07
Location: US

Postby sim » 14 Apr 2012, 16:07

Unfortunately this hasn't worked in my case. Anyone else still having trouble?

Looking at my system (see above), I've been trying things like this:

Code: Select all
hint.hdaa.4.nid31.config="as=15 seq=0 device=Speaker"
hint.hdaa.4.nid25.config="as=15 seq=15 device=Headphones"


but to no avail. If anyone else has any clues I'd be very grateful :)

sim
There's no place like ~
User avatar
sim
Member
 
Posts: 157
Joined: 18 Nov 2008, 16:01
Location: The Spacetime Continuum

Postby ring_zero » 14 Apr 2012, 20:48

sim wrote:Unfortunately this hasn't worked in my case. Anyone else still having trouble?

Looking at my system (see above), I've been trying things like this:

Code: Select all
hint.hdaa.4.nid31.config="as=15 seq=0 device=Speaker"
hint.hdaa.4.nid25.config="as=15 seq=15 device=Headphones"


but to no avail. If anyone else has any clues I'd be very grateful :)

sim

Looking at the [FILE]snd_hda[/FILE] output, it appears that [FILE]hdaa4[/FILE] is at [FILE]cad 0[/FILE] on [FILE]hdac 1[/FILE], so assuming I read this correctly, try:
Code: Select all
hint.hdac.1.cad0.nid31.config="as=2 seq=0 device=Speaker"
hint.hdac.1.cad0.nid25.config="as=2 seq=15 device=Headphones"
If that does not work, try (I did say that I might not have read it correctly, didn't I? :e)
Code: Select all
hint.hdac.0.cad1.nid31.config="as=2 seq=0 device=Speaker"
hint.hdac.0.cad1.nid25.config="as=2 seq=15 device=Headphones"
Also it would be helpful if you could post the section of output from [FILE]snd_hda[/FILE] related to associations. The section I am referring to will look something like this:
Code: Select all
hdac0: Association 0 (1) out:
     hdac0:   Pin nid=21 seq=0
     hdac0:   Pin nid=27 seq=15
     hdac0: Association 1 (2) out:
     hdac0:   Pin nid=20 seq=0
     hdac0: Association 2 (3) in:
     hdac0:   Pin nid=24 seq=0
     hdac0:   Pin nid=26 seq=1
     hdac0:   Pin nid=25 seq=15
Basically what we are trying to do here, is get both the integrated speakers and the line-out into the same association. We have to know the associations that the codec supports to do this. The sequence numbers mean: seq=0(stereo), and seq=15 when used in conjunction with type "Headphones", will duplicate with auto muting if supported.
ring_zero
Junior Member
 
Posts: 67
Joined: 31 Mar 2011, 05:07
Location: US

Postby sim » 15 Apr 2012, 22:32

Thanks for your help ring_zero, I really appreciate it.

I've tried both your suggested dev hints - the first resulted in no sound through either output, the second had sound through the speakers which muted when the headphones were plugged in (good) but the headphones didn't work.

Here is my verbose dmesg, grepped by 'hda', booting with your second dev hint suggestion:
http://pastebin.com/FbHGeyDq

If I understand correctly, you can see from this bit that the association '2' given in your second dev hint is apparently not being picked up:

Code: Select all
hdacc4: <Conexant CX20585 HDA CODEC> at cad 0 on hdac1
hdacc4: Root Node at nid=0: 2 subnodes 1-2
hdaa4: <Conexant CX20585 HDA CODEC Audio Function Group> at nid 1 on hdacc4
hdaa4: Audio Function Group at nid=1: 22 subnodes 16-37
hdaa4: NumGPIO=4 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa4:  GPIO0: disabled
hdaa4:  GPIO1: disabled
hdaa4:  GPIO2: disabled
hdaa4:  GPIO3: disabled
hdaa4: Original pins configuration:
hdaa4: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa4: 25 042110f0 15 0  Headphones    Jack  1/8     Right      Black   0
hdaa4: 26 61a190f0 15 0  Mic           None  1/8     Ext-Rear   Pink    0
hdaa4: 27 04a110f0 15 0  Mic           Jack  1/8     Right      Black   0
hdaa4: 28 612140f0 15 0  Headphones    None  1/8     Ext-Rear   Green   0
hdaa4: 29 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1
hdaa4: 30 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1
hdaa4: 31 901701f0 15 0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa4: 32 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1
hdaa4: 34 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1
hdaa4: 35 90a601f0 15 0  Mic           Fixed Digital Internal   Unknown 1
hdaa4: Patched pins configuration:
hdaa4: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa4: 25 042110f0 15 0  Headphones    Jack  1/8     Right      Black   0
hdaa4: 26 61a190f0 15 0  Mic           None  1/8     Ext-Rear   Pink    0 DISA
hdaa4: 27 04a110f0 15 0  Mic           Jack  1/8     Right      Black   0
hdaa4: 28 612140f0 15 0  Headphones    None  1/8     Ext-Rear   Green   0 DISA
hdaa4: 29 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1 DISA
hdaa4: 30 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1 DISA
hdaa4: 31 901701f0 15 0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa4: 32 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1 DISA
hdaa4: 34 40f001f0 15 0  Other         None  Unknown 0x00       Unknown 1 DISA
hdaa4: 35 90a601f0 15 0  Mic           Fixed Digital Internal   Unknown 1


It does look like it should be cad 0 on hdac1, as per your first suggestion:

Code: Select all
hdacc4: <Conexant CX20585 HDA CODEC> at cad 0 on hdac1
hdacc4: Root Node at nid=0: 2 subnodes 1-2
hdaa4: <Conexant CX20585 HDA CODEC Audio Function Group> at nid 1 on hdacc4
hdaa4: Audio Function Group at nid=1: 22 subnodes 16-37


However as I mentioned above this seemed to kill all output!

Anyway I'm still looking through the dmesg output for more clues - in the meantime if you have any more suggestions do let me know :)

Many thanks

sim
There's no place like ~
User avatar
sim
Member
 
Posts: 157
Joined: 18 Nov 2008, 16:01
Location: The Spacetime Continuum

Postby ring_zero » 16 Apr 2012, 00:28

Sim, from the looks of [FILE]dmesg[/FILE] you have five PCM devices, two of which are relevant to our discussion, [FILE]pcm4[/FILE] and [FILE]pcm5[/FILE]. Looking at [FILE]dmesg[/FILE] I see two things, nid 31 (the internal speakers) is located on [FILE]pcm4[/FILE] on [FILE]hdaa4[/FILE], and nid 25 (the headphones) is located on [FILE]pcm5[/FILE] on [FILE]hdaa4[/FILE]. So let's try to force them both into the same association "as=2", and hopefully the same device using:
Code: Select all
hint.hdaa.4.nid31.config="as=2 seq=0 device=Speaker"
hint.hdaa.4.nid25.config="as=2 seq=15 device=Headphones"
I realize that you have tried something similar to this before, but you were using:
Code: Select all
hint.hdaa.4.nid31.config="as=15 seq=0 device=Speaker"
hint.hdaa.4.nid25.config="as=15 seq=15 device=Headphones"
15 is a non-existent association. Sorry for all the running around, but I don't have a card this complex to test with. I would like to see the output of [CMD=" "]sysctl hw.snd.default_unit[/CMD] This could shed a little more light on things.
ring_zero
Junior Member
 
Posts: 67
Joined: 31 Mar 2011, 05:07
Location: US

Postby sim » 18 Apr 2012, 21:14

Give that man a beer! :beergrin

It's working! I restarted with the new device.hints and neither of the two outputs worked at all. I then checked the sysctrl as suggested, which I had previously forced to 5 so that at least the internal speakers worked. Switching this to 4 then magically made both outputs work as desired, with the speakers muting when the headphones are inserted. :)

A couple of tips for anyone else messing with this stuff in case it's not 100% obvious:

1) You have to reboot for a change to [FILE]/etc/device.hints[/FILE] to take effect.
2) If like me you're using something like Flash video / Youtube to test sound, changes to the sysctls don't apppear to take effect until you reload the media file (e.g. refresh the browser page).

Anyway, thanks once again for your help ring_zero :)

sim
There's no place like ~
User avatar
sim
Member
 
Posts: 157
Joined: 18 Nov 2008, 16:01
Location: The Spacetime Continuum

Postby ring_zero » 19 Apr 2012, 01:42

Any time. Glad to hear that it worked.
ring_zero
Junior Member
 
Posts: 67
Joined: 31 Mar 2011, 05:07
Location: US

Postby laufdi » 02 Aug 2012, 14:12

for a Thinkpad T510, I had to set [FILE]hw.snd.default_unit=5[/FILE]
Code: Select all
# cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm4: <Conexant CX20585 (Right Analog)> (play/rec)
pcm5: <Conexant CX20585 (Internal Analog)> (play/rec) default
laufdi
Junior Member
 
Posts: 67
Joined: 18 Jul 2009, 11:00


Return to Mobile Computing

Who is online

Users browsing this forum: No registered users and 0 guests