Page MenuHomeFreeBSD

christos (Christos Margiolis)
User

Projects

User Details

User Since
Jul 2 2021, 4:03 PM (263 w, 3 d)

Recent Activity

Wed, Jul 15

christos committed rG6d66485276cb: sound: Remove dead code in dsp_ioctl() (authored by christos).
sound: Remove dead code in dsp_ioctl()
Wed, Jul 15, 8:16 AM
christos committed rG896f9ba7d4cc: sound: Pass format and speed as arguments to sndbuf_create() (authored by christos).
sound: Pass format and speed as arguments to sndbuf_create()
Wed, Jul 15, 8:16 AM

Tue, Jul 14

christos committed rG954001a9dd36: snd_uaudio: Initialize mixer_lock with MTX_RECURSE (authored by christos).
snd_uaudio: Initialize mixer_lock with MTX_RECURSE
Tue, Jul 14, 9:18 PM
christos closed D58022: Status/2026Q2/audio.adoc: Add report.
Tue, Jul 14, 1:54 PM
christos committed R9:a5a20544a369: Status/2026Q2/audio.adoc: Add report (authored by christos).
Status/2026Q2/audio.adoc: Add report
Tue, Jul 14, 1:54 PM
christos committed rGa619438615fb: sound: track kqueue low watermark per-knote for mmaped channels (authored by meka_tilda.center).
sound: track kqueue low watermark per-knote for mmaped channels
Tue, Jul 14, 1:53 PM

Fri, Jul 10

christos added a comment to D58064: sound: Scale PCM secondary buffers by byte rate.

This looks good. The only thing I am still skeptical about are the various casts you've introduced, not sure if they are needed. I will be testing the patch as well.

Fri, Jul 10, 2:03 PM

Thu, Jul 9

christos added inline comments to D58064: sound: Scale PCM secondary buffers by byte rate.
Thu, Jul 9, 11:24 AM

Wed, Jul 8

christos committed rG815dc35b7b5e: sound: Pass format and speed as arguments to sndbuf_create() (authored by christos).
sound: Pass format and speed as arguments to sndbuf_create()
Wed, Jul 8, 6:20 PM
christos committed rG69c4e2b68a58: sound: Remove dead code in dsp_ioctl() (authored by christos).
sound: Remove dead code in dsp_ioctl()
Wed, Jul 8, 6:13 PM
christos added inline comments to D58064: sound: Scale PCM secondary buffers by byte rate.
Wed, Jul 8, 5:44 PM

Tue, Jul 7

christos added inline comments to D58064: sound: Scale PCM secondary buffers by byte rate.
Tue, Jul 7, 5:08 PM

Mon, Jul 6

christos committed rG24576c39789c: sound: track kqueue low watermark per-knote for mmaped channels (authored by meka_tilda.center).
sound: track kqueue low watermark per-knote for mmaped channels
Mon, Jul 6, 12:08 PM
christos closed D57833: sound: track kqueue low watermark per-knote for mmaped channels.
Mon, Jul 6, 12:08 PM
christos accepted D57833: sound: track kqueue low watermark per-knote for mmaped channels.
Mon, Jul 6, 12:05 PM

Sat, Jul 4

christos committed rGfdaee441eb5f: snd_dummy: advance pointers for both channels (authored by meka_tilda.center).
snd_dummy: advance pointers for both channels
Sat, Jul 4, 9:38 AM
christos committed rGb2ee6be16f79: sound: Use sx_assert instead of KASSERT(sx_xlocked()) (authored by christos).
sound: Use sx_assert instead of KASSERT(sx_xlocked())
Sat, Jul 4, 9:37 AM

Fri, Jul 3

christos requested review of D58022: Status/2026Q2/audio.adoc: Add report.
Fri, Jul 3, 1:44 PM
christos added inline comments to D57833: sound: track kqueue low watermark per-knote for mmaped channels.
Fri, Jul 3, 1:16 PM

Thu, Jul 2

