mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2025-10-29 05:40:25 -04:00
Update by Uros
This commit is contained in:
parent
adfa382906
commit
b10f3cbcb6
1 changed files with 6 additions and 21 deletions
|
|
@ -1,11 +1,8 @@
|
|||
/*
|
||||
* SB16/AWE32 Creative Signal Processor (ASP/CSP) control program
|
||||
* ver 0.2.0
|
||||
*
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* 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 <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <alsa/asoundlib.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <sound/sb16_csp.h>
|
||||
|
||||
/* --- commands --- */
|
||||
enum {
|
||||
|
|
@ -66,11 +63,6 @@ static void help(char *command)
|
|||
, command);
|
||||
}
|
||||
|
||||
static void version(void)
|
||||
{
|
||||
printf("Version: " VERSION "\n");
|
||||
}
|
||||
|
||||
static int csp_command (int idx, int dev, int command, char *filename)
|
||||
{
|
||||
int fd, err;
|
||||
|
|
@ -136,21 +128,14 @@ int main(int argc, char *argv[])
|
|||
help(argv[0]);
|
||||
return 0;
|
||||
}
|
||||
if (argc > 1 && !strcmp(argv[1], "--version")) {
|
||||
version();
|
||||
return 0;
|
||||
}
|
||||
|
||||
strcpy (microcode.info.codec_name, "UNKNOWN");
|
||||
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) {
|
||||
case 'h':
|
||||
help(argv[0]);
|
||||
return 0;
|
||||
case 'v':
|
||||
version();
|
||||
return 0;
|
||||
case 'c':
|
||||
{
|
||||
card = snd_card_get_index(optarg);
|
||||
|
|
@ -210,10 +195,10 @@ int main(int argc, char *argv[])
|
|||
exit(1);
|
||||
}
|
||||
|
||||
// CSP chip is present only on SB16 and SBAWE cards
|
||||
if (strcmp(snd_ctl_card_info_get_driver(card_info), "SB 16") != 0 &&
|
||||
// CSP chip is present only on SB16 and SB AWE cards
|
||||
if (strcmp(snd_ctl_card_info_get_driver(card_info), "SB16") != 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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue