1# Audio redirection 2notify 0 { 3 match "system" "SND"; 4 match "subsystem" "CONN"; 5 match "type" "IN"; 6 match "cdev" "dsp[0-9]+"; 7 8 # Other audio servers or device switching commands can be used here 9 # instead of virtual_oss(8). 10 action "/usr/sbin/virtual_oss_cmd \ 11 /dev/$(sysrc virtual_oss_default_control_device) -R /dev/$cdev"; 12}; 13 14notify 0 { 15 match "system" "SND"; 16 match "subsystem" "CONN"; 17 match "type" "OUT"; 18 match "cdev" "dsp[0-9]+"; 19 20 # See comment above. 21 action "/usr/sbin/virtual_oss_cmd \ 22 /dev/$(sysrc virtual_oss_default_control_device) -P /dev/$cdev"; 23}; 24 25notify 0 { 26 match "system" "SND"; 27 match "subsystem" "CONN"; 28 match "type" "NODEV"; 29 30 # No connected devices. Disable both recording and playback to avoid 31 # repeated virtual_oss error messages. 32 action "/usr/sbin/virtual_oss_cmd \ 33 /dev/$(sysrc virtual_oss_default_control_device) -f /dev/null"; 34}; 35