Index: firmware/tuner_philips.c
===================================================================
RCS file: /cvsroot/rockbox/firmware/tuner_philips.c,v
retrieving revision 1.9
diff -u -r1.9 tuner_philips.c
--- firmware/tuner_philips.c	24 Sep 2005 09:06:31 -0000	1.9
+++ firmware/tuner_philips.c	27 May 2006 21:52:06 -0000
@@ -27,6 +27,8 @@
 
 #define I2C_ADR 0xC0
 static unsigned char write_bytes[5];
+static int highsideinjections;
+static int philips_frequency_set;
 
 /* tuner abstraction layer: set something to the tuner */
 void philips_set(int setting, int value)
@@ -35,6 +37,7 @@
     {
         case RADIO_SLEEP:
             /* init values */
+            highsideinjections=0;
             write_bytes[0] = 0x80; /* mute */
             write_bytes[1] = 0x00;
             write_bytes[2] = 0x00;
@@ -51,14 +54,39 @@
             }
             break;
 
+            case RADIO_HIGHSIDEINJECTION:
+			if(value)
+			{
+				highsideinjections=1;
+				write_bytes[2] = (write_bytes[2] & 0xEF) | 0x10;
+			}
+			else
+			{
+				highsideinjections=0;
+				write_bytes[2] = (write_bytes[2] & 0xEF);
+			}
+			value=philips_frequency_set;
+
         case RADIO_FREQUENCY:
             {
                 int n;
+                philips_frequency_set=value;
+                if(highsideinjections)
+                {
+#if CONFIG_TUNER_XTAL == 32768
+                	n = (4 * (value + 225000)) / 32768;
+#else
+    	            n = (4 * (value + 225000)) / 50000;
+#endif
+				}
+				else
+				{
 #if CONFIG_TUNER_XTAL == 32768
-                n = (4 * (value - 225000) + 16384) / 32768;
+                	n = (4 * (value - 225000)) / 32768;
 #else
-                n = (4 * (value - 225000)) / 50000;
+    	            n = (4 * (value - 225000)) / 50000;
 #endif
+				}
                 write_bytes[0] = (write_bytes[0] & 0xC0) | (n >> 8);
                 write_bytes[1] = n & 0xFF;
             }
@@ -73,6 +101,7 @@
             fmradio_i2c_write(I2C_ADR, write_bytes, sizeof(write_bytes));
             break;
 
+
         default:
             return;
     }
@@ -107,11 +136,14 @@
             break;
 
         case RADIO_ALL: /* debug query */
-            val = read_bytes[0] << 24 
-                | read_bytes[1] << 16 
-                | read_bytes[2] << 8 
+            val = read_bytes[0] << 24
+                | read_bytes[1] << 16
+                | read_bytes[2] << 8
                 | read_bytes[3];
             break;
+        case RADIO_STRENGTH: /*signalstrength*/
+            val = read_bytes[3] >> 4;
+            break;
     }
     return val;
 }
Index: apps/recorder/radio.c
===================================================================
RCS file: /cvsroot/rockbox/apps/recorder/radio.c,v
retrieving revision 1.98
diff -u -r1.98 radio.c
--- apps/recorder/radio.c	30 Apr 2006 23:18:21 -0000	1.98
+++ apps/recorder/radio.c	27 May 2006 21:52:09 -0000
@@ -118,8 +118,8 @@
 #define FM_EXIT (BUTTON_OFF | BUTTON_REPEAT)
 #endif
 
-#define MAX_FREQ (108000000)
-#define MIN_FREQ (87500000)
+#define MAX_FREQ (133960000)
+#define MIN_FREQ (1000000)
 #define FREQ_STEP 100000
 
 #define RADIO_SCAN_MODE 0
@@ -127,6 +127,11 @@
 
 static int curr_preset = -1;
 static int curr_freq;
+static int freq_step;
+static int min_freq;
+static int max_freq;
+static bool highsideinjection = false;
+static int softwaremute = 0;
 static int radio_mode = RADIO_SCAN_MODE;
 
 static int radio_status = FMRADIO_OFF;
