]> git.alsa-project.org Git - alsa-tools.git/commitdiff
Updates for package distribution.
authorJaroslav Kysela <perex@perex.cz>
Mon, 20 Aug 2001 15:17:09 +0000 (15:17 +0000)
committerJaroslav Kysela <perex@perex.cz>
Mon, 20 Aug 2001 15:17:09 +0000 (15:17 +0000)
12 files changed:
Makefile [new file with mode: 0644]
ac3dec/Makefile.am
ac3dec/output_irix.c [deleted file]
ac3dec/output_linux.c [deleted file]
ac3dec/output_solaris.c [deleted file]
as10k1/Makefile.am
cvscompile [new file with mode: 0644]
envy24control/Makefile.am
sb16_csp/Makefile.am
sb16_csp/README
seq/Makefile [new file with mode: 0644]
seq/sbiload/Makefile.am

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..de16fba
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+VERSION = 0.9.0beta7
+TOP = .
+SUBDIRS = ac3dec as10k1 envy24control sb16_csp seq
+
+all:
+       @for i in $(SUBDIRS); do cd $(TOP)/$$i; ./cvscompile; cd ..; make -C $$i; done
+
+alsa-dist:
+       @mkdir -p $(TOP)/distdir
+       @for i in $(SUBDIRS); do cd $(TOP)/$$i; ./cvscompile; cd ..; make -C $$i alsa-dist; done
+       @mv distdir alsa-tools-$(VERSION)
+       @tar cIf alsa-tools-$(VERSION).tar.bz2 alsa-tools-$(VERSION)
+       @mv alsa-tools-$(VERSION) distdir
+
+clean:
+       rm -rf *~ distdir
+       @for i in $(SUBDIRS); do make -C $$i clean; done
index a3d1560d1139300d12389898e798b49da3a386ed..b6c8a4b6bb9829adf0c355d567f4024e3217ad80 100644 (file)
@@ -12,8 +12,12 @@ ac3dec_SOURCES = ac3dec.c output.c ac3spdif.c
 ac3dec_DEPENDENCIES = libac3/libac3.a
 
 
-EXTRA_DIST = README Changelog TODO plot_spectrum.m autogen.sh\
-       output_linux.c output_irix.c output_solaris.c
+EXTRA_DIST = README Changelog TODO plot_spectrum.m autogen.sh
 
 SUBDIRS = libac3 tools test .
 
+alsa-dist: distdir
+       @rm -rf ../distdir/ac3dec
+       @mkdir -p ../distdir/ac3dec
+       @cp -RLpv $(distdir)/* ../distdir/ac3dec
+       @rm -rf $(distdir)
diff --git a/ac3dec/output_irix.c b/ac3dec/output_irix.c
deleted file mode 100644 (file)
index 931819b..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- *
- *  output_irix.c
- *    
- *      Copyright (C) Aaron Holtzman - May 1999
- *      Port to IRIX by Jim Miller, SGI - Nov 1999
- *
- *  This file is part of ac3dec, a free Dolby AC-3 stream decoder.
- *      
- *  ac3dec is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2, or (at your option)
- *  any later version.
- *   
- *  ac3dec is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *   
- *  You should have received a copy of the GNU General Public License
- *  along with GNU Make; see the file COPYING.  If not, write to
- *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
- *
- *
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <math.h>
-
-#include <audio.h>
-
-
-typedef signed short sint_16;
-typedef unsigned int uint_32;
-#include "output.h"
-
-static int init = 0;
-static ALport alport = 0;
-static ALconfig alconfig = 0;
-static int bytesPerWord = 1;
-static int nChannels = 2;
-
-
-/*
- * open the audio device for writing to
- */
-int output_open(int bits, int rate, int channels)
-{
-  ALpv params[2];
-  int  dev = AL_DEFAULT_OUTPUT;
-  int  wsize = AL_SAMPLE_16;
-
-  nChannels = channels;
-
-  if (!init) {
-    init = 1;
-    alconfig = alNewConfig();
-
-    if (alSetQueueSize(alconfig, BUFFER_SIZE) < 0) {
-        fprintf(stderr, "alSetQueueSize failed: %s\n",
-                alGetErrorString(oserror()));
-        return 0;
-    }
-
-    if (alSetChannels(alconfig, channels) < 0) {
-        fprintf(stderr, "alSetChannels(%d) failed: %s\n",
-                channels, alGetErrorString(oserror()));
-        return 0;
-    }
-
-    if (alSetDevice(alconfig, dev) < 0) {
-        fprintf(stderr, "alSetDevice failed: %s\n",
-                        alGetErrorString(oserror()));
-        return 0;
-    }
-
-    if (alSetSampFmt(alconfig, AL_SAMPFMT_TWOSCOMP) < 0) {
-        fprintf(stderr, "alSetSampFmt failed: %s\n",
-                        alGetErrorString(oserror()));
-        return 0;
-    }
-
-    alport = alOpenPort("AC3Decode", "w", 0);
-    if (!alport) {
-        fprintf(stderr, "alOpenPort failed: %s\n",
-                        alGetErrorString(oserror()));
-        return 0;
-    }
-
-    switch (bits) {
-        case 8:         
-                bytesPerWord = 1;
-                wsize = AL_SAMPLE_8;
-                break;
-        case 16: 
-                bytesPerWord = 2;
-                wsize = AL_SAMPLE_16;
-                break;
-        case 24:
-                bytesPerWord = 4;
-                wsize = AL_SAMPLE_24;
-                break;
-        default:
-                printf("Irix audio: unsupported bit with %d\n", bits);
-                break;
-    }
-
-    if (alSetWidth(alconfig, wsize) < 0) {
-        fprintf(stderr, "alSetWidth failed: %s\n", alGetErrorString(oserror()));
-        return 0;
-    }
-        
-    params[0].param = AL_RATE;
-    params[0].value.ll = alDoubleToFixed((double)rate);
-    params[1].param = AL_MASTER_CLOCK;
-    params[1].value.i = AL_CRYSTAL_MCLK_TYPE;
-    if ( alSetParams(dev, params, 1) < 0) {
-        printf("alSetParams() failed: %s\n", alGetErrorString(oserror()));
-        return 0;
-    }
-  }
-
-       printf("I've synced the IRIX code with the mainline blindly.\n Let me know if it works.\n");
-
-  return 1;
-}
-
-/*
- * play the sample to the already opened file descriptor
- */
-
-void output_play(sint_16* output_samples, uint_32 num_bytes)
-{
-       alWriteFrames(alport, output_samples, 6 * 256); 
-}
-
-void
-output_close(void)
-{
-  alClosePort(alport);
-  alFreeConfig(alconfig);
-  alport = 0;
-  alconfig = 0;
-  init = 0;
-}
diff --git a/ac3dec/output_linux.c b/ac3dec/output_linux.c
deleted file mode 100644 (file)
index 9a467bd..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- *
- *  output_linux.c
- *    
- *     Copyright (C) Aaron Holtzman - May 1999
- *
- *  This file is part of ac3dec, a free Dolby AC-3 stream decoder.
- *     
- *  ac3dec is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2, or (at your option)
- *  any later version.
- *   
- *  ac3dec is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *   
- *  You should have received a copy of the GNU General Public License
- *  along with GNU Make; see the file COPYING.  If not, write to
- *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
- *
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <math.h>
-#if defined(__OpenBSD__)
-#include <soundcard.h>
-#elif defined(__FreeBSD__)
-#include <machine/soundcard.h>
-#else
-#include <sys/soundcard.h>
-#endif
-#include <sys/ioctl.h>
-
-//this sux...types should go in config.h methinks
-typedef signed short sint_16;
-typedef unsigned int uint_32;
-
-#include "output.h"
-
-
-static char dev[] = "/dev/dsp";
-static int fd;
-
-
-/*
- * open the audio device for writing to
- */
-int output_open(int bits, int rate, int channels)
-{
-  int tmp;
-  
-  /*
-   * Open the device driver
-   */
-
-       fd=open(dev,O_WRONLY);
-  if(fd < 0) 
-  {
-    fprintf(stderr,"%s: Opening audio device %s\n",
-        strerror(errno), dev);
-    goto ERR;
-  }
-
-  tmp = channels == 2 ? 1 : 0;
-  ioctl(fd,SNDCTL_DSP_STEREO,&tmp);
-
-  tmp = bits;
-  ioctl(fd,SNDCTL_DSP_SAMPLESIZE,&tmp);
-
-  tmp = rate;
-  ioctl(fd,SNDCTL_DSP_SPEED, &tmp);
-
-       //this is cheating
-       tmp = 256;
-//  ioctl(fd,SNDCTL_DSP_SETFRAGMENT,&tmp);
-
-
-
-       return 1;
-
-ERR:
-  if(fd >= 0) { close(fd); }
-  return 0;
-}
-
-/*
- * play the sample to the already opened file descriptor
- */
-void output_play(sint_16* output_samples, uint_32 num_bytes)
-{
-//     if(fd < 0)
-//             return;
-
-       write(fd,output_samples,1024 * 6);
-}
-
-
-void
-output_close(void)
-{
-       close(fd);
-}
diff --git a/ac3dec/output_solaris.c b/ac3dec/output_solaris.c
deleted file mode 100644 (file)
index df4e1ed..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- *
- *  output_solaris.c
- *
- *     Copyright (C) Aaron Holtzman - May 1999
- *
- *  This file is part of ac3dec, a free Dolby AC-3 stream decoder.
- *     
- *  ac3dec is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2, or (at your option)
- *  any later version.
- *   
- *  ac3dec is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *   
- *  You should have received a copy of the GNU General Public License
- *  along with GNU Make; see the file COPYING.  If not, write to
- *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
- *
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/audioio.h>
-#include <sys/ioctl.h>
-#include <stropts.h>
-#include <signal.h>
-#include <math.h>
-
-//FIXME broken solaris headers!
-int usleep(unsigned int useconds);
-
-
-//this sux...types should go in config.h methinks
-typedef signed short sint_16;
-typedef unsigned int uint_32;
-
-#include "output.h"
-
-/* Global to keep track of old state */
-static audio_info_t info;
-static char dev[] = "/dev/audio";
-static int fd;
-
-
-/*
- * open the audio device for writing to
- */
-int output_open(int bits, int rate, int channels)
-{
-
-  /*
-   * Open the device driver
-   */
-
-       fd=open(dev,O_WRONLY);
-  if(fd < 0) 
-  {
-    fprintf(stderr,"%s: Opening audio device %s\n",
-        strerror(errno), dev);
-    goto ERR;
-  }
-       fprintf(stderr,"Opened audio device \"%s\"\n",dev);
-
-       /* Setup our parameters */
-       AUDIO_INITINFO(&info);
-
-       info.play.sample_rate = rate;
-       info.play.precision = bits;
-       info.play.channels = channels;
-       info.play.buffer_size = 1024;
-       info.play.encoding = AUDIO_ENCODING_LINEAR;
-       //info.play.port = AUDIO_SPEAKER;
-       //info.play.gain = 110;
-
-       /* Write our configuration */
-       /* An implicit GETINFO is also performed so we can get
-        * the buffer_size */
-
-  if(ioctl(fd, AUDIO_SETINFO, &info) < 0)
-  {
-    fprintf(stderr, "%s: Writing audio config block\n",strerror(errno));
-    goto ERR;
-  }
-
-       return 1;
-
-ERR:
-  if(fd >= 0) { close(fd); }
-  return 0;
-}
-
-unsigned long j= 0 ;
-/*
- * play the sample to the already opened file descriptor
- */
-void output_play(sint_16* output_samples, uint_32 num_bytes)
-{
-       write(fd,&output_samples[0 * 512],1024);
-       write(fd,&output_samples[1 * 512],1024);
-       write(fd,&output_samples[2 * 512],1024);
-       write(fd,&output_samples[3 * 512],1024);
-       write(fd,&output_samples[4 * 512],1024);
-       write(fd,&output_samples[5 * 512],1024);
-}
-
-
-void
-output_close(void)
-{
-       close(fd);
-}
-
index 682ae2c1a426716618705a0eb6e4fed689f486ba..6f7a3f4ef8569596d082583fdcb50be96ae10465 100644 (file)
@@ -1,5 +1,6 @@
 bin_PROGRAMS = as10k1
 as10k1_SOURCES = as10k1.c parse.c assemble.c macro.c
+noinst_HEADERS = as10k1.h list.h parse.h proto.h types.h
 EXTRA_DIST = cvscompile output.doc examples/Makefile examples/*.asm
 
 dsp:
@@ -8,3 +9,9 @@ dsp:
 clean:
        rm -rf .deps *~
        $(MAKE) -C examples clean
+
+alsa-dist: distdir
+       @rm -rf ../distdir/as10k1
+       @mkdir -p ../distdir/as10k1
+       @cp -RLpv $(distdir)/* ../distdir/as10k1
+       @rm -rf $(distdir)
diff --git a/cvscompile b/cvscompile
new file mode 100644 (file)
index 0000000..5b139ec
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make
index af3605666974e759d79fcadacefc33da5dbebf43..088b980105905bceda4f49dca8a6f80cf8059134 100644 (file)
@@ -7,3 +7,8 @@ EXTRA_DIST = cvscompile
 clean:
        rm -rf .deps *~
 
+alsa-dist: distdir
+       @rm -rf ../distdir/envy24control
+       @mkdir -p ../distdir/envy24control
+       @cp -RLpv $(distdir)/* ../distdir/envy24control
+       @rm -rf $(distdir)
index 5b00c27f9214f365fa0d66da2c7fc1b449fb0820..3d8d5d195f0f01f6b2978745b177d7f65e5fcce9 100644 (file)
@@ -8,4 +8,10 @@ man_MANS = cspctl.1
 
 cspctl_SOURCES = cspctl.c
 
-EXTRA_DIST = README COPYING
+EXTRA_DIST = README COPYING cspctl.1
+
+alsa-dist: distdir
+       @rm -rf ../distdir/sb16_csp
+       @mkdir -p ../distdir/sb16_csp
+       @cp -RLpv $(distdir)/* ../distdir/sb16_csp
+       @rm -rf $(distdir)
index 3426e63d6562590cfd2cd7c64d99c3b188e4f5d5..3b28ab5563f3f3c338ba0d1d2c53289f675b3472 100644 (file)
@@ -2,7 +2,9 @@ TO COMPILE:
 
 1. install ALSA driver
 2. compile with:
-       'make'
+       './configure; make'
+   or
+        './cvscompile'
 3. install with:
        'make install'
 4. read cspctl.1 manpage:
diff --git a/seq/Makefile b/seq/Makefile
new file mode 100644 (file)
index 0000000..9de5cda
--- /dev/null
@@ -0,0 +1,10 @@
+SUBDIRS = sbiload
+
+all:
+       @for i in $(SUBDIRS); do cd $$i; ./cvscompile; cd ..; $(MAKE) -C $$i; done      
+
+alsa-dist:
+       @for i in $(SUBDIRS); do $(MAKE) -C $$i alsa-dist; done
+
+clean:
+       @for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
index 9ea6d653bf8360a85184b578265b13a6134ae522..688ab5c5e178844322159990f21fe68cbd7800f0 100644 (file)
@@ -9,3 +9,9 @@ bin_PROGRAMS = sbiload
 sbiload_SOURCES = sbiload.c
 
 EXTRA_DIST = README COPYING
+
+alsa-dist: distdir
+       @rm -rf ../../distdir/seq/sbiload
+       @mkdir -p ../../distdir/seq/sbiload
+       @cp -RLpv $(distdir)/* ../../distdir/seq/sbiload
+       @rm -rf $(distdir)