Update of /cvsroot/alsa/alsa-kernel/isa
In directory sc8-pr-cvs1:/tmp/cvs-serv32008/isa
Modified Files:
sgalaxy.c
Log Message:
- changed the exported mixer interface to use a sole entry function
snd_ad1848_add_ctl().
- mixer elements are built from struct ad1848_mix_elem.
Index: sgalaxy.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/isa/sgalaxy.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- sgalaxy.c 21 Oct 2002 18:28:21 -0000 1.12
+++ sgalaxy.c 9 Jan 2003 10:50:01 -0000 1.13
@@ -30,6 +30,7 @@
#include <sound/core.h>
#include <sound/sb.h>
#include <sound/ad1848.h>
+#include <sound/control.h>
#define SNDRV_LEGACY_FIND_FREE_IRQ
#define SNDRV_LEGACY_FIND_FREE_DMA
#define SNDRV_GET_ID
@@ -176,9 +177,7 @@
return snd_sgalaxy_setup_wss(wssport[dev], irq, dma);
}
-#define SGALAXY_CONTROLS 2
-
-static snd_kcontrol_new_t snd_sgalaxy_controls[2] = {
+static struct ad1848_mix_elem snd_sgalaxy_controls[] = {
AD1848_DOUBLE("Aux Playback Switch", 0, SGALAXY_AUXC_LEFT, SGALAXY_AUXC_RIGHT, 7, 7,
1, 1),
AD1848_DOUBLE("Aux Playback Volume", 0, SGALAXY_AUXC_LEFT, SGALAXY_AUXC_RIGHT, 0, 0,
31, 0)
};
@@ -211,8 +210,8 @@
if ((err = snd_ctl_rename_id(card, &id1, &id2)) < 0)
return err;
/* build AUX2 input */
- for (idx = 0; idx < SGALAXY_CONTROLS; idx++) {
- if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_sgalaxy_controls[idx],
chip))) < 0)
+ for (idx = 0; idx < ARRAY_SIZE(snd_sgalaxy_controls); idx++) {
+ if ((err = snd_ad1848_add_ctl_elem(chip, &snd_sgalaxy_controls[idx]))
+< 0)
return err;
}
return 0;
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog