Page MenuHomeFreeBSD

christos (Christos Margiolis)
User

Projects

User Details

User Since
Jul 2 2021, 4:03 PM (269 w, 6 d)

Recent Activity

Today

christos added a comment to D59084: sound: Prefer idle primary channels when allocating.

The patch looks like it does what the review description says it does, but apparently it doesn't actually fix the cited PR?

Yes. I cited the PR because it does fix an issue raised indirectly in the PR. Should I omit the "PR" line?

I'm not sure. It depends on the root cause of the bug. Maybe this patch helps but isn't sufficient, in which case the PR line should be included, or maybe the problem is unrelated, in which case it shouldn't be included.

Fri, Sep 4, 8:38 AM

Wed, Sep 2

christos committed rGde60db7469f0: bcm2835_audio: Comment out vchi_service_release() (authored by Xuqing Yang <rigelyoung@icloud.com>).
bcm2835_audio: Comment out vchi_service_release()
Wed, Sep 2, 9:40 AM

Sat, Aug 29

christos added a comment to D56845: mixer: Improve error messages.

No problem! Make sure you MFC this to stable/15 at some point.

Sat, Aug 29, 3:36 PM
christos accepted D56845: mixer: Improve error messages.
Sat, Aug 29, 11:26 AM
christos added a comment to D58779: sound: uaudio: discard hardware sidetone feature units.

Can you please take care of MFCing this?

Sat, Aug 29, 11:20 AM
christos added a comment to D59084: sound: Prefer idle primary channels when allocating.

The patch looks like it does what the review description says it does, but apparently it doesn't actually fix the cited PR?

Sat, Aug 29, 11:20 AM
christos accepted D59199: snd_uaudio: drop the default monitor level to 10%.
Sat, Aug 29, 11:18 AM
christos committed rGbd0449aab239: snd_uaudio: Use uDWord for the UAC2 sample rate (authored by christos).
snd_uaudio: Use uDWord for the UAC2 sample rate
Sat, Aug 29, 11:15 AM

Tue, Aug 25

christos committed rGba00f716c1be: sound: Retire sndcard_func (authored by christos).
sound: Retire sndcard_func
Tue, Aug 25, 11:56 AM
christos committed rGdde735f47495: snd_uaudio: Define USB IDs in usbdevs (authored by christos).
snd_uaudio: Define USB IDs in usbdevs
Tue, Aug 25, 11:56 AM

Mon, Aug 24

christos committed rGadf4c3336c31: bcm2835_audio: Remove wrong chn_intr() (authored by christos).
bcm2835_audio: Remove wrong chn_intr()
Mon, Aug 24, 8:48 PM

Sat, Aug 22

christos requested review of D59110: sound: Lock around mixer_set*() in mixer_init() for consistency.
Sat, Aug 22, 1:43 PM
christos requested review of D59109: sound: Remove unncessary locking in sysctl_hw_snd_hwvol_mixer().
Sat, Aug 22, 1:43 PM
christos committed rGf4d953bea740: bhyve: Do not panic on invalid input in HDA emulation (authored by christos).
bhyve: Do not panic on invalid input in HDA emulation
Sat, Aug 22, 12:49 PM
christos committed rGb5c1ab6c8f28: snd_hdsp*: malloc(9) with M_WAITOK (authored by christos).
snd_hdsp*: malloc(9) with M_WAITOK
Sat, Aug 22, 12:49 PM
christos closed D59079: snd_hdsp*: malloc(9) with M_WAITOK.
Sat, Aug 22, 12:49 PM
christos closed D59082: bhyve: Do not panic on invalid input in HDA emulation.
Sat, Aug 22, 12:49 PM
christos added inline comments to D56845: mixer: Improve error messages.
Sat, Aug 22, 12:46 PM
christos added a comment to D58779: sound: uaudio: discard hardware sidetone feature units.

Sidenote: please name the title as "snd_uaudio: ..." instead of "sound: uaudio: ...."

Sat, Aug 22, 12:44 PM
christos accepted D58779: sound: uaudio: discard hardware sidetone feature units.
Sat, Aug 22, 12:44 PM
christos added inline comments to D59071: sound: Embed mixer cdev in snd_mixer.
Sat, Aug 22, 11:21 AM

Fri, Aug 21

christos added a comment to D58779: sound: uaudio: discard hardware sidetone feature units.

This seems to work reasonably well and happens quickly enough that there is infact no feedback:

diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
index 4cdd20315258..8fcab56230b3 100644
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -1198,6 +1199,7 @@ uaudio_attach_sub(device_t dev, kobj_class_t mixer_class, kobj_class_t chan_clas
        }
        if (mixer_init(dev, mixer_class, sc))
                goto detach;
+       mix_set(sc->sc_child[i].mixer_dev, SOUND_MIXER_MONITOR, 10 /* XXX */, 10);
        sc->sc_child[i].mixer_init = 1;
 
        mixer_hwvol_init(dev);
Fri, Aug 21, 5:44 PM
christos added inline comments to D59082: bhyve: Do not panic on invalid input in HDA emulation.
Fri, Aug 21, 3:59 PM
christos requested review of D59085: snd_dummy: Bump primary channel count.
Fri, Aug 21, 3:29 PM
christos requested review of D59084: sound: Prefer idle primary channels when allocating.
Fri, Aug 21, 3:29 PM
christos requested review of D59082: bhyve: Do not panic on invalid input in HDA emulation.
Fri, Aug 21, 3:02 PM
christos committed rG5c3bc8ab427c: snd_uaudio: Use uDWord for the UAC2 sample rate (authored by christos).
snd_uaudio: Use uDWord for the UAC2 sample rate
Fri, Aug 21, 2:03 PM
christos closed D59066: snd_uaudio: Use uDWord for the UAC2 sample rate.
Fri, Aug 21, 2:03 PM
christos added a comment to D58779: sound: uaudio: discard hardware sidetone feature units.
static u_int16_t snd_mixerdefaults[SOUND_MIXER_NRDEVICES] = {
[...]
        [SOUND_MIXER_MONITOR]   = 75,                                                                         
};

Anythng above 15 or 20% results in major feedback, and it's not clear how to best handle this. You can hint it lower, of course, but I wonder if it'd make sense to add a function to the kernel mixer interface to allow uaudio to override the default.

You could call mix_set() from uaudio once everything is set up, and set the volume like that. Should work I think.

I was concerned that I'd still get a momentary blip of feedback between the two, but I will give it a shot.

Fri, Aug 21, 1:03 PM
christos added a comment to D58779: sound: uaudio: discard hardware sidetone feature units.
static u_int16_t snd_mixerdefaults[SOUND_MIXER_NRDEVICES] = {
[...]
        [SOUND_MIXER_MONITOR]   = 75,                                                                         
};

Anythng above 15 or 20% results in major feedback, and it's not clear how to best handle this. You can hint it lower, of course, but I wonder if it'd make sense to add a function to the kernel mixer interface to allow uaudio to override the default.

Fri, Aug 21, 12:55 PM
christos requested review of D59079: snd_hdsp*: malloc(9) with M_WAITOK.
Fri, Aug 21, 12:47 PM
christos requested review of D59078: sound: Improve some mixer return values and their handling.
Fri, Aug 21, 12:46 PM
christos requested review of D59077: sound: Reuse mixer_delete() in mixer_uninit().
Fri, Aug 21, 12:46 PM
christos requested review of D59076: sound: Do not set a recording source in mixer_uninit().
Fri, Aug 21, 12:46 PM
christos requested review of D59075: sound: Retire mixer_hwvol locked variants.
Fri, Aug 21, 12:44 PM
christos abandoned D59072: sound: Standardize mixer_init() call order.
Fri, Aug 21, 12:44 PM
christos requested review of D59074: sound: Use snddev_info->lock in place of snd_mixer->lock.
Fri, Aug 21, 12:44 PM
christos requested review of D59073: sound: Defer macio codec volume writes to a task.
Fri, Aug 21, 12:44 PM
christos requested review of D59072: sound: Standardize mixer_init() call order.
Fri, Aug 21, 12:43 PM
christos added a comment to D58370: snd_hdspe: Avoid allocation in the interrupt handler.

