Commit graph

47 commits

Author SHA1 Message Date
Abramo Bagnara
8f0cb26fdf Control API encapsulation. Better names for kernel API. Simpler PCM hw_params API. Added missing const. 2001-02-06 23:48:10 +00:00
Abramo Bagnara
5bf23ae9a1 Encapsulated hwdep. Converted all enums to type safety 2001-02-05 15:44:42 +00:00
Abramo Bagnara
de19407578 Removed card type from devices info. Added card number to devices info. Completed encapsulation of PCM API. Removed snd_pcm_card(). All copy functions now have the form copy(dst, src). 2001-01-31 17:26:56 +00:00
Abramo Bagnara
70809b1835 First step toward encapsulation 2001-01-29 14:27:53 +00:00
Abramo Bagnara
77d992bebc Moved ERR and SYSERR to a global place 2001-01-01 15:15:41 +00:00
Abramo Bagnara
b0cd1da822 Added missing diagnostics 2000-11-30 09:40:50 +00:00
Jaroslav Kysela
e0acbbfef8 Added sequencer event <-> MIDI byte stream coder from the kernel space 2000-11-26 22:18:25 +00:00
Jaroslav Kysela
41bb7068f2 Merged pcmfinal branch. 2000-11-20 20:10:46 +00:00
Takashi Iwai
1e9a496217 - Added a length check. 2000-10-30 17:54:55 +00:00
Abramo Bagnara
2ea3fd4bb3 Completed renaming drain->stop, flush->drain (PCM). Done renaming drain->drop, flush->drain (rawmidi and seq). Removed wrong module usage count inc/dec from mmap 2000-09-29 20:49:18 +00:00
Jaroslav Kysela
6962a9d6ce Merged pcmplug branch. 2000-09-24 09:57:26 +00:00
Takashi Iwai
d1d906e295 Experimental synchronization support on ALSA sequencer 2000-09-05 17:15:11 +00:00
Takashi Iwai
5e06d14431 Fix compile warnings and a typo 2000-08-31 11:56:52 +00:00
Takashi Iwai
a7f3ff4a4f New light-weight event handling:
1. No more needs to call snd_seq_event_free() for releasing the cell.
   But you should keep it anyway, both for compatibility and for future
   extension.
2. API is basically kept unmodified.  The sign of return values are same,
   i.e. positive integers will be returned if events exist on buffer/queue.
   But the exact value may be different from the older version.
3. snd_seq_event_input() renders the event directly from the static input
   buffer.  The function is not re-entrant.
4. snd_seq_event_input_selective() is removed.
2000-08-29 11:39:08 +00:00
Jaroslav Kysela
f981892e3a 64-bit fixes.
Controls API uses binary tree functions (tsearch ...).
2000-08-04 10:24:12 +00:00
Abramo Bagnara
9c72daca41 Added timestamps in strategic places 2000-07-01 14:17:25 +00:00
Takashi Iwai
bbdff9fce5 Bugfix:
- dead SMP lock in es1968 (maestro2) driver.

Bugfix & enhances of sequencer stuff
    by Scott McNab <sdm@fractalgraphics.com.au>:
 - fix for the insrument list locking in SND_SEQ_EVENT_INSTR_BEGIN
   and SND_SEQ_EVENT_INSTR_END events.
   Note that nothing seems to really take notice of the list locking.
   This is more an issue when we add support for editing instruments
   anyway.

 - added new alsa-lib utility function snd_seq_ev_set_varusr() which
   is similar to snd_seq_ev_set_variable(), but specifies userspace
   extended event data.
   This is required in order to use the SND_SEQ_EVENT_INSTR_PUT
   command (took me bloody ages to work this out btw)

 - minor correction for gus & trident synth drivers
2000-06-08 10:55:34 +00:00
Jaroslav Kysela
1cd6778173 Merged pcm2 branch. 2000-05-08 18:53:38 +00:00
Takashi Iwai
43041cbe78 New functions for sequencer:
- snd_seq_event_output_buffer()
	Outputs an event on buffer without flushing to sequencer.
	Useful for non-blocking mode write.
- snd_seq_event_output_direct()
	Outputs an event directly to sequencer without using buffer.
	Thus the event can be passed even if output buffer is full.
- snd_seq_input_buffer_size(), snd_seq_output_buffer_size()
	Returns the size of input/output buffers
- snd_seq_resize_input_buffer(), snd_seq_resize_output_buffer()
	Changes the size of input/output buffers
