Date: Sat, 3 Feb 2018 20:44:30 -0000 (UTC) From: Christian Weisgerber <naddy@mips.inka.de> To: freebsd-questions@freebsd.org Subject: How to set default pcm device? Message-ID: <slrnp7c7pe.13p.naddy@lorvorc.mips.inka.de>
next in thread | raw e-mail | index | archive | help
After boot, my /dev/sndstat looks like this: Installed devices: pcm0: <ATI R6xx (HDMI)> (play) pcm1: <Realtek ALC280 (Analog 2.0+HP/2.0)> (play/rec) default pcm2: <Realtek ALC280 (Rear Analog)> (play/rec) pcm3: <USB audio> (play) No devices installed from userspace. However, I would like the USB audio device, pcm3, to be the default sound unit. How do I set this persistently across reboots? The traditional solution was to set hw.snd.default_unit=3 in /boot/loader.conf. That worked for FreeBSD 10.x, but with 11.x the USB devices are attached very late and the boot loader setting (which I still have) is effectively ignored. Loading the uaudio module early with snd_uaudio_load=YES doesn't change this. Setting hw.snd.default_unit in /etc/sysctl.conf is unlikely to work either; certainly it's a race. Do I need to define a devd(8) action for when uaudio attaches or is there a better way? -- Christian "naddy" Weisgerber naddy@mips.inka.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?slrnp7c7pe.13p.naddy>