Page MenuHomeFreeBSD

christos (Christos Margiolis)
User

Projects

User Details

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

Recent Activity

Sat, Mar 22

christos added a reviewer for D49216: sound: Implement /dev/dsp as a router device: kib.
Sat, Mar 22, 4:23 PM

Fri, Mar 21

christos added a comment to D49216: sound: Implement /dev/dsp as a router device.

So from a quick investigation, the problem with mmap seems to be the fact that the memory used by the mmap is actually a channel's buffer:

static int
dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offset,
    vm_size_t size, struct vm_object **object, int nprot)
{
        ...
	*offset = (uintptr_t)sndbuf_getbufofs(c->bufsoft, *offset);
        ...
}

Which means that when we hot-swap, and as a result, we close the previous device's channels, the buffer also gets deleted. I am wondering what a solution to this could be while also avoiding overcomplicating things. Perhaps we could use global (i.e., not per-channel) buffers so that we can point each new device to them?

Fri, Mar 21, 10:04 PM
christos updated the diff for D49216: sound: Implement /dev/dsp as a router device.

Do not ignore value from dsp_poll() in vdsp_poll(), otherwise we might block
there forever.

Fri, Mar 21, 9:49 PM
christos updated the diff for D49216: sound: Implement /dev/dsp as a router device.
  • bus_topo_lock() around uses of devclass_*().
  • Pass the unit as argument to vdsp_getdev(). Will be useful in the follow-up patch.
Fri, Mar 21, 9:10 PM
christos added a comment to D49449: audio/virtual_oss: Update to 1.3.2.

Out of curiosity, would there be any benefit to add support / replace fftw3 with https://github.com/kfrlib/kfr ( math/kfr ) ?

Fri, Mar 21, 9:07 PM
christos added a reviewer for D49449: audio/virtual_oss: Update to 1.3.2: diizzy.
Fri, Mar 21, 8:40 PM
christos added a reviewer for D46700: sound: Use bus_topo_lock() where appropriate: jhb.
Fri, Mar 21, 8:37 PM
christos retitled D49416: snd_hda: Patch Framework 16 AMD from snd_hda: Patch Framework 16" AMD to snd_hda: Patch Framework 16 AMD.
Fri, Mar 21, 8:33 PM
christos requested review of D49449: audio/virtual_oss: Update to 1.3.2.
Fri, Mar 21, 7:40 PM
christos abandoned D49390: virtual_oss: Retire -T option.

Committed and created new tag: https://github.com/freebsd/virtual_oss/commit/6d7f60c21497989f1527465f5e9b493174ac9095

Fri, Mar 21, 7:36 PM

Thu, Mar 20

christos committed rG7e8f29eb1b2c: snd_hda: Patch Framework AMD 13th gen (authored by christos).
snd_hda: Patch Framework AMD 13th gen
Thu, Mar 20, 12:36 AM
christos requested review of D49416: snd_hda: Patch Framework 16 AMD.
Thu, Mar 20, 12:09 AM

Wed, Mar 19

christos updated the diff for D48009: sound: Improve afmt_tab.

Fix 24-bit formats as well.

Wed, Mar 19, 6:36 PM
christos closed D49389: snd_hda: Support Intel Raptor Lake 0x7a50.
Wed, Mar 19, 6:19 PM
christos committed rGfc40132603f5: snd_hda: Support Intel Raptor Lake 0x7a50 (authored by christos).
snd_hda: Support Intel Raptor Lake 0x7a50
Wed, Mar 19, 6:19 PM
christos added a comment to D49216: sound: Implement /dev/dsp as a router device.

@mav @markj I have gotten down the functionality of splitting the default into playback and recording already, so I can confirm this is possible, but I still want to finalize this patch first before I submit the next one for review. The main problem currently is how we can trigger vdsp_getdev() from outside the cdevsw context, so that we can account for cases where an application may not call a cdevsw function for a while. Again, as I described in a previous comment, a possible scenario, which sounds a bit ugly IMHO, is to keep our own list of cdevprivs, so that we can fetch them whenever we want. I am not sure however if devfs_get_cdevpriv() would work in those cases, where the cdevsw function is triggered from outside the cdevsw context, though -- I'll need to test this. Do you have any ideas with regards to this?

Wed, Mar 19, 6:17 PM
christos abandoned D49396: snd_hda: Enable microphone redirection for ALC257.

Abandoning not exactly because of mav@'s comment per-se, but because I didn't realize that this patch could be problematic for people who plug into the headphone jack, but with headphones that do not have a microphone as well. I guess this is better set in /boot/device.hints.

Wed, Mar 19, 6:08 PM
christos committed rGb61c045ff868: sound: Remove redundant check in mixer_clone() (authored by christos).
sound: Remove redundant check in mixer_clone()
Wed, Mar 19, 2:54 PM

Tue, Mar 18

christos committed rG235fe911df59: include: add a userland version of __assert_unreachable (authored by kevans).
include: add a userland version of __assert_unreachable
Tue, Mar 18, 1:00 PM

Mon, Mar 17

christos requested changes to D49002: snd_hda(4): Add quirks for Lenovo ThinkBooks and ASUS TUFs.
Mon, Mar 17, 8:14 PM
christos added a comment to D49002: snd_hda(4): Add quirks for Lenovo ThinkBooks and ASUS TUFs.

New ALC257 patch: D49396

Mon, Mar 17, 8:13 PM
christos added a comment to D49396: snd_hda: Enable microphone redirection for ALC257.

@wulf Is this change breaking something on your device?

Mon, Mar 17, 8:13 PM
christos requested review of D49396: snd_hda: Enable microphone redirection for ALC257.
Mon, Mar 17, 8:12 PM
christos updated the diff for D49389: snd_hda: Support Intel Raptor Lake 0x7a50.

Address Ed's comment.

Mon, Mar 17, 7:54 PM
christos committed rG4ed0ca91a309: sound: Make feed_mixer_apply() __always_inline (authored by christos).
sound: Make feed_mixer_apply() __always_inline
Mon, Mar 17, 6:38 PM
christos committed rGcaa06360e655: sound: Update COPYRIGHT notices (authored by christos).
sound: Update COPYRIGHT notices
Mon, Mar 17, 6:38 PM
christos committed rG65dec169468c: sound: Make dev.pcm.X.mode dynamic (authored by christos).
sound: Make dev.pcm.X.mode dynamic
Mon, Mar 17, 6:38 PM
christos committed rG31ddfe9d9cf4: sound: Retire SD_F_AUTOVCHAN (authored by christos).
sound: Retire SD_F_AUTOVCHAN
Mon, Mar 17, 6:38 PM
christos committed rG42889e8e2f1a: sound: Take dsp_cdevsw out of header file (authored by christos).
sound: Take dsp_cdevsw out of header file
Mon, Mar 17, 6:38 PM
christos committed rGa33356100b85: sound: Simplify pcm/feeder_mixer.c (authored by christos).
sound: Simplify pcm/feeder_mixer.c
Mon, Mar 17, 6:38 PM
christos committed rG15dc84ba5f50: sound: Remove feed_matrix_apply_generic() (authored by christos).
sound: Remove feed_matrix_apply_generic()
Mon, Mar 17, 6:38 PM
christos committed rGa25f84cf0910: sound: Remove macro magic from pcm/feeder_matrix.c (authored by christos).
sound: Remove macro magic from pcm/feeder_matrix.c
Mon, Mar 17, 6:38 PM
christos committed rGb2adb71308af: sound: Remove macro magic from pcm/feeder_eq.c (authored by christos).
sound: Remove macro magic from pcm/feeder_eq.c
Mon, Mar 17, 6:38 PM
christos committed rGd8c3c6752bf8: sound: Turn clamp macros into a function (authored by christos).
sound: Turn clamp macros into a function
Mon, Mar 17, 6:37 PM
christos committed rG33529d6ad44d: sound: Refactor the format conversion framework (authored by christos).
sound: Refactor the format conversion framework
Mon, Mar 17, 6:37 PM

Sat, Mar 15

christos requested review of D49390: virtual_oss: Retire -T option.
Sat, Mar 15, 4:03 PM
christos requested review of D49389: snd_hda: Support Intel Raptor Lake 0x7a50.
Sat, Mar 15, 3:10 PM
christos added a comment to D47638: sound: Implement AFMT_FLOAT support.

