{"device", 1, NULL, 'D'},
{"4ch", 0, NULL, '4'},
{"6ch", 0, NULL, '6'},
- {"card", 0, NULL, 'c'},
+ {"card", 1, NULL, 'c'},
{"iec958c", 0, NULL, 'C'},
{"spdif", 0, NULL, 'C'},
{"iec958p", 0, NULL, 'P'},
while (1) {
int c;
- if ((c = getopt_long(argc, argv, "hvcD:46CPRZ:q", long_option, NULL)) < 0)
+ if ((c = getopt_long(argc, argv, "hvc:D:46CPRZ:q", long_option, NULL)) < 0)
break;
switch (c) {
case 'h':
switch (output->channels) {
case 1:
case 2:
- sprintf(devstr, "default");
if (output->spdif != SPDIF_NONE) {
unsigned char s[4];
if (output->spdif == SPDIF_PRO) {
sprintf(devstr, "iec958:AES0=0x%x,AES1=0x%x,AES2=0x%x,AES3=0x%x", s[0], s[1], s[2], s[3]);
if (out_config.card)
sprintf(devstr + strlen(devstr), ",CARD=%s", out_config.card);
+ } else {
+ if (out_config.card)
+ sprintf(devstr, "plughw:%s", out_config.card);
+ else
+ sprintf(devstr, "default");
}
break;
case 4: