jeyzu pushed a commit to branch devs/jeyzu/mixer.
commit 1b51c21501168ce1de34a41b24e5410cee94eb90
Author: Jérémy Zurcher <[email protected]>
Date: Thu Feb 28 23:15:58 2013 +0100
mixer: remove e_mod_mixer_mutable_get and e_mod_mixer_capture_get
it's handled by channel capabilities
---
src/modules/mixer/e_mod_mixer.c | 6 ------
src/modules/mixer/e_mod_mixer.h | 6 ------
src/modules/mixer/sys_alsa.c | 23 -----------------------
src/modules/mixer/sys_dummy.c | 15 ---------------
src/modules/mixer/sys_pulse.c | 14 --------------
5 files changed, 64 deletions(-)
diff --git a/src/modules/mixer/e_mod_mixer.c b/src/modules/mixer/e_mod_mixer.c
index 0d320df..4c2d6ff 100644
--- a/src/modules/mixer/e_mod_mixer.c
+++ b/src/modules/mixer/e_mod_mixer.c
@@ -5,9 +5,7 @@ E_Mixer_Volume_Get_Cb e_mod_mixer_volume_get;
E_Mixer_Volume_Set_Cb e_mod_mixer_volume_set;
E_Mixer_Mute_Get_Cb e_mod_mixer_mute_get;
E_Mixer_Mute_Set_Cb e_mod_mixer_mute_set;
-E_Mixer_Capture_Cb e_mod_mixer_mutable_get;
E_Mixer_State_Get_Cb e_mod_mixer_state_get;
-E_Mixer_Capture_Cb e_mod_mixer_capture_get;
E_Mixer_Cb e_mod_mixer_new;
E_Mixer_Cb e_mod_mixer_del;
E_Mixer_Cb e_mod_mixer_channel_default_name_get;
@@ -26,9 +24,7 @@ e_mixer_default_setup(void)
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;
@@ -49,9 +45,7 @@ e_mixer_pulse_setup()
e_mod_mixer_volume_set = (void *)e_mixer_pulse_set_volume;
e_mod_mixer_mute_get = (void *)e_mixer_pulse_get_mute;
e_mod_mixer_mute_set = (void *)e_mixer_pulse_set_mute;
- e_mod_mixer_mutable_get = (void *)e_mixer_pulse_can_mute;
e_mod_mixer_state_get = (void *)e_mixer_pulse_get_state;
- e_mod_mixer_capture_get = (void *)e_mixer_pulse_has_capture;
e_mod_mixer_new = (void *)e_mixer_pulse_new;
e_mod_mixer_del = (void *)e_mixer_pulse_del;
e_mod_mixer_channel_default_name_get = (void
*)e_mixer_pulse_get_default_channel_name;
diff --git a/src/modules/mixer/e_mod_mixer.h b/src/modules/mixer/e_mod_mixer.h
index bf0ffdb..c7d1b38 100644
--- a/src/modules/mixer/e_mod_mixer.h
+++ b/src/modules/mixer/e_mod_mixer.h
@@ -61,9 +61,7 @@ extern E_Mixer_Volume_Get_Cb e_mod_mixer_volume_get;
extern E_Mixer_Volume_Set_Cb e_mod_mixer_volume_set;
extern E_Mixer_Mute_Get_Cb e_mod_mixer_mute_get;
extern E_Mixer_Mute_Set_Cb e_mod_mixer_mute_set;
-extern E_Mixer_Capture_Cb e_mod_mixer_mutable_get;
extern E_Mixer_State_Get_Cb e_mod_mixer_state_get;
-extern E_Mixer_Capture_Cb e_mod_mixer_capture_get;
extern E_Mixer_Cb e_mod_mixer_new;
extern E_Mixer_Cb e_mod_mixer_del;
extern E_Mixer_Cb e_mod_mixer_channel_default_name_get;
@@ -100,10 +98,8 @@ Eina_List *e_mixer_system_get_channel_names(const
E_Mixer_System *self);
const char *e_mixer_system_get_default_channel_name(const E_Mixer_System
*self);
E_Mixer_Channel_Info *e_mixer_system_get_channel_by_name(const E_Mixer_System
*self, const char *name);
-int e_mixer_system_has_capture(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel);
int e_mixer_system_get_volume(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel, int *left, int *right);
int e_mixer_system_set_volume(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel, int left, int right);
-int e_mixer_system_can_mute(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel);
int e_mixer_system_get_mute(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel, int *mute);
int e_mixer_system_set_mute(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel, int mute);
int e_mixer_system_get_state(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel, E_Mixer_Channel_State *state);
@@ -129,10 +125,8 @@ Eina_List *e_mixer_pulse_get_channel_names(const
E_Mixer_System *self);
const char *e_mixer_pulse_get_default_channel_name(const E_Mixer_System *self);
E_Mixer_Channel_Info *e_mixer_pulse_get_channel_by_name(const E_Mixer_System
*self, const char *name);
-int e_mixer_pulse_has_capture(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel);
int e_mixer_pulse_get_volume(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel, int *left, int *right);
int e_mixer_pulse_set_volume(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel, int left, int right);
-int e_mixer_pulse_can_mute(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel);
int e_mixer_pulse_get_mute(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel, int *mute);
int e_mixer_pulse_set_mute(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel, int mute);
int e_mixer_pulse_get_state(const E_Mixer_System *self, const
E_Mixer_Channel_Info *channel, E_Mixer_Channel_State *state);
diff --git a/src/modules/mixer/sys_alsa.c b/src/modules/mixer/sys_alsa.c
index 2e14d36..0d18af2 100644
--- a/src/modules/mixer/sys_alsa.c
+++ b/src/modules/mixer/sys_alsa.c
@@ -568,18 +568,6 @@ e_mixer_system_set_volume(const E_Mixer_System *self,
}
int
-e_mixer_system_can_mute(const E_Mixer_System *self,
- const E_Mixer_Channel_Info *channel)
-{
- if ((!self) || (!channel) || (!channel->id))
- return 0;
-
- snd_mixer_handle_events((snd_mixer_t *)self);
- return snd_mixer_selem_has_playback_switch(channel->id) ||
- snd_mixer_selem_has_playback_switch_joined(channel->id);
-}
-
-int
e_mixer_system_get_mute(const E_Mixer_System *self,
const E_Mixer_Channel_Info *channel,
int *mute)
@@ -650,14 +638,3 @@ e_mixer_system_set_state(const E_Mixer_System *self,
r &= e_mixer_system_set_volume(self, channel, state->left, state->right);
return r;
}
-
-int
-e_mixer_system_has_capture(const E_Mixer_System *self,
- const E_Mixer_Channel_Info *channel)
-{
- if ((!self) || (!channel) || (!channel->id))
- return 0;
-
- return snd_mixer_selem_has_capture_switch(channel->id) ||
snd_mixer_selem_has_capture_volume(channel->id);
-}
-
diff --git a/src/modules/mixer/sys_dummy.c b/src/modules/mixer/sys_dummy.c
index 9fbd46b..0fb6441 100644
--- a/src/modules/mixer/sys_dummy.c
+++ b/src/modules/mixer/sys_dummy.c
@@ -146,13 +146,6 @@ e_mixer_system_set_volume(const E_Mixer_System *self
__UNUSED__,
}
int
-e_mixer_system_can_mute(const E_Mixer_System *self __UNUSED__,
- const E_Mixer_Channel_Info *channel __UNUSED__)
-{
- return 1;
-}
-
-int
e_mixer_system_get_mute(const E_Mixer_System *self __UNUSED__,
const E_Mixer_Channel_Info *channel __UNUSED__,
int *mute)
@@ -191,11 +184,3 @@ e_mixer_system_set_state(const E_Mixer_System *self
__UNUSED__,
{
return 0;
}
-
-int
-e_mixer_system_has_capture(const E_Mixer_System *self __UNUSED__,
- const E_Mixer_Channel_Info *channel __UNUSED__)
-{
- return 0;
-}
-
diff --git a/src/modules/mixer/sys_pulse.c b/src/modules/mixer/sys_pulse.c
index a1ac56e..9697331 100644
--- a/src/modules/mixer/sys_pulse.c
+++ b/src/modules/mixer/sys_pulse.c
@@ -583,13 +583,6 @@ e_mixer_pulse_set_volume(const E_Mixer_System *self,
}
int
-e_mixer_pulse_can_mute(const E_Mixer_System *self __UNUSED__,
- const E_Mixer_Channel_Info *channel __UNUSED__)
-{
- return 1;
-}
-
-int
e_mixer_pulse_get_mute(const E_Mixer_System *self,
const E_Mixer_Channel_Info *channel __UNUSED__, int
*mute)
{
@@ -638,10 +631,3 @@ e_mixer_pulse_set_state(const E_Mixer_System *self,
e_mixer_pulse_set_mute(self, channel, state->mute);
return 1;
}
-
-int
-e_mixer_pulse_has_capture(const E_Mixer_System *self __UNUSED__,
- const E_Mixer_Channel_Info *channel __UNUSED__)
-{
- return 0;
-}
--
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb