Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Dec 2020
    Posts
    131

    hard limit volume control

    I know there are some LMS plugins that (partly) offer this, but I'd rather have a more robust solution.

    Browsing in the firmware (on Radio) I found a `setVolume()` function in `/usr/share/jive/jive/audio/Playback.lua` which appeared promising, but when I hack the code to use a fixed value for anything above a certain limit I can still use the volume knob to go beyond that set value. Should I look some place else or is the code cached and do I need to reboot when I make changes here?

  2. #2
    Quote Originally Posted by gordonb3 View Post
    I know there are some LMS plugins that (partly) offer this, but I'd rather have a more robust solution.

    Browsing in the firmware (on Radio) I found a `setVolume()` function in `/usr/share/jive/jive/audio/Playback.lua` which appeared promising, but when I hack the code to use a fixed value for anything above a certain limit I can still use the volume knob to go beyond that set value. Should I look some place else or is the code cached and do I need to reboot when I make changes here?
    It would not surprise me at all if that function was effectively only read at startup. A full reboot should work but might not be required -- once SSHed in you should be able to restart the Jive process.
    owner of the stuff at https://tuxreborn.netlify.app/
    (which used to reside at www.tux.org/~peterw/)
    Note: The best way to reach me is email or PM, as I don't spend much time on the forums.
    Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
    FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
    SettingsManager SleepFade StatusFirst SyncOptions VolumeLock

  3. #3
    Senior Member
    Join Date
    Dec 2020
    Posts
    131
    Well, it turned out to be the wrong one anyway. It only limited the volume as long as I was turning the knob and then it still became louder while still showing the set limit. But yes, it does require a reboot.

    The solution is in fact more straight forward than I expected to find. It is in `/usr/share/jive/applets/SlimBrowser/Volume.lua` in a function named `_coerceVolume` that does in fact already do the exact thing I wanted, except that it limits at 100 (percent).

  4. #4
    I'm glad you found a solution, and thanks for sharing the details.
    owner of the stuff at https://tuxreborn.netlify.app/
    (which used to reside at www.tux.org/~peterw/)
    Note: The best way to reach me is email or PM, as I don't spend much time on the forums.
    Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
    FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
    SettingsManager SleepFade StatusFirst SyncOptions VolumeLock

  5. #5
    Senior Member
    Join Date
    Dec 2020
    Posts
    131
    Quote Originally Posted by peterw View Post
    I'm glad you found a solution, and thanks for sharing the details.
    Pretty interesting actually. Although after hacking that bit of code I can no longer get past the set limit either by using the device's own volume control or IR remote, I can still go beyond it when changing volume through LMS or (Duet) Controller. It appears that the function I suspected initially is in fact the one that is accessed by the Slim executable whenever an `audg` is initiated through the Slim networking protocol. A bit of nastiness here is that whatever limit you set here does not provide any feedback to the initiator, but I consider that an acceptable price for the health of both the kids' ears and the device's speakers

  6. #6
    Senior Member
    Join Date
    Dec 2020
    Posts
    131
    Oh, bugger... Received the Boom I found on eBay and noticed that it doesn't allow ssh access, so it's back to plan B.

  7. #7
    Quote Originally Posted by gordonb3 View Post
    Oh, bugger... Received the Boom I found on eBay and noticed that it doesn't allow ssh access, so it's back to plan B.
    Yeah, the Boom is a true "slim" device. Except for the special offline mode for playing what it gets through the Line In jack, it obeys LMS, and my VolumeLock plugin should take care of you. The general model for Boom volume control is that when you use the knob or buttons or send IR codes, it tells LMS what it saw, and if LMS thinks the volume should change, it uses the SlimProto to tell Boom to change its volume. So VolumeLock works well with Boom (and Classic, Receiver, etc.) -- it can *prevent* the volume change on Boom (vs. just revert the volume after the fact on Touch, Radio, and Jivelite).
    owner of the stuff at https://tuxreborn.netlify.app/
    (which used to reside at www.tux.org/~peterw/)
    Note: The best way to reach me is email or PM, as I don't spend much time on the forums.
    Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
    FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
    SettingsManager SleepFade StatusFirst SyncOptions VolumeLock

  8. #8
    Senior Member
    Join Date
    Dec 2020
    Posts
    131
    Excellent! Then I'll keep both methods for the two generation players.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •