diff --git a/src/cpp/ALSA_support.cpp b/src/cpp/ALSA_support.cpp
index ecd34dd0bb2dd481e2d6569ad19d84527a91383e..eea0bcd4bbdbdf287210254bd98dddee577051fa 100644
--- a/src/cpp/ALSA_support.cpp
+++ b/src/cpp/ALSA_support.cpp
@@ -423,7 +423,7 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type)
 
       default:
         DSP::log << "Unsupported no of bytes in channel" << endl;
-        return -1;
+        return -6;
         break;
     }
   }
@@ -495,7 +495,7 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type)
 
       default:
         DSP::log << "Unsupported no of bytes in channel" << endl;
-        return -1;
+        return -6;
         break;
     }
   }
@@ -507,7 +507,7 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type)
     if (rc < 0)
     {
       DSP::log << "Unable to set blocking mode" << endl;
-      return -1;
+      return -7;
     }
   }
 
@@ -518,7 +518,7 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type)
     if (rc < 0)
     {
       DSP::log << "Unable to set non blocking mode" << endl;
-      return -1;
+      return -8;
     }
   }