Page MenuHomeFreeBSD

meka_tilda.center (Goran Mekić)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 19 2019, 8:59 AM (328 w, 5 d)

Recent Activity

Today

meka_tilda.center added inline comments to D54038: sound examples: Check if setting property was successful.
Sat, Dec 6, 3:54 PM
meka_tilda.center updated the diff for D53749: sound examples: Add mmap example.

Lowering usleep time and checking if ci.ptr is zero made all the glitches in the sound go away. I do need to run it for quite a few times to validate that, but in the worst case I significantly lowered the probability of gibberish on the output. Next, I need to calculate the usleep time based on ci.ptr.

Sat, Dec 6, 2:23 AM

Yesterday

meka_tilda.center updated the diff for D53749: sound examples: Add mmap example.

The usleep based mmap example based on official OSS example. There are three big things about it right now that make it not-so-perfect:

Fri, Dec 5, 6:50 PM
meka_tilda.center added a comment to D53749: sound examples: Add mmap example.

I think I'll try my luck with http://manuals.opensound.com/developer/mmap_test.c.html first and fit it into our example and once the usleep version works, see what are the values of ptr compared to the ones in kqueue scenario. My thinking is "if I can't fix it, move to simpler example", which I'm hoping the official docs are. Anyway, I didn't give up on this code, I just need to approach it from the different angle, for now.

Fri, Dec 5, 3:11 AM

Thu, Dec 4

meka_tilda.center added inline comments to D54038: sound examples: Check if setting property was successful.
Thu, Dec 4, 4:21 PM
meka_tilda.center added inline comments to D54038: sound examples: Check if setting property was successful.
Thu, Dec 4, 3:35 PM
meka_tilda.center updated the diff for D54038: sound examples: Check if setting property was successful.

Give more info on failed set attempt

Thu, Dec 4, 3:14 PM
meka_tilda.center updated the diff for D54038: sound examples: Check if setting property was successful.

Fix copy/paste typo.

Thu, Dec 4, 11:30 AM
meka_tilda.center updated the diff for D54038: sound examples: Check if setting property was successful.

Check sample format, rate and channels after they are set.

Thu, Dec 4, 11:29 AM

Wed, Dec 3

meka_tilda.center updated the diff for D54038: sound examples: Check if setting property was successful.

Check sample rate and format after ioctl call. While here, print sample size and number of channels of configured device.

Wed, Dec 3, 11:16 AM

Tue, Dec 2

meka_tilda.center added a comment to D53749: sound examples: Add mmap example.

I am looking into the code in general and I want to figure out how to display information so it makes more sense, not just dump printf.

Tue, Dec 2, 7:21 PM
meka_tilda.center requested review of D54038: sound examples: Check if setting property was successful.
Tue, Dec 2, 7:20 PM

Fri, Nov 28

meka_tilda.center updated the diff for D53749: sound examples: Add mmap example.

Rebase after oss.h fix

Fri, Nov 28, 3:13 PM

Wed, Nov 26

meka_tilda.center updated the diff for D53749: sound examples: Add mmap example.

Remove needless include

Wed, Nov 26, 8:01 PM
meka_tilda.center requested review of D53939: sound examples: Fix buffer mapping/allocation.
Wed, Nov 26, 6:43 PM

Thu, Nov 20

meka_tilda.center updated the diff for D53749: sound examples: Add mmap example.

Map or allocate buffer in oss_init. For some reason with this patch probability of producing proper sound is way higher. I still have to add GETIPTR/GETOPTR checks and usleep based on the position.

Thu, Nov 20, 4:12 PM
meka_tilda.center added a comment to D53749: sound examples: Add mmap example.

Let me try to compensate the drift by reading SNDCTL_DSP_GETIPTR and SNDCTL_DSP_GETOPTR and experiment with that for a bit.

Thu, Nov 20, 3:12 PM

Wed, Nov 19

meka_tilda.center updated the diff for D53749: sound examples: Add mmap example.

I forgot to edit Makefile. Fixed now.

Wed, Nov 19, 4:24 PM
meka_tilda.center updated the diff for D53749: sound examples: Add mmap example.

Remove extra functions as they are very simple

Wed, Nov 19, 3:40 PM
meka_tilda.center added a comment to D53749: sound examples: Add mmap example.

That's the strange thing. If I run it 20-30 times, I would get roughly half of the times distorted sound, half of the times normal sound. Also, I tried having one config and two events for read and write, but I couldn't produce any sound like that. Anyway, let me fix this example to conform to the comments and lets go from there.

Wed, Nov 19, 3:18 PM

Fri, Nov 14

meka_tilda.center added reviewers for D53749: sound examples: Add mmap example: christos, dev_submerge.ch.
Fri, Nov 14, 12:39 AM
meka_tilda.center requested review of D53749: sound examples: Add mmap example.
Fri, Nov 14, 12:39 AM

Wed, Nov 12

meka_tilda.center added a comment to D53353: sound examples: Extend and clean up.

I tested simple, select and poll on the real hardware. As that machine is not running CURRENT, I can't test kqueue. @christos, do you have any means on testing it on real hardware? I tried to test it in bhyve with -s 6,hda,play=/dev/dsp,rec=/dev/dsp but none of the examples work properly that way.

Wed, Nov 12, 7:10 PM
meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

Reword comments and fix Makefile

Wed, Nov 12, 12:34 PM
meka_tilda.center added a comment to D53353: sound examples: Extend and clean up.

I already fixed those as well as share/examples/Makefile, I just want to check if everything is working, and that has to wait for my day job to finish.

Wed, Nov 12, 11:50 AM

Tue, Nov 11

meka_tilda.center added a comment to D53353: sound examples: Extend and clean up.

I just realized I copy/pasted the same first license comment everywhere. Can you tell me what should I put in the "Copyright" lines, please?

Tue, Nov 11, 3:41 PM
meka_tilda.center abandoned D36795: Example of audio/MIDI with select(2), poll(2) and kqueue(2).
Tue, Nov 11, 3:39 PM

Mon, Nov 10

meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

Improve comment regarding usage of interleaved format and channels.

Mon, Nov 10, 9:48 PM
meka_tilda.center added a comment to D53353: sound examples: Extend and clean up.

I tested all examples with real hardware. Well, all except kqueue, as the machine with the actual hardware is 14.3 based.

Mon, Nov 10, 9:36 PM
meka_tilda.center added inline comments to D53353: sound examples: Extend and clean up.
Mon, Nov 10, 9:34 PM
meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

Fix to_channels and to_interleaved and address other comments.

Mon, Nov 10, 9:33 PM

Sun, Nov 9

meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

Move contents of README into comments, mostly in oss.h

Sun, Nov 9, 9:14 PM

Sat, Nov 8

meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

More cleanup from old example

Sat, Nov 8, 5:10 PM
meka_tilda.center added a comment to D53353: sound examples: Extend and clean up.

I just remembered one more comment I can't find. It is about setting fragments. I'd like to leave it there and in the comments mention that setting fragments is optional. I'd like to have a full examples so people interested in sound don't have to wonder how things are done. To be honest, official OSS documentation could use some improvement. At least I found it hard to understand what exactly I need to do.

Sat, Nov 8, 1:01 PM

Fri, Nov 7

meka_tilda.center added a comment to D53353: sound examples: Extend and clean up.

I hope I found all comments. It was not obvious I would have to click on a line number beside comment to get old comments.

Fri, Nov 7, 12:09 PM

Thu, Nov 6

meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

I missed old comments as I moved files from oss directory. It took me a while to realize how to read them. Sorry for the noise.

Thu, Nov 6, 11:11 PM

Nov 3 2025

meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

I really hope this is OK way to handle 24 bits.

Nov 3 2025, 5:35 PM

Nov 2 2025

meka_tilda.center added a comment to D53353: sound examples: Extend and clean up.

The directory where these files live is "oss". As everything is about OSS in "sound" directory, should I perhaps rename oss to audio? My reasoning is that there are audio and MIDI examples that we can show, so "oss" is a bit missleading. Or maybe have share/examples/oss and audio and midi under it? Anyway, when I started writing the examples I only wrote audio part, so "sound" was appropriate, which probably isn't the case any more.

Nov 2 2025, 11:57 AM
meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

Use per-config buffer.

Nov 2 2025, 11:48 AM

Nov 1 2025

meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

Address the rest of the comments (without moving README to comments).

Nov 1 2025, 5:26 PM
meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

I hope I addressed all the comments except showing example for both polling directions and readme. I think if a person understands polling in one direction, it is easy to extrapolate how to work with two directions. As these are examples, not complete guides, I would argue that this is good enough, especially in kqueue case where both directions would create two events and example would become more complicated. As I do plan to add mmap example once this is merged, that example will have input device and output device so even that configuration will be shown, I just don't think that all examples should split the sound card into two directions. As for the readme, good catch, I didn't think of that, but let's make the code in the examples good and I'll change the readme to correspond to those changes.

Nov 1 2025, 12:05 PM
meka_tilda.center retitled D53353: sound examples: Extend and clean up from sound: Extend examples with polling mechanisms to sound examples: Extend and clean up.
Nov 1 2025, 11:35 AM

Oct 31 2025

meka_tilda.center added inline comments to D53353: sound examples: Extend and clean up.
Oct 31 2025, 10:39 PM
meka_tilda.center added inline comments to D53353: sound examples: Extend and clean up.
Oct 31 2025, 10:29 PM
meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

Add triggering.

Oct 31 2025, 3:50 PM

Oct 25 2025

meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

One more wrong device fixed

Oct 25 2025, 9:08 PM
meka_tilda.center updated the diff for D53353: sound examples: Extend and clean up.

Use default DSP device

Oct 25 2025, 9:07 PM
meka_tilda.center requested review of D53353: sound examples: Extend and clean up.
Oct 25 2025, 6:46 PM

Oct 22 2025

meka_tilda.center added inline comments to D53188: sound tests: Test polling.
Oct 22 2025, 12:15 PM

Oct 21 2025

meka_tilda.center updated the diff for D53244: kqueue(9): add EXAMPLES section.

New sentences on new lines

Oct 21 2025, 5:14 PM · docs
meka_tilda.center requested review of D53244: kqueue(9): add EXAMPLES section.
Oct 21 2025, 4:43 PM · docs

Oct 20 2025

meka_tilda.center added a comment to D53188: sound tests: Test polling.

So, if I understand right, I should move oss_init into the test file and simplify it. What does it mean "simplify"? I guess mmap parts can be removed, but what else do you want gone? The thing is that I don't know what is the minimum that we can work with. Maybe just set sample format and remove all the rest? Also, what should I do with oss.h then? I mean, everything in that file is made just so the oss_init would work.

Oct 20 2025, 7:51 PM
meka_tilda.center added a comment to D53029: sound: Add kqueue support.

I've been testing the patch and trying to fix the panic you mentioned in D53029, although there is one more panic in dsp_kqdetach() that I'm working on. The code needs a few changes, is it okay if I take over the revision, at least for now, so that it's easier to upload the new changes?

Oct 20 2025, 5:22 PM

Oct 19 2025

meka_tilda.center updated the diff for D53188: sound tests: Test polling.

Running polling:poll_select for the first time in VM exposes LOR while polling:poll_kqueue panics the kernel. The reason I added oss.h is to be able to use those common functions and structures in mmap based test that I have yet to write.

Oct 19 2025, 8:13 PM

Oct 18 2025

meka_tilda.center requested review of D53188: sound tests: Test polling.
Oct 18 2025, 2:12 PM
meka_tilda.center added inline comments to D53029: sound: Add kqueue support.
Oct 18 2025, 12:53 AM
meka_tilda.center updated the diff for D53029: sound: Add kqueue support.

Fixed typos

Oct 18 2025, 12:45 AM

Oct 17 2025

