X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/8aab207f861a26ccc65a69897293b3af92546f5e..33203ca44da7863055a41e2b5145c5b9614f873e:/lib/dvb/volume.cpp diff --git a/lib/dvb/volume.cpp b/lib/dvb/volume.cpp index ba03b520..e57fbc80 100644 --- a/lib/dvb/volume.cpp +++ b/lib/dvb/volume.cpp @@ -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() @@ -113,6 +124,17 @@ void eDVBVolumecontrol::volumeMute() #endif closeMixer(fd); muted = true; + + //HACK? + FILE *f; + if((f = fopen("/proc/stb/audio/j1_mute", "wb")) == NULL) { + printf("cannot open /proc/stb/audio/j1_mute\n"); + return; + } + + fprintf(f, "%d", 1); + + fclose(f); } void eDVBVolumecontrol::volumeUnMute() @@ -123,14 +145,23 @@ void eDVBVolumecontrol::volumeUnMute() #endif closeMixer(fd); muted = false; + + //HACK? + FILE *f; + if((f = fopen("/proc/stb/audio/j1_mute", "wb")) == NULL) { + printf("cannot open /proc/stb/audio/j1_mute\n"); + return; + } + + fprintf(f, "%d", 0); + + fclose(f); } void eDVBVolumecontrol::volumeToggleMute() { - printf("Mute\n"); if (isMuted()) volumeUnMute(); else volumeMute(); - -} \ No newline at end of file +}