rendered paste bodyIndex: firmware/export/audiohw.h===================================================================--- firmware/export/audiohw.h (revision 29594)+++ firmware/export/audiohw.h (working copy)@@ -338,6 +338,7 @@ SOUND_CHAN_MONO_LEFT, SOUND_CHAN_MONO_RIGHT, SOUND_CHAN_KARAOKE,+ SOUND_CHAN_SWAP, SOUND_CHAN_NUM_MODES, }; Index: apps/lang/english.lang===================================================================--- apps/lang/english.lang (revision 29594)+++ apps/lang/english.lang (working copy)@@ -12744,3 +12744,20 @@ *: "In custom directories only" </voice> </phrase>+<phrase>+ id: LANG_CHANNEL_SWAP+ desc: in sound_settings+ user: core+ <source>+ *: none+ swcodec: "Swap channels"+ </source>+ <dest>+ *: none+ swcodec: "Swap channels"+ </dest>+ <voice>+ *: none+ swcodec: "Swap channels"+ </voice>+</phrase>Index: apps/dsp.c===================================================================--- apps/dsp.c (revision 29594)+++ apps/dsp.c (working copy)@@ -1116,6 +1116,18 @@ } #endif /* DSP_HAVE_ASM_SOUND_CHAN_KARAOKE */ +static void channels_process_sound_chan_swap(int count, int32_t *buf[])+{+ int32_t *sl = buf[0], *sr = buf[1];++ while (count-- > 0)+ {+ int32_t ch = *sl;+ *sl++ = *sr;+ *sr++ = ch;+ }+}+ static void dsp_set_channel_config(int value) { static const channels_process_fn_type channels_process_functions[] =@@ -1127,6 +1139,7 @@ [SOUND_CHAN_MONO_LEFT] = channels_process_sound_chan_mono_left, [SOUND_CHAN_MONO_RIGHT] = channels_process_sound_chan_mono_right, [SOUND_CHAN_KARAOKE] = channels_process_sound_chan_karaoke,+ [SOUND_CHAN_SWAP] = channels_process_sound_chan_swap, }; if ((unsigned)value >= ARRAYLEN(channels_process_functions) ||Index: apps/settings_list.c===================================================================--- apps/settings_list.c (revision 29594)+++ apps/settings_list.c (working copy)@@ -639,11 +639,12 @@ CHOICE_SETTING(F_SOUNDSETTING, channel_config, LANG_CHANNEL_CONFIGURATION, 0,"channels",- "stereo,mono,custom,mono left,mono right,karaoke",- sound_set_channels, 6,+ "stereo,mono,custom,mono left,mono right,karaoke,swap",+ sound_set_channels, 7, ID2P(LANG_CHANNEL_STEREO), ID2P(LANG_CHANNEL_MONO), ID2P(LANG_CHANNEL_CUSTOM), ID2P(LANG_CHANNEL_LEFT),- ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE)),+ ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE),+ ID2P(LANG_CHANNEL_SWAP)), SOUND_SETTING(F_SOUNDSETTING, stereo_width, LANG_STEREO_WIDTH, "stereo_width", SOUND_STEREO_WIDTH), #ifdef AUDIOHW_HAVE_DEPTH_3D