HomeFreeBSD

sound: Get rid of snddev_info->devcount

Description

sound: Get rid of snddev_info->devcount

snddev_info->devcount keeps track of the total number of channels for a
given device. However, it is redundant to have it, since it is only used
in sound_oss_sysinfo() to populate the "numaudios" field, and we also
keep track of the channel counts in the playcount, pvchancount, reccount
and rvchancount fields anyway. We can simply sum those fields together
instead of updating a separate variable upon every channel
addition/deletion.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44852

Details

Provenance
christosAuthored on Apr 18 2024, 8:35 PM
Reviewer
markj
Differential Revision
D44852: sound: Get rid of snddev_info->devcount
Parents
rG41ab202ff74e: sound: Call device_get_name() and device_get_unit() only once in mixer_init()
Branches
Unknown
Tags
Unknown