fix spaces
[enigma2.git] / lib / dvb / volume.cpp
index ba03b52..202de33 100644 (file)
@@ -90,6 +90,17 @@ void eDVBVolumecontrol::setVolume(int left, int right)
                
                printf("Setvolume: %d %d\n", leftVol, rightVol);
                printf("Setvolume: %d %d\n", left, right);              
+               
+       //HACK?
+       FILE *f;
+       if((f = fopen("/proc/stb/avs/0/volume", "wb")) == NULL) {
+               printf("cannot open /proc/stb/avs/0/volume\n");
+               return;
+       }
+       
+       fprintf(f, "%d", left);
+
+       fclose(f);
 }
 
 int eDVBVolumecontrol::getVolume()
@@ -109,6 +120,7 @@ void eDVBVolumecontrol::volumeMute()
 {
        int fd = openMixer();
 #ifdef HAVE_DVB_API_VERSION    
+       printf("ioctl AUDIO_SET_MUTE,1 %d\n",fd);
        ioctl(fd, AUDIO_SET_MUTE, true);
 #endif
        closeMixer(fd);
@@ -119,6 +131,7 @@ void eDVBVolumecontrol::volumeUnMute()
 {
        int fd = openMixer();
 #ifdef HAVE_DVB_API_VERSION
+       printf("ioctl AUDIO_SET_MUTE,0\n");
        ioctl(fd, AUDIO_SET_MUTE, false);
 #endif
        closeMixer(fd);
@@ -133,4 +146,4 @@ void eDVBVolumecontrol::volumeToggleMute()
        else
                volumeMute();
                
-}
\ No newline at end of file
+}