I forgot to rebase it since I committed some patches. Try again. :-)

Thanks! I can confirm that the patches fix game crashing and sound issues in multiple games on LSU Steam + FreeBSD Proton, such as Tell Me Why, Dishonored 2, and Republique.

Glad to hear that! :-)

However, Cyberpunk 2077 still has broken, static sound output, even with the patch.

Is this related to the sound system? If yes, please open a bug report on Bugzilla and we can investigate it there.

Well, audio works correctly in the game if I choose PulseAudio or Alsa as the Wine sound backends (via winetricks) in the game. So it's only by using the OSS audio backend that sound is all static. Other games with fixed audio (with the patch) are using the OSS backend.

Sat, Mar 15, 1:48 PM

Fri, Mar 14

christos accepted D49350: hda: add macbook air 6,1 and 6,2 GPIO to enable amplifier.
Fri, Mar 14, 9:35 AM

Thu, Mar 13

christos committed rG68b6567d09dd: snd_hda: Patch Framework AMD 13th gen (authored by christos).
snd_hda: Patch Framework AMD 13th gen
Thu, Mar 13, 9:52 PM
christos closed D49346: snd_hda: Patch Framework AMD 13th gen.
Thu, Mar 13, 9:52 PM
christos requested review of D49346: snd_hda: Patch Framework AMD 13th gen.
Thu, Mar 13, 8:04 PM
christos added a comment to D47638: sound: Implement AFMT_FLOAT support.

I forgot to rebase it since I committed some patches. Try again. :-)

Thanks! I can confirm that the patches fix game crashing and sound issues in multiple games on LSU Steam + FreeBSD Proton, such as Tell Me Why, Dishonored 2, and Republique.

Thu, Mar 13, 11:04 AM

Wed, Mar 12

christos committed rGcabf76fde836: sound: Remove redundant check in mixer_clone() (authored by christos).
sound: Remove redundant check in mixer_clone()
Wed, Mar 12, 9:16 PM
christos updated the diff for D46700: sound: Use bus_topo_lock() where appropriate.

Address Mark's comments.

Wed, Mar 12, 9:12 PM
christos retitled D46700: sound: Use bus_topo_lock() where appropriate from sound: Introduce global driver lock to sound: Use bus_topo_lock() where appropriate.
Wed, Mar 12, 9:12 PM
christos added a comment to D47638: sound: Implement AFMT_FLOAT support.

It looks like the patch fails to apply against main:

$ git apply D47638.diff
error: patch failed: sys/dev/sound/pcm/feeder_mixer.c:73
error: sys/dev/sound/pcm/feeder_mixer.c: patch does not apply
Wed, Mar 12, 7:57 PM
christos updated the diff for D47638: sound: Implement AFMT_FLOAT support.

Rebase.

Wed, Mar 12, 7:57 PM
christos added a comment to D48961: sound: Fix vchanrate and vchanformat.

Bump.

Wed, Mar 12, 5:19 PM

Tue, Mar 11

christos added inline comments to D47638: sound: Implement AFMT_FLOAT support.
Tue, Mar 11, 8:49 PM

Mon, Mar 10