christos accepted D57979: dtrace: Fix DOF section-specific validation.
Thu, Jul 2, 3:38 PM
christos accepted D57977: dtrace: Improve DOF string table validation.
Thu, Jul 2, 3:37 PM
christos accepted D57976: dtrace: Fix DOF section bounds validation.
Thu, Jul 2, 3:37 PM
christos accepted D57975: dtrace: Improve DOF section size validation.
Thu, Jul 2, 3:35 PM
christos accepted D57833: sound: track kqueue low watermark per-knote for mmaped channels.
Thu, Jul 2, 3:32 PM
christos committed rG5cac86f12e0c: sound: Rename SD_F_EQ_ENABLED to SD_F_EQ (authored by christos).
sound: Rename SD_F_EQ_ENABLED to SD_F_EQ
Thu, Jul 2, 12:58 PM
christos committed rG8163944f2739: sound: Retire unused SD_F_EQ_PC (authored by christos).
sound: Retire unused SD_F_EQ_PC
Thu, Jul 2, 12:58 PM

Tue, Jun 30

christos added a comment to D57833: sound: track kqueue low watermark per-knote for mmaped channels.

Before I do that, let's get the code in perfect shape. I mean, should I change chn_polltrigger and chn_pollreset to handle mmap or should I leave it as it is now?

Tue, Jun 30, 9:41 AM
christos committed rGa751490f5bf7: sound: Adjust mmap example to use kqueue (authored by meka_tilda.center).
sound: Adjust mmap example to use kqueue
Tue, Jun 30, 6:25 AM
christos committed rG5347284ba90f: sound: Include more information in kevent returned from the kernel (authored by meka_tilda.center).
sound: Include more information in kevent returned from the kernel
Tue, Jun 30, 6:25 AM
christos committed rG0665d5b9d38a: sound: Start each channel individually (authored by meka_tilda.center).
sound: Start each channel individually
Tue, Jun 30, 6:25 AM

Mon, Jun 29

christos added a comment to D57833: sound: track kqueue low watermark per-knote for mmaped channels.

It's not about mmap, it's about kqueue. Look at the following code:

if (bs->prev_total < c->lw)
    delta = c->lw;
else
    delta = bs->total - bs->prev_total;

For this to report discrete events, prev_total must be reset to total after each firing. The select/poll path does exactly that inside chn_poll():

if (chn_polltrigger(c)) {
    chn_pollreset(c);
    ...
}

Kqueue cannot safely use that same per-channel reset for two reasons:

  1. Activation/delivery race. If you reset prev_total inside dsp_kqevent() when KNOTE_LOCKED activates the knote, the event has not yet been delivered to userland. The next interrupt runs kn_scan() again, sees total - prev_total < lw, and drops the event.
  2. Multiple knotes on one channel share prev_total. If two kevent registrations are watching the same channel, resetting prev_total for one knote prevents the other from ever seeing its own low-watermark edge.

So chn_polltrigger()'s mmap logic is correct, but it needs a per-caller counter. Select/poll uses the single per-channel prev_total because each poll call is a fresh, one-shot evaluation. Kqueue needs a separate counter per knote, which is kn_sdata.

Mon, Jun 29, 8:01 AM

Sat, Jun 27

christos committed rG72acd1720af3: sound: Use sx_assert instead of KASSERT(sx_xlocked()) (authored by christos).
sound: Use sx_assert instead of KASSERT(sx_xlocked())
Sat, Jun 27, 2:28 PM
christos committed rG968e748c439a: snd_dummy: advance pointers for both channels (authored by meka_tilda.center).
snd_dummy: advance pointers for both channels
Sat, Jun 27, 1:43 PM
christos closed D57834: snd_dummy: advance pointers for both channels.
Sat, Jun 27, 1:42 PM
christos added a comment to D57833: sound: track kqueue low watermark per-knote for mmaped channels.

chn_polltrigger() has a case for CHN_F_MMAP, isn't it enough? And if not, why?

