Re: Missing magic in i915kms.ko?

From: Polytropon <freebsd_at_edvax.de>
Date: Wed, 01 May 2024 05:43:49 UTC
On Tue, 30 Apr 2024 12:49:16 -0400, Steven Friedrich wrote:
> I can use beep -d /dev/dsp0 or /dev/dsp1 and hear a sound at the rear or 
> fron audio jacks.
> 
> If I send the beep to /dev/dsp2, I hear nothing.
> 
> I believe there is missing magic in i915kms.ko that routes audio from 
> the video driver to the audio driver.

Don't confuse this audio with "normal" audio - this is the console
beep or flash, here specifically a NCurses thing; see "man beep"
for details.

The console beep is definitely not a good test for if audio works.



> Or perhaps I need a hint in 
> /boot/loader.conf or /boot/device.hints?

Possible. In /boot/loader.conf, you can set

	hw.snd.default_unit="1"

depending on your available outputs (several analog possible,
but also digital like HDMI audio).



> I am using the snd_hda.ko driver in FreeBSD-14p6.

That is correct. Check if it's working by

	$ cat /dev/sndstat

The following is IMPORTANT for testing:

Also make sure you have a simple but reliable (!) test setup.
Use some MP3 file and install something simple like madplay.
Use

	$ madplay testfile.mp3

to check audio output.

Also mind the mixers. Check them with

	$ mixer -f /dev/mixer0

and

	$ mixer -f /dev/mixer1
	$ mixer -f /dev/mixer2
	$ mixer -f /dev/mixer3

and so on, if you have them. See "man mixer" for details.



> I also have linuxkpi_hdmi.ko in kldstat.

Is that something Linux-specific?



> I can't find man pages describing these components.  There are man pages 
> for drm and drm-kms, but they don't contain magic, like loader settings 
> or device hints.

With

	$ sysctl -aod | grep "snd"

you can get some information related to sound. Otherwise, see
the manpage for your audio driver which contains all the tunables
it has. Also see "man pcm", it contains a lot of those.



> I haven't been able to get sound from FreeBSD on this system for years.  
> Linux Mint, KDE Neon, and Ubuntu 24.04  DO deliver sound to the hdmi/dp 
> port.

If you're using HDMI, make sure that it is set as the default
unit (see above), or otherwise you will only get audio through
the speakers or 3.5mm connectors (whatever your system provides).
Why do I know? Because I "recently discovered" this fact on a
HP mini laptop... ;-)






-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...