afh: Unify name of init functions.
[paraslash.git] / alsa_mix.c
index cad58af0a9481bd8cb7985cf87b431685f537c01..6520416fb83931ede15a299118a972f5893b2f34 100644 (file)
@@ -142,7 +142,7 @@ static int alsa_mix_set_channel(struct mixer_handle *h,
        snd_mixer_selem_id_set_name(sid, mixer_channel);
        h->elem = snd_mixer_find_selem(h->mixer, sid);
        if (!h->elem) {
-               PARA_NOTICE_LOG("unable to find simple control '%s',%i\n",
+               PARA_NOTICE_LOG("unable to find simple control '%s',%u\n",
                        snd_mixer_selem_id_get_name(sid),
                        snd_mixer_selem_id_get_index(sid));
                ret = -E_BAD_CHANNEL;
@@ -216,19 +216,13 @@ static int alsa_mix_set(struct mixer_handle *h, int val)
        return 1;
 }
 
-/**
- * The init function of the ALSA mixer.
- *
- * \param self The structure to initialize.
- *
- * \sa struct \ref mixer, \ref oss_mix_init().
- */
-void alsa_mix_init(struct mixer *self)
-{
-       self->open = alsa_mix_open;
-       self->get_channels = alsa_mix_get_channels;
-       self->set_channel = alsa_mix_set_channel;
-       self->close = alsa_mix_close;
-       self->get = alsa_mix_get;
-       self->set = alsa_mix_set;
-}
+/** The mixer operations for the ALSA mixer. */
+const struct mixer alsa_mixer = {
+       .name = "alsa",
+       .open = alsa_mix_open,
+       .get_channels = alsa_mix_get_channels,
+       .set_channel = alsa_mix_set_channel,
+       .close = alsa_mix_close,
+       .get = alsa_mix_get,
+       .set = alsa_mix_set
+};