From cadd6ca38f64c510170b5c841f9079872ab2cb76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 28 Feb 2013 23:15:58 +0100 Subject: [PATCH] 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 0d320df5a..4c2d6ff26 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 bf0ffdbaa..c7d1b38b5 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 2e14d3611..0d18af241 100644 --- a/src/modules/mixer/sys_alsa.c +++ b/src/modules/mixer/sys_alsa.c @@ -567,18 +567,6 @@ e_mixer_system_set_volume(const E_Mixer_System *self, return 1; } -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, @@ -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 9fbd46bdd..0fb6441b7 100644 --- a/src/modules/mixer/sys_dummy.c +++ b/src/modules/mixer/sys_dummy.c @@ -145,13 +145,6 @@ e_mixer_system_set_volume(const E_Mixer_System *self __UNUSED__, return 0; } -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__, @@ -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 a1ac56ebb..96973319d 100644 --- a/src/modules/mixer/sys_pulse.c +++ b/src/modules/mixer/sys_pulse.c @@ -582,13 +582,6 @@ e_mixer_pulse_set_volume(const E_Mixer_System *self, return 1; } -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; -}