christos committed rG717adecbbb52: sound: Make feed_mixer_apply() __always_inline (authored by christos).
sound: Make feed_mixer_apply() __always_inline
Mon, Mar 10, 9:17 PM
christos committed rGc824383b269d: sound: Update COPYRIGHT notices (authored by christos).
sound: Update COPYRIGHT notices
Mon, Mar 10, 8:50 PM
christos committed rGab95710f30f7: sound: Make dev.pcm.X.mode dynamic (authored by christos).
sound: Make dev.pcm.X.mode dynamic
Mon, Mar 10, 8:50 PM
christos committed rG2fda8597116e: sound: Take dsp_cdevsw out of header file (authored by christos).
sound: Take dsp_cdevsw out of header file
Mon, Mar 10, 8:50 PM
christos committed rGb768f2c7773b: sound: Retire SD_F_AUTOVCHAN (authored by christos).
sound: Retire SD_F_AUTOVCHAN
Mon, Mar 10, 8:50 PM
christos closed D49024: sound: Make dev.pcm.X.mode dynamic.
Mon, Mar 10, 8:50 PM
christos closed D49021: sound: Retire SD_F_AUTOVCHAN.
Mon, Mar 10, 8:50 PM
christos closed D49217: sound: Take dsp_cdevsw out of header file.
Mon, Mar 10, 8:50 PM
christos committed rG4021fa32d92d: sound: Simplify pcm/feeder_mixer.c (authored by christos).
sound: Simplify pcm/feeder_mixer.c
Mon, Mar 10, 8:41 PM
christos closed D48394: sound: Simplify pcm/feeder_mixer.c.
Mon, Mar 10, 8:41 PM
christos added inline comments to D47638: sound: Implement AFMT_FLOAT support.
Mon, Mar 10, 8:40 PM
christos committed rGb73b5f70e9f6: sound: Remove feed_matrix_apply_generic() (authored by christos).
sound: Remove feed_matrix_apply_generic()
Mon, Mar 10, 8:23 PM
christos committed rGac24c9da8bb7: sound: Remove macro magic from pcm/feeder_matrix.c (authored by christos).
sound: Remove macro magic from pcm/feeder_matrix.c
Mon, Mar 10, 8:23 PM
christos committed rGe18d66d9c515: sound: Remove macro magic from pcm/feeder_eq.c (authored by christos).
sound: Remove macro magic from pcm/feeder_eq.c
Mon, Mar 10, 8:23 PM
christos committed rG433e270f341c: sound: Refactor the format conversion framework (authored by christos).
sound: Refactor the format conversion framework
Mon, Mar 10, 8:22 PM
christos committed rG4918fc2e238b: sound: Turn clamp macros into a function (authored by christos).
sound: Turn clamp macros into a function
Mon, Mar 10, 8:22 PM
christos closed D48036: sound: Remove feed_matrix_apply_generic().
Mon, Mar 10, 8:22 PM
christos closed D48035: sound: Remove macro magic from pcm/feeder_matrix.c.
Mon, Mar 10, 8:22 PM
christos closed D48032: sound: Remove macro magic from pcm/feeder_eq.c.
Mon, Mar 10, 8:22 PM
christos closed D47932: sound: Refactor the format conversion framework.
Mon, Mar 10, 8:22 PM
christos closed D48421: sound: Turn clamp macros into a function.
Mon, Mar 10, 8:22 PM
christos added inline comments to D47638: sound: Implement AFMT_FLOAT support.
Mon, Mar 10, 8:21 PM
christos retitled D48421: sound: Turn clamp macros into a function from sound: Turn PCM_CLAMP_* macros into a function to sound: Turn clamp macros into a function.
Mon, Mar 10, 8:11 PM
christos abandoned D48765: sound: Retire Z_CLAMP().

Merged with D48421.

Mon, Mar 10, 8:11 PM
christos abandoned D48764: sound: Retire FEEDEQ_CLAMP().

Merged with D48421.

Mon, Mar 10, 8:11 PM
christos added inline comments to D47638: sound: Implement AFMT_FLOAT support.
Mon, Mar 10, 6:48 PM
christos added inline comments to D46700: sound: Use bus_topo_lock() where appropriate.
Mon, Mar 10, 11:43 AM

Sat, Mar 8

christos added a comment to D46700: sound: Use bus_topo_lock() where appropriate.

Is this good to go?

Sat, Mar 8, 12:45 PM

Fri, Mar 7

christos updated the diff for D49216: sound: Implement /dev/dsp as a router device.
  • Address ziaee@'s man page comment.
  • Restored hw.snd.basename_clone and dsp_clone(), but instead of cloning /dev/dsp${hw.snd.default_unit}, we are cloning vdsp_cdev, which is defined as /dev/vdsp. This way we preserve backwards compatibility with virtual_oss, since it can override /dev/dsp with its own. Update man page accordingly.
  • Check whether the channels are not NULL, as opposed to checking priv->flags and assuming the channels will be non-NULL.
  • Check for !DSP_REGISTERED() after acquiring the new cdevpriv in vdsp_getdev(), as well as in vdsp_open().
Fri, Mar 7, 12:36 PM
christos updated the summary of D49216: sound: Implement /dev/dsp as a router device.
Fri, Mar 7, 12:10 PM
christos added a comment to D49216: sound: Implement /dev/dsp as a router device.
Fri, Mar 7, 11:12 AM

Thu, Mar 6

christos added a comment to D49216: sound: Implement /dev/dsp as a router device.

Patch does not apply to CURRENT. Also, may I have your permission to post this on the Reddit?{F111680852}

Thu, Mar 6, 11:21 PM
christos added inline comments to D49216: sound: Implement /dev/dsp as a router device.
Thu, Mar 6, 4:01 PM
christos added a comment to D49216: sound: Implement /dev/dsp as a router device.

@dev_submerge.ch If I'm not mistaken, your sosso library works with mmap. Could the test case it has be of any use to make sure this patch doesn't break anything?

Thu, Mar 6, 1:13 PM
christos updated the diff for D47638: sound: Implement AFMT_FLOAT support.

Reflect changes in D47932.

Thu, Mar 6, 1:07 PM
christos updated the diff for D48421: sound: Turn clamp macros into a function.

Reflect changes in D47932.

Thu, Mar 6, 1:07 PM
christos updated the diff for D47932: sound: Refactor the format conversion framework.

Return to __always_inline __unused. I think it is better to leave it like
that for now and avoid complicating the code base further.

Thu, Mar 6, 1:06 PM
christos accepted D49002: snd_hda(4): Add quirks for Lenovo ThinkBooks and ASUS TUFs.

With the exception of the latest comments I left last time, LGTM.

Thu, Mar 6, 1:00 PM
christos added a comment to D47932: sound: Refactor the format conversion framework.

I think we should just go ahead with using __always_inline __unused for now.

Thu, Mar 6, 12:35 PM

Tue, Mar 4

christos committed rG311b84540e73: mixer(3): Do not skip devices with no volume control (authored by christos).
mixer(3): Do not skip devices with no volume control
Tue, Mar 4, 3:48 PM
christos committed rG8278fd982926: RELNOTES: Add 960ee8094913 note (authored by christos).
RELNOTES: Add 960ee8094913 note
Tue, Mar 4, 3:48 PM
christos committed rG0a309ec1b802: snd_uaudio.4: Move non-uaudio-specific BUGS paragraph to pcm.4 (authored by christos).
snd_uaudio.4: Move non-uaudio-specific BUGS paragraph to pcm.4
Tue, Mar 4, 3:48 PM
christos committed rG858504a1d89f: sound: Call chn_kill() in chn_init() failure (authored by christos).
sound: Call chn_kill() in chn_init() failure
Tue, Mar 4, 3:48 PM
christos committed rG127a39c54c2b: sound: Update comment and channel insertion in vchan_create() (authored by christos).
sound: Update comment and channel insertion in vchan_create()
Tue, Mar 4, 3:48 PM
christos committed rGbd9a9c001951: snd_uaudio: Remove undefined functions (authored by christos).
snd_uaudio: Remove undefined functions
Tue, Mar 4, 3:48 PM
christos committed rGcd4615c223b3: sound: Simplify locking during device creation (authored by christos).
sound: Simplify locking during device creation
Tue, Mar 4, 3:48 PM
christos committed rG21e0d2aa35bf: sound: Return if the new speed/format is the same as the current one (authored by christos).
sound: Return if the new speed/format is the same as the current one
Tue, Mar 4, 3:48 PM
christos committed rG9091f61d2f2c: sound: Get rid of redundant variables in chn_setspeed() and chn_setformat() (authored by christos).
sound: Get rid of redundant variables in chn_setspeed() and chn_setformat()
Tue, Mar 4, 3:48 PM
christos committed rG5dc0c867c8ca: sound: Remove SNDBUF_LOCKASSERT() (authored by christos).
sound: Remove SNDBUF_LOCKASSERT()
Tue, Mar 4, 3:48 PM
christos committed rG905ae2bc6a27: sound: Handle multiple primary channel cases in vchan sysctls (authored by christos).
sound: Handle multiple primary channel cases in vchan sysctls
Tue, Mar 4, 3:47 PM