Initial commit - project started Aug 2020 (!)

This commit is contained in:
Tony Garnock-Jones 2022-03-09 16:37:19 +01:00
commit a0cdf56b1b
78 changed files with 97667 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
github-cache/
package-cache/
SqueakDebug.log
squeak-output.log
fonts/from-github/Roboto*ttf

45
DevSupport.st Normal file
View File

@ -0,0 +1,45 @@
AbstractLauncher subclass: #LinuxIODevStartup
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'DevSupport-LinuxIO'!
!LinuxIODevStartup methods!
startUp
| i |
FileDirectory setDefaultDirectory: (UnixProcess env at: 'HOME'), '/src/squeak-phone'.
Utilities authorInitials: (UnixProcess env at: 'USER').
NetNameResolver localHostName caseOf: {
['zip'] -> [
PhoneWorldMorph uninstall.
DisplayScreen fullScreenOn.
].
} otherwise: [].
i := Installer mc directory: (UnixProcess env at: 'HOME'), '/Archives/Monticello'.
self update: 'SyndicatedActors' from: i.
self update: 'LinuxIO' from: i.
self update: 'SqueakPhone' from: i.
"If we run the following either here directly, or in the UI
process, it appears to lock up the image at 100% CPU usage."
[RFBServer allowEmptyPasswords: true; stop; start] forkAt: Processor lowestPriority + 1.
!
update: packageName from: anInstaller
| wc |
wc := MCWorkingCopy allManagers detect: [:m | m package name = packageName] ifNone: [nil].
(wc isNil or: [wc modified not]) ifTrue: [anInstaller install: packageName]
!
!
LinuxIODevStartup activate!
Utilities commonRequestStrings: 'DisplayDevice fixDPI "Autodetect"
DisplayDevice fixDPI: 500 "Cellphoneish"
DisplayDevice fixDPI: 256 "Comfortable on my 27-inch monitor"
DisplayDevice fixDPI: 163 "Nominal for a 4k 27-inch monitor"
-
', Utilities commonRequestStrings contents!
SyndicateSnippets stdio1!

30
Makefile Normal file
View File

@ -0,0 +1,30 @@
.PHONY: build-images untag untag-all veryclean dev sudo-dev
SQUEAKERFLAGS=
BUILDFLAGS=
build-images:
squeaker $(SQUEAKERFLAGS) build $(BUILDFLAGS) -t squeak-phone-base -f Squeakerfile.phone-base.st .
squeaker $(SQUEAKERFLAGS) build $(BUILDFLAGS) -t squeak-phone -f Squeakerfile.phone.st .
squeaker $(SQUEAKERFLAGS) build $(BUILDFLAGS) -t squeak-phone-dev -f Squeakerfile.phone-dev.st .
untag:
squeaker untag squeak-phone squeak-phone-dev
untag-all: untag
squeaker untag squeak-phone-base
clean: untag
squeaker gc
veryclean: untag-all
squeaker gc
dev: build-images
squeaker run squeak-phone-dev
sudo-dev: build-images
squeaker run --root squeak-phone-dev
images/%: build-images
squeaker create squeak-phone "$@"

1
MorphicForCellphone.1.cs Normal file
View File

@ -0,0 +1 @@
'From Squeak6.0alpha of 8 October 2020 [latest update: #19909] on 29 November 2021 at 12:41:42 pm'! !AbstractResizerMorph class methodsFor: 'preferences' stamp: 'tonyg 10/6/2020 00:49'! gripThickness "A number in pixels that encodes the area were the user can target splitters or edge grips." <preference: 'Grip Thickness' category: 'windows' description: 'A number in pixels that encodes the area were the user can target splitters or edge grips such as in application windows. Bigger grips make it easier to click on them.' type: #Number> ^ GripThickness ifNil: [(UserInterfaceTheme current get: #gripThickness) ifNil: [4]]! ! !AbstractResizerMorph class methodsFor: 'preferences' stamp: 'tonyg 10/6/2020 01:03'! handleLength <preference: 'Handle Length' category: 'windows' description: 'AThe size of a grip handle if shown. Can be interpreted as width or height, depending of the resizer orientation. Does not affect the clickable area. See grip thickness for that.' type: #Number> ^ HandleLength ifNil: [(UserInterfaceTheme current get: #handleLength) ifNil: [25]]! ! !ScrollPane class methodsFor: 'defaults' stamp: 'tonyg 10/6/2020 11:21'! scrollBarThickness ^ Preferences scrollBarsNarrow ifTrue: [(UserInterfaceTheme current get: #scrollBarThicknessNarrow) ifNil: [10]] ifFalse: [(UserInterfaceTheme current get: #scrollBarThickness) ifNil: [14]]! !

67
README.md Normal file
View File

@ -0,0 +1,67 @@
# How to use pmbootstrap
Switching devices:
pmbootstrap config device <new_device>
e.g.
pmbootstrap config device pine64-pinephone
pmbootstrap config device samsung-herolte
pmbootstrap config device qemu-amd64
Building for Samsung Galaxy S7 (samsung-herolte):
pmbootstrap install --android-recovery-zip
Building for Pinephone (pine64-pinephone):
pmbootstrap install --sdcard BLOCKDEV
Building for qemu-amd64:
pmbootstrap install
pmbootstrap qemu
# How to install on Samsung Galaxy S7
(See https://wiki.postmarketos.org/wiki/Installation_from_recovery_mode )
Reboot holding power + home + volup to enter the recovery. Choose
Advanced, ADB sideload.
Then run
pmbootstrap flasher --method adb sideload
# How to use RNDIS to connect via ssh over USB
(See https://wiki.postmarketos.org/wiki/USB_Network )
For pinephone, which *does* get a MAC address for the RNDIS device:
sudo ip a del 10.42.0.1/32 dev usb0
sudo ip a add 172.16.42.2/32 dev usb0
sudo ip r add 172.16.0.0/16 dev usb0
SSH_AUTH_SOCK= ssh user@172.16.42.1
... or, huh, just use DHCP to get an address from the phone! It turns
out to work.
The equivalent for samsung-herolte is similar but requires inventing a
MAC address and assigning it at the link layer:
sudo ip link set dev eth0 address 12:12:12:12:12:12
sudo ip a add 172.16.42.2/32 dev eth0
sudo ip r add 172.16.0.0/16 dev eth0
SSH_AUTH_SOCK= ssh user@172.16.42.1
# How to set up WiFi on a running instance
(See https://wiki.postmarketos.org/wiki/WiFi)
When you pick "none" UI, you get no nmcli *or* wpa_supplicant.
Pick "console". Then you get both.
sudo nmcli device wifi connect <SSID> password <PASSWORD> ifname wlan0

View File

@ -0,0 +1 @@
from: 'http://files.squeak.org/6.0alpha/Squeak6.0alpha-21379-64bit/Squeak6.0alpha-21379-64bit.zip'! World submorphs select: [:m | (m isKindOf: PreferenceWizardMorph) or: [m isSystemWindow and: [m label beginsWith: 'Welcome to Squeak']]] thenDo: [:m | m delete]. ! "Preferences." CommunityTheme createDark apply. Model useColorfulWindows: true. [Preferences setDemoFonts] valueSupplyingAnswer: true. Cursor useBiggerCursors: true. Preferences enable: #mouseOverForKeyboardFocus. Preferences disable: #balloonHelpEnabled. Preferences disable: #alternativeBrowseIt. TextEditor autoEnclose: false. Model windowActiveOnFirstClick: true. ! MCMcmUpdater default doUpdate: false! Metacello new configuration: 'FFI'; load! Installer ss project: 'OSProcess'; install: 'OSProcess'! Installer ss project: 'CommandShell'; install: 'CommandShell'! Installer ss project: 'JSON'; install: 'JSON'! Installer ss project: 'Snarl'; install: 'Snarl'. Project current instVarNamed: #uiManager put: nil. !

View File

@ -0,0 +1 @@
from: #'squeak-phone'! fileIn: 'DevSupport.st'!

1
Squeakerfile.phone.st Normal file
View File

@ -0,0 +1 @@
from: #'squeak-phone-base'! MCMcmUpdater default doUpdate: false! resource: 'fonts/from-github/Roboto-Regular.ttf' ! | description | description := TTFontDescription addFromTTFile: 'fonts/from-github/Roboto-Regular.ttf'. TTCFont newTextStyleFromTT: description first. TTCFont registerAll. "TTCFont installFromFileNames: #('fonts/from-github/Roboto-Regular.ttf')." TTCFont glyphCacheSize: 8000. ! Installer ss project: 'BitSyntax'; install: 'BitSyntax-Core'! (Installer squeak project: 'ss') install: 'RFB'! Installer ss project: 'Preserves'; install: 'Preserves'! Installer ss project: 'TouchScrolling'; install: 'TouchScrolling'! Installer ss project: 'TiledMaps'; install: 'TiledMaps'! (Installer mc directory: '/home/tonyg/Archives/Monticello') install: 'BTree-Collections'; install: 'SyndicatedActors'! (Installer mc directory: '/home/tonyg/Archives/Monticello') install: 'LinuxIO'! (Installer mc directory: '/home/tonyg/Archives/Monticello') install: 'SqueakPhone'! CellphoneTheme createDark apply! PhoneWorldMorph install. LinuxInputIndex instance. LinuxInputDaemon instance. MachineConfiguration instance. WidgetDaemon instance. CallManager instance. AppRegistryDaemon instance. BacklightControlDaemon instance. ! resource: 'fonts/Font-Awesome/metadata/icons.json'! FontAwesome load: 'fonts/Font-Awesome'!

46
backup-pm-home.sh Executable file
View File

@ -0,0 +1,46 @@
#!/bin/sh
# 2021-11-10
# revised 2022-01-06 for multiple devices
set -e
set -u
eval "$(ssh pm-rndis cat /etc/deviceinfo)"
if [ -z "${deviceinfo_codename}" ]
then
echo Cannot device which device is connected!
exit 1
fi
echo Connected device: $deviceinfo_codename
rsnapshot_conf=/tmp/rsnapshot.backups-pm-${deviceinfo_codename}.conf
cat > $rsnapshot_conf <<EOF
config_version 1.2
snapshot_root /home/tonyg/src/squeak-phone/devices/${deviceinfo_codename}/backups/home-user
no_create_root 0
cmd_cp /usr/bin/cp
cmd_rm /usr/bin/rm
cmd_rsync /usr/bin/rsync
cmd_ssh /usr/bin/ssh
cmd_logger /usr/bin/logger
logfile /tmp/rsnapshot.backups-pm-${deviceinfo_codename}.log
lockfile /tmp/rsnapshot.backups-pm-${deviceinfo_codename}.pid
retain adhoc 10000
verbose 2
one_fs 1
sync_first 1
backup user@pm-rndis:/home/user ./
EOF
rsnapshot -c ${rsnapshot_conf} sync
rsnapshot -c ${rsnapshot_conf} adhoc

1
devices/pine64-pinephone/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
backups/

View File

@ -0,0 +1,104 @@
## Anatomy of an incoming call
Regular call strength indicators, but immediately prior to
registration changing (just before the call -- did it move me to a new
cell for the call because it was a better fit for the traffic that was
about to start?):
09:42:34.644010+01:00 [HayesModem]: +QIND: "csq",99,99
Interestingly the first 99 there means "not known or not detectable",
maybe because we're changing cell and it doesn't know what the signal
strength will be like there yet.
Here we change cell:
09:42:34.644037+01:00 [HayesModem]: +CREG: 1,"1950","0ADC20C",2
09:42:34.644046+01:00 [HayesModem]: +CGREG: 1,"1950","0ADC20C",2
Oh! A call! The CLIP's final 0 tells us the CLI is "valid". The DSCI
tells us call #2 is MT (1), incoming (4), voice (0), from my main
phone, which is in international format (145):
09:42:34.889393+01:00 [HayesModem]: +CRING: VOICE
09:42:34.889410+01:00 [HayesModem]: +CLIP: "+31612345678",145,,,,0
09:42:34.889418+01:00 [HayesModem]: ^DSCI: 2,1,4,0,+31612345678,145
We learn the signal strength at the new cell:
09:42:38.160627+01:00 [HayesModem]: +QIND: "csq",12,99
We get a time signal from the network:
09:42:40.069934+01:00 [HayesModem]: +CTZE: "+04",0,"2021/12/16,08:42:39"
Another ring:
09:42:40.893283+01:00 [HayesModem]: +CRING: VOICE
09:42:40.893309+01:00 [HayesModem]: +CLIP: "+31612345678",145,,,,0
Another:
09:42:47.003871+01:00 [HayesModem]: +CRING: VOICE
09:42:47.003906+01:00 [HayesModem]: +CLIP: "+31612345678",145,,,,0
I hung up on the other end. DSCI says call #2, MT, state CALL_END (6), voice (0).
09:42:47.354649+01:00 [HayesModem]: ^DSCI: 2,1,6,0,+31612345678,145
09:42:47.365856+01:00 [HayesModem]: NO CARRIER
09:42:49.361249+01:00 [HayesModem]: +QIND: "csq",20,99
Back (?) to the old cell (?):
09:42:49.368473+01:00 [HayesModem]: +CREG: 1,"FD21","12B1B20",7
09:42:49.368493+01:00 [HayesModem]: +CGREG: 1,"FD21","12B1B20",7
And back to regular signal strength indicators:
09:42:50.151209+01:00 [HayesModem]: +QIND: "csq",14,99
09:42:52.186241+01:00 [HayesModem]: +QIND: "csq",19,99
09:43:01.303893+01:00 [HayesModem]: +QIND: "csq",16,99
09:43:03.586971+01:00 [HayesModem]: +QIND: "csq",20,99
# Audio
Here's the audio config from the factory:
+QDAI: 1,1,0,1,0,0,1,1
I'm trying the following on advice from https://xnux.eu/devices/feature/modem-pp.html:
AT+QDAI=1,0,0,2,0,1,1,1
Oh, that sucks. Horribly noisy output. Going back to the defaults
produces somewhat workable audio:
AT+QDAI=1,1,0,1,0,0,1,1
Some experiments:
AT+QDAI=1,1,0,1,0,0,1,1
ok, has a click (default)
AT+QDAI=1,0,0,1,0,0,1,1
noisy, horrible
AT+QDAI=1,1,0,2,0,1,1,1
semi-noisy, underwater mic sound on remote end
AT+QDAI=1,1,0,1,0,1,1,1
ok, has a click
AT+QDAI=1,1,0,2,0,0,1,1
semi-noisy, underwater mic sound on remote end
# Network
https://techship.com/faq/how-to-step-by-step-set-up-a-data-connection-over-qmi-interface-using-qmicli-and-in-kernel-driver-qmi-wwan-in-linux/
ifconfig wwan0 down
echo Y | tee /sys/class/net/wwan0/qmi/raw_ip
ifconfig wwan0 up
qmicli --device=/dev/cdc-wdm0 --device-open-proxy --wds-start-network=ip-type=4 --client-no-release-cid
udhcpc -v -q -f -n -i wwan0

View File

@ -0,0 +1,672 @@
state.PinePhone {
control.1 {
iface CARD
name 'Headphone Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.2 {
iface CARD
name 'Headset Microphone Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.3 {
iface MIXER
name 'AIF1 AD0 Capture Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.4 {
iface MIXER
name 'AIF1 DA0 Playback Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.5 {
iface MIXER
name 'AIF2 ADC Capture Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.6 {
iface MIXER
name 'AIF2 DAC Playback Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.7 {
iface MIXER
name 'ADC Capture Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.8 {
iface MIXER
name 'DAC Playback Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.9 {
iface MIXER
name 'Headphone Playback Volume'
value 11
comment {
access 'read write'
type INTEGER
count 1
range '0 - 63'
dbmin -9999999
dbmax 0
dbvalue.0 -5200
}
}
control.10 {
iface MIXER
name 'Mic1 Playback Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.11 {
iface MIXER
name 'Mic1 Boost Volume'
value 1
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin 0
dbmax 4200
dbvalue.0 2400
}
}
control.12 {
iface MIXER
name 'Mic2 Playback Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.13 {
iface MIXER
name 'Mic2 Boost Volume'
value 1
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin 0
dbmax 4200
dbvalue.0 2400
}
}
control.14 {
iface MIXER
name 'ADC Gain Capture Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.15 {
iface MIXER
name 'Line In Playback Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.16 {
iface MIXER
name 'Line Out Playback Volume'
value 15
comment {
access 'read write'
type INTEGER
count 1
range '0 - 31'
dbmin -9999999
dbmax 0
dbvalue.0 -2400
}
}
control.17 {
iface MIXER
name 'Earpiece Playback Volume'
value 28
comment {
access 'read write'
type INTEGER
count 1
range '0 - 31'
dbmin -9999999
dbmax 0
dbvalue.0 -450
}
}
control.18 {
iface MIXER
name 'AIF1 AD0 Stereo Capture Route'
value.0 Stereo
value.1 Stereo
comment {
access 'read write'
type ENUMERATED
count 2
item.0 Stereo
item.1 'Reverse Stereo'
item.2 'Sum Mono'
item.3 'Mix Mono'
}
}
control.19 {
iface MIXER
name 'AIF2 ADC Stereo Capture Route'
value.0 'Mix Mono'
value.1 'Mix Mono'
comment {
access 'read write'
type ENUMERATED
count 2
item.0 Stereo
item.1 'Reverse Stereo'
item.2 'Sum Mono'
item.3 'Mix Mono'
}
}
control.20 {
iface MIXER
name 'AIF3 ADC Source Capture Route'
value None
comment {
access 'read write'
type ENUMERATED
count 1
item.0 None
item.1 'AIF2 ADCL'
item.2 'AIF2 ADCR'
}
}
control.21 {
iface MIXER
name 'AIF1 Slot 0 Digital ADC Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.22 {
iface MIXER
name 'AIF2 Digital ADC Capture Switch'
value.0 false
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.23 {
iface MIXER
name 'AIF1 Data Digital ADC Capture Switch'
value.0 true
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.24 {
iface MIXER
name 'AIF2 Inv Digital ADC Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.25 {
iface MIXER
name 'AIF2 ADC Mixer AIF1 DA0 Capture Switch'
value.0 false
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.26 {
iface MIXER
name 'AIF2 ADC Mixer AIF2 DAC Rev Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.27 {
iface MIXER
name 'AIF2 ADC Mixer ADC Capture Switch'
value.0 true
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.28 {
iface MIXER
name 'AIF2 DAC Source Playback Route'
value AIF2
comment {
access 'read write'
type ENUMERATED
count 1
item.0 AIF2
item.1 AIF3+2
item.2 AIF2+3
}
}
control.29 {
iface MIXER
name 'AIF1 DA0 Stereo Playback Route'
value.0 Stereo
value.1 Stereo
comment {
access 'read write'
type ENUMERATED
count 2
item.0 Stereo
item.1 'Reverse Stereo'
item.2 'Sum Mono'
item.3 'Mix Mono'
}
}
control.30 {
iface MIXER
name 'AIF2 DAC Stereo Playback Route'
value.0 'Sum Mono'
value.1 'Sum Mono'
comment {
access 'read write'
type ENUMERATED
count 2
item.0 Stereo
item.1 'Reverse Stereo'
item.2 'Sum Mono'
item.3 'Mix Mono'
}
}
control.31 {
iface MIXER
name 'AIF1 Slot 0 Digital DAC Playback Switch'
value.0 true
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.32 {
iface MIXER
name 'AIF2 Digital DAC Playback Switch'
value.0 false
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.33 {
iface MIXER
name 'ADC Digital DAC Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.34 {
iface MIXER
name 'Headphone Source Playback Route'
value.0 Mixer
value.1 Mixer
comment {
access 'read write'
type ENUMERATED
count 2
item.0 DAC
item.1 Mixer
}
}
control.35 {
iface MIXER
name 'Headphone Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.36 {
iface MIXER
name 'Line Out Source Playback Route'
value.0 'Mono Differential'
value.1 'Mono Differential'
comment {
access 'read write'
type ENUMERATED
count 2
item.0 Stereo
item.1 'Mono Differential'
}
}
control.37 {
iface MIXER
name 'Line Out Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.38 {
iface MIXER
name 'Earpiece Source Playback Route'
value 'Left Mixer'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 DACR
item.1 DACL
item.2 'Right Mixer'
item.3 'Left Mixer'
}
}
control.39 {
iface MIXER
name 'Earpiece Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.40 {
iface MIXER
name 'Mic1 Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.41 {
iface MIXER
name 'Mic2 Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.42 {
iface MIXER
name 'Line In Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.43 {
iface MIXER
name 'DAC Playback Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.44 {
iface MIXER
name 'DAC Reversed Playback Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.45 {
iface MIXER
name 'Mic1 Capture Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.46 {
iface MIXER
name 'Mic2 Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.47 {
iface MIXER
name 'Line In Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.48 {
iface MIXER
name 'Mixer Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.49 {
iface MIXER
name 'Mixer Reversed Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
}
state.sun9ihdmi {
control.1 {
iface PCM
name 'Playback Channel Map'
value.0 0
value.1 0
value.2 0
value.3 0
value.4 0
value.5 0
value.6 0
value.7 0
comment {
access read
type INTEGER
count 8
range '0 - 36'
}
}
control.2 {
iface PCM
name 'IEC958 Playback Mask'
value ffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
comment {
access read
type IEC958
count 1
}
}
control.3 {
iface PCM
name 'IEC958 Playback Default'
value '0400000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access 'read write'
type IEC958
count 1
}
}
control.4 {
iface PCM
name ELD
value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access 'read volatile'
type BYTES
count 128
}
}
}

View File

@ -0,0 +1,672 @@
state.PinePhone {
control.1 {
iface CARD
name 'Headphone Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.2 {
iface CARD
name 'Headset Microphone Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.3 {
iface MIXER
name 'AIF1 AD0 Capture Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.4 {
iface MIXER
name 'AIF1 DA0 Playback Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.5 {
iface MIXER
name 'AIF2 ADC Capture Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.6 {
iface MIXER
name 'AIF2 DAC Playback Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.7 {
iface MIXER
name 'ADC Capture Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.8 {
iface MIXER
name 'DAC Playback Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.9 {
iface MIXER
name 'Headphone Playback Volume'
value 15
comment {
access 'read write'
type INTEGER
count 1
range '0 - 63'
dbmin -9999999
dbmax 0
dbvalue.0 -4800
}
}
control.10 {
iface MIXER
name 'Mic1 Playback Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.11 {
iface MIXER
name 'Mic1 Boost Volume'
value 1
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin 0
dbmax 4200
dbvalue.0 2400
}
}
control.12 {
iface MIXER
name 'Mic2 Playback Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.13 {
iface MIXER
name 'Mic2 Boost Volume'
value 1
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin 0
dbmax 4200
dbvalue.0 2400
}
}
control.14 {
iface MIXER
name 'ADC Gain Capture Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.15 {
iface MIXER
name 'Line In Playback Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.16 {
iface MIXER
name 'Line Out Playback Volume'
value 15
comment {
access 'read write'
type INTEGER
count 1
range '0 - 31'
dbmin -9999999
dbmax 0
dbvalue.0 -2400
}
}
control.17 {
iface MIXER
name 'Earpiece Playback Volume'
value 31
comment {
access 'read write'
type INTEGER
count 1
range '0 - 31'
dbmin -9999999
dbmax 0
dbvalue.0 0
}
}
control.18 {
iface MIXER
name 'AIF1 AD0 Stereo Capture Route'
value.0 Stereo
value.1 Stereo
comment {
access 'read write'
type ENUMERATED
count 2
item.0 Stereo
item.1 'Reverse Stereo'
item.2 'Sum Mono'
item.3 'Mix Mono'
}
}
control.19 {
iface MIXER
name 'AIF2 ADC Stereo Capture Route'
value.0 'Mix Mono'
value.1 'Mix Mono'
comment {
access 'read write'
type ENUMERATED
count 2
item.0 Stereo
item.1 'Reverse Stereo'
item.2 'Sum Mono'
item.3 'Mix Mono'
}
}
control.20 {
iface MIXER
name 'AIF3 ADC Source Capture Route'
value None
comment {
access 'read write'
type ENUMERATED
count 1
item.0 None
item.1 'AIF2 ADCL'
item.2 'AIF2 ADCR'
}
}
control.21 {
iface MIXER
name 'AIF1 Slot 0 Digital ADC Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.22 {
iface MIXER
name 'AIF2 Digital ADC Capture Switch'
value.0 false
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.23 {
iface MIXER
name 'AIF1 Data Digital ADC Capture Switch'
value.0 true
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.24 {
iface MIXER
name 'AIF2 Inv Digital ADC Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.25 {
iface MIXER
name 'AIF2 ADC Mixer AIF1 DA0 Capture Switch'
value.0 false
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.26 {
iface MIXER
name 'AIF2 ADC Mixer AIF2 DAC Rev Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.27 {
iface MIXER
name 'AIF2 ADC Mixer ADC Capture Switch'
value.0 true
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.28 {
iface MIXER
name 'AIF2 DAC Source Playback Route'
value AIF2
comment {
access 'read write'
type ENUMERATED
count 1
item.0 AIF2
item.1 AIF3+2
item.2 AIF2+3
}
}
control.29 {
iface MIXER
name 'AIF1 DA0 Stereo Playback Route'
value.0 Stereo
value.1 Stereo
comment {
access 'read write'
type ENUMERATED
count 2
item.0 Stereo
item.1 'Reverse Stereo'
item.2 'Sum Mono'
item.3 'Mix Mono'
}
}
control.30 {
iface MIXER
name 'AIF2 DAC Stereo Playback Route'
value.0 'Sum Mono'
value.1 'Sum Mono'
comment {
access 'read write'
type ENUMERATED
count 2
item.0 Stereo
item.1 'Reverse Stereo'
item.2 'Sum Mono'
item.3 'Mix Mono'
}
}
control.31 {
iface MIXER
name 'AIF1 Slot 0 Digital DAC Playback Switch'
value.0 true
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.32 {
iface MIXER
name 'AIF2 Digital DAC Playback Switch'
value.0 false
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.33 {
iface MIXER
name 'ADC Digital DAC Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.34 {
iface MIXER
name 'Headphone Source Playback Route'
value.0 Mixer
value.1 Mixer
comment {
access 'read write'
type ENUMERATED
count 2
item.0 DAC
item.1 Mixer
}
}
control.35 {
iface MIXER
name 'Headphone Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.36 {
iface MIXER
name 'Line Out Source Playback Route'
value.0 'Mono Differential'
value.1 'Mono Differential'
comment {
access 'read write'
type ENUMERATED
count 2
item.0 Stereo
item.1 'Mono Differential'
}
}
control.37 {
iface MIXER
name 'Line Out Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.38 {
iface MIXER
name 'Earpiece Source Playback Route'
value 'Left Mixer'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 DACR
item.1 DACL
item.2 'Right Mixer'
item.3 'Left Mixer'
}
}
control.39 {
iface MIXER
name 'Earpiece Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.40 {
iface MIXER
name 'Mic1 Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.41 {
iface MIXER
name 'Mic2 Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.42 {
iface MIXER
name 'Line In Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.43 {
iface MIXER
name 'DAC Playback Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.44 {
iface MIXER
name 'DAC Reversed Playback Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.45 {
iface MIXER
name 'Mic1 Capture Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.46 {
iface MIXER
name 'Mic2 Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.47 {
iface MIXER
name 'Line In Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.48 {
iface MIXER
name 'Mixer Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.49 {
iface MIXER
name 'Mixer Reversed Capture Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
}
state.sun9ihdmi {
control.1 {
iface PCM
name 'Playback Channel Map'
value.0 0
value.1 0
value.2 0
value.3 0
value.4 0
value.5 0
value.6 0
value.7 0
comment {
access read
type INTEGER
count 8
range '0 - 36'
}
}
control.2 {
iface PCM
name 'IEC958 Playback Mask'
value ffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
comment {
access read
type IEC958
count 1
}
}
control.3 {
iface PCM
name 'IEC958 Playback Default'
value '0400000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access 'read write'
type IEC958
count 1
}
}
control.4 {
iface PCM
name ELD
value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access 'read volatile'
type BYTES
count 128
}
}
}

View File

@ -0,0 +1,672 @@
state.PinePhone {
control.1 {
iface CARD
name 'Headphone Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.2 {
iface CARD
name 'Headset Microphone Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.3 {
iface MIXER
name 'AIF1 AD0 Capture Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.4 {
iface MIXER
name 'AIF1 DA0 Playback Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.5 {
iface MIXER
name 'AIF2 ADC Capture Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.6 {
iface MIXER
name 'AIF2 DAC Playback Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.7 {
iface MIXER
name 'ADC Capture Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.8 {
iface MIXER
name 'DAC Playback Volume'
value.0 160
value.1 160
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9999999
dbmax 2400
dbvalue.0 0
dbvalue.1 0
}
}
control.9 {
iface MIXER
name 'Headphone Playback Volume'
value 15
comment {
access 'read write'
type INTEGER
count 1
range '0 - 63'
dbmin -9999999
dbmax 0
dbvalue.0 -4800
}
}
control.10 {
iface MIXER
name 'Mic1 Playback Volume'
value 0
comment {
access 'read write'
type INTEGER