Allrighty, here's what's happening when HIJACK_VOLBOOST_DEBUG is set...
1. I turn the volume down to something low:
Boosted: 28, Requested: 28, Current Boost: 0
VOLBOOST: Req: 27, Boosted: 27, Appl. Boost: 0, Appl. Vol: 27
Boosted: 27, Requested: 27, Current Boost: 0
VOLBOOST: Req: 26, Boosted: 26, Appl. Boost: 0, Appl. Vol: 26
Boosted: 26, Requested: 26, Current Boost: 0
.
2. I send some text to the ttsd:
sh-2.03# echo "Can you hear me now?" > /usr/local/ttsd
.
3. After a couple seconds of processing, ttsd writes its output, the audio overlay patch does it's thing, fading down the background music, playing the buffers, and fading the music back up to the *correct* previously stored volume (26 in this example.) No debug output is shown from the volume boost debug statements at this point.
4. About a second later, after the "fade up to the previous volume" code from the overlay patch does its work, the volume spikes up, and we see this debug output:
VOLBOOST: Req: 85, Boosted: 85, Appl. Boost: 0, Appl. Vol: 85
Boosted: 85, Requested: 85, Current Boost: 0
.
5. At this point, as you had suggested might be the case, if I turn the knob a single click, the volume "jumps" to the correct volume:
VOLBOOST: Req: 25, Boosted: 25, Appl. Boost: 0, Appl. Vol: 25
Boosted: 25, Requested: 25, Current Boost: 0
.
So... Any ideas? I could dig deep into the code and start putting printk's everywhere, but since you wrote the volume boost, maybe you have an idea where this "phantom" volume change is coming from after the overlay patch is done its work?