]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sound: Simplify unit fetching in dsp_oss_audioinfo()
authorChristos Margiolis <christos@FreeBSD.org>
Thu, 18 Apr 2024 20:35:20 +0000 (22:35 +0200)
committerChristos Margiolis <christos@FreeBSD.org>
Thu, 18 Apr 2024 20:35:41 +0000 (22:35 +0200)
commita44c45c7f597d67d37e09396b0778a2847a30981
tree019b3892a24cc8e0e644f899d98d464fb22a51a6
parent8b97dce6973ca1b6c3407c34c76d459f43ca1061
sound: Simplify unit fetching in dsp_oss_audioinfo()

"i" keeps the value of the current unit, so we do not have to call
PCMUNIT() and device_get_unit() to fetch it.

In the mixer case, I think it is more correct to do it like this, since
mixer and DSP device units have a 1-1 relationship (i.e the mixer unit
is always the same as the corresponding DSP device one) and that way we
can make it more clear.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44855
sys/dev/sound/pcm/dsp.c