HomeFreeBSD

sound: Improve simplex handling in dsp_open()

Description

sound: Improve simplex handling in dsp_open()

If we are in simplex mode, make sure we do not open in both directions
(read/write) and also that we do not open in a direction opposite of
what is already opened. For example, if the device is already doing
playback, we cannot open the device for recording at the same time, and
vice-versa.

While here, remove dsp_cdevpriv->simplex as it's no longer needed.

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

Details

Provenance
christosAuthored on Jul 6 2024, 6:22 PM
Reviewer
dev_submerge.ch
Differential Revision
D45835: sound: Improve simplex handling in dsp_open()
Parents
rG46e92a41cb53: sound: Simplify getchns()
Branches
Unknown
Tags
Unknown