Page MenuHomeFreeBSD

sound: Include sound(4) channel information in sndstat nvlist
ClosedPublic

Authored by christos on Jun 5 2024, 6:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 17, 1:47 PM
Unknown Object (File)
Oct 2 2024, 6:20 PM
Unknown Object (File)
Oct 2 2024, 1:55 PM
Unknown Object (File)
Sep 22 2024, 2:53 PM
Unknown Object (File)
Sep 9 2024, 4:27 PM
Unknown Object (File)
Sep 9 2024, 4:27 PM
Unknown Object (File)
Sep 9 2024, 1:42 AM
Unknown Object (File)
Sep 8 2024, 12:05 PM
Subscribers

Details

Summary

Extend SNDST_DSPS_PROVIDER_INFO for sound(4) to include information
about each channel in a given device, similar to how cat'ing
/dev/sndstat with hw.snd.verbose=2 works.

While here, document all provider_info fields.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Test Plan

Quick test program: P638
Test results: P639

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

share/man/man4/sndstat.4
166
184
194
196
sys/dev/sound/pcm/sndstat.c
465

We leak sb in this path. (But why not keep the sbuf on the stack?)

christos marked 5 inline comments as done.

Address Mark's comments.

Seems ok to me.

sys/dev/sound/pcm/sndstat.c
460

You don't need to check the return value here unless SBUF_NOWAIT was passed.

This revision is now accepted and ready to land.Jun 6 2024, 3:35 PM

I couldn't build the test program, missing some symbols like FreeBSD_nvlist_exists? How is an application supposed to consume this?

Apart from that it looks good to me.

I couldn't build the test program, missing some symbols like FreeBSD_nvlist_exists? How is an application supposed to consume this?

Apart from that it looks good to me.

Applications can consume this the same way they'd consume the rest of the nvlist. The OSS library I am creating is making use of some of these new fields (as well as some old ones) to fetch information that is not provided by the AUDIOINFO and ENGINEINFO ioctls.