Sat, Jun 27, 1:40 PM
christos committed rG9707d9f01e5c: sound tests: Add PROT_EXEC rejection test (authored by christos).
sound tests: Add PROT_EXEC rejection test
Sat, Jun 27, 9:56 AM
christos committed rG0f4aac7ed5ae: sound: Handle CHN_F_MMAP_INVALID after cdev_pager_allocate() (authored by christos).
sound: Handle CHN_F_MMAP_INVALID after cdev_pager_allocate()
Sat, Jun 27, 9:56 AM
christos committed rGf3d461cf3220: sound: Re-arrange a calculation in dsp_mmap_single() (authored by christos).
sound: Re-arrange a calculation in dsp_mmap_single()
Sat, Jun 27, 9:56 AM
christos committed rG2c21445c6cbb: sound: Use and lock only the appropriate channel in dsp_mmap_single() (authored by christos).
sound: Use and lock only the appropriate channel in dsp_mmap_single()
Sat, Jun 27, 9:56 AM
christos committed rGe9df33a044ec: sound: Retire SD_F_VPC and related settings (authored by christos).
sound: Retire SD_F_VPC and related settings
Sat, Jun 27, 9:56 AM

Thu, Jun 25

christos added a comment to D57327: packages/sound: Add dependency on bsdconfig.

Bump.

Thu, Jun 25, 12:27 PM
christos accepted D57834: snd_dummy: advance pointers for both channels.
Thu, Jun 25, 12:20 PM
christos added reviewers for D57833: sound: track kqueue low watermark per-knote for mmaped channels: markj, kib.
Thu, Jun 25, 12:17 PM

Wed, Jun 24

christos accepted D57818: virtual_oss.8: Document `/dev/bluetooth/` prefix magic.

LGTM, only some small nits.

Wed, Jun 24, 1:59 PM
christos committed rGa3d65cde7775: sound: Rename SD_F_EQ_ENABLED to SD_F_EQ (authored by christos).
sound: Rename SD_F_EQ_ENABLED to SD_F_EQ
Wed, Jun 24, 1:56 PM
christos committed rGede0236d3b34: sound: Retire unused SD_F_EQ_PC (authored by christos).
sound: Retire unused SD_F_EQ_PC
Wed, Jun 24, 1:49 PM
christos committed rGe1c951dccde1: groups.7: Document audio group (authored by christos).
groups.7: Document audio group
Wed, Jun 24, 1:39 PM

Sun, Jun 21

christos committed rGf6b3bd1f3384: sound tests: Remove trailing PROT_EXEC (authored by christos).
sound tests: Remove trailing PROT_EXEC
Sun, Jun 21, 12:19 PM

Jun 20 2026

christos committed rG730eaf466493: sound tests: Add PROT_EXEC rejection test (authored by christos).
sound tests: Add PROT_EXEC rejection test
Jun 20 2026, 7:06 PM
christos committed rG0c8147ae3bc1: sound: Re-arrange a calculation in dsp_mmap_single() (authored by christos).
sound: Re-arrange a calculation in dsp_mmap_single()
Jun 20 2026, 7:06 PM
christos committed rG47efa8128268: sound: Handle CHN_F_MMAP_INVALID after cdev_pager_allocate() (authored by christos).
sound: Handle CHN_F_MMAP_INVALID after cdev_pager_allocate()
Jun 20 2026, 7:06 PM
christos committed rGbbb37ddf3669: sound: Use and lock only the appropriate channel in dsp_mmap_single() (authored by christos).
sound: Use and lock only the appropriate channel in dsp_mmap_single()
Jun 20 2026, 7:06 PM
christos committed rGf70a687bb071: sound: Retire SD_F_VPC and related settings (authored by christos).
sound: Retire SD_F_VPC and related settings
Jun 20 2026, 5:40 PM
christos committed rG5ec4a7bb2cdf: mixer(8): Retire deprecated control values (authored by christos).
mixer(8): Retire deprecated control values
Jun 20 2026, 10:50 AM

Jun 18 2026

christos committed rGac0068384a22: virtual_oss(8): Make sndstat FD global (authored by christos).
virtual_oss(8): Make sndstat FD global
Jun 18 2026, 7:34 PM
christos committed rG013af29c1e17: virtual_oss(8): Properly cleanup cuse(3) (authored by christos).
virtual_oss(8): Properly cleanup cuse(3)
Jun 18 2026, 7:34 PM

