Page MenuHomeFreeBSD

christos (Christos Margiolis)
User

Projects

User Details

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

Recent Activity

Tue, Feb 18

christos committed rG6672831bda88: sound tests: Fix downshift calculation in pcm_read_write test (authored by dev_submerge.ch).
sound tests: Fix downshift calculation in pcm_read_write test
Tue, Feb 18, 7:38 PM
christos committed rG18457e7e25c5: sound: Bail out early if a format is not supported (authored by christos).
sound: Bail out early if a format is not supported
Tue, Feb 18, 7:38 PM
christos committed rGc23d53490eb3: snd_hda: Define ALC898 (authored by christos).
snd_hda: Define ALC898
Tue, Feb 18, 7:38 PM
christos closed D48031: sound: Bail out early if a format is not supported.
Tue, Feb 18, 7:38 PM
christos committed rGd4176fdb1370: snd_hda: Fix typo (s/owerflow/overflow) (authored by christos).
snd_hda: Fix typo (s/owerflow/overflow)
Tue, Feb 18, 7:38 PM
christos closed D48940: snd_hda: Define ALC898.
Tue, Feb 18, 7:38 PM
christos closed D48926: sound tests: Fix downshift calculation in pcm_read_write test.
Tue, Feb 18, 7:37 PM
christos retitled D48926: sound tests: Fix downshift calculation in pcm_read_write test from sound tests: Fix downshift calculation in pcm_read_write test. to sound tests: Fix downshift calculation in pcm_read_write test.
Tue, Feb 18, 7:35 PM
christos abandoned D48809: [WIP] snd_hda: Attempt to automate pin patching.

Abandoning in favor of a more sane approach. Related discussion: https://lists.freebsd.org/archives/freebsd-multimedia/2025-February/002845.html

Tue, Feb 18, 7:27 PM
christos added a comment to D47932: sound: Refactor the format conversion framework.

Remove __always_inline. Related discussion in D47638.

Aren't we mixing up things here? Regarding performance, we definitely want __always_inline (or __attribute__((__always_inline__))) I suppose. The only issue with that is the unused warnings, which are fully legitimate because we define static functions that are unused in some translation units. There's other ways to fix that, and it seems strange to me that an additional __inline would prevent those warnings.

Tue, Feb 18, 2:22 PM
christos added inline comments to D49002: snd_hda(4): Add quirks for Lenovo ThinkBooks and ASUS TUFs.
Tue, Feb 18, 2:17 PM

Sat, Feb 15

christos requested review of D49024: sound: Make dev.pcm.X.mode dynamic.
Sat, Feb 15, 2:29 PM
christos requested review of D49021: sound: Retire SD_F_AUTOVCHAN.
Sat, Feb 15, 1:44 PM
christos requested review of D49019: snd_uaudio.4: Move non-uaudio-specific BUGS paragraph to pcm.4.
Sat, Feb 15, 12:32 PM
christos added a comment to D49002: snd_hda(4): Add quirks for Lenovo ThinkBooks and ASUS TUFs.

The commit message says "ALC257 codecs initialization", but in hdaa_patch_direct() and in pin_patch_realtek.h we seem to be affecting other codecs as well. Shouldn't the commit message reflect that?

Sat, Feb 15, 11:41 AM
christos added inline comments to D48809: [WIP] snd_hda: Attempt to automate pin patching.
Sat, Feb 15, 11:29 AM
christos added reviewers for D48809: [WIP] snd_hda: Attempt to automate pin patching: mav, wulf.
Sat, Feb 15, 11:29 AM

Fri, Feb 14

christos added a comment to D47638: sound: Implement AFMT_FLOAT support.

@Alexander88207_protonmail.com could you apply D47932, D48421 and D47638 again and see if everything works fine?

Fri, Feb 14, 3:58 PM
christos updated the diff for D47638: sound: Implement AFMT_FLOAT support.

Reflect changes in D47932.

Fri, Feb 14, 3:57 PM
christos updated the diff for D48421: sound: Turn PCM_CLAMP_* macros into a function.

Replace __always_inline __unused with __inline. Related discussion in
D47638.

Fri, Feb 14, 3:56 PM
christos updated the diff for D47932: sound: Refactor the format conversion framework.

