Bug 6419 - Jive Hardware: Volume goes crazy after "muting" (vol+/vol- pressed simultaneously)
: Jive Hardware: Volume goes crazy after "muting" (vol+/vol- pressed simultaneo...
Status: CLOSED FIXED
Product: SB Controller
Classification: Unclassified
Component: Settings
: unspecified
: PC Windows XP
: P2 critical (vote)
: 7.0
Assigned To: Richard Titmuss
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-20 00:07 UTC by tom
Modified: 2008-09-01 10:26 UTC (History)
0 users

See Also:
Category: ---


Attachments
local fix for the "both volume buttons pressed" bug (21.47 KB, patch)
2008-01-22 11:07 UTC, tom
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tom 2007-12-20 00:07:21 UTC
Environment:
- Jive Hardware (fairly recent, with belly label and all)
- Most recent build (Dec 19) of SqueezeCenter (but happens with SqueezeNetwork - SC not running at all - as well), r1228, also duplicated with Jive Hardware build r1123 on SqueezeNetwork with no SC involved.

When using the volume up/down buttons at the same time to mute the SB, it appears as if the Jive hardware has a "logically stuck button", causing the volume to either drift to max or min. There is no way I found to convince Jive to stop doing it except for power cycling it - you can use vol+/- or the wheel to adjust the volume, but a second later it insists on going max/min again.

After a power cycle, when it comes back up, it seems to behave normal again.
Comment 1 Blackketter Dean 2007-12-27 05:11:52 UTC
Richard: have you seen this?
Comment 2 KDF 2008-01-11 09:55:59 UTC
possibly linked with bug5416.  comment there states volume is a work in progress, and the term "wiggy" could also include the behaviour decribed above.
Comment 3 tom 2008-01-11 10:27:05 UTC
I had this working sometime in November, it seems to have broken since then. Will have to try again with the most recent version.
Comment 4 tom 2008-01-11 21:58:15 UTC
Today's daily, r1404, still happens. Press Vol+/Vol- simultaneously, fades to max or min, then jumps seemingly randomly around if trying to correct it until remote is turned off.

Not good if you have the volume up on the amp.... :/
Comment 5 jeffrey s miller 2008-01-17 13:11:14 UTC
SqueezeCenter Version: 7.0 - 16375 - Windows 2000 and 1 r1474:

I see what Tom is seeing when both buttons are pushed simultaneously, and have found another method of getting the controller to wig out.

When selecting something to add or play the info screen comes up, telling you 'adding...'. If you press & scroll volume up while the info screen is showing the volume automatically goes to max. There is no way to decrease the volume after it reaches max (even with the web interface or IR remote), until either the jive is shut off or it locks up.
Comment 6 tom 2008-01-22 11:07:27 UTC
Created attachment 2705 [details]
local fix for the "both volume buttons pressed" bug

This patch is a local fix for the problem of the volume going crazy when pressing both buttons at once. The root cause is somewhere deeper, though, and I believe has to do with message routing/popup handling. It does not fix Jeff's problem (adjusting volume while the "added" popup is active).

In both cases, a timer that is started is not stopped properly.

The patch is unnecessarily long. My editor (emacs) is configured to strip trailing whitespace, which is the case here. The really relevant (non-whitespace-only) portion is the following:

@@ -272,12 +272,16 @@
 			local evtCode = event:getKeycode()
 
 			-- we're only interested in volume keys
+            if evtCode & (KEY_VOLUME_UP | KEY_VOLUME_DOWN) == 0 then
+               return EVENT_UNUSED
+            end
 			if evtCode == KEY_VOLUME_UP then
 				vol = 1
 			elseif evtCode == KEY_VOLUME_DOWN then
 				vol = -1
 			else
-				return EVENT_UNUSED
+                -- TODO: both pressed? should toggle mute?
+                vol = 0
 			end

(since this is the first patch I submit, I should probably ask about "coding style" conventions - it seems you guys use tabs, mostly, but not all the time? What is preferred?)
Comment 7 Richard Titmuss 2008-01-22 11:17:08 UTC
Tom, thanks for the patch. I am actually looking at this today, and have decided to rewrite the volume popup to be less trouble some. I can confirm you patch is good, my solution was very similar, but as you say it does not fix Jeff's problem. I should have a full fix tomorrow morning (uk time) at the latest.

Re tabs and spaces, I just press tab in emacs. Not sure where the spaces are from :)
Comment 8 tom 2008-01-22 11:38:27 UTC
What a coincidence - good to hear I wasn't completely off, being a Lua- and Jive-newbie. It was a good learning experience so far with Jive built on Windows, allowing for some inside debugging to see how it all works. I'm looking forward to checking out what you come up with. I still think pressing both volume buttons at the same time should mute/unmute the player.
Comment 9 Richard Titmuss 2008-01-23 05:26:31 UTC
Fixed in r1577, r1579. The volume is now much more robust, and also is more usable. Vol+ and Vol- also work as a mute function.
Comment 10 tom 2008-01-24 20:33:42 UTC
Very nice fixes, thanks much, Richard!

I did get a repro (similar case but not as bad) when using the volume while another popup is visible. This is with Remote firmware r1605 from today's daily.

Repro:
- pause "now playing"
- unpause again
- while "Now Playing" popup is present, press volume up or down

Observation:
- volume begins to increase or decrease, and keeps going even after releasing the volume button

Mitigating factors:
- it is possible to force it to reverse the volume direction by pressing the other volume adjustment key
- when the "now playing" popup disappears, the volume popup begins to react to "key-up" events again, and world peace ensues (without having to reboot the remote)

Additional comments:
This also happens when other popups are present (such as the "added to favorite" one as described by Jeff.
Comment 11 jeffrey s miller 2008-01-25 06:56:48 UTC
> Mitigating factors:
> - it is possible to force it to reverse the volume direction by pressing the
> other volume adjustment key
> - when the "now playing" popup disappears, the volume popup begins to react to
> "key-up" events again, and world peace ensues (without having to reboot the
> remote)

Sorry Richard but I'm still seeing volume scaling during pop=ups with r1628 too.

Another mitigating factor seems to be the center button; it will stop the volume scaling when pushed.
Comment 12 Richard Titmuss 2008-01-25 06:59:14 UTC
Thanks, that's a good repeatable case. Maybe the KEY_UP events are not being forwarded by the show briefly popup. If so thats an easy fix. I'll look at this soon.
Comment 13 Richard Titmuss 2008-01-25 08:15:27 UTC
In addition dean days:

"I'm not seeing this, but I am seeing that if I hit a volume button, I can't use the transport controls while the volume indicator is up.  That shouldn't be the case, those should override the volume indicator/mode. "
Comment 14 Richard Titmuss 2008-01-27 12:53:20 UTC
Remaining bugs fixed in r1648.
Comment 15 James Richardson 2008-05-15 13:01:03 UTC
This bug has recently been fixed in the latest release of SqueezeCenter 7.0.1

Please try that version, if you still see the error, then reopen this bug.

To download this version, please navigate to: http://www.slimdevices.com/su_downloads.html
Comment 16 jeffrey s miller 2008-09-01 10:26:56 UTC
With version 7.2 r2873; The volume control goes to min/max if either volume button is pressed while the wheel animation is spinning from switching from one player to another.