Jun 17 2026

christos committed rGa48bbef5eb32: sound: Adjust mmap example to use kqueue (authored by meka_tilda.center).
sound: Adjust mmap example to use kqueue
Jun 17 2026, 10:53 AM
christos committed rGfe13f70b95a7: sound: Include more information in kevent returned from the kernel (authored by meka_tilda.center).
sound: Include more information in kevent returned from the kernel
Jun 17 2026, 10:53 AM
christos committed rG47ae0a869c7d: sound: Start each channel individually (authored by meka_tilda.center).
sound: Start each channel individually
Jun 17 2026, 10:53 AM
christos closed D57410: sound: Adjust mmap example to use kqueue.
Jun 17 2026, 10:53 AM
christos closed D57362: sound: Include more information in kevent returned from the kernel.
Jun 17 2026, 10:53 AM
christos closed D57399: sound: Start each channel individually.
Jun 17 2026, 10:53 AM

Jun 16 2026

christos committed rGf799fce68136: devd/snd.conf: Handle absent control device properly (authored by christos).
devd/snd.conf: Handle absent control device properly
Jun 16 2026, 12:08 PM

Jun 15 2026

christos accepted D57362: sound: Include more information in kevent returned from the kernel.

LGTM, minus some details which I will take care of when I'll commit it. Thanks :)

Jun 15 2026, 8:14 PM
christos committed rG7f2d79082469: groups.7: Document audio group (authored by christos).
groups.7: Document audio group
Jun 15 2026, 3:05 PM
christos committed rGa6aa95eba6ee: sound: Create all device nodes with GID_AUDIO (authored by christos).
sound: Create all device nodes with GID_AUDIO
Jun 15 2026, 3:05 PM
christos accepted D57410: sound: Adjust mmap example to use kqueue.
Jun 15 2026, 2:32 PM
christos added inline comments to D57362: sound: Include more information in kevent returned from the kernel.
Jun 15 2026, 2:31 PM

Jun 13 2026

christos committed rG33c8e68d3237: snd_uaudio: Support Roland UA-33 (authored by christos).
snd_uaudio: Support Roland UA-33
Jun 13 2026, 6:42 PM
christos committed rGde2a1366022d: mixer(8): Retire deprecated control values (authored by christos).
mixer(8): Retire deprecated control values
Jun 13 2026, 4:30 PM
christos committed R11:2717347b94f9: audio/freebsd-13-mixer: Discontinue (authored by christos).
audio/freebsd-13-mixer: Discontinue
Jun 13 2026, 4:26 PM
christos committed R11:c3c20bddefe4: sysutils/mixer: Discontinue (authored by christos).
sysutils/mixer: Discontinue
Jun 13 2026, 4:26 PM

Jun 11 2026

christos committed rG93a234a694f3: virtual_oss(8): Make sndstat FD global (authored by christos).
virtual_oss(8): Make sndstat FD global
Jun 11 2026, 9:31 AM
christos committed rG0bd5ef6b4363: virtual_oss(8): Properly cleanup cuse(3) (authored by christos).
virtual_oss(8): Properly cleanup cuse(3)
Jun 11 2026, 9:31 AM

Jun 9 2026

christos committed rG439b219fed3e: devd/snd.conf: Handle absent control device properly (authored by christos).
devd/snd.conf: Handle absent control device properly
Jun 9 2026, 3:14 PM
christos added a comment to D57362: sound: Include more information in kevent returned from the kernel.

The man page needs a date bump.

Jun 9 2026, 1:49 PM
christos committed rG81b3a7991543: virtual_oss_cmd(8): Improve error messages (authored by christos).
virtual_oss_cmd(8): Improve error messages
Jun 9 2026, 10:47 AM
christos committed rGb896c159135d: bsdinstall: Add virtual_oss service option (authored by christos).
bsdinstall: Add virtual_oss service option
Jun 9 2026, 10:47 AM

Jun 8 2026

