stray \342 in program
If I copy your provided code in a vim-editor you can see some strange characters. &lt;202c&gt;

switch (val, HEX) {
  4 
  5     case 0x807FB24D&lt;202c&gt;:
  6       Serial.println("Stisknuto PLAY");
  7       tone(2, fre);
  8       break;
  9     case &lt;202d&gt;0x807FB04F&lt;202c&gt;:


I've removed them for you:

#include &lt;IRremote2.h&gt;
#include &lt;IRremoteInt.h&gt;

#define pinIN 11

uint32_t val;
uint32_t prev;
int fre = 0;

IRrecv remote(pinIN);
decode_results result;

void setup() 
{
  Serial.begin(9600);
  remote.enableIRIn();
  pinMode(2, OUTPUT);
}

void loop() 
{
  if (remote.decode(&amp;result)) 
  {
    val = result.value;
    if (val == 0xFFFFFFFF) 
    {
      val = prev;
    }
    prev = val;
    detekceKlaves();
    remote.resume();
  }
}

void detekceKlaves() 
{
  switch (val, HEX) 
  {
    case 0x807FB24D:
      Serial.println("Stisknuto PLAY");
      tone(2, fre);
      break;
    case 0x807FB04F:
      Serial.println("Stisknuto STOP");
      noTone(2);
      break;
    case 0x807F18E7:
      Serial.println("Stisknuto VOL+");
      fre += 10;
      break;
    case 0x807F906F:
      Serial.println("Stisknuto VOL-");
      fre -= 10;
      break;
    case 0x807F9867:
      Serial.println("Stisknuto OFF/ON");
      fre = 0;
      break;
    default:
      Serial.println("Stisknuta jina klavesa");
  }
}