Doesn't snd_hdsp(4) need the same?

Fri, Aug 21, 12:42 PM
christos requested review of D59071: sound: Embed mixer cdev in snd_mixer.
Fri, Aug 21, 12:42 PM
christos requested review of D59070: sound: Simplify how snd_mixer is fetched and how the cdev is created.
Fri, Aug 21, 12:41 PM
christos requested review of D59069: sound: Standardize mixer_init() call order.
Fri, Aug 21, 12:41 PM
christos added a comment to D58779: sound: uaudio: discard hardware sidetone feature units.

It isn't tied to any of those now, with this patch. It probably makes sense to add a way to plumb the name out so it can be controlled via sysctl, but IGAIN and MONITOR both sounded like they're historically used for subtly different things than this.

Fri, Aug 21, 12:17 PM
christos added a comment to D58779: sound: uaudio: discard hardware sidetone feature units.

on this headset, the vol control does absolutely nothing while pcm controls the volume.

Which controls do you get in mixer(8)?

pcm4:mixer: <Logitech USB Headset Logitech USB Headset> on uaudio0 (play/rec)
    vol       = 0.75:0.75     pbk
    bass      = 0.50:0.50     pbk
    treble    = 0.50:0.50     pbk
    pcm       = 0.75:0.75     pbk
    mic       = 0.25:0.25     pbk

So the sidetone now is tied to which of those controls?

Fri, Aug 21, 11:47 AM
christos requested review of D59066: snd_uaudio: Use uDWord for the UAC2 sample rate.
Fri, Aug 21, 11:30 AM
christos added a comment to D58912: dsp: Fix a potential use-after-free in dsp_oss_syncstart().

Please also add an MFC date for this.

Fri, Aug 21, 9:42 AM
christos added inline comments to D56845: mixer: Improve error messages.
Fri, Aug 21, 9:21 AM
christos added a comment to D58779: sound: uaudio: discard hardware sidetone feature units.

on this headset, the vol control does absolutely nothing while pcm controls the volume.

Which controls do you get in mixer(8)?

Fri, Aug 21, 9:20 AM
christos committed rGf0778a6f9ba7: bcm2835_audio: Remove wrong chn_intr() (authored by christos).
bcm2835_audio: Remove wrong chn_intr()
Fri, Aug 21, 12:48 AM
christos closed D59055: bcm2835_audio: Remove wrong chn_intr().
Fri, Aug 21, 12:47 AM

Thu, Aug 20

christos added a comment to D58889: vchiq: Import two commits from upstream.

@markj @devesas.campos_gmail.com D59055

Thu, Aug 20, 7:36 PM
christos requested review of D59055: bcm2835_audio: Remove wrong chn_intr().
Thu, Aug 20, 7:36 PM
christos added a comment to D58889: vchiq: Import two commits from upstream.

Will try to do more extensive testing tomorrow.

Tested with the vchiq_test utility from rpi-userland in mode bulk, functional, ping and timer and they all succeeded.

Thu, Aug 20, 12:28 PM

Tue, Aug 18

christos accepted D58912: dsp: Fix a potential use-after-free in dsp_oss_syncstart().
Tue, Aug 18, 8:21 PM
christos committed rG95c04b25323d: bcm2835_audio: Comment out vchi_service_release() (authored by Xuqing Yang <rigelyoung@icloud.com>).
bcm2835_audio: Comment out vchi_service_release()
Tue, Aug 18, 8:19 PM
christos closed D58921: bcm2835_audio: Comment out vchi_service_release().
Tue, Aug 18, 8:19 PM
christos requested review of D58921: bcm2835_audio: Comment out vchi_service_release().
Tue, Aug 18, 8:13 PM
christos added a comment to D56845: mixer: Improve error messages.

I would argue that the user might not know it. "Invalid argument" is barely descriptive IMHO. If mixer knows the problem is that the supplied device number is negative, why not tell the user the exact problem instead of trusting the user "should know" something?

Tue, Aug 18, 8:00 PM
christos added a comment to D58889: vchiq: Import two commits from upstream.

bcmchan_trigger() calls chn_intr() which causes a lock recursion because chn_trigger() calls bcmchan_trigger() with the lock held already. However, chn_intr() is not meant to be called there in the CHANNEL_TRIGGER() method, so the code here is wrong in the first place. Does triggering properly if the chn_intr() call is removed from bcmchan_trigger()? I see that it also calls bcm2835_worker_play_start(), which should be enough?

Tue, Aug 18, 7:51 PM
christos committed rGcd9810f00e57: sound: Use unsigned long instead of legacy u_long (authored by christos).
sound: Use unsigned long instead of legacy u_long
Tue, Aug 18, 7:35 PM

Tue, Aug 11

christos committed rG3e67b90c55b4: snd_uaudio: Define USB IDs in usbdevs (authored by christos).
snd_uaudio: Define USB IDs in usbdevs
Tue, Aug 11, 9:03 PM
christos committed rGa753ca9c3f06: sound: Retire sndcard_func (authored by christos).
sound: Retire sndcard_func
Tue, Aug 11, 8:57 PM
christos added a comment to D56845: mixer: Improve error messages.

To be fair, I don't think these changes are meaningful. mixer(8) will fail for all the cases you are trying to catch anyway, and I think the messages are clear enough already.

Tue, Aug 11, 8:15 PM
christos committed rGafe56ee24679: sound: Use unsigned long instead of legacy u_long (authored by christos).
sound: Use unsigned long instead of legacy u_long
Tue, Aug 11, 6:37 PM
christos committed rG6886e8a9a0aa: snd_uaudio: Don't let an idle stream reprogram a shared UAC2 clock (authored by delleceste_gmail.com).
snd_uaudio: Don't let an idle stream reprogram a shared UAC2 clock
Tue, Aug 11, 6:25 PM
christos committed rGa46b8546b1c8: cuse: Fix server reference leak in cuse_client_open() (authored by delleceste_gmail.com).
cuse: Fix server reference leak in cuse_client_open()
Tue, Aug 11, 6:25 PM
christos committed rGcda2abf4f137: sound: Add missing newline in dsp_make_dev()'s device_printf() (authored by christos).
sound: Add missing newline in dsp_make_dev()'s device_printf()
Tue, Aug 11, 6:25 PM
christos committed rGa5b10ce45d67: sound: Propagate error value from dsp_make_dev() (authored by christos).
sound: Propagate error value from dsp_make_dev()
Tue, Aug 11, 6:25 PM
christos committed rG7af4af4ddf13: sound: Stop using legacy u_int types (authored by christos).
sound: Stop using legacy u_int types
Tue, Aug 11, 6:25 PM
christos committed rG44b054dba523: sound: Scale PCM secondary buffers by byte rate (authored by Kevin Bowling <kbowling@FreeBSD.org>).
sound: Scale PCM secondary buffers by byte rate
Tue, Aug 11, 6:25 PM

Jul 28 2026

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

Should we commit this?

Jul 28 2026, 9:42 PM
christos abandoned D53614: sound tests: Test hot-unload.
Jul 28 2026, 8:43 PM
christos abandoned D53896: snd_hdsp*: Fix M_NOWAIT malloc(9) calls.

Continued here: https://ron-dev.freebsd.org/FreeBSD/src/pulls/63

Jul 28 2026, 8:43 PM

Jul 27 2026

christos committed rG2a2705a637cd: sound: Add missing newline in dsp_make_dev()'s device_printf() (authored by christos).
sound: Add missing newline in dsp_make_dev()'s device_printf()
Jul 27 2026, 3:53 PM
christos committed rGa46c92aad16b: sound: Propagate error value from dsp_make_dev() (authored by christos).
sound: Propagate error value from dsp_make_dev()
Jul 27 2026, 2:33 PM

Jul 26 2026

christos committed rG95439b803fce: sound: Stop using legacy u_int types (authored by christos).
sound: Stop using legacy u_int types
Jul 26 2026, 10:19 PM

Jul 24 2026

christos committed rG967e86d1ef2a: sound: Scale PCM secondary buffers by byte rate (authored by Kevin Bowling <kbowling@FreeBSD.org>).
sound: Scale PCM secondary buffers by byte rate
Jul 24 2026, 1:59 PM
christos closed D58064: sound: Scale PCM secondary buffers by byte rate.
Jul 24 2026, 1:59 PM
christos accepted D58064: sound: Scale PCM secondary buffers by byte rate.
Jul 24 2026, 1:57 PM
christos added a comment to D58064: sound: Scale PCM secondary buffers by byte rate.

I don't have a device like that right now. But everything works as expected? Playback, recording, latencies, etc?

Jul 24 2026, 12:09 PM
christos added a comment to D58064: sound: Scale PCM secondary buffers by byte rate.

Tested with my HW, no problems. Is there some particular way you are testing this?

Jul 24 2026, 11:29 AM
christos committed rGd83e42234f76: cuse: Fix server reference leak in cuse_client_open() (authored by delleceste_gmail.com).
cuse: Fix server reference leak in cuse_client_open()
Jul 24 2026, 11:21 AM
christos committed rG755685dd665e: snd_uaudio: Don't let an idle stream reprogram a shared UAC2 clock (authored by delleceste_gmail.com).
snd_uaudio: Don't let an idle stream reprogram a shared UAC2 clock
Jul 24 2026, 11:21 AM

Jul 21 2026

christos committed rGc715fbb8b7e4: snd_uaudio: Initialize mixer_lock with MTX_RECURSE (authored by christos).
snd_uaudio: Initialize mixer_lock with MTX_RECURSE
Jul 21 2026, 10:29 PM

Jul 15 2026

christos committed rG6d66485276cb: sound: Remove dead code in dsp_ioctl() (authored by christos).
sound: Remove dead code in dsp_ioctl()
Jul 15 2026, 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()
Jul 15 2026, 8:16 AM

Jul 14 2026

christos committed rG954001a9dd36: snd_uaudio: Initialize mixer_lock with MTX_RECURSE (authored by christos).
snd_uaudio: Initialize mixer_lock with MTX_RECURSE
Jul 14 2026, 9:18 PM
christos closed D58022: Status/2026Q2/audio.adoc: Add report.
Jul 14 2026, 1:54 PM
christos committed R9:a5a20544a369: Status/2026Q2/audio.adoc: Add report (authored by christos).
Status/2026Q2/audio.adoc: Add report
Jul 14 2026, 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
Jul 14 2026, 1:53 PM

Jul 10 2026

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.

Jul 10 2026, 2:03 PM

Jul 9 2026

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

Jul 8 2026

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()
Jul 8 2026, 6:20 PM
christos committed rG69c4e2b68a58: sound: Remove dead code in dsp_ioctl() (authored by christos).
sound: Remove dead code in dsp_ioctl()
Jul 8 2026, 6:13 PM
christos added inline comments to D58064: sound: Scale PCM secondary buffers by byte rate.
Jul 8 2026, 5:44 PM

Jul 7 2026

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

Jul 6 2026

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
Jul 6 2026, 12:08 PM
christos closed D57833: sound: track kqueue low watermark per-knote for mmaped channels.
Jul 6 2026, 12:08 PM
christos accepted D57833: sound: track kqueue low watermark per-knote for mmaped channels.
Jul 6 2026, 12:05 PM