mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
The way a sound driver currently registers to sound(4) is using the
following sequence of function calls:
1. pcm_register() to initialize snddev_info.
2. pcm_addchan() calls to create the device's primary channels.
3. pcm_setstatus() to do the final setup.
While using 3 different functions in a specific order might not be very
elegant, this pattern cannot be easily avoided. However, pcm_register()
and pcm_setstatus() are especially confusing, since one would
intuitively expect:
1. pcm_register() to actually do the registration, as opposed to a basic
initialization.
2. pcm_setstatus() to, as the name suggests, set some kind of status, as
opposed to finalizing the registration.
This patch renames pcm_register() to pcm_init(), and pcm_setstatus() to
pcm_register(). Drivers are modified accordingly.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D47325
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| allwinner | ||
| altera/socfpga | ||
| annapurna/alpine | ||
| arm | ||
| broadcom/bcm2835 | ||
| conf | ||
| freescale | ||
| include | ||
| mv | ||
| nvidia | ||
| qemu | ||
| qualcomm | ||
| rockchip | ||
| ti | ||
| xilinx | ||