@@ -205,7 +210,7 @@
 }
 
 void radio_stop(void)
-{             
+{
     radio_set(RADIO_MUTE, 1);
     radio_set(RADIO_SLEEP, 1); /* low power mode, if available */
     radio_status = FMRADIO_OFF;
@@ -241,7 +246,7 @@
 
 static int find_closest_preset(int freq)
 {
-    int i; 
+    int i;
     int diff;
     int min_diff = MAX_FREQ;
     int preset = -1;
@@ -256,7 +261,7 @@
 	if(diff < min_diff)
         {
             preset = i;
-            min_diff = diff;	
+            min_diff = diff;
         }
     }
 
@@ -275,10 +280,10 @@
 {
     if (num_presets < 1)
         return;
-            
+
     if(curr_preset == -1)
         curr_preset = find_closest_preset(curr_freq);
-    
+
     if(direction > 0)
         if(curr_preset == num_presets - 1)
             curr_preset = 0;
@@ -289,7 +294,7 @@
             curr_preset = num_presets - 1;
         else
             curr_preset--;
-            
+
     curr_freq = presets[curr_preset].frequency;
     radio_set(RADIO_FREQUENCY, curr_freq);
     remember_frequency();
@@ -298,6 +303,10 @@
 
 bool radio_screen(void)
 {
+	min_freq=MIN_FREQ;
+	max_freq=MAX_FREQ;
+	freq_step=FREQ_STEP;
+
     char buf[MAX_PATH];
     bool done = false;
     int button, lastbutton = BUTTON_NONE;
@@ -305,6 +314,7 @@
     unsigned long rec_lastclick = 0;
 #endif
     int freq, i;
+    int staerke=0, last_staerke=0;
     bool tuned;
     bool stereo = false;
     int search_dir = 0;
@@ -336,21 +346,21 @@
         gui_textarea_clear(&screens[i]);
         screen_set_xmargin(&screens[i],0);
     }
-    
+
     gui_syncstatusbar_draw(&statusbars,true);
 
     fh = font_get(FONT_UI)->height;
-    
+
     /* Adjust for font size, trying to center the information vertically */
     if(fh < 10)
         top_of_screen = 1;
-    
+
     if(!num_presets)
     {
         memset(presets, 0, sizeof(presets));
         radio_load_presets(global_settings.fmr_file);
     }
-                                       
+
 #ifndef SIMULATOR
 #if CONFIG_CODEC != SWCODEC
     if(rec_create_directory() > 0)
@@ -362,16 +372,16 @@
     else if(radio_status == FMRADIO_PAUSED_OUT)
         radio_status = FMRADIO_PAUSED;
 
-    if(radio_status == FMRADIO_OFF)    
+    if(radio_status == FMRADIO_OFF)
         audio_stop();
-        
+
 #if CONFIG_CODEC != SWCODEC
     audio_init_recording(talk_get_bufsize());
 
     sound_settings_apply();
     /* Yes, we use the D/A for monitoring */
     peak_meter_playback(true);
-    
+
     peak_meter_enabled = true;
 
     if (global_settings.rec_prerecord_time)
@@ -384,7 +394,7 @@
                                global_settings.rec_editable,
                                global_settings.rec_prerecord_time);
 
-    
+
     audio_set_recording_gain(sound_default(SOUND_LEFT_GAIN),
                             sound_default(SOUND_RIGHT_GAIN), AUDIO_GAIN_LINEIN);
 #else
@@ -399,8 +409,8 @@
 #endif
 #endif
 
-    curr_freq = global_settings.last_frequency * FREQ_STEP + MIN_FREQ;
-    
+    curr_freq = global_settings.last_frequency * freq_step + min_freq;
+
     if(radio_status == FMRADIO_OFF)
     {
         radio_power(true);
@@ -423,7 +433,7 @@
 
    if(num_presets == 0 && yesno_pop(str(LANG_FM_FIRST_AUTOSCAN)))
         scan_presets();
-    
+
     curr_preset = find_preset(curr_freq);
     if(curr_preset != -1)
          radio_mode = RADIO_PRESET_MODE;
@@ -434,21 +444,21 @@
 #endif
 
     cpu_idle_mode(true);
-        
+
     while(!done)
     {
         if(search_dir)
         {
-            curr_freq += search_dir * FREQ_STEP;
-            if(curr_freq < MIN_FREQ)
-                curr_freq = MAX_FREQ;
-            if(curr_freq > MAX_FREQ)
-                curr_freq = MIN_FREQ;
+            curr_freq += search_dir * freq_step;
+            if(curr_freq < min_freq)
+                curr_freq = max_freq;
+            if(curr_freq > max_freq)
+                curr_freq = min_freq;
 
             /* Tune in and delay */
             radio_set(RADIO_FREQUENCY, curr_freq);
             sleep(1);
-            
+
             /* Start IF measurement */
             radio_set(RADIO_IF_MEASUREMENT, 1);
             sleep(1);
@@ -463,7 +473,7 @@
                 curr_preset = find_preset(curr_freq);
                 remember_frequency();
             }
-            
+
             update_screen = true;
         }
 
@@ -523,7 +533,7 @@
                 {
                     rec_lastclick = current_tick;
                     break;
-                }    
+                }
 #endif
 #ifndef SIMULATOR
                 if(audio_status() == AUDIO_STATUS_RECORD)
@@ -551,7 +561,7 @@
                 if(lastbutton != FM_EXIT_PRE
 #ifdef FM_RC_EXIT_PRE
                    && lastbutton != FM_RC_EXIT_PRE
-#endif                    
+#endif
                     )
                     break;
 #endif
@@ -561,7 +571,7 @@
 #endif
                 keep_playing = true;
                 done = true;
-                
+
                 if(presets_changed)
                 {
                     if(yesno_pop(str(LANG_FM_SAVE_CHANGES)))
@@ -570,23 +580,23 @@
                             save_preset_list();
                         else
                             radio_save_presets();
-                    }                    
+                    }
                 }
-                
+
                 /* Clear the preset list on exit. */
                 clear_preset_list();
-                    
+
                 break;
-                
+
 #ifdef BUTTON_RC_REW
             case BUTTON_RC_REW:
 #endif
             case BUTTON_LEFT:
                 if(radio_mode == RADIO_SCAN_MODE)
                 {
-                     curr_freq -= FREQ_STEP;
-                     if(curr_freq < MIN_FREQ)
-                          curr_freq = MAX_FREQ;
+                     curr_freq -= freq_step;
+                     if(curr_freq < min_freq)
+                          curr_freq = max_freq;
                      radio_set(RADIO_FREQUENCY, curr_freq);
                      curr_preset = find_preset(curr_freq);
                      remember_frequency();
@@ -603,9 +613,9 @@
             case BUTTON_RIGHT:
                 if(radio_mode == RADIO_SCAN_MODE)
                 {
-                     curr_freq += FREQ_STEP;
-                     if(curr_freq > MAX_FREQ)
-                           curr_freq = MIN_FREQ;
+                     curr_freq += freq_step;
+                     if(curr_freq > max_freq)
+                           curr_freq = min_freq;
                      radio_set(RADIO_FREQUENCY, curr_freq);
                      curr_preset = find_preset(curr_freq);
                      remember_frequency();
@@ -629,7 +639,7 @@
                 }
 
                 break;
-                
+
 #ifdef BUTTON_RC_FF
             case BUTTON_RC_FF | BUTTON_REPEAT:
 #endif
@@ -641,7 +651,7 @@
                     next_preset(1);
                     update_screen = true;
                 }
-                
+
                 break;
 
 #ifdef BUTTON_RC_VOL_UP
@@ -731,7 +741,7 @@
 
 #ifdef FM_RC_PRESET
             case FM_RC_PRESET:
-#endif                    
+#endif
 #ifdef FM_PRESET
             case FM_PRESET:
 #ifdef FM_PRESET_PRE
@@ -771,7 +781,7 @@
                 update_screen = true;
                 break;
 #endif
-                
+
 #ifdef FM_FREEZE
             case FM_FREEZE:
                 if(!screen_freeze)
@@ -785,7 +795,7 @@
                     screen_freeze = false;
                 }
                 break;
-#endif                
+#endif
             case SYS_USB_CONNECTED:
                 /* Only accept USB connection when not recording */
                 if(audio_status() != AUDIO_STATUS_RECORD)
@@ -802,10 +812,10 @@
 #endif
 #ifdef FM_MODE
            case FM_MODE:
-                if(lastbutton != FM_MODE 
+                if(lastbutton != FM_MODE
 #ifdef FM_RC_MODE
                    && lastbutton != FM_RC_MODE
-#endif                    
+#endif
                    )
                 {
                     if(radio_mode == RADIO_SCAN_MODE)
@@ -834,7 +844,7 @@
                 update_screen = true;
                 break;
 #endif
-                
+
             default:
                 default_event_handler(button);
                 break;
@@ -842,13 +852,13 @@
 
         if (button != BUTTON_NONE)
             lastbutton = button;
-        
+
 #if CONFIG_CODEC != SWCODEC
         peak_meter_peek();
 #endif
 
         if(!screen_freeze)
-        {           
+        {
             /* Only display the peak meter when not recording */
             if(!audio_status())
             {
@@ -868,7 +878,24 @@
             if(TIME_AFTER(current_tick, timeout))
             {
                 timeout = current_tick + HZ;
-                
+                if(softwaremute)
+                {
+					timeout = current_tick + HZ/5;
+                	radio_set(RADIO_FORCE_MONO,0);
+					staerke=radio_get(RADIO_STRENGTH);
+					if(staerke!=last_staerke)
+					{
+						update_screen = true;
+
+						if(last_staerke==0 && staerke>1) global_settings.volume+=softwaremute;
+						if(last_staerke>1 && staerke==0) global_settings.volume-=softwaremute;
+						if(global_settings.volume > sound_max(SOUND_VOLUME))
+						  global_settings.volume = sound_max(SOUND_VOLUME);
+   		                sound_set_volume(global_settings.volume);
+						last_staerke = staerke;
+				    }
+				}
+
                 stereo = radio_get(RADIO_STEREO) &&
                     !global_settings.fm_force_mono;
                 if(stereo != last_stereo_status)
@@ -877,7 +904,7 @@
                     last_stereo_status = stereo;
                 }
             }
-            
+
 #ifndef SIMULATOR
 #if CONFIG_CODEC != SWCODEC
             seconds = audio_recorded_time() / HZ;
@@ -887,9 +914,10 @@
             {
                 last_seconds = seconds;
 
+
                 FOR_NB_SCREENS(i)
                     screens[i].setfont(FONT_UI);
-                
+
                 if (curr_preset >= 0 )
                    snprintf(buf, 128, "%d. %s",curr_preset + 1,
                                 presets[curr_preset].name);
@@ -897,12 +925,12 @@
                    snprintf(buf, 128, " ");
                 FOR_NB_SCREENS(i)
                     screens[i].puts_scroll(0, top_of_screen, buf);
-                
-                freq = curr_freq / 100000;
-                snprintf(buf, 128, str(LANG_FM_STATION), freq / 10, freq % 10);
+
+                freq = curr_freq / 1000;
+                snprintf(buf, 128, str(LANG_FM_STATION), freq / 1000, freq % 1000);
                 FOR_NB_SCREENS(i)
                     screens[i].puts_scroll(0, top_of_screen + 1, buf);
-                
+
                 strcat(buf, stereo?str(LANG_CHANNEL_STEREO):
                                    str(LANG_CHANNEL_MONO));
 
@@ -916,6 +944,11 @@
                                       str(LANG_RADIO_SCAN_MODE));
                 FOR_NB_SCREENS(i)
                     screens[i].puts_scroll(0, top_of_screen + 3, buf);
+
+                snprintf(buf, 128, "%s %d", "Signalstaerke:",staerke);
+                FOR_NB_SCREENS(i)
+                    screens[i].puts_scroll(0, top_of_screen + 4, buf);
+
 #if CONFIG_CODEC != SWCODEC
                 if(audio_status() == AUDIO_STATUS_RECORD)
                 {
@@ -925,7 +958,7 @@
                              str(LANG_RECORDING_TIME),
                              hours, minutes, seconds%60);
                     FOR_NB_SCREENS(i)
-                        screens[i].puts_scroll(0, top_of_screen + 4, buf);
+                        screens[i].puts_scroll(0, top_of_screen + 5, buf);
                 }
                 else
                 {
@@ -934,7 +967,7 @@
                         snprintf(buf, 32, "%s %02d",
                                  str(LANG_RECORD_PRERECORD), seconds%60);
                         FOR_NB_SCREENS(i)
-                            screens[i].puts_scroll(0, top_of_screen + 4, buf);
+                            screens[i].puts_scroll(0, top_of_screen + 5, buf);
                     }
                 }
 #endif
@@ -977,7 +1010,7 @@
                 break;
         }
     }
