Setting initial volume

Posted by: GeoffT

Setting initial volume - 19/02/2003 12:15

Following the successful (after a while !) installation of my tuner kit, I am now using the Empeg on it's own rather than as an Aux in to my old headunit. Is there a way of setting the "on volume" to a specific value either in the Empeg software or in Hijack intitial settings? My old headunit had this feature and it was useful to avoid early morning shocks if you had the volume up high the night before !

I've had a quick look through the FAQ but couldn't see anything.
Posted by: tfabris

Re: Setting initial volume - 19/02/2003 12:28

I would love to see this feature, as well.

I believe it could be done in Hijack, and in fact, requested that feature here a while back.

How about it, Mark?
Posted by: JeffS

Re: Setting initial volume - 19/02/2003 13:02

Yes, this would be great. I've often remarked to my wife that I'd love this feature.
Posted by: tfabris

Re: Setting initial volume - 19/02/2003 13:08

In fact, if it were a Flash setting instead of a config.ini setting, we wouldn't need to rob very many flash bits to store it. Because we wouldn't need it to be very granular. Maybe just -60, -40, -20, or 0. That's only what, two bits? Four if you do it separately for home and work.
Posted by: tfabris

Re: Setting initial volume - 19/02/2003 13:17

Nah, we'd need more bits than that, because we'd also want the option to "not have it" at all (ie, default behavior)...
Posted by: foxtrot_xray

Re: Setting initial volume - 19/02/2003 14:36


Nah, we'd need more bits than that, because we'd also want the option to "not have it" at all (ie, default behavior)...


Okay, so 5 bits.
First one 0 or 1, enabled or disabled. Then 2 for home, and 2 for car.


Of course, dosn't the player already STORE volumne info in the flash somewhere? I mean, If I turn mine down, turn it off, then turn it back on, it remembers where I set it.

So, just a little programming, and we just 'update' the location where the volumne is already stored, make it a setting in config.ini.. (Unless I'm WAY off base here. Which wouldn't suprise me..)

Me.
Posted by: johnmcd3

Re: Setting initial volume - 19/02/2003 14:40

perhaps I don't understand the way the player internals work, but why not just have hijack have the option of capping the boot volume in the config.ini with something like

[hijack]
max_boot_volume=-20

and then hijack would just update the stored player volume if it exceeded this. the setting could then default to +10 (no limiting). would such a solution work better than using flash bits?

Edit: aarg, my idea's been suggested.

just though to have it work the way this thread suggested it'd need to be:

[hijack]
boot_volume=-16

and have no effect if not present.
Posted by: TheAmigo

Re: Setting initial volume - 19/02/2003 14:53

Might the same setting be applied then to ttsclock? Since the clock runs before the player is loaded, you can't use the knob to adjust volume at that point.
Posted by: genixia

Re: Setting initial volume - 19/02/2003 15:01

There's two issues with this that would need to be addressed.

Firstly, integration with the player software. It could be made simpler if we told people that they couldn't use volume ramping with this feature. Then we'd just trap the very first volume IOCTL call in hijack and cap if neccessary. Otherwise we'd have to trap the first X calls, where X is an undefined quantity. We'd have to use the boot timer and pre-define a time during which the cap is active.

But this still might not work - I suspect that the player would complain about failed volume setting calls, unless we lied to it. We currently already lie for the volboost_ code, but the idealogy of that is opposite to what we want here, the volboost code *always* lies to the player when active, but here we wouldn't want to perpetuate the lie beyond the end of the volume ramp. I don't know how the player would react if it thought that the volume was X dB and then it finds out that it was really X-25 dB. It might deal with it fairly gracefully, with no more than a visual anomoly, or it might not.

The second issue is that of storage. I suppose that 6 bits of flash would give 7 levels + off for both AC and DC modes, but I don't know that this feature would be worth that much flash - it's not something that you'd want to modify on a frequent basis. I suspect that config.ini would be a better place for this.

The 'perfect' solution, if time allows, is intercept the powerdown flash write, and cap the volume according to config.ini as the player writes it. That way the player would read the capped volume when it next boots, and ramp accordingly.