meka_tilda.center added inline comments to D53029: sound: Add kqueue support.
Oct 17 2025, 4:13 PM
meka_tilda.center updated the diff for D53029: sound: Add kqueue support.

Most notable change is removal of example, I'll add it in a new revision.

Oct 17 2025, 4:11 PM

Oct 12 2025

meka_tilda.center updated the diff for D53029: sound: Add kqueue support.

I was wrong about what SNDCTL_DSP_GETOSPACE and SNDCTL_DSP_GETISPACE do, hence the update.

Oct 12 2025, 6:57 PM
meka_tilda.center updated the diff for D53029: sound: Add kqueue support.

While at it, I decided to add all polling/events into one example.

Oct 12 2025, 6:51 PM
meka_tilda.center added inline comments to D53029: sound: Add kqueue support.
Oct 12 2025, 11:09 AM
meka_tilda.center updated the diff for D53029: sound: Add kqueue support.

I changed the code based on the comments, but I didn't add test program, yet. Give me some more time.

Oct 12 2025, 11:07 AM

Oct 10 2025

meka_tilda.center requested review of D53029: sound: Add kqueue support.
Oct 10 2025, 4:47 PM

Oct 2 2024

meka_tilda.center requested review of D46866: Fix zfsd so it checks FAULTED vdevs.
Oct 2 2024, 7:53 AM

Sep 9 2024

meka_tilda.center accepted D46601: Drop expired FreeBSD 14.0 support.
Sep 9 2024, 9:25 AM

Aug 20 2024

meka_tilda.center accepted D46308: sound examples: Move MIDI example out of OSS directory.
Aug 20 2024, 3:45 PM
meka_tilda.center added a comment to D46307: sound examples: Simplify audio example.

I suppose the original idea by @meka_tilda.center was to implement another example using mmap, at least there's code fragments for that. What's the plan regarding a mmap example?

Aug 20 2024, 3:43 PM

Apr 28 2024

meka_tilda.center added a comment to D44912: sound: Retire unit.*.

I had to remove dev/sound/unit.c optional sound from sys/conf/files but otherwise it works.

Apr 28 2024, 12:13 AM

Apr 11 2024

meka_tilda.center added a comment to D44411: sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9).

Works here, too. I did only the short test, but no EBUSY.

Apr 11 2024, 4:34 PM

Jan 29 2024

meka_tilda.center added a comment to D41942: snd_uaudio(4): Adapt buffer length to buffer_ms tunable..

Interesting. I just tested, and if I boot my machine while interface is on, kld_list and buffer_ms together do the trick. I mean, jack_iodelay reports exactly same latency as if I loaded the module, set buffer_ms and then turned on the interface. Maybe my interface is slow to respond initially, so sysctl has time to kick in? Anyway, if I were to do it differently, what should I do? Load module and set buffer_ms in loader.conf?

Jan 29 2024, 12:05 PM · multimedia

Jan 28 2024

meka_tilda.center added a comment to D41942: snd_uaudio(4): Adapt buffer length to buffer_ms tunable..

A misunderstanding. I though you wanted me to make sure there are no reconnects. Anyway, loading the driver first, then setting buffer_ms and then turning on the interface yields the following results

period = 192
buffer_ms = 1
  690.921 frames     14.394 ms total roundtrip latency
	extra loopback latency: 306 frames
	use 153 for the backend arguments -I and -O

Now this is a great improvement! Can we document it somewhere? Suggesting, for example, to put kld_list+=snd_uaudio and then set buffer_ms as any other sysctl? In my oppinion, if we spent so much time figuring out how to properly do the measurement, I'm sure other people will need help with their setup, too, so why not make it easier for them and put this into snd_uaudio(4).

Jan 28 2024, 3:38 AM · multimedia

Jan 27 2024

meka_tilda.center added a comment to D41942: snd_uaudio(4): Adapt buffer length to buffer_ms tunable..

I didn't answer about re-plugging. No, the interface is always connected and I don't touch the cables.

Jan 27 2024, 12:23 PM · multimedia
meka_tilda.center added a comment to D41942: snd_uaudio(4): Adapt buffer length to buffer_ms tunable..

I see what you mean. I tested with buffer_ms of 1 and 8 and I get almost exact numbers:

period = 192
Jan 27 2024, 12:19 PM · multimedia

Jan 22 2024

meka_tilda.center added a comment to D41942: snd_uaudio(4): Adapt buffer length to buffer_ms tunable..
Main branch
-----------
hw.usb.uaudio.buffer_ms = 8
period = 768
  2563.934 frames     53.415 ms total roundtrip latency
	extra loopback latency: 1027 frames
	use 513 for the backend arguments -I and -O
Jan 22 2024, 6:38 AM · multimedia

Jan 21 2024

meka_tilda.center added a comment to D41942: snd_uaudio(4): Adapt buffer length to buffer_ms tunable..

I missed 4ms request from you, so here are those measurements

Main branch
-----------
hw.usb.uaudio.buffer_ms = 4
period = 768
  3337.952 frames     69.541 ms total roundtrip latency
	extra loopback latency: 1033 frames
	use 516 for the backend arguments -I and -O
Jan 21 2024, 4:23 PM · multimedia
meka_tilda.center added a comment to D41942: snd_uaudio(4): Adapt buffer length to buffer_ms tunable..

Thank you for the explanation. I took the measurement and I tried to get the lowest latency without jitters, so here is the complete measurement.

Main branch
-----------
hw.usb.uaudio.buffer_ms = 2
Jan 21 2024, 4:12 PM · multimedia

Jan 19 2024

meka_tilda.center added a comment to D41942: snd_uaudio(4): Adapt buffer length to buffer_ms tunable..

Sorry for the delay, I got sick (again). Anyway, it took me a while to figure out what's going on. As I didn't have speakers on, I didn't notice there are jitters, that's why the numbers don't match. I took similar measurements with higher period size in jack and these are the results

Main branch
-----------
hw.usb.uaudio.buffer_ms = 2
Jan 19 2024, 4:55 PM · multimedia

Jan 17 2024

meka_tilda.center requested review of D43474: fwget: Use versioned packages for RDNA3 firmware.
Jan 17 2024, 10:05 AM
meka_tilda.center updated the diff for D43468: fwget: Update for Radeon RX 7900 XT (RDNA3) PCI-ID.
Jan 17 2024, 9:27 AM

Jan 16 2024

meka_tilda.center added a comment to D43468: fwget: Update for Radeon RX 7900 XT (RDNA3) PCI-ID.

An example

Jan 16 2024, 7:08 PM
meka_tilda.center updated the diff for D43468: fwget: Update for Radeon RX 7900 XT (RDNA3) PCI-ID.

Ah, so, single argument with quotes. If broken into multiple lines with "\" it makes fwget's output weird, hence one huge line.

Jan 16 2024, 6:55 PM
meka_tilda.center added a comment to D43468: fwget: Update for Radeon RX 7900 XT (RDNA3) PCI-ID.

It would be better if addpkg supported multiple arguments, but with current implementation we have to use multiple invocations.

Jan 16 2024, 6:47 PM
meka_tilda.center requested review of D43468: fwget: Update for Radeon RX 7900 XT (RDNA3) PCI-ID.
Jan 16 2024, 6:45 PM

Jan 11 2024

meka_tilda.center updated the diff for D43380: find: add SIGINFO handler.
Jan 11 2024, 10:12 PM
meka_tilda.center updated the diff for D43380: find: add SIGINFO handler.
Jan 11 2024, 3:59 PM

Jan 9 2024

meka_tilda.center requested review of D43380: find: add SIGINFO handler.
Jan 9 2024, 8:24 PM

Dec 30 2023

meka_tilda.center added a comment to D41942: snd_uaudio(4): Adapt buffer length to buffer_ms tunable..

I ran jack_iodelay with same buffer_ms value and these are the results:

Dec 30 2023, 10:43 AM · multimedia
meka_tilda.center abandoned D41627: Lower minimal USB audio buffer size limit from 2ms to 1ms.

Florian's patch is superior to this one, hence closing.

Dec 30 2023, 10:36 AM · multimedia

Dec 26 2023

meka_tilda.center added a comment to D41942: snd_uaudio(4): Adapt buffer length to buffer_ms tunable..

I finally found the time to test this patch. I'm running CURRENT and I only have Behringer XR18 at my disposal. First test I ran was lowering the buffer_ms to 1 and just playing audio for few hours. I didn't tweak virtual_oss parameters or anything, and audacious was using virtual_oss. Not a single jitter, glitch or xrun in those few hours, no audible defects of any kind. In the following days I intend to test the latency with jack_iodelay.

Dec 26 2023, 3:35 AM · multimedia

Aug 31 2023

meka_tilda.center updated the diff for D41627: Lower minimal USB audio buffer size limit from 2ms to 1ms.
Aug 31 2023, 2:46 PM · multimedia
meka_tilda.center added a comment to D41627: Lower minimal USB audio buffer size limit from 2ms to 1ms.
In D41627#949637, @mav wrote:

I am sorry, but once again: in this patch you change allowed minimum, but do not change the default on line 99, right?

I guess heat got to my head :) Thank you, good catch! Update is coming.

Aug 31 2023, 2:29 PM · multimedia
meka_tilda.center added a comment to D41627: Lower minimal USB audio buffer size limit from 2ms to 1ms.
In D41627#949189, @mav wrote:

After your initial commit Hans reduced the default value from 8ms to the minimum of 2ms. I wonder if it is still OK or you'd like to reduce default also.

As a disclaimer, I know very little to nothing about USB.

Aug 31 2023, 8:14 AM · multimedia

Aug 29 2023

meka_tilda.center retitled D36795: Example of audio/MIDI with select(2), poll(2) and kqueue(2) from Example of audio/MIDI with select(2) and poll(2) to Example of audio/MIDI with select(2), poll(2) and kqueue(2).
Aug 29 2023, 2:28 PM
meka_tilda.center retitled D41627: Lower minimal USB audio buffer size limit from 2ms to 1ms from Lower USB audio buffer size from 2ms to 1ms to Lower minimal USB audio buffer size limit from 2ms to 1ms.
Aug 29 2023, 8:42 AM · multimedia
meka_tilda.center requested review of D41627: Lower minimal USB audio buffer size limit from 2ms to 1ms.
Aug 29 2023, 8:42 AM · multimedia

Jul 6 2023

meka_tilda.center added a comment to D20967: new MAC policy module - mac_ipacl.

If you're going to change format, why not use tree, as it feels natural for sysctl. One existing example would be dev.pcm.<number> so following that, we could have security.mac.ipacl.<jid>.<rule> and .family and .address (or maybe .range) as leafs. It is not set in stone that it has to be like that, but given it's sysctl, it feels more natural to me, so please give it a thought. Also, as it is about jail, it would also feel more natural to have this tunables under security.jail.<jid>

Jul 6 2023, 5:06 PM · GSoC Students, GSoC Admins

Jul 4 2023

meka_tilda.center added a comment to D22012: Import dhcpcd(8) into FreeBSD base..

This patch fails to apply to CURRENT. I am using dhcpcd-10 since it was released (and used previous versions) for DHCP, SLAAC and DHCPv6, all on the same network. That's the closest to testing I can get in current state. If this patch is updated I would love to test it. Of course, if updating patch is required, I would love to do it, but at this point I'm not sure I know how.

Jul 4 2023, 9:13 AM

Jul 3 2023

meka_tilda.center added a comment to D22012: Import dhcpcd(8) into FreeBSD base..

Is there something we can do to make dhcpcd part of 14.0-RELEASE besides testing this patch?

Jul 3 2023, 2:07 PM

Jun 19 2023

meka_tilda.center abandoned D39011: Enable jail(8) to parse all config files.
Jun 19 2023, 8:10 AM