]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Some fixes. Added conf for trident
authorAbramo Bagnara <abramo@alsa-project.org>
Sat, 16 Jun 2001 09:40:20 +0000 (09:40 +0000)
committerAbramo Bagnara <abramo@alsa-project.org>
Sat, 16 Jun 2001 09:40:20 +0000 (09:40 +0000)
src/cards/Makefile.am
src/cards/TRID4DWAVENX.conf [new file with mode: 0644]
src/conf.c
src/control/setup.c

index 76853b909d5c6fe477902f2489ddaf9c39d83137..4d21c9e410ab389e05e89f853f0daa83f39247d3 100644 (file)
@@ -1,5 +1,5 @@
 alsadir = $(datadir)/alsa/cards
-cfg_files = SI_7018.conf EMU10K1.conf
+cfg_files = SI_7018.conf EMU10K1.conf TRID4DWAVENX.conf
 
 EXTRA_DIST = $(cfg_files)
 alsa_DATA = $(cfg_files)
diff --git a/src/cards/TRID4DWAVENX.conf b/src/cards/TRID4DWAVENX.conf
new file mode 100644 (file)
index 0000000..f308a59
--- /dev/null
@@ -0,0 +1,40 @@
+pcm.iec958_0 {
+       @args [ CARD DEV AES0 AES1 AES2 AES3 ]
+       @args.CARD {
+               type integer
+       }
+       @args.DEV {
+               type integer
+       }
+       @args.AES0 {
+               type integer
+       }
+       @args.AES1 {
+               type integer
+       }
+       @args.AES2 {
+               type integer
+       }
+       @args.AES3 {
+               type integer
+       }
+       type hooks
+       slave.pcm {
+               type hw
+               card $(CARD)
+               device 2
+       }
+       hooks.0 {
+               type ctl_elems
+               hook_args [
+                       {
+                               interface PCM
+                               name "IEC958 Playback PCM Stream"
+                               value [ $(AES0) $(AES1) $(AES2) $(AES3) ]
+                               device 2
+                               lock true
+                               preserve true
+                       }
+               ]
+       }
+}
index f6252f3c3e55134f85d44c6eb5cd1c8f263a653f..f37207dd4a3d9dad0a7ed31d520392a879b161a3 100644 (file)
@@ -1864,8 +1864,17 @@ static int _snd_config_expand(snd_config_t *src,
 
 void snd_config_substitute(snd_config_t *dst, snd_config_t *src)
 {
+       if (src->type == SND_CONFIG_TYPE_COMPOUND) {
+               snd_config_iterator_t i, next;
+               snd_config_for_each(i, next, src) {
+                       snd_config_t *n = snd_config_iterator_entry(i);
+                       n->father = dst;
+               }
+               src->u.compound.fields.next->prev = &dst->u.compound.fields;
+               src->u.compound.fields.prev->next = &dst->u.compound.fields;
+       }
        free(dst->id);
-       dst->id = src->id;
+       dst->id  = src->id;
        dst->type = src->type;
        dst->u = src->u;
 }
index 220a743501d8af733de6b76dfa1af501de6007f3..73acb135b5df09b72afe8aa6deb0c4b6b584b230 100644 (file)
@@ -460,6 +460,7 @@ static int add_elem(snd_sctl_t *h, snd_config_t *conf,
                                free(tmp);
                                goto _err;
                        }
+                       iface = err;
                        free(tmp);
                        continue;
                }