-    
+
 #if CONFIG_CODEC != SWCODEC
     audio_init_playback();
 #endif
@@ -986,7 +1019,7 @@
 #endif /* SIMULATOR */
     if(keep_playing)
     {
-/* Catch FMRADIO_PLAYING_OUT status for the sim. */ 
+/* Catch FMRADIO_PLAYING_OUT status for the sim. */
 #ifndef SIMULATOR
 #if CONFIG_CODEC != SWCODEC
         /* Enable the Left and right A/D Converter */
@@ -1004,19 +1037,19 @@
     else
     {
         radio_stop();
-#ifndef SIMULATOR /* SIMULATOR. Catch FMRADIO_OFF status for the sim. */ 
+#ifndef SIMULATOR /* SIMULATOR. Catch FMRADIO_OFF status for the sim. */
 #if CONFIG_CODEC == SWCODEC
         pcm_rec_mux(0); /* Line In */
         peak_meter_enabled = true;
 #endif
 #endif /* SIMULATOR */
     }
-    
+
     cpu_idle_mode(false);
 
     /* restore status bar settings */
     global_settings.statusbar = statusbar;
-    
+
     return have_recorded;
 }
 
@@ -1024,7 +1057,7 @@
 {
     int fd;
     int i;
-          
+
     fd = creat(filepreset, O_WRONLY);
     if(fd >= 0)
     {
@@ -1033,7 +1066,7 @@
             fdprintf(fd, "%d:%s\n", presets[i].frequency, presets[i].name);
         }
         close(fd);
-        
+
         if(!strncasecmp(FMPRESET_PATH, filepreset, strlen(FMPRESET_PATH)))
             set_file(filepreset, global_settings.fmr_file, MAX_FILENAME);
         presets_changed = false;
@@ -1041,7 +1074,7 @@
     else
     {
         gui_syncsplash(HZ, true, str(LANG_FM_PRESET_SAVE_FAILED));
-    }    
+    }
 }
 
 void radio_load_presets(char *filename)
@@ -1065,13 +1098,13 @@
         return;
 	}
 /* Temporary preset, loaded until player shuts down. */
-    else if(filename[0] == '/') 
+    else if(filename[0] == '/')
         strncpy(filepreset, filename, sizeof(filepreset));
 /* Preset from default directory. */
     else
 	    snprintf(filepreset, sizeof(filepreset), "%s/%s.fmr",
             FMPRESET_PATH, filename);
-    
+
     fd = open(filepreset, O_RDONLY);
     if(fd >= 0)
     {
@@ -1099,12 +1132,12 @@
     }
     else /* invalid file name? */
         filepreset[0] = '\0';
-    
+
     if(num_presets > 0)
         presets_loaded = true;
     else
         presets_loaded = false;
-        
+
     presets_changed = false;
 }
 
@@ -1124,19 +1157,19 @@
     if(num_presets < MAX_PRESETS)
     {
         memset(buf, 0, MAX_FMPRESET_LEN);
-        
+
         if (!kbd_input(buf, MAX_FMPRESET_LEN))
         {
             buf[MAX_FMPRESET_LEN] = 0;
             strcpy(presets[num_presets].name, buf);
             presets[num_presets].frequency = curr_freq;
-#ifdef FM_PRESET_ADD  /* only for archos */         
+#ifdef FM_PRESET_ADD  /* only for archos */
             menu_insert(preset_menu, -1,
                         presets[num_presets].name, 0);
             /* We must still rebuild the menu table, since the
                item name pointers must be updated */
             rebuild_preset_menu();
-#endif 
+#endif
             num_presets++;
             presets_changed = true;
             if(num_presets > 0)
@@ -1160,7 +1193,7 @@
         case FM_PRESET_ACTION:
             key = MENU_EXIT; /* Fake an exit */
             break;
-            
+
         case FM_PRESET_ACTION | BUTTON_REL:
             /* Ignore the release events */
             key = BUTTON_NONE;
@@ -1176,7 +1209,7 @@
     char buf[MAX_FMPRESET_LEN];
 
     strncpy(buf, menu_description(preset_menu, pos), MAX_FMPRESET_LEN);
-        
+
     if (!kbd_input(buf, MAX_FMPRESET_LEN))
     {
         buf[MAX_FMPRESET_LEN] = 0;
@@ -1194,12 +1227,12 @@
     for(i = pos;i < num_presets;i++)
         presets[i] = presets[i+1];
     num_presets--;
-    
+
     menu_delete(preset_menu, pos);
     /* We must still rebuild the menu table, since the
        item name pointers must be updated */
     rebuild_preset_menu();
-    
+
      /* Don't ask to save when all presets are deleted. */
     if(num_presets > 0)
         presets_changed = true;
@@ -1210,7 +1243,7 @@
         radio_mode = RADIO_SCAN_MODE;
         presets_loaded = false;
     }
-        
+
     return true; /* Make the menu return immediately */
 }
 
@@ -1220,14 +1253,14 @@
 }
 
 bool save_preset_list(void)
-{   
+{
     if(num_presets != 0)
-    { 
+    {
         bool bad_file_name = true;
 
         if(!opendir(FMPRESET_PATH)) /* Check if there is preset folder */
-            mkdir(FMPRESET_PATH, 0); 
-    
+            mkdir(FMPRESET_PATH, 0);
+
         create_numbered_filename(filepreset,FMPRESET_PATH,"preset",".fmr",2);
 
         while(bad_file_name)
@@ -1246,7 +1279,7 @@
                 if((!p1) || (len > MAX_FILENAME) || (len == 0))
                 {
                     /* no slash, too long or too short */
-                    gui_syncsplash(HZ,true,str(LANG_INVALID_FILENAME));                    
+                    gui_syncsplash(HZ,true,str(LANG_INVALID_FILENAME));
                 }
                 else
                 {
@@ -1267,27 +1300,27 @@
     }
     else
         gui_syncsplash(HZ,true,str(LANG_FM_NO_PRESETS));
-        
+
     return true;
 }
 
 bool clear_preset_list(void)
 {
     int i;
-    
+
     /* Clear all the preset entries */
     for(i = 0;i <= num_presets;i++){
         presets[i].name[0] = '\0';
         presets[i].frequency = 0;
     }
-    
+
     num_presets = 0;
     presets_loaded = false;
     /* The preset list will be cleared switch to Scan Mode. */
     radio_mode = RADIO_SCAN_MODE;
-         
+
     presets_changed = false; /* Don't ask to save when clearing the list. */
-    
+
     return true;
 }
 
@@ -1365,7 +1398,7 @@
         case MENU_ENTER | BUTTON_REL:
             key = MENU_ENTER; /* fake enter for short press */
             break;
-            
+
 /* ignore down events */
 #ifdef MENU_RC_ENTER
         case MENU_RC_ENTER:
@@ -1377,7 +1410,7 @@
 #ifdef MENU_ENTER2
         case MENU_ENTER2:
 #endif
-        case MENU_ENTER: 
+        case MENU_ENTER:
             /* Ignore the release events */
 #ifdef FM_PRESET_ADD
         case FM_PRESET_ADD | BUTTON_REL:
@@ -1415,7 +1448,7 @@
             return false;
         else if (result == MENU_ATTACHED_USB)
             reload_dir = true;
-        
+
         if (result >= 0) /* A preset was selected */
         {
             curr_preset = menu_cursor(preset_menu);
@@ -1424,7 +1457,7 @@
             remember_frequency();
         }
     }
-    
+
     return reload_dir;
 }
 
@@ -1433,7 +1466,7 @@
 static bool fm_recording_settings(void)
 {
     bool ret;
-    
+
     ret = recording_menu(true);
     if(!ret)
     {
@@ -1471,6 +1504,153 @@
     return false;
 }
 
+char highsideinjection_menu_string[32];
+
+static void create_highsideinjection_menu(void)
+{
+	snprintf(highsideinjection_menu_string, 32, "Highsideinjection %s",
+			highsideinjection ? str(LANG_SET_BOOL_YES):str(LANG_SET_BOOL_NO));
+}
+
+static bool toggle_highsideinjection(void)
+{
+	highsideinjection = !highsideinjection;
+	radio_set(RADIO_HIGHSIDEINJECTION, highsideinjection);
+	create_highsideinjection_menu();
+	return false;
+}
+
+char freq_step_menu_string[32];
+
+static void create_freq_step_menu(void)
+{
+	snprintf(freq_step_menu_string, 32, "Freq-Step %dHz", freq_step);
+}
+
+static bool toggle_freq_step(void)
+{
+	switch(freq_step)
+	{
+		case 8192:
+			freq_step=32768;
+			break;
+		case 32768:
+			freq_step=50000;
+			break;
+		case 50000:
+			freq_step=100000;
+			break;
+		case 100000:
+			freq_step=500000;
+			break;
+		case 500000:
+			freq_step=8192;
+			break;
+		default:
+			freq_step=50000;
+			break;
+	}
+	create_freq_step_menu();
+	return false;
+}
+
+char softwaremute_menu_string[32];
+
+static void create_softwaremute_menu(void)
+{
+	snprintf(softwaremute_menu_string, 32, "Softwaremute %d", softwaremute);
+}
+
+static bool toggle_softwaremute(void)
+{
+	switch(softwaremute)
+	{
+		case 0:
+			softwaremute=10;
+			break;
+		case 10:
+			softwaremute=15;
+			break;
+		case 15:
+			softwaremute=20;
+			break;
+		case 20:
+			softwaremute=0;
+			break;
+		default:
+			softwaremute=0;
+			break;
+	}
+	create_softwaremute_menu();
+	return false;
+}
+
+char minfreq_menu_string[32];
+
+static void create_minfreq_menu(void)
+{
+	snprintf(minfreq_menu_string, 32, "Minfreq: %dMHz", min_freq/1000000);
+}
+
+static bool toggle_minfreq(void)
+{
+	switch (min_freq)
+	{
+		case 1000000:
+			min_freq=10000000;
+			break;
+		case 10000000:
+			min_freq=80000000;
+			break;
+		case 80000000:
+			min_freq=87500000;
+			break;
+		case 87500000:
+			min_freq=108000000;
+			break;
+		case 108000000:
+			min_freq=1000000;
+			break;
+		default:
+			min_freq=1000000;
+			break;
+	}
+	create_minfreq_menu();
+	return false;
+}
+
+char maxfreq_menu_string[32];
+
+static void create_maxfreq_menu(void)
+{
+	snprintf(maxfreq_menu_string, 32, "Maxfreq: %dMHz", max_freq/1000000);
+}
+
+static bool toggle_maxfreq(void)
+{
+	switch (max_freq)
+	{
+		case 133960000:
+			max_freq=50000000;
+			break;
+		case 50000000:
+			max_freq=100000000;
+			break;
+		case 100000000:
+			max_freq=108000000;
+			break;
+		case 108000000:
+			max_freq=133960000;
+			break;
+		default:
+			max_freq=133960000;
+			break;
+	}
+	create_maxfreq_menu();
+	return false;
+}
+
+
 #ifndef FM_MODE
 char radiomode_menu_string[32];
 
@@ -1488,6 +1668,7 @@
     create_radiomode_menu();
     return false;
 }
+
 #endif
 
 static bool scan_presets(void)
@@ -1495,10 +1676,10 @@
     bool tuned = false, do_scan = true;
     char buf[MAX_FMPRESET_LEN];
     int freq, i;
-    
+
     if(num_presets > 0) /* Do that to avoid 2 questions. */
         do_scan = yesno_pop(str(LANG_FM_CLEAR_PRESETS));
-        
+
     if(do_scan)
     {
         curr_freq = MIN_FREQ;
@@ -1510,14 +1691,14 @@
                 break;
 
             freq = curr_freq /100000;
-            snprintf(buf, MAX_FMPRESET_LEN, str(LANG_FM_SCANNING), 
+            snprintf(buf, MAX_FMPRESET_LEN, str(LANG_FM_SCANNING),
                             freq/10, freq % 10);
             gui_syncsplash(0, true, buf);
 
             /* Tune in and delay */
             radio_set(RADIO_FREQUENCY, curr_freq);
             sleep(1);
-            
+
             /* Start IF measurement */
             radio_set(RADIO_IF_MEASUREMENT, 1);
             sleep(1);
@@ -1527,7 +1708,7 @@
 
             /* add preset */
             if(tuned){
-                 snprintf(buf, MAX_FMPRESET_LEN, 
+                 snprintf(buf, MAX_FMPRESET_LEN,
                     str(LANG_FM_DEFAULT_PRESET_NAME),freq/10, freq % 10);
                  strcpy(presets[num_presets].name,buf);
                  presets[num_presets].frequency = curr_freq;
@@ -1535,11 +1716,11 @@
             }
 
             curr_freq += FREQ_STEP;
-                   
+
         }
 
         presets_changed = true;
-        
+
         FOR_NB_SCREENS(i)
         {
             gui_textarea_clear(&screens[i]);
@@ -1594,7 +1775,7 @@
 {
     int m;
     bool result;
-    
+
     static const struct menu_item items[] = {
 /* Add functions not accessible via buttons */
 #ifndef FM_PRESET
@@ -1608,6 +1789,11 @@
         { ID2P(LANG_FM_PRESET_CLEAR)     , clear_preset_list    },
 
         { monomode_menu_string           , toggle_mono_mode     },
+        { softwaremute_menu_string		 , toggle_softwaremute  },
+        { highsideinjection_menu_string	 , toggle_highsideinjection },
+        { freq_step_menu_string			 , toggle_freq_step     },
+        { minfreq_menu_string			 , toggle_minfreq		},
+        { maxfreq_menu_string			 , toggle_maxfreq		},
 #ifndef FM_MODE
         { radiomode_menu_string          , toggle_radio_mode    },
 #endif
@@ -1619,6 +1805,11 @@
     };
 
     create_monomode_menu();
+    create_highsideinjection_menu();
+    create_freq_step_menu();
+    create_softwaremute_menu();
+    create_minfreq_menu();
+    create_maxfreq_menu();
 #ifndef FM_MODE
     create_radiomode_menu();
 #endif