2000-03-18 18:03:50 +00:00
Jaroslav Kysela
70a536e924 snd_seq_timestamp_t->real was renamed to snd_seq_timestamp_t->time
Some code is using real as a variable type.
2000-01-20 12:14:50 +00:00
Jaroslav Kysela
2cdc7a7767 Removed unfinished sequencer sync code. 2000-01-10 13:08:38 +00:00
Jaroslav Kysela
d117462cb9 Takashi Iwai <iwai@ww.uni-erlangen.de>
Mon, 03 Jan 2000 10:47:02 +0100
- bugfix: proper handling of exclusive subscription
- bugfix and update: alsa-lib/test/seq* stuff
- minor updates (long option support, etc) of aconnect and aseqnet
- man pages for aconnect and aseqnet are added
2000-01-03 10:25:56 +00:00
Jaroslav Kysela
e4b58d20f1 Takashi Iwai <iwai@ww.uni-erlangen.de>
Thu, 30 Dec 1999 16:07:12 +0100
- fix of memory leak in seq_midi
- snd_seq_extract_output() accepts NULL ev_res argument (for removing the
  error event without malloc).
- addition of snd_seq_drain_input_buffer() and snd_seq_drain_output_buffer()
  functions in alsa-lib
1999-12-30 15:21:52 +00:00
Jaroslav Kysela
244d345fda Takashi Iwai <iwai@ww.uni-erlangen.de>
Wed, 22 Dec 1999 15:51:37 +0100
Changes in alsa-driver:

1. SND_SEQ_DEST_DIRECT was removed.  For direct dispatching, specify
   the scheduling queue as SND_SEQ_QUEUE_DIRECT.
   Source compatibility is kept if alsa-lib functions are used to set
   or check direct mode.
   Tested: pmidi, playmidi1, aconnect, aseqview, OSS emulation

2. The error event can be bounced to the sender as an encapsulated
   event with SND_SEQ_EVENT_BOUNCE type.  If the orignal event is
   variable length (like SYSEX), the data body is added after the
   copied event data.  (To access to it, use
   snd_seq_event_bounce_ext_data() macro.)
   This feature is enabled only when the sender is opened with read
   flag and has a client-filter flag SND_SEQ_FILTER_BOUNCE, so that
   as default it is disabled.

3. Maximum size of VARIABLE length event is defined as 2048 bytes.
   Larger events will be refused.
   Note that this is not the size of VARUSR nor VARIPC event.

4. Return error code was revised.
   Possible errors for read():
        -ENXIO  invalid client or file open mode
        -ENOSPC FIFO overflow (the flag is cleared after this error report)
        -EINVAL no enough user-space buffer to write the whole event
        -EFAULT seg. fault during copy to user space
   Possible errors for write():
        -ENXIO  invalid client or file open mode
        -ENOMEM malloc failed
        -EFAULT seg. fault during copy from user space
        -EINVAL invalid event
        -EAGAIN no space in output pool
        -EINTR  interrupts while sleep
        -EMLINK too many hops

        others  depends on return value from driver event_input callback

Changes in alsa-lib:

5. Behavior of snd_seq_flush_output() was changed.
   It flushes data in output buffer as much as possible.  This has
   two advantages.  One is that most data can be sent at one call,
   and another is that the error in write() can be detected directly
   from this function.
   The demerit of this implementation is that in non-blocking mode, it
   tries twice write() even if write pool of sequencer is full, which
   is not actually error.  In this case, flush_output() always returns
   -EAGAIN error code.
   After an error is detected (except for -EAGAIN in non-blocking
   mode), you should remove the error event via
   snd_seq_extract_output() as below.  Otherwise, it'll remain in
   output buffer and cause the same error again.

6. Some functions were added:
   snd_seq_exract_output(seq, &event)
        This extracts the first event on *output* buffer.  This will
        be useful to know (and remove) the event which causes error in
        write().
   snd_seq_event_input_pending(seq, fetch)
        Retunrs the number of events on input buffer.
        If no events exist in input buffer, it fetches from sequencer
        (only when flag is true).
   snd_seq_event_input_selective(seq, &ev, type, blocking)
        Retrieve the event from input with the given event type.
        If blocking is true, it waits until the target event is
        received.  It'll be useful for checking bounced error or
        waiting for hand-shake results (eg. loading insruments).
