Page MenuHomeFreeBSD

christos (Christos Margiolis)
User

Projects

User Details

User Since
Jul 2 2021, 4:03 PM (152 w, 18 h)

Recent Activity

Sun, May 26

christos committed rG38286d9f6828: pcm: centralize 32-bit ioctl compat (authored by brooks).
pcm: centralize 32-bit ioctl compat
Sun, May 26, 1:53 PM

Sat, May 25

christos committed rG63be29379cb1: mixer.3: Fix mandoc -Tlint warnings (authored by christos).
mixer.3: Fix mandoc -Tlint warnings
Sat, May 25, 7:32 PM
christos committed rG0aa767021c19: sound: Fix minchn, maxchn and fmts in sndstat_get_caps() (authored by christos).
sound: Fix minchn, maxchn and fmts in sndstat_get_caps()
Sat, May 25, 7:32 PM
christos committed rGe279b7aa5d31: mixer(8): Use mixer_get_path() (authored by christos).
mixer(8): Use mixer_get_path()
Sat, May 25, 7:32 PM
christos committed rG0a1eb394d7b6: mixer(3): Implement mixer_get_path() function (authored by christos).
mixer(3): Implement mixer_get_path() function
Sat, May 25, 7:32 PM
christos committed rGcd254b9243d3: mixer(8): Ignore mixer_open() failures for the -a option (authored by christos).
mixer(8): Ignore mixer_open() failures for the -a option
Sat, May 25, 7:32 PM
christos committed rGab7c89415462: sound: Handle unavailable devices in various OSS IOCTLs (authored by christos).
sound: Handle unavailable devices in various OSS IOCTLs
Sat, May 25, 7:32 PM
christos committed rGe8a80b4e50e8: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO (authored by christos).
sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO
Sat, May 25, 7:32 PM

Thu, May 23

christos committed rG425a7bc465d4: sound: Fix minchn, maxchn and fmts in sndstat_get_caps() (authored by christos).
sound: Fix minchn, maxchn and fmts in sndstat_get_caps()
Thu, May 23, 12:58 AM
christos committed rG1ab62c8d0674: mixer.3: Fix mandoc -Tlint warnings (authored by christos).
mixer.3: Fix mandoc -Tlint warnings
Thu, May 23, 12:58 AM
christos committed rGe3b94b375e1d: mixer(8): Use mixer_get_path() (authored by christos).
mixer(8): Use mixer_get_path()
Thu, May 23, 12:58 AM
christos committed rG67c89b21b956: mixer(3): Implement mixer_get_path() function (authored by christos).
mixer(3): Implement mixer_get_path() function
Thu, May 23, 12:58 AM
christos committed rG0e80798518be: mixer(8): Ignore mixer_open() failures for the -a option (authored by christos).
mixer(8): Ignore mixer_open() failures for the -a option
Thu, May 23, 12:58 AM
christos closed D45312: sound: Fix minchn, maxchn and fmts in sndstat_get_caps().
Thu, May 23, 12:58 AM
christos committed rG5d980fadf73d: sound: Handle unavailable devices in various OSS IOCTLs (authored by christos).
sound: Handle unavailable devices in various OSS IOCTLs
Thu, May 23, 12:58 AM
christos committed rGe07f9178502b: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO (authored by christos).
sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO
Thu, May 23, 12:58 AM
christos closed D45290: mixer.3: Fix mandoc -Tlint warnings.
Thu, May 23, 12:58 AM
christos closed D45276: mixer(8): Use mixer_get_path().
Thu, May 23, 12:58 AM
christos closed D45275: mixer(3): Implement mixer_get_path() function.
Thu, May 23, 12:58 AM
christos closed D45151: mixer(8): Ignore mixer_open() failures for the -a option.
Thu, May 23, 12:58 AM
christos closed D45256: sound: Handle unavailable devices in various OSS IOCTLs.
Thu, May 23, 12:58 AM
christos closed D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.
Thu, May 23, 12:58 AM
christos committed rG1fb0a65ab2dd: snd_hda: Add patch for Asus UX331UAL (authored by Lutz Bichler <Lutz.Bichler@gmail.com>).
snd_hda: Add patch for Asus UX331UAL
Thu, May 23, 12:25 AM
christos added a comment to D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.

I think this patch should fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252761 as well.

Thu, May 23, 12:15 AM
christos updated the summary of D45312: sound: Fix minchn, maxchn and fmts in sndstat_get_caps().
Thu, May 23, 12:12 AM
christos updated the diff for D45312: sound: Fix minchn, maxchn and fmts in sndstat_get_caps().

