Volume resets to lowest setting on boot


#1

Hi everyone,

I have everything up and running 100% on my new Picade, but the only issue is… the volume defaults to its lowest setting (basically "zero) every time I reboot. A minor annoyance, but I thought I’d check whether there is a simple solution?

I’ve updated to the latest firmware, so that shouldn’t be the problem. Running Retropie on a Raspberry pi 3.

Thanks,

Jim


#2

Hi

From memory the latest firmware still doesn’t save the volume as set by the buttons. I used the picade python library to send the + command followed by s to save it when I was happy with the volume level. This then stored the volume and it doesn’t reset to zero on reboot.

It would be nice if the firmware would save the changes when the volume is changed using the buttons but for now the above works for me.

Cheers

Paul


#3

I’ve painted myself into something of a corner here. When I changed the firmware to support configurable bindings, the volume became part of the configuration structure rather than its own separate little nook in EEPROM. While the volume could easily be saved, it’ll take the rest of the config structure with it, which is no good if you’re mid configuration, have changes you don’t want to save, or myriad other reasons.

I’m looking into selectively saving just the volume byte.


#4

And, without further ado, here’s my proposed fix: https://github.com/pimoroni/Picade-Sketch/commit/7f048fbc34a4cb71efc6d43c76a4f924f1fb70e2

If anyone’s prepared to build and flash this firmware from the GitHub Master I’d appreciate some feedback.

I’m hoping to push v2.3 soon with the volume fix and dual analog joystick support.


#5

Hi

I’ve compiled it and will hopefully be able to try it this evening.

Cheers

Paul


#6

Hi

New firmware installed and the volume is now saved when altered using the volume buttons. :-)

However the headphone still doesn’t work correctly as in the speakers are not muted when the headphones are plugged in.

Cheers

Paul


#7

Thanks to you both for your quick replies!

I’m somewhat of a pi newbie. I was able to figure out the instructions for installing the standard firmware update that is available, but how would I go about installing this flashing the firmware with this new build? Could one of you walk me through the steps (assuming its not too much trouble… if its a difficult process, I’ll merely wait for the official version of v2.3).

Thanks again! I really appreciate it.

Jim


#8

Hi

You need to download the Ardiuno IDE in order to compile it which I did on my PC.

If you send my your email address I can send you the compiled hex file so you can install it the same way you did the standard firmware.

Cheers

Paul


#9

Also a complete newb question, what is the process for updating the firmware? Is there no way of installing the firmware updates from any of the menus?


#10

Hi

Unfortunately not, however it isn’t difficult. You need to download the zip file from GitHub, unzip it on the Pi.

This will create the directories you need. Go to the update directory and run ./update filename where filename is the hex file you wish to load.

Cheers

Paul


#11

I’ve updated the Beta 2.3 firmware .hex file to the latest build, and also started a README for people not used to the Picade PCB configuration menus: https://github.com/pimoroni/Picade-Sketch/tree/master/Picade

To update your Picade PCB to Beta 2.3, you’d need to grab the zip file from GitHub, navigate into update and run ./update picade_b2.3.hex


#12

So I got up the courage and found the time to update the firmware.

Followed these steps: https://github.com/pimoroni/Picade-Sketch/blob/master/update/README.md

Everything appeared to go as expected and the system rebooted.

Now I have no audio. I checked all the places I would expect volume to be set and everything looks correct.

Any ideas?


#13

Update, it appears that I just ran ./update the first time.

I’ve since ran ./update picade_b2.3.hex and now I have sound and it sticks after reboot… but…

It doesn’t respond to the volume keys on the left side of the Picade.

I’ve confirmed that the keys are mapped to U and D.

So, same question… any ideas?


#14

D’oh! I’ve mapped those keys to ‘u’ and ‘d’ rather than VOL_UP and VOL_DN by default. I really should fix that!


#15

Is it a file I can edit for now rather than having you create a new package?


#16

the firmware in the repo was updated earlier today to fix this. So resync the repo and go through the same procedure again:

./update picade_b2.3.hex

#17

After updating to repository and re-running the 2.3 hex, U&D are still mapped. I deleted the repository and re-cloned it, ran 2.3 again and U&D are still mapped to volume buttons.

I noticed there were two updates in the git log today, both for button fixes.

Am I doing something wrong?


#18

D’oh. No. You’re not :( I bet because the version number has remained the same, the old incorrect config was loaded from your EEPROM rather than restored from the default in the latest binary.

If you’re using a Raspberry Pi, try going into the /Config dir and create a new file like bind-volume.py with the contents:

import picade

picade.bind(picade.BTN_VOL_UP, picade.VOL_UP)
picade.bind(picade.BTN_VOL_DN, picade.VOL_DN)
picade.save()

And run it ./bind-volume.py


#19

Still need help… I’m sorry.

I dropped to the shell, changed to the Picade-Sketch/Config directory.
nano bind-volume.py then typed out:

import picade

picade.bind(picade.BTN_VOL_UP, picade.VOL_UP)
picade.bind(picade.BTN_VOL_DN, picade.VOL_DN)
picade.save()

Executing the script caused a Permission Denied error.

I ran chmod u+x bind-volume.py then re-executed with the following errors.

Line 1: import: command not found
line 3: syntax error near unexpected token 'picade.BTN_VOL_UP,'
line 3: ‘picade.bind(picade.BTN_VOL_UP, picade.VOL_UP)’

Not really sure where to go from here unless I wasn’t supposed to have created this file in the Picade-Sketch/Config folder.


#20

Fixed it.

I ran the update with the original picade.hex then re-ran it with picade_2.3.hex and it overwrote it correctly.