Date: Thu, 31 Jan 2008 14:19:03 +0100 From: Alexander Leidinger <Alexander@Leidinger.net> To: Aragon Gouveia <aragon@phat.za.net> Cc: freebsd-multimedia@freebsd.org Subject: Re: Handling of newly attached pcm devices (eg. via uaudio) Message-ID: <20080131141903.q3lw3nsqf44c0cwg@webmail.leidinger.net> In-Reply-To: <20080131121005.GA62806@phat.za.net> References: <20080131121005.GA62806@phat.za.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Aragon Gouveia <aragon@phat.za.net> (from Thu, 31 Jan 2008 =20 14:10:05 +0200): > Hi, > > On my FreeBSD workstations I frequently use a USB sound device (headphone > amplifier). I typically plug it in and out only when I need it, and expec= t > (or hope!) for my system to use it when it's plugged in, but use the onboa= rd > sound when it is unplugged. > > On FreeBSD 7 I used to set hw.snd.default_unit to 1 (from 0) after pluggin= g > the device in and then set the mixer levels to how I want them. I've > subsequently automated this ala devd and a shell script to do precisely th= e > same thing, except the shell script also calls /etc/rc.d/mixer to restore > the saved mixer settings in /var/db. > > I would like to PR my work in the hope of someone committing it as I think > it might be useful to others. What are people's opinions of this idea, > in particular setting hw.snd.default_unit to make a newly plugged sound > device the default? Can anyone think of a better way to handle newly > attached sound hardware? Not commenting on the fact if this handling itself is ok or not (I =20 have no strong opinion about it), but it should at least be not =20 activated by default. So whatever you submit as a PR should contain =20 something which has a look at rc.conf (and the other config files) and =20 only do something if it is explicitly activated there. It should also =20 be able to not fail if the attached device is the only sound device =20 (so on removal of the only sound device, it should not fall on the =20 nose or spit out a lot of messages). Bye, Alexander. --=20 Why do they call a fast a fast, when it goes so slow? http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080131141903.q3lw3nsqf44c0cwg>