Remove __always_inline. Related discussion in D47638.

Fri, Feb 14, 3:55 PM
christos added a comment to D47638: sound: Implement AFMT_FLOAT support.
[...]
  124 | static __always_inline __inline intpcm_t
      |                        ^
/usr/src/sys/dev/sound/pcm/pcm.h:220:24: error: duplicate 'inline' declaration specifier [-Werror,-Wduplicate-decl-specifier]
  220 | static __always_inline __inline intpcm_t
      |                        ^
[...]

Interesting, it builds fine for me. @markj do you have any clue as to why that is the case?

I'm not sure. __always_inline apparently includes the __inline qualifier as well, but that's not enough to suppress unused warnings with clang. See commit d25f0bdceb3ab for the justification of adding that qualifier in the first place. Perhaps it's a bad idea to use __always_inline for functions defined in a header file. I can't see any other examples of that in the kernel.

Do you think defining it as just __inline will suffice?

Fri, Feb 14, 3:00 PM
christos added a comment to D47638: sound: Implement AFMT_FLOAT support.
[...]
  124 | static __always_inline __inline intpcm_t
      |                        ^
/usr/src/sys/dev/sound/pcm/pcm.h:220:24: error: duplicate 'inline' declaration specifier [-Werror,-Wduplicate-decl-specifier]
  220 | static __always_inline __inline intpcm_t
      |                        ^
[...]

Interesting, it builds fine for me. @markj do you have any clue as to why that is the case?

I'm not sure. __always_inline apparently includes the __inline qualifier as well, but that's not enough to suppress unused warnings with clang. See commit d25f0bdceb3ab for the justification of adding that qualifier in the first place. Perhaps it's a bad idea to use __always_inline for functions defined in a header file. I can't see any other examples of that in the kernel.

Fri, Feb 14, 2:46 PM
christos added a comment to D47638: sound: Implement AFMT_FLOAT support.
[...]
  124 | static __always_inline __inline intpcm_t
      |                        ^
/usr/src/sys/dev/sound/pcm/pcm.h:220:24: error: duplicate 'inline' declaration specifier [-Werror,-Wduplicate-decl-specifier]
  220 | static __always_inline __inline intpcm_t
      |                        ^
[...]
Fri, Feb 14, 2:25 PM
christos updated the diff for D48809: [WIP] snd_hda: Attempt to automate pin patching.

Add more printfs.

Fri, Feb 14, 1:09 PM

Thu, Feb 13

christos added a comment to D47638: sound: Implement AFMT_FLOAT support.

@Alexander88207_protonmail.com now it should apply fine. Do not forget to apply D47932 and D48421 first.

Thu, Feb 13, 9:19 PM
christos updated the diff for D47638: sound: Implement AFMT_FLOAT support.

Reflect minor changes in D47932 so that patch can apply cleanly.

Thu, Feb 13, 9:18 PM
christos updated the diff for D48966: sound: Call chn_kill() in chn_init() failure.

Address Mark's comments.

Thu, Feb 13, 5:02 PM
christos added inline comments to D48966: sound: Call chn_kill() in chn_init() failure.
Thu, Feb 13, 5:01 PM

Wed, Feb 12

christos added inline comments to D48966: sound: Call chn_kill() in chn_init() failure.
Wed, Feb 12, 4:08 PM
christos requested review of D48966: sound: Call chn_kill() in chn_init() failure.
Wed, Feb 12, 4:05 PM
christos updated the summary of D48961: sound: Fix vchanrate and vchanformat.
Wed, Feb 12, 2:43 PM
christos updated the diff for D48962: sound: Update comment and channel insertion in vchan_create().

Typo.

Wed, Feb 12, 12:29 PM
christos requested review of D48962: sound: Update comment and channel insertion in vchan_create().
Wed, Feb 12, 12:28 PM
christos added a comment to D47917: sound: Allocate vchans on-demand.

I'm still a bit conflicted as to what approach is the best for this patch specifically. It's probably better not to over-complicate this patch, and instead either leave the vchanrate and vchanformat sysctls uninitialized until the first vchan is created, or just hardcode some value.
@dev_submerge.ch What do you think?

