Date: Fri, 22 Jan 2010 11:30:32 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r202800 - stable/8/sys/dev/sound/pcm Message-ID: <201001221130.o0MBUWaw055104@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Fri Jan 22 11:30:32 2010 New Revision: 202800 URL: http://svn.freebsd.org/changeset/base/202800 Log: MFC r202166: Make default recording source choosing more intelligent. Change default recording level from 0 to 75. It should increase chances for things to work just out of the box. Modified: stable/8/sys/dev/sound/pcm/mixer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pcm/mixer.c ============================================================================== --- stable/8/sys/dev/sound/pcm/mixer.c Fri Jan 22 11:16:46 2010 (r202799) +++ stable/8/sys/dev/sound/pcm/mixer.c Fri Jan 22 11:30:32 2010 (r202800) @@ -87,7 +87,7 @@ static u_int16_t snd_mixerdefaults[SOUND [SOUND_MIXER_IGAIN] = 0, [SOUND_MIXER_LINE1] = 75, [SOUND_MIXER_VIDEO] = 75, - [SOUND_MIXER_RECLEV] = 0, + [SOUND_MIXER_RECLEV] = 75, [SOUND_MIXER_OGAIN] = 50, [SOUND_MIXER_MONITOR] = 75, }; @@ -352,7 +352,13 @@ mixer_setrecsrc(struct snd_mixer *mixer, dropmtx = 0; src &= mixer->recdevs; if (src == 0) - src = SOUND_MASK_MIC; + src = mixer->recdevs & SOUND_MASK_MIC; + if (src == 0) + src = mixer->recdevs & SOUND_MASK_MONITOR; + if (src == 0) + src = mixer->recdevs & SOUND_MASK_LINE; + if (src == 0 && mixer->recdevs != 0) + src = (1 << (ffs(mixer->recdevs) - 1)); /* It is safe to drop this mutex due to Giant. */ MIXER_SET_UNLOCK(mixer, dropmtx); recsrc = MIXER_SETRECSRC(mixer, src); @@ -716,7 +722,7 @@ mixer_init(device_t dev, kobj_class_t cl mixer_set(m, i, v | (v << 8)); } - mixer_setrecsrc(m, SOUND_MASK_MIC); + mixer_setrecsrc(m, 0); /* Set default input. */ unit = device_get_unit(dev); devunit = snd_mkunit(unit, SND_DEV_CTL, 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001221130.o0MBUWaw055104>