Address Florian's comment.

Thu, May 23, 12:12 AM
christos retitled D45312: sound: Fix minchn, maxchn and fmts in sndstat_get_caps() from sound: Fix min and max channel counting in sndstat_get_caps() to sound: Fix minchn, maxchn and fmts in sndstat_get_caps().
Thu, May 23, 12:11 AM
christos added inline comments to D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.
Thu, May 23, 12:05 AM
christos updated the diff for D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.

Fix minch initialization.

Thu, May 23, 12:04 AM

Wed, May 22

christos updated the diff for D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.

Simplify min/max stuff in dsp_oss_audioinfo().

Wed, May 22, 11:31 PM
christos accepted D45307: pcm: centralize 32-bit ioctl compat.

LGTM.

Wed, May 22, 11:29 PM
christos requested review of D45312: sound: Fix minchn, maxchn and fmts in sndstat_get_caps().
Wed, May 22, 11:19 PM
christos added a comment to D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.

Tests with ossinfo(1) run fine.

Wed, May 22, 10:50 PM
christos updated the summary of D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.
Wed, May 22, 10:49 PM
christos updated the diff for D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.

Address all Florian's comments. Apply the following changes:

Wed, May 22, 10:49 PM
christos closed D45238: snd_hda: Add patch for Asus UX331UAL.
Wed, May 22, 10:21 PM
christos committed rG93ad59a25189: snd_hda: Add patch for Asus UX331UAL (authored by Lutz Bichler <Lutz.Bichler@gmail.com>).
snd_hda: Add patch for Asus UX331UAL
Wed, May 22, 10:21 PM
christos committed rG0b367134dd92: sound: Make SNDST_UNVLBUF_MAX a power of two (authored by christos).
sound: Make SNDST_UNVLBUF_MAX a power of two
Wed, May 22, 1:24 PM
christos committed rG8d3f96bd85c9: sound: Correctly check nvlist_unpack() error (authored by christos).
sound: Correctly check nvlist_unpack() error
Wed, May 22, 1:24 PM
christos committed rG18f80d6d4634: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* (authored by christos).
sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*
Wed, May 22, 1:24 PM
christos committed rG5a9a2f5eed47: snd_hda: Rename LENOVO_I* to LENOVO_IDEAPAD* (authored by christos).
snd_hda: Rename LENOVO_I* to LENOVO_IDEAPAD*
Wed, May 22, 1:24 PM
christos committed rGcb23e0eebfe2: snd_hda: Add patch for Lenovo Ideapad 3 (authored by christos).
snd_hda: Add patch for Lenovo Ideapad 3
Wed, May 22, 1:23 PM
christos committed rGa0ff4e0f3e02: sound: Fix oss_sysinfo->numcards (authored by christos).
sound: Fix oss_sysinfo->numcards
Wed, May 22, 1:23 PM
christos committed rGa4a473104ec4: sound: Remove nmix variable from mixer_oss_mixerinfo() (authored by christos).
sound: Remove nmix variable from mixer_oss_mixerinfo()
Wed, May 22, 1:23 PM

Tue, May 21

christos updated the diff for D45275: mixer(3): Implement mixer_get_path() function.

Mention EXAMPLES section in mixer_get_nmixers().

Tue, May 21, 10:33 PM
christos requested review of D45290: mixer.3: Fix mandoc -Tlint warnings.
Tue, May 21, 10:29 PM
christos updated the diff for D45256: sound: Handle unavailable devices in various OSS IOCTLs.

Update mixer_get_nmixers() entry in mixer.3.

Tue, May 21, 10:24 PM
christos committed rGeba949c37e64: sound: Make SNDST_UNVLBUF_MAX a power of two (authored by christos).
sound: Make SNDST_UNVLBUF_MAX a power of two
Tue, May 21, 5:54 PM
christos committed rG5830a00c2c54: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* (authored by christos).
sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*
Tue, May 21, 5:54 PM
christos committed rG45feaa73c680: sound: Correctly check nvlist_unpack() error (authored by christos).
sound: Correctly check nvlist_unpack() error
Tue, May 21, 5:54 PM
christos committed rGbca6f391aed9: sound: Prevent uninitialized variable destruction in chn_init() (authored by christos).
sound: Prevent uninitialized variable destruction in chn_init()
Tue, May 21, 5:54 PM
christos committed rG8a15d5e7223d: sound: Get rid of redundant assignments in chn_init() (authored by christos).
sound: Get rid of redundant assignments in chn_init()
Tue, May 21, 5:54 PM

Mon, May 20

christos updated the diff for D45275: mixer(3): Implement mixer_get_path() function.

Address Florian's comments.

Mon, May 20, 8:23 PM
christos added inline comments to D45275: mixer(3): Implement mixer_get_path() function.
Mon, May 20, 8:06 PM
christos added a comment to D45256: sound: Handle unavailable devices in various OSS IOCTLs.

@dev_submerge.ch I am not really sure if we can implement this in SNDCTL_ENGINEINFO as well. In SNDCTL_ENGINEINFO we choose an "engine"/channel on a device that is already opened, so in the case of an unavailable device, we won't be able to open it in the first place.

There's no 1:1 mapping from engines (virtual channels) to pcm devices anyway. I think the only thing we care about with SNDCTL_ENGINEINFO is that applications can iterate them using numaudioengines as expected.

Mon, May 20, 5:57 PM
christos added inline comments to D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.
Mon, May 20, 5:46 PM
christos committed rGd59058f3b313: sound: Make SNDST_UNVLBUF_MAX a power of two (authored by christos).
sound: Make SNDST_UNVLBUF_MAX a power of two
Mon, May 20, 5:42 PM
christos closed D45277: sound: Make SNDST_UNVLBUF_MAX a power of two.
Mon, May 20, 5:41 PM
christos requested review of D45277: sound: Make SNDST_UNVLBUF_MAX a power of two.
Mon, May 20, 5:32 PM
christos updated the summary of D45256: sound: Handle unavailable devices in various OSS IOCTLs.
Mon, May 20, 5:01 PM
christos abandoned D45150: sound: Fix oss_sysinfo->nummixers.

Merged with D45256.

Mon, May 20, 5:01 PM
christos updated the diff for D45256: sound: Handle unavailable devices in various OSS IOCTLs.

Merge with D45150.

Mon, May 20, 5:01 PM
christos updated the diff for D45256: sound: Handle unavailable devices in various OSS IOCTLs.

Address Mark's comments.

Mon, May 20, 4:50 PM
christos abandoned D45154: mixer.3: Showcase example of how to loop through all mixers.

D45275 and D45276.

Mon, May 20, 4:45 PM
christos requested review of D45276: mixer(8): Use mixer_get_path().
Mon, May 20, 4:44 PM
christos requested review of D45275: mixer(3): Implement mixer_get_path() function.
Mon, May 20, 4:44 PM
christos added inline comments to D45154: mixer.3: Showcase example of how to loop through all mixers.
Mon, May 20, 3:45 PM
christos committed rG64f4e2db6d19: sound: Correctly check nvlist_unpack() error (authored by christos).
sound: Correctly check nvlist_unpack() error
Mon, May 20, 2:19 PM
christos committed rG074d337ad618: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* (authored by christos).
sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*
Mon, May 20, 2:19 PM
christos closed D45237: sound: Correctly check nvlist_unpack() error.
Mon, May 20, 2:19 PM
christos closed D45236: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*.
Mon, May 20, 2:19 PM
christos committed rG5d1a5d6f1f59: sound: Prevent uninitialized variable destruction in chn_init() (authored by christos).
sound: Prevent uninitialized variable destruction in chn_init()
Mon, May 20, 2:15 PM
christos committed rG2db2292dac73: sound: Get rid of redundant assignments in chn_init() (authored by christos).
sound: Get rid of redundant assignments in chn_init()
Mon, May 20, 2:15 PM
christos closed D45272: sound: Prevent uninitialized variable destruction in chn_init().
Mon, May 20, 2:15 PM
christos closed D45273: sound: Get rid of redundant assignments in chn_init().
Mon, May 20, 2:15 PM
christos updated the diff for D45272: sound: Prevent uninitialized variable destruction in chn_init().

Address Mark's comment.

Mon, May 20, 2:12 PM
christos added inline comments to D45272: sound: Prevent uninitialized variable destruction in chn_init().
Mon, May 20, 2:12 PM
christos requested review of D45273: sound: Get rid of redundant assignments in chn_init().
Mon, May 20, 2:11 PM
christos requested review of D45272: sound: Prevent uninitialized variable destruction in chn_init().
Mon, May 20, 2:03 PM

Sun, May 19

christos added a comment to D45150: sound: Fix oss_sysinfo->nummixers.

We're missing a piece of the puzzle, as mixer_oss_mixerinfo() still skips unavailable devices. Which means SNDCTL_MIXERINFO returns an error instead of a device with enabled == 0, thus breaking the ossinfo utility from audio/oss, and probably other software using the same approach.

That's right. So before I implement this I want to make sure we agree on what each oss_mixerinfo field should contain:

devloop counter
idmixer<loop counter> (unavailable)
namePerhaps something like pcm<loop_counter>:mixer (unavailable)
modify_counter0
card_numberloop counter
port_number0
enabled0
capsNot supported.
nrextNot supported.
priorityNot supported.
devnodeNothing.
legacy_deviceloop counter

I am not really sure whether we want to include the mixer name in id and name or simply leave it blank, or unavailable.

I would include the mixer name both in id and name, as those fields may be shown to the user in a list of mixer devices. It's more obvious than leaving them blank. I think your suggested strings are fine, except that id is only 16 bytes. Maybe mixer<loop counter> (n/a)?

The other values look good to me.

Also, in oss_mixerinfo() there are two cases where we can skip a device:

  1. if (!PCM_REGISTERED(d) || PCM_DETACHING(d))
  2. if (d->mixer_dev != NULL && d->mixer_dev->si_drv1 != NULL && ((mi->dev == -1 && d->mixer_dev == i_dev) || mi->dev == i))

I think it's better to handle both cases the same way, that is, return a structure with the values described above, instead of handling them differently.

Not sure I understand the question here. I think I would use ((mi->dev == -1 && d->mixer_dev == i_dev) || mi->dev == i) as an outer if to select the requested device, and then the other indicators to decide whether the requested device is available or not. Does that make sense?

Sun, May 19, 9:36 PM
christos added inline comments to D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.
Sun, May 19, 9:36 PM
christos updated the diff for D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.

Add locking around loop in AUDIOINFO. Haven't addressed Florian's comments yet.

Sun, May 19, 9:34 PM
christos added a comment to D45256: sound: Handle unavailable devices in various OSS IOCTLs.

@dev_submerge.ch I am not really sure if we can implement this in SNDCTL_ENGINEINFO as well. In SNDCTL_ENGINEINFO we choose an "engine"/channel on a device that is already opened, so in the case of an unavailable device, we won't be able to open it in the first place.

Sun, May 19, 9:34 PM
christos requested review of D45256: sound: Handle unavailable devices in various OSS IOCTLs.
Sun, May 19, 9:32 PM
christos updated the diff for D45236: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*.

Address brooks' comments.

Sun, May 19, 6:56 PM
christos retitled D45236: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* from sound: Check user-supplied size passed to sndstat_ioctl() to sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*.
Sun, May 19, 6:56 PM
christos added inline comments to D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.
Sun, May 19, 6:26 PM
christos added inline comments to D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.
Sun, May 19, 6:20 PM

Sat, May 18

christos added a comment to D45237: sound: Correctly check nvlist_unpack() error.

The current check is never false and If nvlist_unpack(), we might panic later down the road.

Commit message should probably be "... if nvlist_unpack() fails, ..."?

Sat, May 18, 1:28 AM
christos requested review of D45238: snd_hda: Add patch for Asus UX331UAL.
Sat, May 18, 12:07 AM

Fri, May 17

christos added inline comments to D45236: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*.
Fri, May 17, 11:22 PM
christos added a reviewer for D45236: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*: brooks.
Fri, May 17, 10:51 PM
christos updated the diff for D45236: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*.

Address brooks' comment.

Fri, May 17, 10:48 PM
christos updated the test plan for D45237: sound: Correctly check nvlist_unpack() error.
Fri, May 17, 10:40 PM
christos requested review of D45237: sound: Correctly check nvlist_unpack() error.
Fri, May 17, 10:39 PM
christos added a comment to D45236: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*.

You need to decide the type of data based on the command passed before you examine it so you'll need a case statement before the tests. I'd also tend not to assign the arg/arg32 until you've decided the type. Additionally, data will be NULL for at least SNDSTIOC_REFRESH_DEVS and SNDSTIOC_FLUSH_USER_DEVS,

Fri, May 17, 10:32 PM
christos added a reviewer for D45236: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*: imp.
Fri, May 17, 9:38 PM
christos added inline comments to D45236: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*.
Fri, May 17, 9:37 PM
christos updated the test plan for D45236: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*.
Fri, May 17, 9:36 PM
christos requested review of D45236: sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*.
Fri, May 17, 9:33 PM