While the practical consequences of this issue are somewhat minor, what bothers me is the disconnectedness of sysctl settings and current state. We should either make the vchan* sysctls reflect the current software format of the primary channel. Or, as an alternative, make the vchan* settings a template for newly created vchans, independent of the current primary channel setup. It doesn't help to decide here that vchanrate only accepts hardware sample rates now, whereas the vchanformat can be chosen freely.

That being said, I'm fine with postponing these fixes, and I would recommend to merge this patch to get it exposed to more real-world testing. It's quite a fundamental change in behavior, but I'm done with reviewing from my side. Please take note of the issues I mentioned so we can tackle them in a future change.

Wed, Feb 12, 12:23 PM
christos requested review of D48961: sound: Fix vchanrate and vchanformat.
Wed, Feb 12, 12:21 PM

Tue, Feb 11

christos accepted D48926: sound tests: Fix downshift calculation in pcm_read_write test.
Tue, Feb 11, 11:43 PM
christos updated the diff for D47932: sound: Refactor the format conversion framework.

Use __inline instead __unused to silence warnings.

Tue, Feb 11, 3:27 PM
christos added inline comments to D47932: sound: Refactor the format conversion framework.
Tue, Feb 11, 3:24 PM
christos added inline comments to D47932: sound: Refactor the format conversion framework.
Tue, Feb 11, 3:17 PM
christos added a comment to D47932: sound: Refactor the format conversion framework.

I think with the recent fixes to the tests, and since all comments here have been addressed, we could go ahead with this?

Tue, Feb 11, 3:10 PM
christos added inline comments to D48926: sound tests: Fix downshift calculation in pcm_read_write test.
Tue, Feb 11, 1:30 PM
christos added a comment to D47638: sound: Implement AFMT_FLOAT support.

@Alexander88207_protonmail.com I remember you tested the patch when it was still a draft. Can you re-test please?

Tue, Feb 11, 1:01 PM
christos accepted D48926: sound tests: Fix downshift calculation in pcm_read_write test.

Tested it by undefing SND_PCM_64 and it works fine. Thank you.

Tue, Feb 11, 11:34 AM
christos requested review of D48940: snd_hda: Define ALC898.
Tue, Feb 11, 10:19 AM

Wed, Feb 5

christos added inline comments to D47917: sound: Allocate vchans on-demand.
Wed, Feb 5, 1:33 PM
christos updated the summary of D46700: sound: Introduce global driver lock.
Wed, Feb 5, 1:30 PM
christos updated the diff for D46700: sound: Introduce global driver lock.

Rebase on top of recent patches.

Wed, Feb 5, 1:29 PM
christos added a comment to D48421: sound: Turn PCM_CLAMP_* macros into a function.

I have a proposal to simplify this code, may be worth considering. The general idea would be to

  • Use normalized, full 32bit magnitude values for calculation.
  • In feeder_mixer.c, for 32bit calculation, check potential overflow before doing the addition, substitute PCM_S32_MIN or PCM_S32_MAX if it would overflow.
  • In feeder_volume.c, always use 64bit multiplication but make it clear to the compiler that the volume value is 16bit.

For the mixer this just takes a bit more logic on 32bit architectures, and for the volume multiplying a 16bit sample with a 16bit volume would now be two multiplication ops. On the positive side, we can always maintain the full 32bit resolution, and get rid of the whole *_calc() sample handling.

Does that make sense?

Wed, Feb 5, 12:30 PM
christos updated the diff for D48809: [WIP] snd_hda: Attempt to automate pin patching.
  • Fix a typo.
  • break at the end of the loop.
Wed, Feb 5, 11:36 AM

Tue, Feb 4

christos added inline comments to D48809: [WIP] snd_hda: Attempt to automate pin patching.
Tue, Feb 4, 12:38 PM

Mon, Feb 3

christos updated the diff for D48730: mixer(3): Do not skip devices with no volume control.

Address Ed's comment.

Mon, Feb 3, 1:25 PM
christos added inline comments to D48809: [WIP] snd_hda: Attempt to automate pin patching.
Mon, Feb 3, 12:48 PM
christos added a comment to D48809: [WIP] snd_hda: Attempt to automate pin patching.

This is still an experimental patch and not finished.

Mon, Feb 3, 12:43 PM
christos requested review of D48809: [WIP] snd_hda: Attempt to automate pin patching.
Mon, Feb 3, 12:39 PM
christos updated the diff for D47638: sound: Implement AFMT_FLOAT support.
  • Simplify read.
  • Make big-endian tests pass. Hopefully it will all work properly on actual big-endian architectures as well.
Mon, Feb 3, 10:32 AM

Sat, Feb 1

christos added a comment to D48730: mixer(3): Do not skip devices with no volume control.

Related discussion in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279787. The issue is solved with this patch.

Sat, Feb 1, 1:48 PM
christos retitled D48730: mixer(3): Do not skip devices with no volume control from mixer(3): Do not skip recording-only devices to mixer(3): Do not skip devices with no volume control.
Sat, Feb 1, 11:09 AM

Fri, Jan 31

christos requested review of D48765: sound: Retire Z_CLAMP().
Fri, Jan 31, 3:03 PM
christos requested review of D48764: sound: Retire FEEDEQ_CLAMP().
Fri, Jan 31, 3:03 PM

Thu, Jan 30

christos requested review of D48730: mixer(3): Do not skip devices with no volume control.
Thu, Jan 30, 5:57 PM
christos updated the diff for D47638: sound: Implement AFMT_FLOAT support.

Fix big endian regressions introduced in last diff.

Thu, Jan 30, 5:20 PM
christos updated the diff for D48394: sound: Simplify pcm/feeder_mixer.c.

Use the right pcm_sample_* variants.

Thu, Jan 30, 3:43 PM
christos updated the diff for D48394: sound: Simplify pcm/feeder_mixer.c.

Make z intpcm32_t.

Thu, Jan 30, 3:40 PM
christos added a comment to D48036: sound: Remove feed_matrix_apply_generic().

Bump.

Thu, Jan 30, 3:37 PM
christos updated the diff for D48421: sound: Turn PCM_CLAMP_* macros into a function.

Reflect changes in D47932.

Thu, Jan 30, 3:37 PM
christos added a comment to D48035: sound: Remove macro magic from pcm/feeder_matrix.c.

Bump.

Thu, Jan 30, 3:37 PM
christos added a comment to D48032: sound: Remove macro magic from pcm/feeder_eq.c.

Bump.

Thu, Jan 30, 3:37 PM
christos added a comment to D48031: sound: Bail out early if a format is not supported.

Bump.

Thu, Jan 30, 3:36 PM
christos added a comment to D48012: sound: Return if the new speed/format is the same as the current one.

@dev_submerge.ch @emaste Can you re-accept this patch?

Thu, Jan 30, 3:36 PM
christos updated the diff for D47932: sound: Refactor the format conversion framework.

Address comments.

Thu, Jan 30, 3:32 PM

Tue, Jan 28

christos committed rGe92226873681: sound tests: Fix 32bit calculation detection in pcm_read_write (authored by dev_submerge.ch).
sound tests: Fix 32bit calculation detection in pcm_read_write
Tue, Jan 28, 2:06 PM
christos committed rG5edda2488cc5: sound: Unit test the pcm sample read and write macros (authored by dev_submerge.ch).
sound: Unit test the pcm sample read and write macros
Tue, Jan 28, 2:06 PM
christos committed rG6819621ec999: sound: Safely remove channel from list in one pass (authored by dev_submerge.ch).
sound: Safely remove channel from list in one pass
Tue, Jan 28, 2:05 PM
christos committed rGafa1ba3b9c7a: sound tests: Fix gcc build (authored by christos).
sound tests: Fix gcc build
Tue, Jan 28, 2:05 PM
christos committed rGe4458d4d71c4: sound: Make CHN_REMOVE_SAFE() the default (authored by christos).
sound: Make CHN_REMOVE_SAFE() the default
Tue, Jan 28, 2:05 PM

Mon, Jan 27

christos added inline comments to D47932: sound: Refactor the format conversion framework.
Mon, Jan 27, 11:18 AM
christos added a comment to D48693: build/development.7: System building examples.

Thanks! That's how I create them, but this one changed too much for git-arc.sh update HEAD.

Mon, Jan 27, 11:05 AM
christos added a comment to D48693: build/development.7: System building examples.

Oops, I forgot to make the patch with -U9999 like bz taught me.
That, is an excellent example which I think is very appropriate to put in development(7).