Yes, it could be achieved in hijack fairly easily, but I suspect that it would be trivial to include in the player software itself, and ideally this is where it should live.
Posted by: andy

Re: Setting initial volume - 19/02/2003 15:28

Has no one yet identified space on the scratch partition that could be used instead of flash ?
Posted by: tonyc

Re: Setting initial volume - 19/02/2003 15:42

Has no one yet identified space on the scratch partition that could be used instead of flash ?

Reserved space? IIRC there is none. According to peter, the scratch partition as currently laid out doesn't even have enough room to store running orders of grzelakian proportions across reboots.

However, I did get the impression that post-2.0 they were going to increase the density of the FID/running order entries in hda3 beyond one FID per sector. If that were done, maybe we could ask them real nicely if they could set aside some space at the end which would be reserved for user hacks. Then we'd just have to have an Empeg Assigned Sectors Authority responsible for doling out sector numbers to application developers. And then we'd have speculators buying up all the sectors and reselling them. See the can of worms you've opened?

Posted by: johnmcd3

Re: Setting initial volume - 19/02/2003 16:15

but hijack gets to parse the config file before the player does it volume ramping (the way i understand it), so can't you have hijack (if necessary) set the appropriate flash bits for the final volume level and just let the player deal with ramping on it's own?
Posted by: mlord

Hijack v317: Volume Level on Boot - 19/02/2003 16:30

Okay, it took two flash bits -- one for AC, one for DC -- I just assumed that there'd be howls of misery if this feature didn't remember AC/DC separately.

To use it, look for the "Volume Level on Boot" entry on the Hijack menu (long knob press). If you cannot figure it out, too bad!

EDIT: Hijack v317 is out now, but wait for v318 which fixes a typo on the menu display.

Cheers
Posted by: tfabris

Re: Setting initial volume - 19/02/2003 16:32

It could be made simpler if we told people that they couldn't use volume ramping with this feature. Then we'd just trap the very first volume IOCTL call in hijack and cap if neccessary.
Ah, I think that's way overkill. That's not what we need.

We've already got a volume cap command in the player software. We don't need to cap every volume adjustment. We just need to cap the value that gets written to flash.

See, when the player boots, it's reading the flash and ramping *to* that. Whatever's in the flash. We wouldn't even have to intercept *reads* from the flash, just the power-down *write*. And just make sure that value is no larger than X.
Posted by: tfabris

Re: Setting initial volume - 19/02/2003 16:35

Well, that was a really pointless post.

MARK, YOU ARE THE MAN!

/me presses refresh on the Hijack site...
Posted by: mlord

Hijack v318: fixed "messy" Volume Level screen - 19/02/2003 16:48

Well, I guess I'll have to put out a v318 to fix the "wrapping-e" from v317 on the "Volume Level on Boot" screen..

So if y'all haven't grabbed v317 yet, then wait another 10 minutes or so for v318.

-ml
Posted by: genixia

Re: Setting initial volume - 19/02/2003 16:55

Well, that was a really pointless post.


In that case, it's probably pointless referring you to the paragraph that starts "The 'perfect' solution" in my previous post.

I'm intruiged as to how Mark's implemented this. Since I've now gotten my server back up, I should have time to look at the diff.
Posted by: mlord

Re: Setting initial volume - 19/02/2003 17:07

Look for "volumelock" in the patch file, specifically in empeg_state.c

Cheers
Posted by: Shonky

Re: Hijack v318: fixed "messy" Volume Level screen - 19/02/2003 17:08

Damn - the master beat me to it. I was just working on exactly this feature. Although I was doing it the hard way and limiting the volume ramp on power on rather than simply intercepting the volume save on power off.

Does the hijack version allow lower than set value? i.e. I set the hijack version to a reasonably high -20db to prevent major heart attacks. If I actually have the player set lower than -20db it will ramp up to the lower value?

Oh well.... Thanks for adding it
Posted by: tfabris

Re: Setting initial volume - 19/02/2003 17:14

Can you explain what the two options mean? I'm not sure I understand what it's supposed to be doing (it's not doing what I expected it to do).

I want it to always boot at 0db in home mode, and always boot at -40db in car mode. What sequence of actions to I perform to make that happen?
Posted by: mlord

Re: Setting initial volume - 19/02/2003 17:25

>I want it to always boot at 0db in home mode, and always
>boot at -40db in car mode. What sequence of actions to I
>perform to make that happen?

1. Go into the Hijack menu, and select the "Volume Level on Boot" screen.
2. Select "Previous" as the setting, which will restore whatever volume level was previously in use (at poweroff) on the next boot ("normal operation"). Press Menu/Knob to save the setting.
3. Exit from the Hijack menus.
4. Dial the volume you want it to restore to, be it 0db, -40db, or whatever.
5. Go back into the "Volume Level on Boot" screen, and change the setting to "Current". Press Menu/Knob to save the setting.

Repeat the above for each of AC/DC (while running on the appropriate power source, or using Force AC/DC from Hijack) if desired.

EDIT: I'll welcome suggestions for better settings labels (within screen confines)

Cheers
Posted by: mlord

Re: Setting initial volume - 19/02/2003 17:31

Or, the short version:

"Previous" means "use default Empeg behaviour" -- most recent volume level at poweroff is restored on boot.

"Current" means remember current volume level at the instant you press Menu/Knob on the "Volume Level on Boot" screen in Hijack.


BUG: If setting was already "Current", and you re-enter the menu to set "Current" again for a new volume level, nothing changes.. Ooops. You have to set it to "Previous", exit, change the volume, and then go back and set it to "Current" again.

I'll see if I can fix that in v319.
Posted by: mlord

Hijack v319: Fixed bug in Volume Level on Boot - 19/02/2003 17:50

It should work better now.

v319 will be out in 10 minutes or so.

-ml
Posted by: tfabris

Re: Setting initial volume - 19/02/2003 18:17

Hmm, even 319 isn't doing what I'm hoping/expecting it will do. I followed those steps, and it's not restoring it to 0db on a reboot in AC power. Hm.

Anyone else get it to work?
Posted by: Yang

Re: Setting initial volume - 19/02/2003 18:47

I just tried it out in DC mode and it works pretty well.

The only issue that I had was when set to Current mode, if you adjust the volume as it ramps up, it seems to reset the saved volume.. Doing that a couple of times can get you down all the way with no easy way to adjust the volume without setting it to Previous, etc.
Posted by: tfabris

Re: Setting initial volume - 19/02/2003 18:55

if you adjust the volume as it ramps up, it seems to reset the saved volume..


If I could get the feature doing what I want, I could deactivate volume ramp, so...
Posted by: mlord

Re: Setting initial volume - 19/02/2003 19:18

Yeah, it's very badly broken..

I guess I'll spend more than 5-minutes on it this time..

gimmeasec
Posted by: wfaulk

Re: Setting initial volume - 19/02/2003 19:26

A sec is more than 5 minutes?

Is part of your linux contracts dealing with a time machine?
Posted by: mlord

Re: Setting initial volume - 19/02/2003 19:28

All programmers are optimists, including Murphy.

-ml
Posted by: mlord

Hijack v320: Volume Level on Boot (again!) - 19/02/2003 19:50

Okay, this time I actually put away my paid work for half an hour, and worked through the Volume Level feature again, simplified and rewrote most of it, and here it is.. works for me!

Hijack v320, available at quality websites near you (soon).

-ml
Posted by: tfabris

Re: Hijack v320: Volume Level on Boot (again!) - 19/02/2003 21:45

Hijack v320, available at quality websites near you (soon).
And quality, it is! Working perfectly for me now, in both home and car modes.

Mark, you are THE MAN. Thanks!

time I actually put away my paid work for half an hour
Paid? I thought Linux was free?
Posted by: muzza

Re: Hijack v320: Volume Level on Boot (again!) - 19/02/2003 23:51

Holy crap!
less than 12 hours from suggestion to implementation!

Anyone who suggests that Mark is not THE MAN will be beaten up and have thier empeg removed.
Posted by: eliceo

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 00:17

I just tried out 320 and its a really cool feature, thanks for the hard work. The amount of user development for the empeg still amazes me.
Posted by: tonyc

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 00:17

Holy crap!
less than 12 hours from suggestion to implementation!

For Mark, that's actually a long time. Heck, even I went from suggestion to implementation in 3 hours tonight with a brand new program. When you catch a hacker at the right time with the right suggestion, it's almost impossible to stop.
Posted by: GeoffT

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 09:46

Mark et al,

Thanks for the incredibly quick response to my request. I have only just looked at the BB again since my enquiry and there are 33 replies (34 now !) and several up-issues of Hijack to implement a solution.

If only everything in life was as reliable as the Empeg BB !

Geoff
Posted by: genixia

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 10:32

When you catch a hacker at the right time with the right suggestion, it's almost impossible to stop.


I want to know which brands of coffee/pizza/coke you guys are on. I could use some.
Posted by: tonyc

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 12:04

I want to know which brands of coffee/pizza/coke you guys are on. I could use some.

I dunno, you did the volboost stuff, right? That was a winner. As for what I'm on, nothing really, it's just that the alternative to playing around with lrctool was to do my school work, and, well, I'm sure you know who wins that battle.

As for how Mark gets his Linux stuff done while assembling tuners, building docking stations, and implementing complex features in Hijack... AND still manages to stay very involved on the BBS... I'm just guessing he fell from another planet. Let's hope he sticks around for awhile longer before returning home!
Posted by: mlord

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 12:12

But when rock-climbing season returns.. THEN I'm outa here!
Posted by: altman

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 12:40

Thank god you don't snowboard, with that and climbing you'd never be concentrating on work

Hugo
Posted by: rtundo

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 13:06

Hey, stop giving him ideas.
Posted by: mlord

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 13:07

Oh yeah?

Posted by: genixia

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 13:21

Thank god you don't snowboard, with that and climbing you'd never be concentrating on work


Although he might be able to get back quicker!
Posted by: loren

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 14:31

DAMN! Remind me to go snowboarding with you next time. Wow.
Posted by: accept

Re: Hijack v320: Volume Level on Boot (again!) - 20/02/2003 18:45

Wow !! just caught up on the BBS, reading through this thread, can't believe the capabilities of Mark.

An idea turned into reality just like that !!!
Awesome dude !

Another assurance that i bought the right MP3 player !!
(nothing else compares)
Posted by: GeoffT

Re: Hijack v320: Volume Level on Boot (again!) - 21/02/2003 13:42

I've just loaded V320 of Hijack to take advantage of the new boot volume facility. This works great but since I've loaded it I'm getting some odd behaviour - whenever I re-start in car mode, Info reverts to Line rather than the last setting and some of my ir-translates for the Sony stalk seem to have reverted to an earlier version of my config.ini. Emplode shows config.ini as I expect and I've re-synchronised but that has not helped. It's as if it has got a back-issue of my config.ini (that it won't let me see) and is using that instead

