Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2008 14:10:05 +0200
From:      Aragon Gouveia <aragon@phat.za.net>
To:        freebsd-multimedia@freebsd.org
Subject:   Handling of newly attached pcm devices (eg. via uaudio)
Message-ID:  <20080131121005.GA62806@phat.za.net>

next in thread | raw e-mail | index | archive | help
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 expect
(or hope!) for my system to use it when it's plugged in, but use the onboard
sound when it is unplugged.

On FreeBSD 7 I used to set hw.snd.default_unit to 1 (from 0) after plugging
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 the
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?


Thanks,
Aragon



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