Browse Source

Enforce power of two size frames. Moved alsa headers to alsa directory.

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@483 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
trutkin 22 years ago
parent
commit
67229c0d27
19 changed files with 44 additions and 25 deletions
  1. +1
    -0
      AUTHORS
  2. +3
    -3
      TODO
  3. +1
    -2
      drivers/Makefile.am
  4. +8
    -0
      drivers/alsa/Makefile.am
  5. +11
    -5
      drivers/alsa/alsa_driver.c
  6. +1
    -1
      drivers/alsa/alsa_driver.h
  7. +0
    -0
      drivers/alsa/generic.h
  8. +1
    -1
      drivers/alsa/generic_hw.c
  9. +2
    -2
      drivers/alsa/hammerfall.c
  10. +0
    -0
      drivers/alsa/hammerfall.h
  11. +2
    -2
      drivers/alsa/hdsp.c
  12. +0
    -0
      drivers/alsa/hdsp.h
  13. +2
    -2
      drivers/alsa/ice1712.c
  14. +0
    -0
      drivers/alsa/ice1712.h
  15. +1
    -1
      drivers/alsa/memops.c
  16. +0
    -0
      drivers/alsa/memops.h
  17. +6
    -0
      drivers/portaudio/portaudio_driver.c
  18. +0
    -6
      jack/Makefile.am
  19. +5
    -0
      jack/engine.h

+ 1
- 0
AUTHORS View File

@@ -16,5 +16,6 @@ many small patches and documentation. Fernando Pablo Lopez-Lezcano
contributed the capabilities-based code. Jeremy Hall, Steve Harris,
and Martin Boer contributed sample clients and utilities.
Jack O'Quin contributed new transport interfaces and documentation.
Taybin Rutkin helps with patch management and releases.

Many others have contributed patches and/or test results.

+ 3
- 3
TODO View File

@@ -12,7 +12,6 @@ send a change request to Kai Vehmanen (mailto:k_at_eca.cx).
TO BE DECIDED (owner)

- dropping the use of CAP_RESOURCE (nando)
- whether to default to triangular dithering the at 16bit (swh)
- support for on-the-fly sampling rate change

TODO for 1.0 (owner)
@@ -21,14 +20,13 @@ TODO for 1.0 (owner)
- API to change buffer size (joq)

TODO post-1.0
- jack session handling (taybin)
- TBD

TODO general (owner)

- don't build static libraries of drivers and ip-clients (kaiv)
- add explanation of protocol versioning to README.developers (kaiv)
- add code to enforce the 'bufsize==2^x' rule (kaiv)
- proper handling of client return values in libjack (kaiv)
- pool based malloc for rt client-local mem allocation (paul, moved back here)

@@ -43,6 +41,8 @@ TO THINK ABOUT

CLOSED (date,who,comment)

- added code to enforce the 'bufsize==2^x' rule (taybin) (2003/8/28)
- whether to default to triangular dithering the at 16bit. This was decided to leave off. (taybin) (2003/8/28)
- make sure that process callbacks always have nframes equal to buffersize (2003/08/27,done,kaiv)
- add Paul's graph/subgraph explanation to the design doc (2003/08/27,done,kaiv)
- add support for custom jackd --tmpdir in libjack (2003/05/06,done,jesse)


+ 1
- 2
drivers/Makefile.am View File

@@ -1,4 +1,4 @@
MAINTAINERCLEANFILES = Makefile.in
MAINTAINERCLEANFILES = Makefile.in

if HAVE_ALSA
ALSA_DIR = alsa
@@ -9,4 +9,3 @@ endif
SUBDIRS = dummy $(ALSA_DIR)

DIST_SUBDIRS = dummy alsa


+ 8
- 0
drivers/alsa/Makefile.am View File

@@ -9,4 +9,12 @@ plugin_LTLIBRARIES = jack_alsa.la
jack_alsa_la_LDFLAGS = -module -avoid-version
jack_alsa_la_SOURCES = alsa_driver.c generic_hw.c memops.c \
hammerfall.c hdsp.c ice1712.c

noinst_HEADERS = alsa_driver.h \
generic.h \
hammerfall.h \
hdsp.h \
ice1712.h \
memops.h

jack_alsa_la_LIBADD = $(ALSA_LIBS)

+ 11
- 5
drivers/alsa/alsa_driver.c View File

@@ -27,14 +27,14 @@
#include <stdarg.h>
#include <getopt.h>

#include <jack/alsa_driver.h>
#include "alsa_driver.h"
#include <jack/types.h>
#include <jack/internal.h>
#include <jack/engine.h>
#include <jack/hammerfall.h>
#include <jack/hdsp.h>
#include <jack/ice1712.h>
#include <jack/generic.h>
#include "hammerfall.h"
#include "hdsp.h"
#include "ice1712.h"
#include "generic.h"
#include <jack/time.h>