Mon, Jan 27, 10:36 AM

Sat, Jan 25

christos added inline comments to D48394: sound: Simplify pcm/feeder_mixer.c.
Sat, Jan 25, 4:58 PM
christos added a comment to D47932: sound: Refactor the format conversion framework.

@dev_submerge.ch Both 32 and 64 bit tests pass normally (with the fix mentioned in D48330). Are we done with this one?

Sat, Jan 25, 4:18 PM
christos added inline comments to D48330: sound: Unit test the pcm sample read and write macros.
Sat, Jan 25, 4:07 PM
christos added inline comments to D48330: sound: Unit test the pcm sample read and write macros.
Sat, Jan 25, 3:53 PM

Thu, Jan 23

christos added inline comments to D47638: sound: Implement AFMT_FLOAT support.
Thu, Jan 23, 3:21 PM
christos updated the diff for D47638: sound: Implement AFMT_FLOAT support.
  • Fix bugs.
  • Write unit tests.
  • Re-arrange fpu_kern(9) calls.
Thu, Jan 23, 3:19 PM
christos added inline comments to D48336: sound: Handle multiple primary channel cases in vchan sysctls.
Thu, Jan 23, 12:59 PM
christos updated the diff for D48336: sound: Handle multiple primary channel cases in vchan sysctls.

Reflect changes in D48435. Hopefully last change.

Thu, Jan 23, 12:57 PM
christos updated the diff for D48435: sound: Report actual vchanrate and vchanformat in sysctl.

Assign to primary channel parameters.

Thu, Jan 23, 12:54 PM
christos added a comment to D48435: sound: Report actual vchanrate and vchanformat in sysctl.

Aren't vchanrate and vchanformat now completely disconnected from the actual parameters of the primary channel, until a vchan is opened?

Thu, Jan 23, 12:51 PM
christos committed rGe02b579b5379: sound tests: Fix 32bit calculation detection in pcm_read_write (authored by dev_submerge.ch).
sound tests: Fix 32bit calculation detection in pcm_read_write
Thu, Jan 23, 12:40 PM
christos closed D48617: sound tests: Fix 32bit calculation detection in pcm_read_write.
Thu, Jan 23, 12:40 PM
christos accepted D48617: sound tests: Fix 32bit calculation detection in pcm_read_write.

LGTM. I just saw that https://ci.freebsd.org/job/FreeBSD-main-i386-test/lastUnstableBuild/testReport/junit/sys.sound/pcm_read_write/pcm_read/ reported this error, as a result of the 32 -> 24 bit conversion not happening.

Thu, Jan 23, 12:30 PM
christos accepted D48507: development.7: Add example for just kernel modules.
Thu, Jan 23, 12:17 PM

Wed, Jan 22

christos added a comment to D48330: sound: Unit test the pcm sample read and write macros.

@christos, thanks - do we have some feedback on running the tests by now? I only know of ci.freebsd.org, and I couldn't find anything about test runs.

Wed, Jan 22, 2:27 PM
christos added a comment to D48507: development.7: Add example for just kernel modules.

I think we're missing the note I suggested: "I think it'd also make sense to mention that this can only work if the module is not built into the kernel."

Wed, Jan 22, 12:22 PM
christos added a comment to D48330: sound: Unit test the pcm sample read and write macros.

Pushed a fix for gcc builds: https://cgit.freebsd.org/src/commit/?id=f6631da0b581b28c2bfeea1199b52013bb46aa41

Wed, Jan 22, 12:14 PM
christos committed rGf6631da0b581: sound tests: Fix gcc build (authored by christos).
sound tests: Fix gcc build
Wed, Jan 22, 12:14 PM

Jan 21 2025

christos committed rGffcefe5310e0: sound: Make CHN_REMOVE_SAFE() the default (authored by christos).
sound: Make CHN_REMOVE_SAFE() the default
Jan 21 2025, 12:05 PM
christos closed D48249: sound: Make CHN_REMOVE_SAFE() the default.
Jan 21 2025, 12:05 PM
christos committed rG27b932e32fab: sound: Safely remove channel from list in one pass (authored by dev_submerge.ch).
sound: Safely remove channel from list in one pass
Jan 21 2025, 12:05 PM