Is this possible?
Am I going mad?


Posted by: butter

Re: Hijack v320: Volume Level on Boot (again!) - 21/02/2003 13:57

Am I going mad?

I dunno. How many legs does this elephant have?

Posted by: GeoffT

Re: Hijack v320: Volume Level on Boot (again!) - 21/02/2003 14:34

What elephant? All I see is is an Empeg Tuner circuit diagram.
Posted by: fossi

Re: Setting initial volume - 24/02/2003 23:24

Idea for the "Previous" settings:

From my last car stereo I know the following possibility, which is quite simple but very powerful:

- store the previous volume level for each individual operation mode (player, tuner, aux) and even for traffic alarms separately

- restore to the previous volume level when switching to the operating mode, e.g. to previous level of tuner when switching to tuner or to previous level of traffic alarm when an alarms comes in (even if you are already in radio mode)

Could such a feature be part of hijack ?

Juergen
Posted by: genixia

Re: Setting initial volume - 25/02/2003 07:48

Except for the TA part, this is already implemented in hijack.

Check out the volboost_ settings in the FAQ

Posted by: fossi

Re: Setting initial volume - 25/02/2003 09:34

O.K., but I don not mean a pre-defined volume-level, which is stored in the config-file. The idea is to store the volume level, which is actually set during operation.

So if you adjust the volume during a traffic alert the same volume level will be used next time during a TA.

Juergen
Posted by: mlord

Re: Setting initial volume - 25/02/2003 09:48

The only truly feasible method for doing this in Hijack would be for Hijack to completely take over the volume controls. Completely -- not even passing the volume buttons (remote) or knob volume changes through to the player software.

It could then accurately track and maintain separate volume settings for each mixer input (AM/FM/MP3/AUX), and switch between them whenever it notices the player software selecting a different mixer input.

But where to store these?

The player software uses 7-bits each for AC/DC "master volume" memory. For Hijack to also provide AC/DC, it would need as much as four times that amount, or 56 bits in total. It can re-use the existing 7+7 bits, so we'd just need to "appropriate" an additional 42 bits (5+ bytes) of the flash savearea.

There's not much space left there to grab, and this would be a HUGE use of it, displacing other potential uses/features.

Is it worth it?
Posted by: genixia

Re: Setting initial volume - 25/02/2003 10:31

I still can't see any benefits for fossi's idea - the volboost_ parameters are relative to the current volume which makes sense to me from the user perspective. The whole motivation for the volboost_ code is to eliminate users' needs to adjust the volume when switching between MP3,FM,AM and Aux modes, and storing absolute values for each would simpy reintroduce that in many cases. People listen to their empegs at different volumes depending upon differing circumstances - time of day, speed, mood, number of passengers etc, and absolute volumes would soon become a maintenance chore.

Yeah, it would be nice to have the volboost_ parameters in flash rather than in config.ini. But that goes for a lot of other parameters too. I don't think that tweaking the volboost_ parameters should be too difficult or time consuming, although being tunerless myself, I'll defer to someone that has actually done it to confirm or deny that statement. Once it has been done well, it's not something that is likely to change often. In principle, knowing that each volboost_ step is 0.5dB for most of the usable volume range of the empeg means that you could sit in your car for five minutes, note down the adjustments that you make to the volume for each mode, and use those figures as a start point.

I'm not sure whether hijack has any obvious visibility into TA mode switches anyway. But if it does then I'd suggest that a volboost_ parameter could be added for TA mode. (And also for WB mode when the player supports it)

And I can't see any other reason to hijack the volume control completely away from the player either.
Posted by: tfabris

Re: Setting initial volume - 25/02/2003 11:57

People listen to their empegs at different volumes depending upon differing circumstances - time of day, speed, mood, number of passengers etc, and absolute volumes would soon become a maintenance chore.
Not to mention, a source of heart attacks.
Posted by: fossi

Re: Setting initial volume - 25/02/2003 12:58

O.K. if memory is rare there should not be a waste of resources and for switching between MP3/AM/AUX/... predefined values are also useable.

But for the traffic alert part it would be very helpful to have a adjustable volume level, not a prestored adjustment. With this feature you could e.g. lower volume when driving with guests but still hear traffic alerts. A prestored absolut value could also be feasible but with one disadvantage: when driving in town volume level for TA will be equal as when driving on an Autobahn.

Juergen
Posted by: tms13

Re: Setting initial volume - 25/02/2003 14:46

VolBoost works very well for me (thanks, Genixia).

It took me a long time to set up, though - a day or so for each adjustment (assuming I remember to edit config.ini every time I came to work). Even if I did it as fast as possible, it's still a 5-minute round-trip to the car; add on the time to get in and boot up, and it's still quite slow.

One thing that would help would be to be able to adjust and see the volboost settings interactively, even though they won't be saved on power-down (so you can later type the right numbers into config.ini). And maybe a lock-down setting in the config file (default locked) to remove the menu item; then you'd have to understand its transience when you enable it...

It's too late to be of use to me, of course (unless I get something to plug into Aux), but I thought I'd suggest it.