Page MenuHomeFreeBSD

sound: Fix VCHANs' starting and ending points in feeder chain
ClosedPublic

Authored by christos on Jul 29 2024, 4:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 23, 5:00 AM
Unknown Object (File)
Fri, Oct 18, 5:29 PM
Unknown Object (File)
Fri, Oct 18, 3:16 AM
Unknown Object (File)
Oct 12 2024, 7:02 AM
Unknown Object (File)
Oct 8 2024, 8:17 AM
Unknown Object (File)
Oct 2 2024, 8:31 AM
Unknown Object (File)
Oct 1 2024, 5:22 AM
Unknown Object (File)
Sep 30 2024, 11:02 PM
Subscribers

Details

Summary

sndstat(4) falsely reports "hardware" as the starting point of
recording, and ending point of playback VCHANs. Recording VCHANs get
their input from the physical recording channel, and playback VCHANs
send their input to the physical playback channel.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days

Test Plan
pcm0:play:dsp0.p0[pcm0:virtual_play:dsp0.vp0]: 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) -> {pcm0:play:dsp0.p0}
...
pcm0:record:dsp0.r0[pcm0:virtual_record:dsp0.vr0]: 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>
{pcm0:record:dsp0.r0} -> feeder_root(0x00000000) -> {userland}

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Jul 29 2024, 4:18 PM

Good one, that was always a source of confusion.
What about the recording vchans? Would it be possible to print the primary recording channel as source there?

Good one, that was always a source of confusion.
What about the recording vchans? Would it be possible to print the primary recording channel as source there?

Yes. I had the patch written already to be submitted today, but I think it's better to just merge them into a single patch. I'll update the diff shortly.

christos retitled this revision from sound: Fix playback VCHANs' ending point in feeder chain to sound: Fix VCHANs' starting and ending points in feeder chain.Jul 30 2024, 6:33 AM
christos edited the summary of this revision. (Show Details)
christos edited the test plan for this revision. (Show Details)

Fix recording VCHANs as well.

This revision now requires review to proceed.Jul 30 2024, 6:34 AM

Nice!
Just a nitpick on the commit message, I think "primary" channel would be more understandable than "physical" here.

This revision is now accepted and ready to land.Jul 31 2024, 11:00 AM