christos added inline comments to D57410: sound: Adjust mmap example to use kqueue.
Jun 8 2026, 10:16 AM
christos added a reviewer for D57362: sound: Include more information in kevent returned from the kernel: ziaee.
Jun 8 2026, 10:10 AM
christos accepted D57399: sound: Start each channel individually.
Jun 8 2026, 10:06 AM

Jun 7 2026

christos committed rGa48a807e9bf7: sound: Centralize and improve hot-swapping (authored by christos).
sound: Centralize and improve hot-swapping
Jun 7 2026, 9:20 PM
christos committed rG91167d0b66e8: rc: virtual_oss: Handle absent pidfile properly (authored by christos).
rc: virtual_oss: Handle absent pidfile properly
Jun 7 2026, 9:20 PM
christos committed rGb8a97cc677df: rc: virtual_oss: Wait for process to exit (authored by christos).
rc: virtual_oss: Wait for process to exit
Jun 7 2026, 9:20 PM
christos committed rG4910c5a7d518: rc: virtual_oss: Define some variables in rc.conf (authored by christos).
rc: virtual_oss: Define some variables in rc.conf
Jun 7 2026, 9:20 PM

Jun 3 2026

christos committed rG70f682385515: sound: Update mixer.c LICENSE header (authored by christos).
sound: Update mixer.c LICENSE header
Jun 3 2026, 8:24 AM
christos committed rG323e28ed4cac: sound: Retire MIXER_SIZE and use correct size in DEFINE_CLASS (authored by christos).
sound: Retire MIXER_SIZE and use correct size in DEFINE_CLASS
Jun 3 2026, 8:24 AM
christos committed rGa22f7e404446: sound: Retire snd_mixer->enuminfo (authored by christos).
sound: Retire snd_mixer->enuminfo
Jun 3 2026, 8:24 AM
christos committed rGda80fa2c3d6b: sound: Retire unused mixer_get_lock() (authored by christos).
sound: Retire unused mixer_get_lock()
Jun 3 2026, 8:24 AM
christos committed rGb8d119c96986: sound: Do not lock before destroying snd_mixer->lock (authored by christos).
sound: Do not lock before destroying snd_mixer->lock
Jun 3 2026, 8:24 AM
christos committed rG1ed48176bc0b: sound: Remove all remaining uses of mixer_get_lock() (authored by christos).
sound: Remove all remaining uses of mixer_get_lock()
Jun 3 2026, 8:24 AM
christos committed rGd608731d556d: snd_uaudio: Do not use snd_mixer->lock as mixer_lock (authored by christos).
snd_uaudio: Do not use snd_mixer->lock as mixer_lock
Jun 3 2026, 8:24 AM
christos committed rGf94bb91ac69c: sound: Retire unused hw.snd.vpc_mixer_bypass (authored by christos).
sound: Retire unused hw.snd.vpc_mixer_bypass
Jun 3 2026, 8:24 AM
christos committed rGd80356b7525b: snd_uaudio: Stop using mixer_get_lock() (authored by christos).
snd_uaudio: Stop using mixer_get_lock()
Jun 3 2026, 8:24 AM
christos committed rGde5502ed01c8: sound: Remove unused "from" mixer_ioctl_cmd() argument (authored by christos).
sound: Remove unused "from" mixer_ioctl_cmd() argument
Jun 3 2026, 8:24 AM
christos committed rG3693f4404bec: sound: Retire mixer_ioctl_channel() (authored by christos).
sound: Retire mixer_ioctl_channel()
Jun 3 2026, 8:24 AM
christos committed rG3c49470b551a: sound: Retire M_MIXER (authored by christos).
sound: Retire M_MIXER
Jun 3 2026, 8:24 AM
christos committed rG755a785affcf: sound: Update feeder_eq.c LICENSE header (authored by christos).
sound: Update feeder_eq.c LICENSE header
Jun 3 2026, 8:24 AM
christos committed rG65029fee7837: sndctl(8): Implement EQ controls (authored by christos).
sndctl(8): Implement EQ controls
Jun 3 2026, 8:24 AM
christos committed rG9060512d2be6: pcm.4: Document dev.pcm.%d.eq* (authored by christos).
pcm.4: Document dev.pcm.%d.eq*
Jun 3 2026, 8:24 AM