pass parameter to kernel module

I need to pass the following parameter to the snd_hda module in order to allow correct headphone support: model=fujitsu-pi2515

(Linux: /etc/modprobe.d/sound:
options snd-hda-intel model=fujitsu-pi2515) works

(FreeBSD: /boot/loader.conf
snd_hda_flags="model=fujitsu-pi2515") does not work

anything wrong in here?
 
kldload, kldunload and kldstat are the tools similar to linux' insmod, lsmod etc.
 
estellnb said:
How can I force a module reloading that takes device.hints into account without having to reboot?

You can't (i think), device.hints is read by the loader at boot time. For the verbose mode, put boot_verbose="YES" in /boot/loader.conf

What is the problem with snd_hda? You can start with the current version of snd_hda (just copy the /sys/dev/sound/pci/hda directory from FreeBSD-Current and rebuild the module).
 
You may need to update your src tree..

From /usr/src/UPDATING:
20090107:
snd_hda(4) driver was updated to version 20081226_0122.

Due to added HDMI audio and logical audio devices support, updated
driver often provides several PCM devices. In some cases it can make
system default audio device no longer correspond to the users's
habbitual audio connectors. In such cases wanted device can be
specified in audio application setup or defined globally via
hw.snd.default_unit sysctl according to sound(4) and snd_hda(4)
man pages.
 
The thing here is simply that the main speaker should be turned off if the headphones are plugged in. Under Linux there are two different volume control panels for the headphones and the main speaker. To achieve both (mainspeaker turned off, headphone volume control used) it is necessary to reconfigure the pins by specifying the given model id.
 
snd_hda pin configuration

estellnb said:
The thing here is simply that the main speaker should be turned off if the headphones are plugged in. Under Linux there are two different volume control panels for the headphones and the main speaker. To achieve both (mainspeaker turned off, headphone volume control used) it is necessary to reconfigure the pins by specifying the given model id.

Ok. You may need to associate the headphone pin to the speaker. So the driver will mute the speaker.

The man page of snd_hda explains this:
The sequence number 15 has a special meaning for output associations. Output pins with this number and device type ``Headphones'' will duplicate (with automatic mute if jack detection is supported) the first pin in that association.

By instance I've got on my laptop:
Code:
hdac0:  nid 20 0x90100140 as  4 seq  0       Speaker Fixed jack  0 loc 16 color Unknown misc 1
hdac0:  nid 21 0x012b4050 as  5 seq  0    Headphones  Jack jack 11 loc  1 color   Green misc 0

To make the auto mute works, The headphone pin must be associate with the as '4' (the as of the speaker pin) with the sequence '15'). So I must add a quirk like:
Code:
hint.hdac.0.cad0.nid21.config="as=4 seq=15"

But be sure to have the latest version of the snd_hda driver.

Put somewhere the output of snd_hda and pcm in verbose mode if you need more help.
 
Unfortunately simply adding
Code:
hint.hdac.0.cad0.nid21.config="as=4 seq=15"
seems to have no effect.
Unfortunately I do not understand what the 'nid', 'as' and 'seq' parameters are ment to be for.
 
freshen snd_hda kernel module

How should I freshen the snd_hda kernel module?
/usr/src/sys/modules/sound/driver/hda solely contains a single Makefile which has not been updated in the HEAD release.
 
OK; that is done:
Code:
cd /sys/modules
mv sound sound-old
svn co [url]http://svn.freebsd.org/base/head/sys/modules/sound[/url]
cd /sys/dev
mv sound sound-old
svn co [url]http://svn.freebsd.org/base/head/sys/dev/sound[/url]
cd /sys/modules/sound/driver/hda
make depend all install  (make depend; make all; make install;)
 
Back
Top