Roland0 wrote: > > Did you note any other differences to the ALSA version? >
I didn't test much more after I noticed the pause issue. Have you had a chance to look at that? I added a spinner animation that covers the screen while pCP is loading, it's removed and replaced by the cover art and cava once they are ready. The video link below shows the boot process and when the animation starts, which is later than I'd like. I'm starting it from /opt/bootsync.sh. There's probably an earlier place to start it - /etc/init.d/ maybe? I need the spriteview tcz loaded so it would need to be after tcz's are loaded and after the user backup is restored because that's where the png is. Still looks kinda cool I think! Screenshot provided for those that don't want to sit through the video, just imagine the spinner spinning. https://www.youtube.com/watch?v=NJ79WwyRqe8 The rest of this post will document some issues and the fixes I implemented, if anyone sees any problems or has a better solution please let me know. Issue: cava bars show as numbers instead of bars when launching straight from the standard local console. Cause: The default console font doesn't have the right characters (glyphs?) for cava to display the bars properly. I was setting a utf-8 locale, loading the ncurses-terminfo.tcz, setting TERM=screen-256color (or something) and tmux to get everything looking good. Cava tries to set the font to a font included with Cava but so far as I can tell it expects the system to have the "setfont" command, which isn't present in pCP out of the box. Solution: Busybox provides "loadfont" so I'm using that prior to launching cava as well as turning off the cursor with the echo command: Code: -------------------- echo -e '\033[?17;0;0c' loadfont < $home/fonts/cava.psf cava -p $home/config/cava.config -------------------- As of now, I've eliminated the extra stuff above (tmux, terminfo etc) and can launch cava straight from the standard vty console. Issue: Cava colors not working. Cause: The TERM environment variable is set to "vt100" by default causing the cava bars to be white regardless of what color is set in the config file. Solution: Set TERM to "xterm". This gives you the 8 standard cava colors which is I think all I can expect to get with the standard console vty. This variable is staying set on reboots and I'm not sure how exactly. I thought it was resetting to vt100 on every boot and I was setting it to xterm either in my startup script or in /home/tc/.profile but I don't see the command anywhere?? So much for good note taking. Code: -------------------- export TERM="xterm" -------------------- Issue: Where's the best place to kick off my scripts and how? Solution: I know have one "run" script which is started on tc login by the /home/tc/.profile script. This should only be run once so use a run marker file and execute if it doesn't exist. Code: -------------------- if [ ! -e /tmp/sod-npd/run ]; then sudo touch /tmp/sod-npd/run sudo openvt -s $HOME/sod-npd/scripts/sod-npd-run.sh fi -------------------- Issue: Job control, backgrounding of scripts, scripts outputing noise to the console, etc. Solution: As you can see above, I'm launching the run script with "openvt" which starts a second vty and switches focus to it with the -s parameter. This vty is where cava runs. The run script starts the "main" script on a third vty, which sets up the telnet listener and does all the image processing and displays the text and artwork. I do not switch focus to this third vty so any output from the script is no visible and the pngview commands that display the images work just fine. Code: -------------------- openvt $home/scripts/sod-npd-main.sh -------------------- So if you have a keyboard connected, you can: "alt+f1" for the default tc login shell on vty1 "alt+f2" for the normal "now playing" screen with cava and artwork "alt+f3" to view any output / errors etc from the "main" script doing most of the grunt work I know there's other ways to manage this but the multiple vtys using the openvt command was kind of a relief from a lot of little annoyances I was having with background tasks stopping and noise on the console even after redirecting output to /dev/null. Issue: I was initially using tmux to confine cava to a smaller area of the screen, at the bottom. After eliminating tmux and going back to the bare console, cava bars would want to consume the full height of the screen. I tried adjusting the bar height in the cava config script but I found that this worked ok at a set volume but adjusting the volume would make either the bars not move at all (lower volume) or exceed the desired confinement area (higher volume). Cause: The height value of the linux framebuffer needs to be adjusted to the desired value. Solution: Uncomment and set the overscan value in config.txt Code: -------------------- # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 overscan_top=600 #overscan_bottom=16 -------------------- Other things I'm changing in config.txt -------------------- gpu_mem=256 hdmi_force_hotplug=1 hdmi_drive=2 framebuffer_depth=32 framebuffer_ignore_alpha=0 -------------------- +-------------------------------------------------------------------+ |Filename: loading_spinner.png | |Download: http://forums.slimdevices.com/attachment.php?attachmentid=26284| +-------------------------------------------------------------------+ ------------------------------------------------------------------------ sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057 View this thread: http://forums.slimdevices.com/showthread.php?t=109694 _______________________________________________ unix mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/unix
