From owner-svn-src-all@FreeBSD.ORG Tue Jun 7 17:48:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A08C2106566C; Tue, 7 Jun 2011 17:48:16 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id BD87E8FC0C; Tue, 7 Jun 2011 17:48:15 +0000 (UTC) Received: by bwz12 with SMTP id 12so6629981bwz.13 for ; Tue, 07 Jun 2011 10:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=70fUFSZF/8bmsHrqztW7KYuLMU5ZfgVImC/0b1+0DOg=; b=iDIFTMlsbmuMWX0EiBhDSMu8qwDlHLN4GFHfqPc5hM0dZo6LlKgWABf7aaDe8yPHsO VGdrTxMyGEbtDabNUVtKMEJmi+pKSb8y/fC+4VKpHZRHrgWSVOBgpId8a0oCTaYM9M2k YuhH6UqnwaKtLvzywlluDRdViZ05QNpZ4/N/Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=H78MRvEFN1YbKv98CB5O40t6IFtB1pwRomi44mg8CMJTX6b8CuCUxnLS5tC6TXpwJ5 EcnHpz2lPNlthyznvjX0J5BH7V22QZwaBVkJmQf2YLInTxCLdUdfH01JlVPKVsHFozC3 dRrVV0Cc063fMnLLUIHcMd8PTr9PTkK7GB+bI= Received: by 10.204.151.204 with SMTP id d12mr568999bkw.127.1307468894510; Tue, 07 Jun 2011 10:48:14 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id j7sm820464bka.20.2011.06.07.10.48.12 (version=SSLv3 cipher=OTHER); Tue, 07 Jun 2011 10:48:13 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DEE6434.5030406@FreeBSD.org> Date: Tue, 07 Jun 2011 20:47:32 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Hans Petter Selasky References: <201106071701.p57H1qvN092370@svn.freebsd.org> <201106071930.49724.hselasky@c2i.net> In-Reply-To: <201106071930.49724.hselasky@c2i.net> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r222826 - head/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2011 17:48:16 -0000 Hans Petter Selasky wrote: > On Tuesday 07 June 2011 19:01:52 Alexander Motin wrote: >> Author: mav >> Date: Tue Jun 7 17:01:52 2011 >> New Revision: 222826 >> URL: http://svn.freebsd.org/changeset/base/222826 >> >> Log: >> 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. > > Idea: I would be cool if some GTK mixer apps can set this value. Definitely. This patch only tries to set more or less reasonable initial default, which later may need to be tuned. I am personally using two different playback devices depending on situation: digital (SPDIF) pcm1 at home and analog pcm0 when out. Now I am switching it via sysctl, but obviously it is not the "right way". -- Alexander Motin