Eros Q Native: Make Mute logic channel-independent

An oversight on my part meant that setting channel balance to
100% L or 100% R would mute both channels - this logic will
prevent that.

Change-Id: I912c2745784fbbbd7a773e1234179801f2ca4680
This commit is contained in:
Dana Conrad 2021-08-10 18:14:32 -05:00
parent cdd1f90131
commit 77a98ada12

View file

@ -70,14 +70,10 @@ void audiohw_set_volume(int vol_l, int vol_r)
} }
#endif #endif
if (l <= PCM5102A_VOLUME_MIN || r <= PCM5102A_VOLUME_MIN) l = l <= PCM5102A_VOLUME_MIN ? PCM_MUTE_LEVEL : (l / 20);
{ r = r <= PCM5102A_VOLUME_MIN ? PCM_MUTE_LEVEL : (r / 20);
pcm_set_master_volume(PCM_MUTE_LEVEL, PCM_MUTE_LEVEL);
} pcm_set_master_volume(l, r);
else
{
pcm_set_master_volume(l/20, r/20);
}
} }
void audiohw_mute_hp(int mute) void audiohw_mute_hp(int mute)