pckbd volume keys (part 1), diff to test

2014-04-29 Thread Alexandre Ratchov
This diff attempts to unify volume keys; it makes pckbd and ukbd volume keys behave like all other volume keys (acpithinkpad, acpiasus, macppc/abtn and similar drivers): simply adjust the hardware volume without passing keystroke events to upper layers (i.e. consume the keystroke). If your volume

pckbd volume keys (part 2): knob to pass keystrokes

2014-04-29 Thread Alexandre Ratchov
this diff applies on top of the previous one; it adds the hw.kbdvolume sysctl(1) entry to select how pckbd ukbd volume keys are handled: hw.kbdvolume=0 pass keystrokes to upper layer as we do for regular keys, thus usable by X apps as hot-keys or whatever. hw.kbdvolume=1

Re: (int)sizeof in smtpd

2014-05-08 Thread Alexandre Ratchov
On Thu, May 08, 2014 at 12:35:56PM -0400, Ted Unangst wrote: This is wrong in several ways. Never cast sizeof down, always cast the comparison variable up. I'll specifically call out this change: - if (snprintf(buf, sizeof(buf)) = (int)sizeof(buf)) + if ((size_t)snprintf(buf,

Re: pckbd volume keys (part 1), diff to test

2014-05-19 Thread Alexandre Ratchov
On Wed, Apr 30, 2014 at 01:06:48AM +0200, Alexandre Ratchov wrote: This diff attempts to unify volume keys; it makes pckbd and ukbd volume keys behave like all other volume keys (acpithinkpad, acpiasus, macppc/abtn and similar drivers): simply adjust the hardware volume without passing

Re: pckbd volume keys (part 1), diff to test

2014-05-23 Thread Alexandre Ratchov
On Wed, Apr 30, 2014 at 01:06:48AM +0200, Alexandre Ratchov wrote: This diff attempts to unify volume keys; it makes pckbd and ukbd volume keys behave like all other volume keys (acpithinkpad, acpiasus, macppc/abtn and similar drivers): simply adjust the hardware volume without passing

Re: pckbd volume keys (part 1), diff to test

2014-05-26 Thread Alexandre Ratchov
On Mon, May 26, 2014 at 02:19:28PM +0200, Mark Kettenis wrote: But as I said before, the problem is that this breaks the visual feedback feature in desktop environments and applications like Gnome. The diff is to make pckbd keys behave like all other volume keys (thinkpad, asus, macppc). For

Re: audio(9) manual page

2014-06-24 Thread Alexandre Ratchov
On Tue, Jun 24, 2014 at 03:58:41AM +0400, Alexander Polakov wrote: So I have been trying to write a new audio driver (for Xonar DS if anyone interested) and therefore reading audio(9). I was confused for a while by the use of will here. I think it's not clear enough that these functions

Re: PATCH: further kernel malloc - mallocarray

2014-07-16 Thread Alexandre Ratchov
On Wed, Jul 16, 2014 at 04:54:49AM +, Doug Hogan wrote: + if ((fake_table = mallocarray(3, sizeof(struct est_op), It's not necessary to use mallocarray() for well known constants. Few examples below. --- sys/arch/i386/i386/est.c 12 Jul 2014 18:44:41 - 1.43 +++

error messages during zaurus installation

2014-08-05 Thread Alexandre Ratchov
Last two lines of a fresh (and successful) zaurus install are: grep: /etc/mnt/wsconsctl.conf: No such file or directory grep: /etc/mnt/sysctl.conf: No such file or directory which is somewhat ugly. As {sysctl,wsconsctl}.conf are now in /etc/examples, when the installer tries to update the

Re: [PATCH]delete xfree() from sndiod

2014-08-18 Thread Alexandre Ratchov
On Sat, Aug 16, 2014 at 06:45:54PM +0200, Fritjof Bornebusch wrote: On Sun, Aug 03, 2014 at 02:56:25PM +0200, Fritjof Bornebusch wrote: Ping? Hi tech, during my search after other xfree() implementations, I saw that xfree() in sndiod is just a wrapper for free() without any other

audioctl: drop useless fields

2014-09-10 Thread Alexandre Ratchov
audioctl output is full of useless, misleading and/or unreliable fields. Let's keep the usable ones only. The plan is to remove them from the kernel as well. OK? Index: audioctl.c === RCS file: /cvs/src/usr.bin/audioctl/audioctl.c,v

Re: audioctl: drop useless fields

2014-09-11 Thread Alexandre Ratchov
On Wed, Sep 10, 2014 at 07:31:17PM +0200, Alexandre Ratchov wrote: audioctl output is full of useless, misleading and/or unreliable fields. Let's keep the usable ones only. The plan is to remove them from the kernel as well. OK? I've been asked in private to explain the reason I think

Re: implement CLOCK_VIRTUAL and CLOCK_PROF

2014-10-15 Thread Alexandre Ratchov
On Wed, Oct 15, 2014 at 11:37:26AM -0600, Todd C. Miller wrote: Since this came up in another thread. Trivial implementations of CLOCK_VIRTUAL and CLOCK_PROF, modeled after what FreeBSD does. out of curiousity, what program needs these?

Re: delete kernel audio conversions code

2014-10-24 Thread Alexandre Ratchov
On Tue, Oct 14, 2014 at 09:09:26PM +0200, Alexandre Ratchov wrote: Since end 2011 we have complete audio format conversions code enabled by default that runs in user-mode (from any to any encoding, rate, and channel number combination). So there's no reason to keep the incomplete kernel

remove audio support in linux emulation

2014-10-31 Thread Alexandre Ratchov
I believe there are no recent binary-only programs that could use audio in linux emulation. I couldn't find a single example, and there are no examples in replies to my e-mail to misc@: https://marc.info/?l=openbsd-miscm=141460646910168 OK to remove it? --- arch/i386/conf/files.i386.orig

Re: quota: use mount points instead of device names

2013-08-19 Thread Alexandre Ratchov
On Mon, Jul 01, 2013 at 12:29:02PM +0200, Alexandre Ratchov wrote: The quota utility obtains the block device name (with getmntinfo()) then searches the corresponding fstab entry (with getfsspec()). Unfortunately if the fstab entry uses the disk uuid, it doesn't match the block device string

Re: azalia acer quirks

2013-09-14 Thread Alexandre Ratchov
On Sat, Sep 14, 2013 at 01:03:39PM +0200, Raphael Graf wrote: Without this diff, I just get silence from an Acer Extensa 6700. I don't know if this is the right way to fix it.. Comments? The diff seems correct. Anyone with a non-Acer Extensa 6700 box using a ALC260 to test this diff ? --

Re: azalia(4): RIRB DMA engine needs delay after started

2014-02-26 Thread Alexandre Ratchov
On Tue, Feb 25, 2014 at 03:08:48PM -0500, Ted Unangst wrote: Tangent: I don't like the style used for the delay loops in azalia.c. 1. There's an off by one where 0 passes both conditionals. It's unlikely this matters, but it's needless inconsistency. 2. I think i = 0 is a dangerous idiom

Re: Brightness and KBD light (Apple): ukbd.c/wskbd.c to asmc driver?

2014-04-10 Thread Alexandre Ratchov
On Sun, Apr 06, 2014 at 09:45:11PM +0200, Sven-Volker Nowarra wrote: Hi, I am thinking about an approach to set the brightness on my MacBook via standard keyboard keys. I can already call from the commandline wsconsctl display.brightness=xx, and it will arrive in my asmc.c driver (thanx to

tcp support for aucat and midicat

2011-04-19 Thread Alexandre Ratchov
This diffs enables aucat and midicat to work over TCP, which allows a sound card to be shared between machines, doing strange things with ssh port forwarding and so on. Roughly, the first client generates a 128-bit random number (aka the session cookie), saves it in $HOME/.aucat_cookie and sends

libsndio: remove support for legacy device names

2011-05-03 Thread Alexandre Ratchov
hack to support legacy audio/midi device naming scheme is almost two years old, ok to drop support for it? -- Alexandre Index: mio.c === RCS file: /cvs/src/lib/libsndio/mio.c,v retrieving revision 1.10 diff -u -p -r1.10 mio.c ---

Re: macppc: fix volume +/- from keyboard (i2s)

2011-05-03 Thread Alexandre Ratchov
On Tue, May 03, 2011 at 01:38:03PM +0530, Martin Pieuchot wrote: This diff fix the use of the volume keys +/- for the iBooks/PowerBooks. Index: dev/i2s.c === RCS file: /cvs/src/sys/arch/macppc/dev/i2s.c,v retrieving revision

Re: mixerctl(1) diff: sort output

2011-05-09 Thread Alexandre Ratchov
On Mon, May 09, 2011 at 02:56:28PM +0300, Sviatoslav Chagaev wrote: On Mon, May 9, 2011 at 4:48 AM, Jacob Meuser jake...@sdf.lonestar.org wrote: On Mon, May 09, 2011 at 01:32:49AM +0300, Sviatoslav Chagaev wrote: * sorted output looks cleaner, prettier; * it's easier to find the variable

Re: aucat(1) mixing: saturating-addition instead of add-and-divide-by-n_inputs

2011-05-11 Thread Alexandre Ratchov
On Wed, May 11, 2011 at 02:50:36AM +0300, Sviatoslav Chagaev wrote: I'm sitting at work, listening to music, debugging a web-application with JavaScript alert()s. Each time an alert window pops up, the browser plays a sound. For a brief moment, the volume drops twicefold then goes back to

Re: aucat(1) mixing: saturating-addition instead of add-and-divide-by-n_inputs

2011-05-11 Thread Alexandre Ratchov
On Wed, May 11, 2011 at 02:50:36AM +0300, Sviatoslav Chagaev wrote: below are few comments about the diff itself Index: aparams.h === RCS file: /OpenBSD/src/usr.bin/aucat/aparams.h,v retrieving revision 1.11 diff -u -r1.11

Re: aucat(1) mixing: saturating-addition instead of add-and-divide-by-n_inputs

2011-05-13 Thread Alexandre Ratchov
On Thu, May 12, 2011 at 12:36:43AM +0300, Sviatoslav Chagaev wrote: So, why is what I'm proposing better than what currently exists: * Resembles how sound behaves in real world more closely; * Doesn't violate the principle of least surprise; * No more annoying volume jumps up

Re: aucat(1) mixing: saturating-addition instead of add-and-divide-by-n_inputs

2011-05-14 Thread Alexandre Ratchov
On Sat, May 14, 2011 at 06:26:57PM +0300, Sviatoslav Chagaev wrote: Then the only thing that remains -- is to add clipping in mix_badd(). Yes, if the other diff goes in, handling clipping makes sense. This will give aucat all the bits and pieces to meet the requirements of all kinds of

Re: libsndio: remove support for legacy device names

2011-05-24 Thread Alexandre Ratchov
On Tue, May 24, 2011 at 03:18:57PM +0200, Christopher Zimmermann wrote: On 05/03/11 22:58, Alexandre Ratchov wrote: hack to support legacy audio/midi device naming scheme is almost two years old, ok to drop support for it? -- Alexandre This caught me by surprise. I spent about

aucat: suggest using -v100 ?

2011-05-26 Thread Alexandre Ratchov
This is to suggest using -v100 to avoid volume jumps when more than one stream are played at the same time. OK? Or should we just say ``for normal use: -v100'', assuming nowadays nobody listens to a single stream at the same :) -- Alexandre Index: rc.conf

Re: aucat: suggest using -v100 ?

2011-05-26 Thread Alexandre Ratchov
On Thu, May 26, 2011 at 10:31:33AM +0100, Stuart Henderson wrote: On 2011/05/26 09:56, Alexandre Ratchov wrote: This is to suggest using -v100 to avoid volume jumps when more than one stream are played at the same time. OK? Or should we just say ``for normal use: -v100'', assuming

Re: aucat(1) block sizes

2011-06-03 Thread Alexandre Ratchov
On Fri, Jun 03, 2011 at 02:10:37PM +0300, Alexey Suslikov wrote: Hello tech@. aucat(1) manual says: Streams created with the -t option export the server clock using MTC, allowing non-audio software or hardware to be synchronized to the audio stream. The following sample rates (-r) and

Re: aucat(1) block sizes

2011-06-03 Thread Alexandre Ratchov
On Fri, Jun 03, 2011 at 06:03:32PM +0300, Alexey Suslikov wrote: On Fri, Jun 3, 2011 at 17:45, Alexandre Ratchov a...@caoua.org wrote: On Fri, Jun 03, 2011 at 02:10:37PM +0300, Alexey Suslikov wrote: Hello tech@. aucat(1) manual says: Streams created with the -t option export

enable aucat by default

2011-10-06 Thread Alexandre Ratchov
On the one hand, we expect audio to work by default. On the other hand format conversions, channel mapping, resampling and alike belong to the audio sub-system; until 2009, this used to be the audio(4) driver itself. But later, instead of extending the audio(4) driver, we put new audio code in

Re: enable aucat by default

2011-10-06 Thread Alexandre Ratchov
On Thu, Oct 06, 2011 at 08:58:16PM +0200, Ingo Schwarze wrote: Hi Alexandre, Alexandre Ratchov wrote on Thu, Oct 06, 2011 at 08:29:26PM +0200: On the one hand, we expect audio to work by default. On the other hand format conversions, channel mapping, resampling and alike belong

Re: enable aucat by default

2011-10-06 Thread Alexandre Ratchov
On Thu, Oct 06, 2011 at 10:10:10PM +0200, Paul de Weerd wrote: On Thu, Oct 06, 2011 at 08:58:16PM +0200, Ingo Schwarze wrote: | Hi Alexandre, | | Alexandre Ratchov wrote on Thu, Oct 06, 2011 at 08:29:26PM +0200: | | On the one hand, we expect audio to work by default. On the other hand

Re: enable aucat by default

2011-10-06 Thread Alexandre Ratchov
On Thu, Oct 06, 2011 at 11:05:34PM +0200, Mark Kettenis wrote: It would be nice if aucat didn't start when there was no sound hardware. And it doesn't: [weerd@despair] $ sudo aucat -l -fsun:0 aucat: sun:0: can't open device sun:0: failed to open audio device So your

Re: enable aucat by default

2011-10-07 Thread Alexandre Ratchov
On Thu, Oct 06, 2011 at 05:04:03PM -0700, patrick keshishian wrote: Or do you argue that it doesn't matter running it even where it is not needed? Somewhat yes, if there are no audio devices or no audio program is run, aucat does nothing and shouldn't hurt. yuck... sounds like

Re: enable aucat by default

2011-10-07 Thread Alexandre Ratchov
On Fri, Oct 07, 2011 at 02:35:47PM +0200, Mark Kettenis wrote: Date: Fri, 7 Oct 2011 14:17:19 +0200 From: Henning Brauer lists-openbsdt...@bsws.de * Marc Espie es...@nerim.net [2011-10-07 14:14]: It doesn't *belong* in X. I want to be able to get proper sound from the console,

Re: enable aucat by default

2011-10-07 Thread Alexandre Ratchov
On Fri, Oct 07, 2011 at 12:57:08PM +0200, Marc Espie wrote: On Thu, Oct 06, 2011 at 05:04:03PM -0700, patrick keshishian wrote: yuck... sounds like linux to me. please don't go down that route of enable everything, it can't hurt even if you don't use it mentality. In a wide difference to

Re: enable aucat by default

2011-10-10 Thread Alexandre Ratchov
On Mon, Oct 10, 2011 at 11:16:21AM -0600, Anthony J. Bentley wrote: My only issue with aucat is a noticeable lag for real-time applications like games, even when running with a small buffer size as per FAQ 13.5. This should be fixed by the cleanup diff I posted few days ago, isn't it? If

Re: aucat cleanup diff to test

2011-10-11 Thread Alexandre Ratchov
On Tue, Oct 11, 2011 at 12:09:33PM +0300, Paul Irofti wrote: On Tue, Oct 11, 2011 at 10:58:54AM +0200, Paul de Weerd wrote: On Tue, Oct 11, 2011 at 11:01:41AM +0300, Paul Irofti wrote: | With this patch I can no longer get 6 channels to play, only stereo. | | I run aucat with: | |

Re: Scheduler improvements

2011-10-13 Thread Alexandre Ratchov
On Wed, Oct 12, 2011 at 02:55:39PM +0200, Gregor Best wrote: Hi people, attached is a patch that basically rewrites the CPU scheduler. It replaces the multilevel feedback queue currently employed with an earliest effective deadline first approach, similar to the BrainFuck Scheduler for

Re: async i/o (aio and lio) desirable?

2011-10-17 Thread Alexandre Ratchov
On Sun, Oct 16, 2011 at 07:41:56PM -0400, Geoff Steckel wrote: Is there any feeling that aio_* and lio_* functionality is desirable? In theory, async i/o is very desirable in audio programs, and the lack of async i/o causes stuttering. But programs don't use async i/o APIs at all; they roll

sndio: more cleanup + multiple devices support

2011-11-08 Thread Alexandre Ratchov
Initially aucat was designed to handle one device only so multiple audio devices used to be supported simply by starting multiple aucat processes (one per device), very simple. Then (~1.5 years ago) we added support for multiple audio devices (ie multiple -f options), and now it's time to finish

Re: sndio: more cleanup + multiple devices support

2011-11-09 Thread Alexandre Ratchov
On Wed, Nov 09, 2011 at 03:14:21PM +0100, Remco wrote: The highlighted code at the bottom of this mail contains comparisons like this: strncmp(snd, str, len) == 0 Yes, indeed this part of the code is wrong, grr... second time i do the very same mistake; thanks sun, sun: or sun:0 for the

Re: diff: str[n]cmp in ksh(1)

2011-11-17 Thread Alexandre Ratchov
On Thu, Nov 17, 2011 at 09:48:36PM +0800, Michael W. Bombardieri wrote: Hi tech, I have a simple diff for ksh(1) which takes care to not read past the end of the static buffer 'holdbuf' where the length of 'pat' is greater than the buffer. holdbuf is zero-terminated, so strcmp() won't go

Re: Make Apple products somewhat usable

2011-12-02 Thread Alexandre Ratchov
On Thu, Dec 01, 2011 at 11:01:11PM +, Stuart Henderson wrote: On 2011/12/01 11:32, David Hill wrote: For those who have an iProduct from Apple, you know it spams the dmesg with uhids when plugged in. It also attacheds itself as a uaudio device as well. + { { USB_VENDOR_APPLE,

important audio settings to test

2011-12-12 Thread Alexandre Ratchov
By default sndiod (aka aucat) uses 2940 frame blocks at 44.1kHz, iirc to please uaudio, but this is not required anymore. On the other hand, programs that use audio block rate for synchronization (ex. mplayer) need smaller blocks (ex. to get smooth video). If you're using sndiod (or aucat, if you

Re: important audio settings to test

2011-12-13 Thread Alexandre Ratchov
On Mon, Dec 12, 2011 at 09:33:16PM +, Stuart Henderson wrote: I'm currently running with -b 47040 to control skipping when I switch tabs in a web browser on my desktop machine with at least mplayer (using libao), vlc (SDL) and ffplay (I think using SDL). Any of your suggested settings

midi: don't spin in the kernel

2012-03-07 Thread Alexandre Ratchov
Certain midi uarts don't have interrupts, so when data is sent, the driver spins (at IPL_AUDIO) until the uart becomes ready. This is not a big problem because uarts have ~16-32 byte fifos, and programs don't send large chunks of data, so uarts always appear ready. Except for large messages, which

Re: vmyield diff (2) please test

2012-06-14 Thread Alexandre Ratchov
On Thu, Jun 14, 2012 at 03:48:12AM +0200, Ariane van der Steldt wrote: Hi, This diff implements yielding in the vm system, with the intention to make expensive system calls preempt every once in a while, to allow userland system calls to progress. It's a very conservative application at

new sndiod to test

2012-10-03 Thread Alexandre Ratchov
Here's a new sndiod daemon derived from aucat; it's simpler, smaller, faster and -- most importantly -- easier to develop. It has almost the same features, and uses almost the same options. So it can replace the current sndiod binary. The new code is not polished yet and there may be few bugs

Re: Scheduler improvements

2012-10-05 Thread Alexandre Ratchov
On Thu, Oct 04, 2012 at 11:42:45PM +0200, Gregor Best wrote: @@ -222,14 +230,13 @@ setrunqueue(struct proc *p) { struct schedstate_percpu *spc; - int queue = p-p_priority 2; SCHED_ASSERT_LOCKED(); spc = p-p_cpu-ci_schedstate; spc-spc_nrun++; -

Re: Scheduler improvements

2012-10-08 Thread Alexandre Ratchov
On Sat, Oct 06, 2012 at 10:38:34PM +0200, Gregor Best wrote: Hi Alexandre, [...] This change is unclear for me; AFAIU, it removes the mechanism which makes processes wake up with a priority depending on what they are blocked on. [...] Where do you see that? The code I

sndio: protocol change - diff to test

2012-10-27 Thread Alexandre Ratchov
Hi, This diff is to use dedicated messages for flow control instead of abusing clock tick messages and to enable flow control for MIDI. There should be no change in behaviour, but this change is necessary for future developpement of sndiod. any regression? ok? -- Alexandre Index:

Re: sndio: protocol change - diff to test

2012-10-28 Thread Alexandre Ratchov
On Sat, Oct 27, 2012 at 03:14:07PM +0200, Alexandre Ratchov wrote: Hi, This diff is to use dedicated messages for flow control instead of abusing clock tick messages and to enable flow control for MIDI. There should be no change in behaviour, but this change is necessary for future

Re: sndio: protocol change - diff to test

2012-10-28 Thread Alexandre Ratchov
On Sun, Oct 28, 2012 at 06:45:59PM +1100, Jonathan Gray wrote: On Sat, Oct 27, 2012 at 03:14:07PM +0200, Alexandre Ratchov wrote: Hi, This diff is to use dedicated messages for flow control instead of abusing clock tick messages and to enable flow control for MIDI. There should

Re: ##@!#@# gnu tools

2012-11-16 Thread Alexandre Ratchov
On Thu, Nov 15, 2012 at 05:53:52PM +0100, Reyk Floeter wrote: On Thu, Nov 15, 2012 at 5:11 PM, Marc Espie es...@nerim.net wrote: external people regularly ask but why you don't want to use GNU/m4 GNU/make GNU/whatever ? External people seem to ask weird questions. I just had to

Re: fix audio/midi interrupts on mp kernels

2013-04-17 Thread Alexandre Ratchov
On Mon, Apr 08, 2013 at 12:09:15PM +0200, Alexandre Ratchov wrote: This diff is to add audio-specific locking in order to stop taking the global kernel lock in audio interrupt code paths. With this, audio drivers don't have to wait until other kernel calls complete (including heavy syscalls

Re: DPI for pf(4)

2013-05-02 Thread Alexandre Ratchov
On Thu, May 02, 2013 at 10:35:19AM +0200, Franco Fichtner wrote: as stated before, breaking down complexity to the bare minimum is my requirement for this to be happening at all. You all get to be the judges. I'm just trying to work on something worth doing. The last thing we want it a

Re: Question about MP safe audio/video

2013-05-24 Thread Alexandre Ratchov
On Fri, May 24, 2013 at 11:35:15AM +0300, Alexey Suslikov wrote: Hi tech@. Are uvideo(4), bktr(4) and similar also MP safe or they somewhat different in terms of a technique used to make audio MP safe? They are mp safe since they use the global kernel_lock; It's used for everything,

Re: put procs on rb tree

2013-06-05 Thread Alexandre Ratchov
On Tue, Jun 04, 2013 at 11:33:12PM -0400, Ted Unangst wrote: Instead of using a fixed size hash table for procs, use an rb tree. Makes thread/process lookup even more web scale. any measurement? -- Alexandre

Re: put procs on rb tree

2013-06-06 Thread Alexandre Ratchov
On Wed, Jun 05, 2013 at 02:12:36PM -0400, Ted Unangst wrote: Conclusion? You'll never notice the difference. Personally I have a slight preference for improving worst case behavior. I've a preference for simpler structures; as long if pid lookup is not a real problem -- Alexandre

sgi: enable 24-bit audio on mavb(4) devices

2013-06-15 Thread Alexandre Ratchov
This is a small diff to enable mavb(4) 24-bit native format. To test it, first check that audio works without the diff. Then, apply the diff, kill sndiod, and run it as: sndiod -dd -e s24be4lsb then play any audio file; sndiod should log something like: snd0: 48000Hz, s24be4lsb, play

midi support for envy

2010-10-03 Thread Alexandre Ratchov
This diff adds support for midi ports certain envy-based cards have, tested on i386 only. ok? -- Alexandre Index: share/man/man4/envy.4 === RCS file: /cvs/src/share/man/man4/envy.4,v retrieving revision 1.13 diff -u -p -r1.13

fix midi on sparc64

2010-10-05 Thread Alexandre Ratchov
On sparc64, the midi driver is enabled in GENERIC and properly attaches during autoconf, however there's neither an entry in cdevsw[] nor any device node in /dev, which makes the driver unreachable. The diff allocates 68 as major number for midi and updates the MAKEDEV script accordingly. ok?

enable envy(4) on sparc64

2010-10-09 Thread Alexandre Ratchov
with the recent changes cards based on the ice1724 (aka Envy24HT) can work on sparc64, so imho envy(4) could be enabled. cards based on the ice1712 (aka Envy24) can do DMA only on 28-bit addresses which can't work on sparc64. If such a card is plugged, the driver will fail to map the ring buffer

aucat: remove few useless macros

2010-10-17 Thread Alexandre Ratchov
this diff is to slightly clean up aucat headers and shouldn't change its behavior. Since there are a lot of changes, it's worth testing it, imo. -- Alexandre Index: lib/libsndio/aucat.c === RCS file: /cvs/src/lib/libsndio/aucat.c,v

remove unused bits from libsndio

2010-10-27 Thread Alexandre Ratchov
2009/07/25 11:27:14 ratchov Exp $ */ +/* $OpenBSD$ */ /* * Copyright (c) 2008 Alexandre Ratchov a...@caoua.org * @@ -87,12 +87,6 @@ struct sio_cap { #define MIO_IN 8 /* - * maximum size of the encording string (the longest possible - * encoding is ``s24le3msb

Re: mixerctl(1) to sysctl(8); a simpler interface

2009-11-20 Thread Alexandre Ratchov
On Fri, Nov 20, 2009 at 03:39:55PM +0100, Thomas Pfaff wrote: Hi. I've been thinking a bit about how to simplify the audio interface in OpenBSD and I thought about sysctl. Personally I find the mixerctl interface horrible. 88 entries on my system, and I honestly do not understand what

aucat on low latency setups

2010-01-16 Thread Alexandre Ratchov
Hi, The diff below allows aucat to use only two audio blocks, which lowers the server-side latency. The diff should not impact stability, actually it should slightly improve it. Yeah, I know, improved stablility with smaller buffers might sound surprising... I'd love if people could test this

Re: New intel X driver requires testing.

2010-04-17 Thread Alexandre Ratchov
On Sat, Apr 17, 2010 at 05:27:30PM +0300, Sviatoslav Chagaev wrote: DELL Latitude D400 laptop reporting in! At first, I accidentally compiled the kernel without the GEM option, as a result, when I ran X, the screen just went black, and even when I killed the server through ssh, the screen

Re: Random doubles

2015-01-20 Thread Alexandre Ratchov
On Tue, Jan 20, 2015 at 11:17:44AM +, Michael Savage wrote: Hi, I'm having trouble generating uniform random doubles in [0,1) with arc4random. In games, the snippet: (double) arc4random() / (UINT32_MAX + 1.0) crops up multiple times, but that isn't utilising the full precision

Re: ehci(4) Full-speed isochronous transfers support

2015-03-30 Thread Alexandre Ratchov
On Sat, Mar 28, 2015 at 11:29:11AM +0100, Martin Pieuchot wrote: With the increasing number of machines shipping with rate-matching hubs instead of companion controllers to support USB Full and Low- speed devices, a number of people asked me if it was possible to add support for Full-speed

faq: remove references to aucat -M option

2015-02-23 Thread Alexandre Ratchov
The -M option of aucat was removed long time ago, and as we're at it mention about softsynths. OK? Index: faq13.html === RCS file: /cvs/www/faq/faq13.html,v retrieving revision 1.152 diff -u -p -u -p -r1.152 faq13.html ---

Re: faq: remove references to aucat -M option

2015-02-24 Thread Alexandre Ratchov
On Tue, Feb 24, 2015 at 09:34:17AM +0100, Remco wrote: Alexandre Ratchov wrote: The -M option of aucat was removed long time ago, and as we're at it mention about softsynths. OK? +The later are handly for testing the hardware, bypassing most software Did you mean ... latter

Re: faq: remove references to aucat -M option

2015-02-24 Thread Alexandre Ratchov
On Mon, Feb 23, 2015 at 07:44:37AM -0500, Nick Holland wrote: On 02/23/15 04:03, Alexandre Ratchov wrote: The -M option of aucat was removed long time ago, and as we're at it mention about softsynths. OK? ok nick@, but as I'd consider you an authority on this area, please skim

Re: Macbook Air azalia(4) quirk

2015-04-25 Thread Alexandre Ratchov
On Fri, Apr 24, 2015 at 09:18:35PM -0400, James Turner wrote: On Fri, Apr 24, 2015 at 08:53:44PM -0400, James Turner wrote: On Fri, Apr 24, 2015 at 08:23:01PM -0400, James Turner wrote: The attached diff allows sound to work on my late 2013 Macbook Air (6,1). oks? Ok that diff

Re: fix sndiod.1: 7680 vs 7860

2015-04-24 Thread Alexandre Ratchov
On Fri, Apr 24, 2015 at 10:36:24AM -0600, David Coppa wrote: Hi! Code says 7860: dcoppa@t420:/usr/src/usr.bin/sndiod$ grep 7860 * sndiod.c:#define DEFAULT_BUFSZ7860 While manpage says 7680: dcoppa@t420:/usr/src/usr.bin/sndiod$ grep 7680 * sndiod.1:The default is 7680 or

audioctl: remove code for unreachable states

2015-04-22 Thread Alexandre Ratchov
No driver uses these the mpeg encodings and no program can play without the AUDIO_PLAY_ALL flag (I don't even know if the !PLAY_ALL case ever worked). The plan is to drop these from the API soon. OK? Index: audioctl.c === RCS file:

use device.h in midi(4)

2015-05-12 Thread Alexandre Ratchov
This is to use device_lookup() instead of digging into midi_cd.cd_devs[] and maintaining a dying flag which is already present in the device structure. As a side-effect, this adds the missing refcounting that mididetach() was missing. The diff is a mostly mechanical change, except for the

remove oss support from linux compat (i386 only)

2015-04-17 Thread Alexandre Ratchov
This was discussed and nobody steps up to save it: http://comments.gmane.org/gmane.os.openbsd.misc/217005 removing oss emulation, will remove dependency on obscure audio(4) features we don't use since ~2009, and in turn will ease audio(4) driver cleanup without breaking the build. Tested on

remove dsp bits from libossaudio

2015-04-17 Thread Alexandre Ratchov
No code uses the SNDCLT_DSP_* ioctls anymore (the last port using them was removed few months ago), so they could be removed now. As there's no ABI change, no shlib_version crank is necessary. The motivation of removing these ioctls is to ease simplifications and development of the audio(4)

important audio simplifications to test and review

2015-06-11 Thread Alexandre Ratchov
, 2004 Alexandre Ratchov * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions

audioctl: expose counters returned by AUDIO{I,O}OFFS

2015-05-23 Thread Alexandre Ratchov
This exposes the counters returned by AUDIO_GET{I,O}OFFS ioctls, they correspond to the number of bytes processed by the device. The main usefulness of these counters is to check whether the kernel is missing interrupts (by verifying that play.bytes and record.bytes are the same). If we expose

audio: ioctl to fetch snapshot of counters

2015-07-28 Thread Alexandre Ratchov
There are 4 audio counters, and we've one ioctl() to get each. So userland has to call the ioctl() one by one, and must take care to handle cases when a counters are inconsistent (i.e. don't belong to the same time). Inconsistencies are extreamly rare produce so the code is hard to test. This

azalia: rework buffer position reporting code

2015-07-28 Thread Alexandre Ratchov
This diff simplifies the code that reads the DMA pointer and calls the audio(4) driver accordingly. - use simpler (and less) data structures, which makes the code shorter. - if multiple interrupts are missed, call audio(4) as many times as we missed interrupts (unless the pointer wrapped,

envy: recover after missed interrupts

2015-07-29 Thread Alexandre Ratchov
This diff allows the audio(4) driver to properly recover, when the envy(4) device misses interrupts. Fixes permanent distortion on MP systems. OK? Index: envy.c === RCS file: /cvs/src/sys/dev/pci/envy.c,v retrieving revision 1.60

audio: recover after missed interrupts

2015-07-27 Thread Alexandre Ratchov
Sometimes the system may miss enough audio interrupts for DMA pointers to wrap, which makes upper layers misbahave. This diff makes the audio driver properly recover, by detecting and compensating for the missed interrupts. This requires the hardware to expose working DMA pointers and the

Re: sndiod hangs

2015-07-17 Thread Alexandre Ratchov
On Mon, Jul 13, 2015 at 12:52:14PM +0200, Alexandre Ratchov wrote: On Sat, Jul 11, 2015 at 02:23:03PM +0200, Mark Kettenis wrote: Every now and then sndiod hangs on me. Usually I discover this as mplayer hangs while playing a video or hangs while opening the audio device on startup

Re: sndiod hangs

2015-07-13 Thread Alexandre Ratchov
On Sat, Jul 11, 2015 at 02:23:03PM +0200, Mark Kettenis wrote: Every now and then sndiod hangs on me. Usually I discover this as mplayer hangs while playing a video or hangs while opening the audio device on startup. Restarting sndiod using the /etc/rc.d/sndiod script doesn't work; it blocks

Re: sndiod hangs

2015-07-16 Thread Alexandre Ratchov
On Mon, Jul 13, 2015 at 12:52:14PM +0200, Alexandre Ratchov wrote: On Sat, Jul 11, 2015 at 02:23:03PM +0200, Mark Kettenis wrote: Every now and then sndiod hangs on me. Usually I discover this as mplayer hangs while playing a video or hangs while opening the audio device on startup

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-13 Thread Alexandre Ratchov
On Thu, Nov 12, 2015 at 02:52:01PM +0800, Michael W. Bombardieri wrote: > > > ok for removing xfree from aucat? > > > > > > > yes, ok ratchov; if later this causes me merges i'll find another > > solution. Feel free to do the same in usr.bin/sndiod, as it's > > almost the same. > > > > Same

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-09 Thread Alexandre Ratchov
On Sun, Nov 08, 2015 at 07:43:10PM -0500, Michael McConville wrote: > Maybe we should pick this off in smaller chunks so that we don't get > immobilized by a few scattered issues. > > ok for removing xfree from aucat? > yes, ok ratchov; if later this causes me merges i'll find another solution.

add midicat utility

2015-08-30 Thread Alexandre Ratchov
Alexandre Ratchov a...@caoua.org +.\ +.\ Permission to use, copy, modify, and distribute this software for any +.\ purpose with or without fee is hereby granted, provided that the above +.\ copyright notice and this permission notice appear in all copies. +.\ +.\ THE SOFTWARE IS PROVIDED

Re: escape minus signs in sndio manpages

2015-08-31 Thread Alexandre Ratchov
On Sun, Aug 30, 2015 at 03:35:21PM -0400, Peter Piwowarski wrote: > This patch replaces some literal '-' with '\-' in examples for sndio- > related manpages. Certain roff implementations may render '-' as a > hyphen (unicode U+2010) rather than a minus sign (unicode U+002D or ascii > 0x2D); while

remove useless AUCAT_COOKIE knob

2015-09-30 Thread Alexandre Ratchov
The AUCAT_COOKIE environment variable was never used. It doesn't allow the cookie to be shared between users or to have a "group" cookie (because permissions are checked by the library). On the other hand sometimes people loose time trying to use it. OK to remove it? Index: aucat.c

Re: lighter sleep

2015-09-21 Thread Alexandre Ratchov
On Mon, Sep 21, 2015 at 02:29:03PM +, Christian Weisgerber wrote: > On 2015-09-21, Stefan Sperling wrote: > > > The function that parses funny numbers is iswdigit() which gets a wchar_t. > > But sleep(1) doesn't need that. > > The sole somewhat realistic use of i18n in

Re: simpler audioctl

2016-06-20 Thread Alexandre Ratchov
On Sun, Jun 19, 2016 at 05:56:38PM +0200, Sebastien Marie wrote: > > Just one point about the man page: > > Test if the hardware supports 24-bit encoding and 44100Hz sample rate: > >$ audioctl -f /dev/audio0 encoding=s24 rate=44100 > > "Test" is somehow incorrect as if the

simpler audioctl

2016-06-19 Thread Alexandre Ratchov
D: audioctl.c,v 1.14 1998/04/27 16:55:23 augustss Exp $ */ - +/* $OpenBSD$ */ /* - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * Author: Lennart Augustsson + * Copyright (c) 2016 Alexandre Ratchov <a...@caoua.org> * - * Redistribution and u

  1   2   3   >