From owner-cvs-src-old@FreeBSD.ORG Tue Jun 7 17:02:13 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89A42106566B for ; Tue, 7 Jun 2011 17:02:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 78DCF8FC0A for ; Tue, 7 Jun 2011 17:02:13 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p57H2DLa011632 for ; Tue, 7 Jun 2011 17:02:13 GMT (envelope-from mav@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p57H2DRs011631 for cvs-src-old@freebsd.org; Tue, 7 Jun 2011 17:02:13 GMT (envelope-from mav@repoman.freebsd.org) Message-Id: <201106071702.p57H2DRs011631@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to mav@repoman.freebsd.org using -f From: Alexander Motin Date: Tue, 7 Jun 2011 17:01:52 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/sound/pcm sound.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2011 17:02:13 -0000 mav 2011-06-07 17:01:52 UTC FreeBSD src repository Modified files: sys/dev/sound/pcm sound.c Log: SVN rev 222826 on 2011-06-07 17:01:52Z by mav Make automatic hw.snd.default_unit choice a bit more intelligent. Instead of just setting it to the first registered device, reevaluate it for each device registered, trying to choose best candidate, unless one was forced. For now use such preference order: play&rec, play, rec. As side effect, this should workaround the situation when HDMI audio output of the video card, usually not connected to anything, becomes default, that requires manual user intervention to make sound working. If at some point this won't be enough, we can try to fetch some additional priority flags from the device driver. Revision Changes Path 1.126 +36 -18 src/sys/dev/sound/pcm/sound.c