Page MenuHomeFreeBSD

christos (Christos Margiolis)
User

Projects

User Details

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

Recent Activity

Yesterday

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
christos committed rGa19d42b08a40: sound: Remove ncards variable from sound_oss_card_info() (authored by christos).
sound: Remove ncards variable from sound_oss_card_info()
Fri, May 17, 7:34 PM
christos committed rG7814ed2bd321: snd_hda: Rename LENOVO_I* to LENOVO_IDEAPAD* (authored by christos).
snd_hda: Rename LENOVO_I* to LENOVO_IDEAPAD*
Fri, May 17, 7:34 PM
christos committed rG9a620018afb2: snd_hda: Add patch for Lenovo Ideapad 3 (authored by christos).
snd_hda: Add patch for Lenovo Ideapad 3
Fri, May 17, 7:34 PM
christos committed rG15aa8688d036: sound: Rename oss_audioinfo->real_device to oss_audioinfo->legacy_device (authored by christos).
sound: Rename oss_audioinfo->real_device to oss_audioinfo->legacy_device
Fri, May 17, 7:34 PM
christos committed rG8bd14f511efa: sound: Add missing oss_mixerinfo devnode and legacy_device fields (authored by christos).
sound: Add missing oss_mixerinfo devnode and legacy_device fields
Fri, May 17, 7:34 PM
christos committed rG2b3698288771: sound: Fix oss_sysinfo->numcards (authored by christos).
sound: Fix oss_sysinfo->numcards
Fri, May 17, 7:34 PM
christos committed rG8b4e2ba31d1b: sound: Remove nmix variable from mixer_oss_mixerinfo() (authored by christos).
sound: Remove nmix variable from mixer_oss_mixerinfo()
Fri, May 17, 7:34 PM
christos committed rG71b9b8d34bb7: arm: Remove stray references to dev/sound/chip.h (authored by christos).
arm: Remove stray references to dev/sound/chip.h
Fri, May 17, 7:34 PM
christos committed rG00f9d84ee207: sound: Update pcm/vchan.c LICENSE header (authored by christos).
sound: Update pcm/vchan.c LICENSE header
Fri, May 17, 7:34 PM
christos committed rG17a50abe0e19: sound: Remove unused "num" argument from chn_init() and related callers (authored by christos).
sound: Remove unused "num" argument from chn_init() and related callers
Fri, May 17, 7:34 PM
christos committed rGab7c01f9e82c: sound: Move vchan-related code to pcm/vchan.* (authored by christos).
sound: Move vchan-related code to pcm/vchan.*
Fri, May 17, 7:34 PM
christos committed rG99e372420df4: sound: Rename pcm_getparentchannel() to vchan_getparentchannel() (authored by christos).
sound: Rename pcm_getparentchannel() to vchan_getparentchannel()
Fri, May 17, 7:34 PM
christos committed rG00b0cbf98bb7: sound: Use nitems() where possible (authored by christos).
sound: Use nitems() where possible
Fri, May 17, 7:34 PM
christos committed rG6f6cc9324131: sound: Remove unused dsp_cdevs[] fields and devices (authored by christos).
sound: Remove unused dsp_cdevs[] fields and devices
Fri, May 17, 7:33 PM
christos committed rGe14f7d11cb2f: sound: Move chip.h contents to pcm/sound.h (authored by christos).
sound: Move chip.h contents to pcm/sound.h
Fri, May 17, 7:33 PM
christos committed rGd1eaefde3bca: sound: Remove hw.snd.version and SND_DRV_VERSION (authored by christos).
sound: Remove hw.snd.version and SND_DRV_VERSION
Fri, May 17, 7:33 PM
christos committed rG2c53a4bbcb17: sound: Convert pcm_chn_add() to void (authored by christos).
sound: Convert pcm_chn_add() to void
Fri, May 17, 7:33 PM
christos committed rGe6e7bf7087fb: sound: Add __assert_unreachable() to default cases in pcm_chn_add() and… (authored by christos).
sound: Add __assert_unreachable() to default cases in pcm_chn_add() and…
Fri, May 17, 7:33 PM
christos committed rG13ee4d7f332e: sound: Merge pcm_chn_create() and chn_init() (authored by christos).
sound: Merge pcm_chn_create() and chn_init()
Fri, May 17, 7:33 PM
christos committed rG0baaaf8543d5: sound: Remove chn_timeout check from chn_init() (authored by christos).
sound: Remove chn_timeout check from chn_init()
Fri, May 17, 7:33 PM
christos committed rG930b5a3c07f2: sound: Move pcm_chnref() and pcm_chnrelease() to pcm/channel.c (authored by christos).
sound: Move pcm_chnref() and pcm_chnrelease() to pcm/channel.c
Fri, May 17, 7:32 PM
christos committed rG532b1efd2d2e: sound: Merge pcm_chn_destroy() and chn_kill() (authored by christos).
sound: Merge pcm_chn_destroy() and chn_kill()
Fri, May 17, 7:32 PM
christos committed rGad677fb457bb: sound: Retire unit.* (authored by christos).
sound: Retire unit.*
Fri, May 17, 7:32 PM
christos committed rG41dee6355556: sound: Remove obsolete DV_F_* flags (authored by christos).
sound: Remove obsolete DV_F_* flags
Fri, May 17, 7:32 PM
christos committed rG98157281725b: sound: Simplify unit fetching in dsp_oss_audioinfo() (authored by christos).
sound: Simplify unit fetching in dsp_oss_audioinfo()
Fri, May 17, 7:32 PM
christos committed rGdecc224ab899: sound: Remove PCMMINOR() (authored by christos).
sound: Remove PCMMINOR()
Fri, May 17, 7:32 PM
christos committed rGd27972ec911d: sound: Get rid of snddev_info->devcount (authored by christos).
sound: Get rid of snddev_info->devcount
Fri, May 17, 7:32 PM
christos committed rG69707d9f5091: sound: Call device_get_name() and device_get_unit() only once in mixer_init() (authored by christos).
sound: Call device_get_name() and device_get_unit() only once in mixer_init()
Fri, May 17, 7:31 PM
christos committed rG8771127d75a1: sound: Be more verbose with virtual channel descriptions (authored by christos).
sound: Be more verbose with virtual channel descriptions
Fri, May 17, 7:31 PM

Tue, May 14

christos committed rG305db91d4b92: sound: Remove ncards variable from sound_oss_card_info() (authored by christos).
sound: Remove ncards variable from sound_oss_card_info()
Tue, May 14, 1:43 PM
christos committed rG54cc353f505d: snd_hda: Add patch for Lenovo Ideapad 3 (authored by christos).
snd_hda: Add patch for Lenovo Ideapad 3
Tue, May 14, 1:43 PM
christos committed rG278953360e0e: snd_hda: Rename LENOVO_I* to LENOVO_IDEAPAD* (authored by christos).
snd_hda: Rename LENOVO_I* to LENOVO_IDEAPAD*
Tue, May 14, 1:43 PM
christos closed D45144: sound: Remove ncards variable from sound_oss_card_info().
Tue, May 14, 1:43 PM
christos closed D45105: snd_hda: Rename LENOVO_I* to LENOVO_IDEAPAD*.
Tue, May 14, 1:43 PM
christos closed D45100: snd_hda: Add patch for Lenovo Ideapad 3.
Tue, May 14, 1:42 PM

Sat, May 11

christos added inline comments to D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.
Sat, May 11, 5:12 PM
christos updated the test plan for D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.
Sat, May 11, 5:10 PM
christos updated the test plan for D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.
Sat, May 11, 5:10 PM
christos requested review of D45164: sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO.
Sat, May 11, 5:08 PM
christos added a comment to D45150: sound: Fix oss_sysinfo->nummixers.

Also it seems like this fallback mechanism is needed by a few other ioctls, so I think it's better to fix all of them in a single patch.

Sat, May 11, 4:34 PM
christos added a comment to D45150: sound: Fix oss_sysinfo->nummixers.

@dev_submerge.ch Can you test that this and D45151 fix the problem? I cannot reproduce it right now.

The mixer does see devices now that come after the unavailable ones. But it shows no device description for it.

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.

Sat, May 11, 3:22 PM

Fri, May 10

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

@dev_submerge.ch Can you test that this and D45151 fix the problem? I cannot reproduce it right now.

Fri, May 10, 4:50 PM
christos requested review of D45154: mixer.3: Showcase example of how to loop through all mixers.
Fri, May 10, 4:49 PM
christos requested review of D45151: mixer(8): Ignore mixer_open() failures for the -a option.
Fri, May 10, 4:42 PM