e_mod_mixer_del(app->sys);
app->sys = e_mod_mixer_new(app->card);
if (_mixer_using_default)
- e_mixer_system_callback_set(app->sys, _cb_system_update, app);
+ e_mixer_alsa_callback_set(app->sys, _cb_system_update, app);
eina_stringshare_del(app->channel_name);
app->channel_name = e_mod_mixer_channel_default_name_get(app->sys);
inst = l->data;
conf = inst->conf;
- card_name = e_mixer_system_get_card_name(conf->card);
+ card_name = e_mixer_alsa_get_card_name(conf->card);
snprintf(name, sizeof(name), "%s: %s", card_name, conf->channel_name);
eina_stringshare_del(card_name);
r = _mixer_sys_setup(inst);
if (r && _mixer_using_default)
- e_mixer_system_callback_set(inst->sys, _mixer_system_cb_update, inst);
+ e_mixer_alsa_callback_set(inst->sys, _mixer_system_cb_update, inst);
return r;
}
inst->sys = NULL;
return;
}
- if (_mixer_using_default) e_mixer_system_callback_set(inst->sys, _mixer_system_cb_update, inst);
- else e_mixer_system_callback_set(inst->sys, NULL, NULL);
+ if (_mixer_using_default) e_mixer_alsa_callback_set(inst->sys, _mixer_system_cb_update, inst);
+ else e_mixer_alsa_callback_set(inst->sys, NULL, NULL);
if ((inst->mixer_state.left > -1) && (inst->mixer_state.right > -1) && (inst->mixer_state.mute > -1))
e_mod_mixer_volume_set(inst->sys, inst->channel,
inst->mixer_state.left, inst->mixer_state.right);
return NULL;
}
- if (_mixer_using_default) e_mixer_system_callback_set(inst->sys, _mixer_system_cb_update, inst);
+ if (_mixer_using_default) e_mixer_alsa_callback_set(inst->sys, _mixer_system_cb_update, inst);
inst->ui.gadget = edje_object_add(gc->evas);
e_theme_edje_object_set(inst->ui.gadget, "base/theme/modules/mixer",
void
e_mixer_default_setup(void)
{
- e_mod_mixer_volume_get = (void *)e_mixer_system_get_volume;
- e_mod_mixer_volume_set = (void *)e_mixer_system_set_volume;
- e_mod_mixer_mute_get = (void *)e_mixer_system_get_mute;
- e_mod_mixer_mute_set = (void *)e_mixer_system_set_mute;
- e_mod_mixer_mutable_get = (void *)e_mixer_system_can_mute;
- e_mod_mixer_state_get = (void *)e_mixer_system_get_state;
- e_mod_mixer_capture_get = (void *)e_mixer_system_has_capture;
- e_mod_mixer_new = (void *)e_mixer_system_new;
- e_mod_mixer_del = (void *)e_mixer_system_del;
- e_mod_mixer_channel_default_name_get = (void *)e_mixer_system_get_default_channel_name;
- e_mod_mixer_channel_get_by_name = (void *)e_mixer_system_get_channel_by_name;
- e_mod_mixer_channel_name_get = (void *)e_mixer_system_get_channel_name;
- e_mod_mixer_channel_del = (void *)e_mixer_system_channel_del;
- e_mod_mixer_channels_free = (void *)e_mixer_system_free_channels;
- e_mod_mixer_channels_get = (void *)e_mixer_system_get_channels;
- e_mod_mixer_channels_names_get = (void *)e_mixer_system_get_channels_names;
- e_mod_mixer_card_name_get = (void *)e_mixer_system_get_card_name;
- e_mod_mixer_cards_get = (void *)e_mixer_system_get_cards;
- e_mod_mixer_cards_free = (void *)e_mixer_system_free_cards;
- e_mod_mixer_card_default_get = (void *)e_mixer_system_get_default_card;
+ e_mod_mixer_volume_get = (void *)e_mixer_alsa_get_volume;
+ e_mod_mixer_volume_set = (void *)e_mixer_alsa_set_volume;
+ e_mod_mixer_mute_get = (void *)e_mixer_alsa_get_mute;
+ e_mod_mixer_mute_set = (void *)e_mixer_alsa_set_mute;
+ e_mod_mixer_mutable_get = (void *)e_mixer_alsa_can_mute;
+ e_mod_mixer_state_get = (void *)e_mixer_alsa_get_state;
+ e_mod_mixer_capture_get = (void *)e_mixer_alsa_has_capture;
+ e_mod_mixer_new = (void *)e_mixer_alsa_new;
+ e_mod_mixer_del = (void *)e_mixer_alsa_del;
+ e_mod_mixer_channel_default_name_get = (void *)e_mixer_alsa_get_default_channel_name;
+ e_mod_mixer_channel_get_by_name = (void *)e_mixer_alsa_get_channel_by_name;
+ e_mod_mixer_channel_name_get = (void *)e_mixer_alsa_get_channel_name;
+ e_mod_mixer_channel_del = (void *)e_mixer_alsa_channel_del;
+ e_mod_mixer_channels_free = (void *)e_mixer_alsa_free_channels;
+ e_mod_mixer_channels_get = (void *)e_mixer_alsa_get_channels;
+ e_mod_mixer_channels_names_get = (void *)e_mixer_alsa_get_channels_names;
+ e_mod_mixer_card_name_get = (void *)e_mixer_alsa_get_card_name;
+ e_mod_mixer_cards_get = (void *)e_mixer_alsa_get_cards;
+ e_mod_mixer_cards_free = (void *)e_mixer_alsa_free_cards;
+ e_mod_mixer_card_default_get = (void *)e_mixer_alsa_get_default_card;
_mixer_using_default = EINA_TRUE;
}
E_Mixer_App *app;
} E_Mixer_Channel_Info;
-Eina_List *e_mixer_system_get_cards(void);
-void e_mixer_system_free_cards(Eina_List *cards);
-const char *e_mixer_system_get_default_card(void);
-const char *e_mixer_system_get_card_name(const char *card);
+Eina_List *e_mixer_alsa_get_cards(void);
+void e_mixer_alsa_free_cards(Eina_List *cards);
+const char *e_mixer_alsa_get_default_card(void);
+const char *e_mixer_alsa_get_card_name(const char *card);
Eina_Bool e_mixer_pulse_init(void);
-E_Mixer_System *e_mixer_system_new(const char *card);
-void e_mixer_system_del(E_Mixer_System *self);
+E_Mixer_System *e_mixer_alsa_new(const char *card);
+void e_mixer_alsa_del(E_Mixer_System *self);
-int e_mixer_system_callback_set(E_Mixer_System *self, int (*func)(void *data, E_Mixer_System *self), void *data);
+int e_mixer_alsa_callback_set(E_Mixer_System *self, int (*func)(void *data, E_Mixer_System *self), void *data);
-Eina_List *e_mixer_system_get_channels(E_Mixer_System *self);
-void e_mixer_system_free_channels(Eina_List *channels);
-Eina_List *e_mixer_system_get_channels_names(E_Mixer_System *self);
-void e_mixer_system_free_channels_names(Eina_List *channels_names);
-const char *e_mixer_system_get_default_channel_name(E_Mixer_System *self);
-E_Mixer_Channel *e_mixer_system_get_channel_by_name(E_Mixer_System *self, const char *name);
-const char *e_mixer_system_get_channel_name(E_Mixer_System *self, E_Mixer_Channel *channel);
-void e_mixer_system_channel_del(E_Mixer_Channel *channel);
+Eina_List *e_mixer_alsa_get_channels(E_Mixer_System *self);
+void e_mixer_alsa_free_channels(Eina_List *channels);
+Eina_List *e_mixer_alsa_get_channels_names(E_Mixer_System *self);
+void e_mixer_alsa_free_channels_names(Eina_List *channels_names);
+const char *e_mixer_alsa_get_default_channel_name(E_Mixer_System *self);
+E_Mixer_Channel *e_mixer_alsa_get_channel_by_name(E_Mixer_System *self, const char *name);
+const char *e_mixer_alsa_get_channel_name(E_Mixer_System *self, E_Mixer_Channel *channel);
+void e_mixer_alsa_channel_del(E_Mixer_Channel *channel);
-int e_mixer_system_get_state(E_Mixer_System *self, E_Mixer_Channel *channel, E_Mixer_Channel_State *state);
-int e_mixer_system_set_state(E_Mixer_System *self, E_Mixer_Channel *channel, const E_Mixer_Channel_State *state);
-int e_mixer_system_get_volume(E_Mixer_System *self, E_Mixer_Channel *channel, int *left, int *right);
-int e_mixer_system_set_volume(E_Mixer_System *self, E_Mixer_Channel *channel, int left, int right);
-int e_mixer_system_get_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int *mute);
-int e_mixer_system_set_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int mute);
-int e_mixer_system_can_mute(E_Mixer_System *self, E_Mixer_Channel *channel);
-int e_mixer_system_has_capture(E_Mixer_System *self, E_Mixer_Channel *channel);
+int e_mixer_alsa_get_state(E_Mixer_System *self, E_Mixer_Channel *channel, E_Mixer_Channel_State *state);
+int e_mixer_alsa_set_state(E_Mixer_System *self, E_Mixer_Channel *channel, const E_Mixer_Channel_State *state);
+int e_mixer_alsa_get_volume(E_Mixer_System *self, E_Mixer_Channel *channel, int *left, int *right);
+int e_mixer_alsa_set_volume(E_Mixer_System *self, E_Mixer_Channel *channel, int left, int right);
+int e_mixer_alsa_get_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int *mute);
+int e_mixer_alsa_set_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int mute);
+int e_mixer_alsa_can_mute(E_Mixer_System *self, E_Mixer_Channel *channel);
+int e_mixer_alsa_has_capture(E_Mixer_System *self, E_Mixer_Channel *channel);
int pulse_init(void);
Eina_Bool e_mixer_pulse_ready(void);
}
E_Mixer_System *
-e_mixer_system_new(const char *name)
+e_mixer_alsa_new(const char *name)
{
snd_mixer_t *handle;
int err;
}
void
-e_mixer_system_del(E_Mixer_System *self)
+e_mixer_alsa_del(E_Mixer_System *self)
{
struct e_mixer_callback_desc *desc;
}
int
-e_mixer_system_callback_set(E_Mixer_System *self,
+e_mixer_alsa_callback_set(E_Mixer_System *self,
int (*func)(void *data, E_Mixer_System *self),
void *data)
{
}
Eina_List *
-e_mixer_system_get_cards(void)
+e_mixer_alsa_get_cards(void)
{
int err, card_num;
Eina_List *cards;
}
void
-e_mixer_system_free_cards(Eina_List *cards)
+e_mixer_alsa_free_cards(Eina_List *cards)
{
const char *card;
}
const char *
-e_mixer_system_get_default_card(void)
+e_mixer_alsa_get_default_card(void)
{
static const char buf[] = "hw:0";
snd_ctl_t *control;
}
const char *
-e_mixer_system_get_card_name(const char *card)
+e_mixer_alsa_get_card_name(const char *card)
{
snd_ctl_card_info_t *hw_info;
const char *name;
}
Eina_List *
-e_mixer_system_get_channels(E_Mixer_System *self)
+e_mixer_alsa_get_channels(E_Mixer_System *self)
{
Eina_List *channels;
snd_mixer_elem_t *elem;
}
void
-e_mixer_system_free_channels(Eina_List *channels)
+e_mixer_alsa_free_channels(Eina_List *channels)
{
eina_list_free(channels);
}
Eina_List *
-e_mixer_system_get_channels_names(E_Mixer_System *self)
+e_mixer_alsa_get_channels_names(E_Mixer_System *self)
{
Eina_List *channels;
snd_mixer_elem_t *elem;
}
void
-e_mixer_system_free_channels_names(Eina_List *channels_names)
+e_mixer_alsa_free_channels_names(Eina_List *channels_names)
{
const char *channel;
}
const char *
-e_mixer_system_get_default_channel_name(E_Mixer_System *self)
+e_mixer_alsa_get_default_channel_name(E_Mixer_System *self)
{
snd_mixer_elem_t *elem;
snd_mixer_selem_id_t *sid;
}
E_Mixer_Channel *
-e_mixer_system_get_channel_by_name(E_Mixer_System *self,
+e_mixer_alsa_get_channel_by_name(E_Mixer_System *self,
const char *name)
{
snd_mixer_elem_t *elem;
}
void
-e_mixer_system_channel_del(E_Mixer_Channel *channel __UNUSED__)
+e_mixer_alsa_channel_del(E_Mixer_Channel *channel __UNUSED__)
{
}
const char *
-e_mixer_system_get_channel_name(E_Mixer_System *self,
+e_mixer_alsa_get_channel_name(E_Mixer_System *self,
E_Mixer_Channel *channel)
{
snd_mixer_selem_id_t *sid;
}
int
-e_mixer_system_get_volume(E_Mixer_System *self,
+e_mixer_alsa_get_volume(E_Mixer_System *self,
E_Mixer_Channel *channel,
int *left,
int *right)
}
int
-e_mixer_system_set_volume(E_Mixer_System *self,
+e_mixer_alsa_set_volume(E_Mixer_System *self,
E_Mixer_Channel *channel,
int left,
int right)
}
int
-e_mixer_system_can_mute(E_Mixer_System *self,
+e_mixer_alsa_can_mute(E_Mixer_System *self,
E_Mixer_Channel *channel)
{
if ((!self) || (!channel))
}
int
-e_mixer_system_get_mute(E_Mixer_System *self,
+e_mixer_alsa_get_mute(E_Mixer_System *self,
E_Mixer_Channel *channel,
int *mute)
{
}
int
-e_mixer_system_set_mute(E_Mixer_System *self,
+e_mixer_alsa_set_mute(E_Mixer_System *self,
E_Mixer_Channel *channel,
int mute)
{
}
int
-e_mixer_system_get_state(E_Mixer_System *self,
+e_mixer_alsa_get_state(E_Mixer_System *self,
E_Mixer_Channel *channel,
E_Mixer_Channel_State *state)
{
if (!state)
return 0;
- r = e_mixer_system_get_mute(self, channel, &state->mute);
- r &= e_mixer_system_get_volume(self, channel, &state->left, &state->right);
+ r = e_mixer_alsa_get_mute(self, channel, &state->mute);
+ r &= e_mixer_alsa_get_volume(self, channel, &state->left, &state->right);
return r;
}
int
-e_mixer_system_set_state(E_Mixer_System *self,
+e_mixer_alsa_set_state(E_Mixer_System *self,
E_Mixer_Channel *channel,
const E_Mixer_Channel_State *state)
{
if (!state)
return 0;
- r = e_mixer_system_set_mute(self, channel, state->mute);
- r &= e_mixer_system_set_volume(self, channel, state->left, state->right);
+ r = e_mixer_alsa_set_mute(self, channel, state->mute);
+ r &= e_mixer_alsa_set_volume(self, channel, state->left, state->right);
return r;
}
int
-e_mixer_system_has_capture(E_Mixer_System *self,
+e_mixer_alsa_has_capture(E_Mixer_System *self,
E_Mixer_Channel *channel)
{
if ((!self) || (!channel))