HomeFreeBSD

sound: Simplify channel creation and deletion process

Description

sound: Simplify channel creation and deletion process

Currently we create and destroy channels with the following consistent
pattern:

  • chn_init() -> pcm_chn_add()
  • pcm_chn_remove() -> chn_kill()

Instead of calling two separate functions, merge pcm_chn_add() with
chn_init(), and pcm_chn_remove() with chn_kill().

Another benefit of this change is that we avoid the confusion caused by
having pcm_chn_add(), as well as pcm_addchan().

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D46835

(cherry picked from commit 9263f854e9a63cc326a3d5f6331b933c4a010abf)

Details

Provenance
christosAuthored on Oct 18 2024, 8:40 AM
Reviewer
dev_submerge.ch
Differential Revision
D46835: sound: Simplify channel creation and deletion process
Parents
rG3b5b485d7436: sound: Remove useless newspd check in sysctl_dev_pcm_vchanrate()
Branches
Unknown
Tags
Unknown