extern void store_work_time (int);
@@ -346,6 +346,11 @@ alsa_driver_configure_stream (alsa_driver_t *driver, char *device_name,
return -1;
}
if (!jack_power_of_two(driver->frames_per_cycle)) {
jack_error("JACK: frames must be a power of two (64, 512, 1024, ...)\n");
return -1;
}

if ((err = snd_pcm_hw_params_set_buffer_size (handle, hw_params, driver->user_nperiods * driver->frames_per_cycle)) < 0) {
jack_error ("ALSA: cannot set buffer length to %" PRIu32
" for %s",
@@ -1984,3 +1989,4 @@ driver_finish (jack_driver_t *driver)
{
alsa_driver_delete ((alsa_driver_t *) driver);
}


jack/alsa_driver.h → drivers/alsa/alsa_driver.h View File

@@ -26,7 +26,7 @@
#include <jack/types.h>
#include <jack/hardware.h>
#include <jack/driver.h>
#include <jack/memops.h>
#include "memops.h"
#include <jack/jack.h>

typedef void (*ReadCopyFunction) (jack_default_audio_sample_t *dst, char *src,

jack/generic.h → drivers/alsa/generic.h View File


+ 1
- 1
drivers/alsa/generic_hw.c View File

@@ -19,7 +19,7 @@
*/

#include <jack/hardware.h>
#include <jack/alsa_driver.h>
#include "alsa_driver.h"

static int generic_set_input_monitor_mask (jack_hardware_t *hw, unsigned long mask)
{


+ 2
- 2
drivers/alsa/hammerfall.c View File

@@ -19,8 +19,8 @@
*/

#include <jack/hardware.h>
#include <jack/alsa_driver.h>
#include <jack/hammerfall.h>
#include "alsa_driver.h"
#include "hammerfall.h"
#include <jack/internal.h>

/* Set this to 1 if you want this compile error:


jack/hammerfall.h → drivers/alsa/hammerfall.h View File


+ 2
- 2
drivers/alsa/hdsp.c View File

@@ -20,8 +20,8 @@
*/

#include <jack/hardware.h>
#include <jack/alsa_driver.h>
#include <jack/hdsp.h>
#include "alsa_driver.h"
#include "hdsp.h"
#include <jack/internal.h>

/* Constants to make working with the hdsp matrix mixer easier */


jack/hdsp.h → drivers/alsa/hdsp.h View File


+ 2
- 2
drivers/alsa/ice1712.c View File

@@ -22,8 +22,8 @@
*/

#include <jack/hardware.h>
#include <jack/alsa_driver.h>
#include <jack/ice1712.h>
#include "alsa_driver.h"
#include "ice1712.h"
#include <jack/internal.h>

static int


jack/ice1712.h → drivers/alsa/ice1712.h View File


+ 1
- 1
drivers/alsa/memops.c View File

@@ -31,7 +31,7 @@
#include <stdlib.h>
#include <limits.h>

#include <jack/memops.h>
#include "memops.h"

#define SAMPLE_MAX_24BIT 8388607.0f
#define SAMPLE_MAX_16BIT 32767.0f


jack/memops.h → drivers/alsa/memops.h View File


+ 6
- 0
drivers/portaudio/portaudio_driver.c View File

@@ -239,6 +239,12 @@ portaudio_driver_new (char *name,
jack_driver_init ((jack_driver_t *) driver);
driver->frame_rate = rate;

if (!jack_power_of_two(frames_per_cycle)) {
printf("JACK: frames must be a power of two (64, 512, 1024, ...)\n");
goto error;
}

driver->frames_per_cycle = frames_per_cycle;

driver->attach = (JackDriverAttachFunction) portaudio_driver_attach;


+ 0
- 6
jack/Makefile.am View File

@@ -9,18 +9,12 @@ libjackinclude_HEADERS = \
types.h

noinst_HEADERS = \
alsa_driver.h \
cycles.h \
driver.h \
engine.h \
generic.h \
hammerfall.h \
hardware.h \
hdsp.h \
ice1712.h \
internal.h \
jslist.h \
memops.h \
pool.h \
port.h \
shm.h \


+ 5
- 0
jack/engine.h View File

@@ -136,4 +136,9 @@ static inline void jack_unlock_graph (jack_engine_t* engine)
pthread_mutex_unlock (&engine->client_lock);
}

static inline unsigned int jack_power_of_two (unsigned int n)
{
return !(n & (n - 1));
}

#endif /* __jack_engine_h__ */

Loading…
Cancel
Save