2026-02-11 21:42:50 -03:00
|
|
|
#!/bin/bash
|
|
|
|
|
# Arch R - Current volume level for ES info bar
|
|
|
|
|
# Returns volume percentage string
|
2026-02-12 21:07:37 -03:00
|
|
|
# rk817 BSP codec uses "DAC Playback Volume" (not "Master" or "Playback")
|
2026-02-11 21:42:50 -03:00
|
|
|
|
First successful build — 11 pipeline gaps fixed, repo organized
Build pipeline now produces a working bootable image. Found and fixed
11 gaps between the manually-built working SD and build-all.sh output:
Boot partition:
- extlinux.conf as primary boot method (U-Boot loads first)
- PanCho removed from boot.ini and build-image.sh
- Stale uInitrd removed (caused wrong boot path)
- logo.bmp (U-Boot native BMP) replaces broken splash-1.raw
- fstab uses LABEL=ROMS instead of /dev/mmcblk1p3
- Only R36S DTB copied (no extra r35s/rg351mp-linux)
Root filesystem:
- emulationstation.service created and enabled
- getty@tty1 disabled (ES takes over tty1)
- archr-boot-setup: Before=emulationstation.service, simplified
- All services use After=local-fs.target (not removed getty)
- boot-timing captures ES profiling data
New files added to repo:
- build-mesa.sh, build-retroarch.sh (were untracked)
- Custom DTS, ALSA config, controller autoconfig
- Runtime scripts (retroarch-launch, pmic-poweroff, hotkeys)
- VLC stub source, timezone data
Repo cleanup:
- README.md rewritten with build instructions + architecture
- .gitignore expanded (test scripts, failed approaches, logs)
- splash-show.sh removed (failed splash approach)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:01:13 -03:00
|
|
|
# Try DAC volume (rk817 BSP codec)
|
|
|
|
|
# Raw control is "DAC Playback Volume" (numid=8), ALSA simple mixer name is "DAC"
|
|
|
|
|
vol=$(amixer sget 'DAC' 2>/dev/null | grep -o '\[.*%\]' | head -1 | tr -d '[]')
|
2026-02-11 21:42:50 -03:00
|
|
|
if [ -n "$vol" ]; then
|
|
|
|
|
echo "$vol"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
2026-02-12 21:07:37 -03:00
|
|
|
# Fallback: Master control (other codecs)
|
2026-02-11 21:42:50 -03:00
|
|
|
vol=$(amixer sget Master 2>/dev/null | awk -F'[][]' '/Left:/ { print $2 }')
|
|
|
|
|
if [ -n "$vol" ]; then
|
|
|
|
|
echo "$vol"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "N/A"
|