SD_F_BUSY was essentially a custom sleepable lock, which was invisible
to WITNESS. Replace it with an sx lock. This simplifies and removes some
of the PCM macros, and gives us WITNESS coverage.
PCM_WAIT(), PCM_ACQUIRE() and PCM_RELEASE() all asserted that PCM_LOCK
is held, which forced callers to take the mutex just to use the macros.
chn_vpc_proc() and sysctl_hw_snd_feeder_rate_quality() are two such
callers. Simplify this.
Changes to snddev_info->flags are now serialized by the sx alone, which
makes the protocol uniform. Previously some writers held the busy flag,
some held busy and the mutex, and others just the mutex.
snddev_info->eqpreamp was consistent, but its only writer held the mutex
needlessly, so drop that too. Document this above the sx definition in
sound.h, and assert the flags protocol in pcm_setflags().
Name both locks after what they are rather than after the device unit,
so they are distinguishable in WITNESS.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation