Page MenuHomeFreeBSD

sound: Improve /dev/sndstat channel info readability
ClosedPublic

Authored by christos on Oct 1 2024, 2:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 9:33 AM
Unknown Object (File)
Wed, Nov 13, 3:13 PM
Unknown Object (File)
Sun, Nov 10, 10:50 AM
Unknown Object (File)
Wed, Nov 6, 7:43 AM
Unknown Object (File)
Fri, Nov 1, 12:46 AM
Unknown Object (File)
Thu, Oct 31, 11:22 AM
Unknown Object (File)
Mon, Oct 21, 2:56 AM
Unknown Object (File)
Sun, Oct 20, 7:09 PM
Subscribers

Details

Summary

Sponsored by: The FreeBSD Foundation
MFC after: 2 days

Test Plan
# cat /dev/sndstat
FreeBSD Audio Driver
Installed devices:
pcm0: <Dummy Audio Device> on nexus0 (1p:1v/1r:1v) default
        snddev flags=0x2e6<AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
        [dsp0.play.0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
                interrupts 0, underruns 0, feed 0, ready 0
                [b:2048/1024/2|bs:2048/1024/2]
                channel flags=0x2100<BUSY,HAS_VCHAN>
                {userland} -> feeder_mixer(0x00200010) -> {hardware}
        dsp0.play.0[dsp0.virtual_play.0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
                interrupts 0, underruns 0, feed 0, ready 0
                [b:0/0/0|bs:0/0/0]
                channel flags=0x10000000<VIRTUAL>
                {userland} -> feeder_root(0x00000000) -> {dsp0.play.0}
        [dsp0.record.0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
                interrupts 0, overruns 0, feed 0, hfree 2048, sfree 2048
                [b:2048/1024/2|bs:2048/1024/2]
                channel flags=0x2100<BUSY,HAS_VCHAN>
                {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
        dsp0.record.0[dsp0.virtual_record.0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
                interrupts 0, overruns 0, feed 0, hfree 0, sfree 0
                [b:0/0/0|bs:0/0/0]
                channel flags=0x10000000<VIRTUAL>
                {dsp0.record.0} -> feeder_root(0x00000000) -> {userland}

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59955
Build 56840: arc lint + arc unit

Event Timeline

I'd recommend to add test plan to do a quick demonstration for the good effect of this change. Then it will help reviewing.

No objection from me, since those are verbose message that is mostly useful for debugging.

This revision is now accepted and ready to land.Oct 3 2024, 2:45 PM

I'd prefer a smaller indent, maybe 2 spaces instead of the 8 space standard tabs, also for the first indent level. As is, the lines regularly exceed 80 character screen width and break the visual indent with the overflow.
But this is already an improvement, thanks!

I'd prefer a smaller indent, maybe 2 spaces instead of the 8 space standard tabs, also for the first indent level. As is, the lines regularly exceed 80 character screen width and break the visual indent with the overflow.
But this is already an improvement, thanks!

The 80 characters will be easily exceeded by the feeder lines even with 2 spaces for all indent levels. I do not really have a big objection to using 2-space indentation, but I do think the 1-tab one looks cleaner.

I'd prefer a smaller indent, maybe 2 spaces instead of the 8 space standard tabs, also for the first indent level. As is, the lines regularly exceed 80 character screen width and break the visual indent with the overflow.
But this is already an improvement, thanks!

The 80 characters will be easily exceeded by the feeder lines even with 2 spaces for all indent levels. I do not really have a big objection to using 2-space indentation, but I do think the 1-tab one looks cleaner.

The feeder line may overflow anyway, true, depending on the number of stages. But currently already the interrupt / buffer line exceeds 80 characters, which hurts the visual perception of indenting. Maybe we could also put the buffer info on separate line, as an alternative.

christos retitled this revision from sound: Indent channel info lines for more readability to sound: Improve /dev/sndstat channel info readability.Oct 13 2024, 4:14 PM
christos edited the test plan for this revision. (Show Details)
This revision now requires review to proceed.Oct 13 2024, 4:14 PM

I suppose I'll never get used to 8-width indents ;-)
Anyway, for me this is good to go, thanks!

This revision is now accepted and ready to land.Oct 13 2024, 6:54 PM