-#ifdef HAVE_DVB_API_VERSION
- mixer.volume_left = (left * left) / 64;
- mixer.volume_right = (right * right) / 64;
+#if HAVE_DVB_API_VERSION < 3
+ /* convert to linear scale. 0 = loudest, ..63 */
+ mixer.volume_left = 63.0-pow(1.068241, 63-left);
+ mixer.volume_right = 63.0-pow(1.068241, 63-right);
+#else
+ mixer.volume_left = left;
+ mixer.volume_right = right;
+#endif
+
+ eDebug("Setvolume: %d %d (raw)", leftVol, rightVol);
+ eDebug("Setvolume: %d %d (-1db)", left, right);
+#if HAVE_DVB_API_VERSION < 3
+ eDebug("Setvolume: %d %d (lin)", mixer.volume_left, mixer.volume_right);