]> git.alsa-project.org Git - alsa-tools.git/commitdiff
use plug layer to allow the non-16bit PCM devices too.
authorTakashi Iwai <tiwai@suse.de>
Fri, 16 May 2003 14:37:25 +0000 (14:37 +0000)
committerTakashi Iwai <tiwai@suse.de>
Fri, 16 May 2003 14:37:25 +0000 (14:37 +0000)
ac3dec/output.c

index 957e0af95c0da27732945e26564697812e1be3de..9ca1bd15fe1000506be6e4fc964787aa2574c563 100644 (file)
@@ -78,9 +78,10 @@ int output_open(output_t *output)
                                        s[2] = 0;
                                        s[3] = IEC958_AES3_CON_FS_48000;
                                }
-                               sprintf(devstr, "iec958:AES0=0x%x,AES1=0x%x,AES2=0x%x,AES3=0x%x", s[0], s[1], s[2], s[3]);
+                               sprintf(devstr, "plug: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);
+                                       sprintf(devstr + strlen(devstr), " CARD %s", out_config.card);
+                               strcat(devstr, "}");
                                format = SND_PCM_FORMAT_S16_LE;
                        } else {
                                if (out_config.card)
@@ -90,14 +91,14 @@ int output_open(output_t *output)
                        }
                        break;
                case 4:
-                       strcpy(devstr, "surround40");
+                       strcpy(devstr, "plug:surround40");
                        if (out_config.card)
-                               sprintf(devstr + strlen(devstr), ",CARD=%s", out_config.card);
+                               sprintf(devstr + strlen(devstr), ":{CARD %s}", out_config.card);
                        break;
                case 6:
-                       strcpy(devstr, "surround51");
+                       strcpy(devstr, "plug:surround51");
                        if (out_config.card)
-                               sprintf(devstr + strlen(devstr), ",CARD=%s", out_config.card);
+                               sprintf(devstr + strlen(devstr), ":{CARD %s}", out_config.card);
                        break;
                default:
                        fprintf(stderr, "%d channels are not supported\n", output->channels);