Update by Uros

This commit is contained in:
Jaroslav Kysela 2001-10-12 08:12:09 +00:00
parent adfa382906
commit b10f3cbcb6

View file

@ -1,11 +1,8 @@
/* /*
* SB16/AWE32 Creative Signal Processor (ASP/CSP) control program * SB16/AWE32 Creative Signal Processor (ASP/CSP) control program
* ver 0.2.0
* *
* Copyright (c) 2000 by Uros Bizjak <uros@kss-loka.si> * Copyright (c) 2000 by Uros Bizjak <uros@kss-loka.si>
* *
* http://www.kss-loka.si/~uros/CSP.html
*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
@ -22,13 +19,13 @@
* *
*/ */
#include <sound/sb16_csp.h> #include <alsa/asoundlib.h>
#include <getopt.h> #include <getopt.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <alsa/asoundlib.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <sound/sb16_csp.h>
/* --- commands --- */ /* --- commands --- */
enum { enum {
@ -66,11 +63,6 @@ static void help(char *command)
, command); , command);
} }
static void version(void)
{
printf("Version: " VERSION "\n");
}
static int csp_command (int idx, int dev, int command, char *filename) static int csp_command (int idx, int dev, int command, char *filename)
{ {
int fd, err; int fd, err;
@ -136,21 +128,14 @@ int main(int argc, char *argv[])
help(argv[0]); help(argv[0]);
return 0; return 0;
} }
if (argc > 1 && !strcmp(argv[1], "--version")) {
version();
return 0;
}
strcpy (microcode.info.codec_name, "UNKNOWN"); strcpy (microcode.info.codec_name, "UNKNOWN");
microcode.info.func_req = 1; microcode.info.func_req = 1;
while ((c = getopt(argc, argv, "hvc:f:d:")) != EOF) { while ((c = getopt(argc, argv, "hc:f:d:")) != EOF) {
switch (c) { switch (c) {
case 'h': case 'h':
help(argv[0]); help(argv[0]);
return 0; return 0;
case 'v':
version();
return 0;
case 'c': case 'c':
{ {
card = snd_card_get_index(optarg); card = snd_card_get_index(optarg);
@ -210,10 +195,10 @@ int main(int argc, char *argv[])
exit(1); exit(1);
} }
// CSP chip is present only on SB16 and SBAWE cards // CSP chip is present only on SB16 and SB AWE cards
if (strcmp(snd_ctl_card_info_get_driver(card_info), "SB 16") != 0 && if (strcmp(snd_ctl_card_info_get_driver(card_info), "SB16") != 0 &&
strcmp(snd_ctl_card_info_get_driver(card_info), "SB AWE") != 0) { strcmp(snd_ctl_card_info_get_driver(card_info), "SB AWE") != 0) {
error("not a SB_16 or SB_AWE type card"); error("not a SB16 or SB AWE type card");
exit(1); exit(1);
} }