git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix spaces
[enigma2.git]
/
lib
/
dvb
/
volume.cpp
diff --git
a/lib/dvb/volume.cpp
b/lib/dvb/volume.cpp
index bc3d6574d65365d5533d7074fb16b9366dd42e19..202de33e0f6d1145cc6d9718ad9a4ff74b883cb9 100644
(file)
--- a/
lib/dvb/volume.cpp
+++ b/
lib/dvb/volume.cpp
@@
-68,8
+68,8
@@
void eDVBVolumecontrol::setVolume(int left, int right)
leftVol = checkVolume(left);
rightVol = checkVolume(right);
leftVol = checkVolume(left);
rightVol = checkVolume(right);
- left = 63 - leftVol
/ 100.0 * 63.
0;
- right = 63 - rightVol
/ 100.0 * 63.
0;
+ left = 63 - leftVol
* 63 / 10
0;
+ right = 63 - rightVol
* 63 / 10
0;
#if HAVE_DVB_API_VERSION < 3
audioMixer_t mixer;
#if HAVE_DVB_API_VERSION < 3
audioMixer_t mixer;
@@
-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);
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()
}
int eDVBVolumecontrol::getVolume()
@@
-109,6
+120,7
@@
void eDVBVolumecontrol::volumeMute()
{
int fd = openMixer();
#ifdef HAVE_DVB_API_VERSION
{
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);
ioctl(fd, AUDIO_SET_MUTE, true);
#endif
closeMixer(fd);
@@
-119,6
+131,7
@@
void eDVBVolumecontrol::volumeUnMute()
{
int fd = openMixer();
#ifdef HAVE_DVB_API_VERSION
{
int fd = openMixer();
#ifdef HAVE_DVB_API_VERSION
+ printf("ioctl AUDIO_SET_MUTE,0\n");
ioctl(fd, AUDIO_SET_MUTE, false);
#endif
closeMixer(fd);
ioctl(fd, AUDIO_SET_MUTE, false);
#endif
closeMixer(fd);
@@
-133,4
+146,4
@@
void eDVBVolumecontrol::volumeToggleMute()
else
volumeMute();
else
volumeMute();
-}
\ No newline at end of file
+}