Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jun 2011 19:47:16 -0400
From:      Skip Ford <skipford9@gmail.com>
To:        Alexander Motin <mav@FreeBSD.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, Hans Petter Selasky <hselasky@c2i.net>
Subject:   Re: svn commit: r222826 - head/sys/dev/sound/pcm
Message-ID:  <20110607234715.GA62676@ws.menantico.com>
In-Reply-To: <4DEE6434.5030406@FreeBSD.org>
References:  <201106071701.p57H1qvN092370@svn.freebsd.org> <201106071930.49724.hselasky@c2i.net> <4DEE6434.5030406@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 07, 2011 at 08:47:32PM +0300, Alexander Motin wrote:
> 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".

I switch back and forth between a soundcard and wireless headphones, and
have always felt that the sysctl is misnamed.  It really acts as a
combination of default_unit and current_unit.

If I set the default_unit to my wireless headphones, then unplug the usb
dongle, the kernel changes my default_unit setting since my preferred
device disappears.  The kernel changing my default setting is contrary
to what I'd expect.

It would seem more natural if the kernel maintained its own
currently_active_unit variable and just used default_unit as a hint for
when to switch back and forth.  Just feels like it shouldn't overwrite,
and lose, a setting that I've specified.

-- 
Skip



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110607234715.GA62676>