FBSD 8.2R does not probe sound card

Jeremy Chadwick freebsd at jdc.parodius.com
Fri Mar 18 17:22:52 UTC 2011


On Fri, Mar 18, 2011 at 11:45:49PM +0700, Gua Chung Lim wrote:
> Thank you for your kind responses.
> Though I don't understand much what you said,
> I shall give you further info.
> 
> > pcm1 device is the HDMI audio output on your graphics card.  My only 
> > suggestion here is to play with the sysctl hw.snd.default_unit:
> # tail -n 1 /etc/sysctl.conf
> hw.snd.default_unit=1
> (I left /boot/loader.conf untouched.)
> # shutdown -r now
> 
> after reboot
> # kldload snd_driver
> # sysctl -d hw.snd.default_unit
> hw.snd.default_unit: default sound device
> # sysctl hw.snd.default_unit
> hw.snd.default_unit: 0
> 
> The speakers are still quiet.
> I wonder why it is still 0, even if /etc/sysctl.conf set it to 1.

Because you're not thinking about the order of operation correctly.

1) The system boots up, with no knowledge of snd_driver
2) It tries to set hw.snd.default_unit=1, which fails (changes
   nothing) because that's a sysctl registered with snd_driver
   which isn't loaded yet
3) You manually "kldload snd_driver", which pulls in the driver-level
   sysctl default of 0 for hw.snd.default_unit.
4) You then wonder why hw.snd.default_unit isn't 1.

-- 
| Jeremy Chadwick                                   jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.               PGP 4BD6C0CB |



More information about the freebsd-stable mailing list