summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/mixer/app_mixer.c6
-rw-r--r--src/modules/mixer/e_mod_main.c3
-rw-r--r--src/modules/mixer/e_mod_main.h1
-rw-r--r--src/modules/mixer/e_mod_system.h2
-rw-r--r--src/modules/mixer/sys_alsa.c21
-rw-r--r--src/modules/mixer/sys_dummy.c6
-rw-r--r--src/modules/mixer/sys_pulse.c6
7 files changed, 6 insertions, 39 deletions
diff --git a/src/modules/mixer/app_mixer.c b/src/modules/mixer/app_mixer.c
index 2fb37d1cbb..737bf861f0 100644
--- a/src/modules/mixer/app_mixer.c
+++ b/src/modules/mixer/app_mixer.c
@@ -53,7 +53,6 @@ typedef struct E_Mixer_App_Dialog_Data
struct channel_info
{
- int is_mono;
int has_capture;
const char *name;
E_Mixer_Channel *id;
@@ -170,9 +169,7 @@ _populate_channel_editor(E_Mixer_App_Dialog_Data *app)
e_mod_mixer_state_get(app->sys, app->channel_info->id, &state);
_update_channel_editor_state(app, state);
- e_widget_disabled_set(ui->right, app->channel_info->is_mono);
- app->lock_sliders = ( (state.left == state.right) && !app->channel_info->is_mono );
- e_widget_disabled_set(ui->lock_sliders, app->channel_info->is_mono);
+ app->lock_sliders = (state.left == state.right);
e_widget_check_checked_set(ui->lock_sliders, app->lock_sliders);
}
@@ -214,7 +211,6 @@ _channels_info_new(E_Mixer_System *sys)
info = malloc(sizeof(*info));
info->id = l->data;
info->name = e_mod_mixer_channel_name_get(sys, info->id);
- info->is_mono = e_mod_mixer_mono_get(sys, info->id);
info->has_capture = e_mod_mixer_capture_get(sys, info->id);
channels_infos = eina_list_append(channels_infos, info);
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index 3c8f6d6b1d..d133417fb3 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -19,7 +19,6 @@ 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_mono_get;
E_Mixer_Capture_Cb e_mod_mixer_capture_get;
E_Mixer_Cb e_mod_mixer_new;
E_Mixer_Cb e_mod_mixer_del;
@@ -1470,7 +1469,6 @@ e_mixer_default_setup(void)
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_mono_get = (void *)e_mixer_system_is_mono;
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;
@@ -1501,7 +1499,6 @@ e_mixer_pulse_setup(void)
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_mono_get = (void *)e_mixer_pulse_is_mono;
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;
diff --git a/src/modules/mixer/e_mod_main.h b/src/modules/mixer/e_mod_main.h
index 28faab0c88..8320366ec6 100644
--- a/src/modules/mixer/e_mod_main.h
+++ b/src/modules/mixer/e_mod_main.h
@@ -111,7 +111,6 @@ 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_mono_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;
diff --git a/src/modules/mixer/e_mod_system.h b/src/modules/mixer/e_mod_system.h
index 206d2c1195..7a401c4c3b 100644
--- a/src/modules/mixer/e_mod_system.h
+++ b/src/modules/mixer/e_mod_system.h
@@ -43,7 +43,6 @@ int e_mixer_system_set_volume(E_Mixer_System *self, E_Mixer_Channel *channel, in
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_is_mono(E_Mixer_System *self, E_Mixer_Channel *channel);
int e_mixer_system_has_capture(E_Mixer_System *self, E_Mixer_Channel *channel);
int pulse_init(void);
@@ -71,7 +70,6 @@ int e_mixer_pulse_get_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int *
int e_mixer_pulse_set_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int mute);
int e_mixer_pulse_get_state(E_Mixer_System *self, E_Mixer_Channel *channel, E_Mixer_Channel_State *state);
int e_mixer_pulse_set_state(E_Mixer_System *self, E_Mixer_Channel *channel, const E_Mixer_Channel_State *state);
-int e_mixer_pulse_is_mono(E_Mixer_System *self, E_Mixer_Channel *channel);
int e_mixer_pulse_has_capture(E_Mixer_System *self, E_Mixer_Channel *channel);
#endif /* E_MOD_SYSTEM_H */
diff --git a/src/modules/mixer/sys_alsa.c b/src/modules/mixer/sys_alsa.c
index ad89425f81..af122818b2 100644
--- a/src/modules/mixer/sys_alsa.c
+++ b/src/modules/mixer/sys_alsa.c
@@ -473,15 +473,14 @@ e_mixer_system_get_volume(E_Mixer_System *self,
else
lvol = min;
- if (snd_mixer_selem_is_playback_mono(channel))
- rvol = min;
- else if (snd_mixer_selem_has_playback_volume_joined(channel))
- rvol = lvol;
- else if (snd_mixer_selem_has_playback_channel(channel, 1))
+ if (snd_mixer_selem_has_playback_channel(channel, 1))
snd_mixer_selem_get_playback_volume(channel, 1, &rvol);
else
rvol = min;
+ if (snd_mixer_selem_is_playback_mono(channel) ||
+ snd_mixer_selem_has_playback_volume_joined(channel))
+ rvol = lvol;
*left = rint((double)(lvol - min) * 100 / (double)range);
*right = rint((double)(rvol - min) * 100 / (double)range);
@@ -626,22 +625,12 @@ e_mixer_system_set_state(E_Mixer_System *self,
}
int
-e_mixer_system_is_mono(E_Mixer_System *self,
- E_Mixer_Channel *channel)
-{
- if ((!self) || (!channel))
- return 0;
-
- return snd_mixer_selem_is_playback_mono(channel);
-}
-
-int
e_mixer_system_has_capture(E_Mixer_System *self,
E_Mixer_Channel *channel)
{
if ((!self) || (!channel))
return 0;
- return snd_mixer_selem_has_capture_volume(channel);
+ return snd_mixer_selem_has_capture_switch(channel);
}
diff --git a/src/modules/mixer/sys_dummy.c b/src/modules/mixer/sys_dummy.c
index fe6644a4f9..fffce07f5c 100644
--- a/src/modules/mixer/sys_dummy.c
+++ b/src/modules/mixer/sys_dummy.c
@@ -179,12 +179,6 @@ e_mixer_system_set_state(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *chann
}
int
-e_mixer_system_is_mono(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *channel __UNUSED__)
-{
- return 0;
-}
-
-int
e_mixer_system_has_capture(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *channel __UNUSED__)
{
return 0;
diff --git a/src/modules/mixer/sys_pulse.c b/src/modules/mixer/sys_pulse.c
index 57f161c3f9..0aa7672fb1 100644
--- a/src/modules/mixer/sys_pulse.c
+++ b/src/modules/mixer/sys_pulse.c
@@ -595,12 +595,6 @@ e_mixer_pulse_set_volume(E_Mixer_System *self, E_Mixer_Channel *channel, int lef
}
int
-e_mixer_pulse_is_mono(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *channel __UNUSED__)
-{
- return 0;
-}
-
-int
e_mixer_pulse_can_mute(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *channel __UNUSED__)
{
return 1;