1999-12-22 15:05:51 +00:00
Jaroslav Kysela
b4bbbdbc9b Steve Ratcliffe <steve@parabola.demon.co.uk>
Sorry, small correction to my previous patch.
1999-12-19 09:49:35 +00:00
Jaroslav Kysela
e4572ec719 Reset all protocol versions to 1.0.0. 1999-12-16 14:14:16 +00:00
Frank van de Pol
a6cd55dcfe small sequencer fixes 1999-12-15 23:37:12 +00:00
Jaroslav Kysela
a3aaf0582a Takashi Iwai <iwai@ww.uni-erlangen.de>
Frank van de Pol <frank@vande-pol.demon.nl>
Major sequencer changes and cleanups for 1.0.0.
1999-12-15 18:34:12 +00:00
Jaroslav Kysela
7b0898c17d Steve Ratcliffe <steve@parabola.demon.co.uk>
There is a bug in the alsa-lib remove events function.
1999-12-15 08:56:29 +00:00
Jaroslav Kysela
2dc55fd684 Takashi Iwai <iwai@ww.uni-erlangen.de>
Tue, 16 Nov 1999 14:32:17 +0100
Some minor bug fixes in alsa-lib/seq.
1999-11-16 15:07:05 +00:00
Jaroslav Kysela
5b771eb68e Fixed memory leak by Steve. 1999-11-12 08:29:49 +00:00
Jaroslav Kysela
682deca370 Takashi Iwai <iwai@ww.uni-erlangen.de>
Fri, 17 Sep 1999 17:24:43 +0200

OK, the attached is the patch to alsa-driver and alsa-lib.
It will really violate the source/binary compatibility as
I wrote :-p

It includes:
 - change of event data for accessing Timer Port
 - new middle-level functions for sequencer in alsa-lib
 - some comments / fixes

The test programs in alsa-lib (playmidi1, aconnect, aseqnet)
were rewritten to use the new functions above.
I included also a patch to pmidi-1.2.2.
1999-09-17 16:17:21 +00:00
Jaroslav Kysela
e801e2d777 In alsa-lib in snd_seq_close() there are a couple of
missing calls to free().
1999-09-16 09:26:28 +00:00
Jaroslav Kysela
11ce43d87c Takashi Iwai <iwai@ww.uni-erlangen.de> Mon, 30 Aug 1999 14:56:38 +0200 1999-09-01 22:19:11 +00:00
Jaroslav Kysela
928bbc4f10 More sequencer extension (event hop counter, get information about subscription).. 1999-08-26 10:23:28 +00:00
Jaroslav Kysela
3555271122 Sequencer queue remove events 1999-08-19 16:35:48 +00:00
Jaroslav Kysela
c3ed3f7298 New autoloading changes.. 1999-08-02 22:02:14 +00:00
Jaroslav Kysela
30e978b0b8 More mixer updates and some fixes... 1999-07-22 10:49:39 +00:00
Jaroslav Kysela
d00535cc1b Sequencer changes (pool per client) by Takashi Iwai <iwai@ww.uni-erlangen.de> 1999-06-15 22:26:21 +00:00
Frank van de Pol
19811bb9b4 Changed data type of alsa-lib handles from 'void *' to the specific type for
the handle in use. This should be more type-safe as the compiler will perform
checking on type now.
1999-06-02 00:40:30 +00:00
Frank van de Pol
0b124b53bf Small fixes to get ALSA sequencer and example code for alsa-lib (playmidi1) working again. 1999-05-23 18:34:46 +00:00
Jaroslav Kysela
2e07583858 Changed e-mail from <perex@jcu.cz> to <perex@suse.cz>.. 1999-05-11 22:15:16 +00:00
Jaroslav Kysela
ef61108225 * HAL2 driver Ulf Carlsson <ulfc@thepuffingroup.com>
* Timer API changes/cleanups
* Sequencer API changes/cleanups
  - queue ioctls changed
  - instrument events added
1999-05-09 23:15:42 +00:00
Jaroslav Kysela
d0ca621a75 Changes for auto loader.. 1999-01-30 18:35:52 +00:00
Jaroslav Kysela
58a6b3d774 Fixed O_NONBLOCK again... 1999-01-13 14:51:21 +00:00
Jaroslav Kysela
54c4a6c610 Fixed for fcntl calls (NONBLOCK)... 1999-01-06 15:25:15 +00:00
Jaroslav Kysela
47b0531d86 Initial version... 1998-12-27 00:59:08 +00:00