No sound in 11.2, is there per chance an AMD FreeBSD sound driver?

fusion809

Member


Messages: 24

Hi,

Sound doesn't work on my FreeBSD 11.2 desktop; I'm presently typing this from openSUSE Tumbleweed (Linux) on the same PC so here's the output of lspci: https://paste.pound-python.org/show/NLhG3d7cKqTCKqlDGqxz/. If I run
Code:
lspci | grep -i audio
(which I'm running to give what I think is relevant in that lspci output) I get:

Code:
1f:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
21:00.3 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller
I have tried building my kernel with snd_hda built-in (after which I've rebooted, of course) but as my audio cards aren't Intel it doesn't seem to be working, or so I would imagine. I've also tried loading snd_driver per https://www.freebsd.org/doc/handbook/sound-setup.html, along with building my kernel with sound, and_sbc, snd_sb16 built in. Also tried adding:

Code:
hint.sbc.0.at="isa"
hint.sbc.0.port="0x220"
hint.sbc.0.irq="5"
hint.sbc.0.drq="1"
hint.sbc.0.flags="0x15"
to my /boot/device.hints just in case (I didn't understand what the handbook meant reading I/O and alike, so I thought let's see what happens if I do in fact do that, although I have tried without with the same result) and still no audio.

Code:
dmesg | grep pcm
returns:

Code:
pcm0: <NVIDIA (0x0080) (HDMI/DP 8ch)> at nid 4 on hdaa0
pcm1: <NVIDIA (0x0080) (HDMI/DP 8ch)> at nid 5 on hdaa0
pcm2: <NVIDIA (0x0080) (HDMI/DP 8ch)> at nid 6 on hdaa0
pcm3: <Realtek ALC892 (Rear Analog)> at nid 20 and 24,26 on hdaa1
pcm4: <Realtek ALC892 (Front Analog)> at nid 27 and 25 on hdaa1
likewise
Code:
cat /dev/sndstat
returns:

Code:
Installed devices:
pcm0: <NVIDIA (0x0080) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0080) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0080) (HDMI/DP 8ch)> (play)
pcm3: <Realtek ALC892 (Rear Analog)> (play/rec) default
pcm4: <Realtek ALC892 (Front Analog)> (play/rec)
No devices installed from userspace.
I've also tried changing the default sound device with
Code:
sysctl hw.snd.defaultl.unit=4
. as well as 2 and still no audio.

The funny thing is that under Linux audio runs fine and here's a snippet of lspci -k that seems relevant:

Code:
1f:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device 862a
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
21:00.3 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller
        DeviceName: Realtek ALC898
        Subsystem: Micro-Star International Co., Ltd. [MSI] Device eb90
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
as you can see Intel modules are in use and they're running fine. If it is relevant I have x11/nvidia-driver installed too and graphics are working fine. Any ideas what I should do folks?

Thanks for your time and patience,
Brenton
 
OP
fusion809

fusion809

Member


Messages: 24

Oh and I should say alsamixer doesn't show any sound cards when I press F6. Here's a screenshot showing you what I mean:


Now that I'm back on FreeBSD I might as well also give you pciconf -lv: https://gist.github.com/4081061e14978cd234945cac807d6032. If it is relevant I use headphones to listen to audio, as my desktop has no speakers, internal or external.
 

ShelLuser

Son of Beastie

Reaction score: 1,812
Messages: 3,600

What happens if you try to use the snd_driver.ko kernel module? So: boot a GENERIC kernel, or at least a kernel which provides all the sound drivers, and then use # kldload snd_driver, see also chapter 7.2 of the FreeBSD handbook.
 
OP
fusion809

fusion809

Member


Messages: 24

I've edited my original post a bit mate since you must of read it, please re-read and it'll answer your excellent question.
 

ShelLuser

Son of Beastie

Reaction score: 1,812
Messages: 3,600

I've edited my original post a bit mate since you must of read it, please re-read and it'll answer your excellent question.
Yet it doesn't really answer my question.

You share a lot of output yet fail to mention any further details about it. In this case you mention that you used the generic sound driver but not what happened afterwards, and "it doesn't work" doesn't really tell us much. The key to solving stuff like this is to try and rule out possible issues by trying things one at a time.

Anyway, you obviously use a custom kernel; what happens when you try using a GENERIC one? See, some comments don't make much sense to me: you said you tried to embed snd_hda how would you do that?

Another thing: what sound card do you actually use? You said it's not Intel but what is it? I assume an embedded card on your motherboard or... if so: what motherboard?

(edit)

What happens if you run mixer from the commandline (/usr/sbin/mixer)?
 
OP
fusion809

fusion809

Member


Messages: 24

I didn't say my sound card was Intel, I said the drivers Linux used were Intel. As you can see in the output there seems to be AMD and NVIDIA sound cards. When I used the GENERIC one it was the same, no sound, including when I inserted these modules with kldload. By 'doesn't work' I mean exactly what it sounds like, when I go to YouTube and play something I know has sound (e.g. a music video) no sound is heard. Likewise when I play a mp4 file in VLC that I know has sound I get no sound. Alsamixer also doesn't register the sound card after I do this when I say "It doesn't work". Mixer hasn't helped either as still there is no sound, but if the output helps here it is:

Code:
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Oh I built my kernel with it by adding:
Code:
device snd_hda
to /usr/src/sys/amd64/conf/MYKERNEL then rebuilding the kernel (with make buildkernel KERNCONF=MYKERNEL) and reinstalling it (make installkernel KERNCONF=MYKERNEL), which is what the handbook says.

Oh and yes the sound card is embedded into my motherboard, or so I believe (I don't usually tinker with the hardware), which is a MSI B450M Bazooka Plus.

The precise make of the cards are listed in the lspci output.

Code:
1f:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
...
21:00.3 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller
Sorry mate for being unclear when I gave that output, as I was trying to give you all the details needed to help me. Clearly I somehow failed there. I shall try to be more helpful and clear in the future :).
 

chrbr

Aspiring Daemon

Reaction score: 298
Messages: 762

I've also tried changing the default sound device with
Code:
sysctl hw.snd.defaultl.unit=4
. as well as 2 and still no audio.
May be this it just a typo in the post, it should be
Code:
sysctl hw.snd.default_unit=4
or any other card number instead. May be it helps. May be not.
 
OP
fusion809

fusion809

Member


Messages: 24

Yep it was, sorry, I used the correct code you just provided, I was just typing this post quickly as I was trying to finish editing my post before more people saw it in its incomplete state.
 
Top