Soft audio mute is designed to mute/unmute slowly, hence protecting your amp and speakers from ugly sounding and potentially damaging transients. It's not a good idea to disable the ioctl. We don't know for sure what uses it within the player (you could set MIXER_DEBUG which would show you all the calls), but it's fairly safe to assume that it is used when the eq bank is changed, and transients here could be very large. (Ironically it should also be set when changing single eq parameters, but I don't think it is). It's also used when changing source, and as far as I can see, it is the only method used to mute Aux In and the Tuner (since they are analogue inputs). So I can't see disabling the ioctl being a valid thing to do.

The SAM set ioctl is actually a toggle;


case EMPEG_MIXER_SET_SAM:
{
int sam;

copy_from_user_ret((void *) &sam, (const void *) arg,
sizeof(int), -EFAULT);

if(sam) dsp_write(Y_switch, 0);
else dsp_write(Y_switch, 0x5d4); // 4.6ms



Now if we made sam persistant, then it would always hold what the player thought the setting was which is all we really care about. We can force a mute/unmute at will within the overlay code, with the appropriate dsp_write command, and restore it to what the player wants afterwards (I need to find my DSP programming manual to confirm whether 'sam' is inverted or not...I think that sam=0 is muted - this could be tested with MIXER_DEBUG)

With regards to the volume. I haven't tested your code, but I'm guessing that it's not working quite as you were hoping. The overlay volumes that you're touching are AFAIK doing sample scaling - in normal use, the players samples aren't scaled (well, ignoring voladj), so if the main volume is turned down, then you're still not going to hear anything...what you appear to be doing is affecting the player-ttsd balance. (Incidentally, this may have some use in itself - I think that the tts samples ( from ttsclock) are a bit low in volume)

But we need to ensure that we are not scaling the player samples when there isn't any tts active - we don't want to lose any fidelity in the music
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.