Add add chatty & calls to dpaw image and some other improvements
authorDaniel Abrecht <public@danielabrecht.ch>
Thu, 6 Feb 2020 21:57:40 +0000 (21:57 +0000)
committerDaniel Abrecht <public@danielabrecht.ch>
Thu, 6 Feb 2020 21:57:40 +0000 (21:57 +0000)
chroot-build-helper/real-makefile
config/default/b-librem5-phone/rootfs/etc/asound.conf
config/default/config
config/default/rootfs/usr/share/alsa/cards/wm8962.conf [new file with mode: 0644]
config/default/rootfs/usr/share/alsa/ucm/wm8962/Audio [new file with mode: 0644]
config/default/rootfs/var/lib/polkit-1/localauthority/50-local.d/org.freedesktop.ModemManager1.pkla [new file with mode: 0644]
config/default/v-dpaw/build
config/default/v-dpaw/install_early
config/default/v-dpaw/post_target_install [new file with mode: 0755]
kernel/configs/l5-custom

index 734382b171a1d0c439057aad98fc6bb1c5ffa71a..c66bcb9677b0b14d652836bac1bf457aeb16fbd4 100644 (file)
@@ -87,6 +87,7 @@ bin/$(DISTRO)/$(RELEASE)/%/.build: build-env/$(DISTRO)/$(RELEASE)/rootfs/root/%/
          apt-get -y autoremove --purge; \
          cd /root/$(notdir $(<:build-env/$(DISTRO)/$(RELEASE)/rootfs/root/%/src/.source=%))/src/; \
          dch -b -v \"\$$(cat .source)\" \"Version suffix automatically added my librem5-image-builder\"; \
+         sed -i 's/libsystemd-dev[^,]*/\0 | libelogind-dev/g' debian/control; \
          apt-get update; \
          apt-get -y build-dep .; \
          if [ \"$(DO_BUILD_SOURCE_PACKAGES)\" = yes ]; \
index ac4aa34bdb2eb4e1c231716691b6763fc0d825a9..93064f5df2f7031baa944a6f3cf76dd991104e91 100644 (file)
@@ -1,9 +1,2 @@
-pcm.!default {
-  type plug
-  slave.pcm "dmix:CARD=wm8962"
-}
-
-ctl.!default {
-  type hw
-  card "wm8962"
-}
+defaults.pcm.!card "wm8962"
+defaults.ctl.!card "wm8962"
index 1c40cf5f4a771262320694a5d6773d49de07b840..5df79f7626e6a25e1ae41368f598609053fb3923 100644 (file)
@@ -29,6 +29,9 @@ PROJECT_GIT_SERVER_URL-purism = https://source.puri.sm/DanielAbrecht
 PROJECT_GIT_SERVER_URL-gitlab = https://gitlab.com/DanielAbrecht
 PROJECT_GIT_SERVER_URL-github = https://github.com/Daniel-Abrecht
 
+# Don't bother with running tests
+DEB_BUILD_OPTIONS=nocheck
+
 repo-branch@fuseloop = master
 repo-source@fuseloop = https://github.com/jmattsson/fuseloop.git
 
@@ -58,3 +61,34 @@ repo-source@first-boot-setup = $(PROJECT_GIT_SERVER_URL)/first-boot-setup.git
 
 repo-branch@dpaw = master
 repo-source@dpaw = $(PROJECT_GIT_SERVER_URL)/dpaw.git
+
+
+# Add some purism software
+
+repo-branch@libhandy = libhandy-0-0
+repo-source@libhandy = https://source.puri.sm/Librem5/libhandy.git
+
+build@calls: build@libhandy
+build@calls: build@modemmanager
+repo-branch@calls = master
+repo-source@calls = https://source.puri.sm/Librem5/calls.git
+
+build@modemmanager: build@libqmi
+repo-branch@modemmanager = pureos/sloppy
+repo-source@modemmanager = https://source.puri.sm/Librem5/ModemManager.git
+
+repo-branch@libqmi = pureos/amber-phone
+repo-source@libqmi = https://source.puri.sm/Librem5/libqmi.git
+
+# wys is a daemon which connects modem audio devices to speaker audio devices.
+# This is a fork of it which uses alsaloop instead of pulseaudio to do so
+repo-branch@wys = alsa
+repo-source@wys = $(PROJECT_GIT_SERVER_URL)/wys.git
+#repo-source@wys = https://source.puri.sm/Librem5/wys.git
+
+build@chatty: build@libhandy
+repo-branch@chatty = master
+repo-source@chatty = https://source.puri.sm/Librem5/chatty.git
+
+repo-branch@purple-mm-sms = master
+repo-source@purple-mm-sms = https://source.puri.sm/Librem5/purple-mm-sms.git
diff --git a/config/default/rootfs/usr/share/alsa/cards/wm8962.conf b/config/default/rootfs/usr/share/alsa/cards/wm8962.conf
new file mode 100644 (file)
index 0000000..3a5b8b0
--- /dev/null
@@ -0,0 +1,106 @@
+#
+# Configuration for wm8962
+#
+
+<confdir:pcm/front.conf>
+<confdir:pcm/side.conf>
+
+wm8962.pcm.front.0 {
+       @args [ CARD ]
+       @args.CARD {
+               type string
+       }
+       type plug
+       slave.pcm {
+               @func concat
+               strings [ "dmix:" $CARD ",RATE=48000" ]
+       }
+       slave.channels 2
+       route_policy copy
+       ttable.0.0 1
+}
+
+# default with dmix & dsnoop
+wm8962.pcm.default {
+       @args [ CARD ]
+       @args.CARD {
+               type string
+       }
+       type asym
+       playback.pcm {
+               type plug
+               slave.pcm {
+                       @func concat
+                       strings [ "dmix:" $CARD ",RATE=48000" ]
+                       rate 48000
+               }
+               slave.channels 2
+       }
+       capture.pcm {
+               type plug
+               slave.pcm {
+                       @func concat
+                       strings [ "dsnoop:" $CARD ",RATE=48000,FORMAT=S32_LE" ]
+               }
+       }
+}
+
+wm8962.pcm.side.0 {
+       @args [ CARD ]
+       @args.CARD {
+               type string
+       }
+       type asym
+       playback.pcm {
+               type plug
+               slave.pcm {
+                       @func concat
+                       strings [ "dmix:" $CARD ",RATE=48000" ]
+                       rate 48000
+               }
+               slave.channels 2
+               route_policy copy
+               ttable.0.0 1
+       }
+       capture.pcm {
+               type plug
+               slave.pcm {
+                       @func concat
+                       strings [ "dsnoop:" $CARD ",RATE=48000,FORMAT=S32_LE" ]
+               }
+               slave.channels 2
+               route_policy dublicate
+               ttable.0.0 1
+               ttable.1.0 1
+       }
+}
+
+wm8962.pcm.side.1 {
+       @args [ CARD ]
+       @args.CARD {
+               type string
+       }
+       type asym
+       playback.pcm {
+               type plug
+               slave.pcm {
+                       @func concat
+                       strings [ "dmix:" $CARD ",RATE=48000" ]
+                       rate 48000
+               }
+               slave.channels 2
+               route_policy copy
+               ttable.0.1 1
+       }
+       capture.pcm {
+               type plug
+               slave.pcm {
+                       @func concat
+                       strings [ "dsnoop:" $CARD ",RATE=48000,FORMAT=S32_LE" ]
+               }
+               slave.channels 2
+               route_policy dublicate
+               ttable.0.1 1
+               ttable.1.1 1
+       }
+}
diff --git a/config/default/rootfs/usr/share/alsa/ucm/wm8962/Audio b/config/default/rootfs/usr/share/alsa/ucm/wm8962/Audio
new file mode 100644 (file)
index 0000000..f6c1eca
--- /dev/null
@@ -0,0 +1,136 @@
+SectionVerb {
+        EnableSequence [
+        ]
+        DisableSequence [
+        ]
+        Value {
+                TQ "Audio"
+        }
+}
+
+SectionDevice."Handset".0 {
+        Comment "Handset"
+
+        ConflictingDevice [
+                "Headset"
+                "SpeakerPhone"
+        ]
+        EnableSequence [
+                cdev "hw:CARD=wm8962"
+                cset "name='Speaker Switch' off,on"
+                cset "name='Headphone Switch' off,off"
+                cset "name='Speaker Volume' 120,120"
+                cset "name='Speaker Boost Volume' 2"
+                cset "name='Digital Playback Volume' 100,100"
+                cset "name='Digital Capture Volume' 100,100"
+                cset "name='DAC L/R Swap Switch' on"
+        ]
+        DisableSequence [
+                cdev "hw:CARD=wm8962"
+                cset "name='Speaker Switch' off,off"
+                cset "name='Digital Capture Volume' 0,0"
+                cset "name='DAC L/R Swap Switch' off"
+        ]
+        Value {
+                PlaybackChannels "2"
+                PlaybackPriority "1000"
+                PlaybackPCM "hw:CARD=wm8962"
+#                PlaybackPCM "sysdefault:wm8962"
+                PlaybackVolume "name='Speaker Volume'"
+                PlaybackSwitch "name='Speaker Switch'"
+                CaptureChannels "2"
+                CapturePriority "1000"
+                CaptureVolume "name='Digital Capture Volume'"
+#                CapturePCM "sysdefault:wm8962"
+#                CapturePCM "side:wm8962,0"
+                CapturePCM "hw:CARD=wm8962"
+#                CapturePCM "wm8962_left_source"
+        }
+}
+
+SectionDevice."SpeakerPhone".0 {
+        Comment "Speaker Phone"
+
+        ConflictingDevice [
+                "Handset"
+                "Headset"
+        ]
+        EnableSequence [
+                cdev "hw:CARD=wm8962"
+                cset "name='Speaker Switch' on,off"
+                cset "name='Headphone Switch' off,off"
+                cset "name='Speaker Volume' 120,120"
+                cset "name='Speaker Boost Volume' 2"
+                cset "name='Digital Playback Volume' 100,100"
+                cset "name='Digital Capture Volume' 100,100"
+                cset "name='DAC L/R Swap Switch' off"
+        ]
+        DisableSequence [
+                cset "name='Speaker Switch' off,off"
+                cset "name='Digital Capture Volume' 0,0"
+        ]
+        Value {
+                PlaybackChannels "2"
+                PlaybackPriority "800"
+                PlaybackPCM "hw:CARD=wm8962"
+#                PlaybackPCM "sysdefault:wm8962"
+                PlaybackVolume "name='Speaker Volume'"
+                PlaybackSwitch "name='Speaker Switch'"
+                CaptureChannels "2"
+                CapturePriority "800"
+                CaptureVolume "name='Digital Capture Volume'"
+#                CapturePCM "sysdefault:wm8962"
+                CapturePCM "hw:CARD=wm8962"
+        }
+}
+
+SectionDevice."Headset".0 {
+        Comment "Headset"
+
+        ConflictingDevice [
+                "Handset"
+                "SpeakerPhone"
+        ]
+        EnableSequence [
+                cdev "hw:CARD=wm8962"
+                cset "name='Speaker Switch' off,off"
+                cset "name='Headphone Switch' on,on"
+                cset "name='Digital Playback Volume' 100,100"
+                cset "name='Digital Capture Volume' 100,100"
+                cset "name='Headphone Volume' 120,120"
+                cset "name='MIXINR IN3R Switch' on"
+                cset "name='MIXINL IN2L Switch' off"
+                cset "name='MIXINR IN2R Switch' off"
+                cset "name='MIXINL IN3L Switch' off"
+                cset "name='MIXINR IN3R Volume' 7"
+                cset "name='INPGAR IN3R Switch' on"
+                cset "name='INPGAR IN1R Switch' off"
+                cset "name='INPGAR IN2R Switch' off"
+                cset "name='INPGAR IN4R Switch' off"
+                cset "name='INPGAL IN1L Switch' off"
+                cset "name='INPGAL IN2L Switch' off"
+                cset "name='INPGAL IN3L Switch' off"
+                cset "name='INPGAL IN4L Switch' off"
+                cset "name='Input Mixer Switch' off,on"
+        ]
+        DisableSequence [
+                cdev "hw:CARD=wm8962"
+                cset "name='Headphone Switch' off off"
+                cset "name='MIXINR IN3R Switch' off"
+                cset "name='MIXINR IN3R Volume' 0"
+        ]
+        Value {
+                PlaybackChannels "2"
+                PlaybackPriority "700"
+                PlaybackPCM "hw:CARD=wm8962"
+                #PlaybackPCM "sysdefault:wm8962"
+                PlaybackVolume "name='Headphone Playback Volume'"
+                PlaybackSwitch "name='Headphone Playback Switch'"
+                CaptureChannels "2"
+                CapturePriority "700"
+                CaptureVolume "name='MIXINR IN3R Volume'"
+#                CapturePCM "side:wm8962,1"
+                CapturePCM "hw:CARD=wm8962"
+#                CapturePCM "sysdefault:wm8962"
+        }
+}
diff --git a/config/default/rootfs/var/lib/polkit-1/localauthority/50-local.d/org.freedesktop.ModemManager1.pkla b/config/default/rootfs/var/lib/polkit-1/localauthority/50-local.d/org.freedesktop.ModemManager1.pkla
new file mode 100644 (file)
index 0000000..bd5e251
--- /dev/null
@@ -0,0 +1,6 @@
+[ModemManager Permissions]
+Identity=unix-group:modem
+Action=org.freedesktop.ModemManager1.*
+ResultAny=no
+ResultInactive=yes
+ResultActive=yes
index efeb53cce0a446252464e69760fa747edc730556..70d00ea1d6c455e04e212336b829b63759575158 100644 (file)
@@ -1 +1,7 @@
 dpaw
+
+# useful purism apps
+calls
+wys
+chatty
+purple-mm-sms
index d9d22af61d3b0b3b988f72786c5654fff0097c00..11c945b3023371f66ef4c6a41742b265a2399d22 100644 (file)
@@ -15,3 +15,8 @@ xfce4-terminal
 trace-cmd
 i2c-tools
 usbutils
+
+calls
+wys
+chatty
+purple-mm-sms
diff --git a/config/default/v-dpaw/post_target_install b/config/default/v-dpaw/post_target_install
new file mode 100755 (executable)
index 0000000..f3ce7cc
--- /dev/null
@@ -0,0 +1,8 @@
+# Create group modem, to allow users to make calls using modem manager
+groupadd --system modem
+
+# Add all users to group modem
+awk -F':' -v "min=$(awk '/^UID_MIN/ {print $2}' /etc/login.defs)" -v "max=$(awk '/^UID_MAX/ {print $2}' /etc/login.defs)" '{ if ( $3 >= min && $3 <= max  && $7 != "/sbin/nologin" ) print $1 }' /etc/passwd |
+  while read user
+    do usermod -a -G modem "$user"
+  done
index d4b12486c1c647a148d3e0cb77dd29ec1c73deb1..8e411c792cfd1411faf1e4a72a7405987208d5bb 100644 (file)
@@ -407,6 +407,7 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y
 CONFIG_VIDEO_IMX_PXP=m
 CONFIG_IMX_DCSS_CORE=y
 CONFIG_DRM=y
+CONFIG_DRM_LOAD_EDID_FIRMWARE=y
 CONFIG_DRM_I2C_CH7006=m
 CONFIG_DRM_I2C_SIL164=m
 CONFIG_DRM_I2C_NXP_TDA9950=m
@@ -669,6 +670,8 @@ CONFIG_TYPEC_TCPM=m
 CONFIG_TYPEC_TCPCI=m
 CONFIG_TYPEC_UCSI=m
 CONFIG_TYPEC_TPS6598X=m
+CONFIG_TYPEC_DP_ALTMODE=m
+CONFIG_TYPEC_NVIDIA_ALTMODE=m
 CONFIG_USB_ULPI_BUS=m
 CONFIG_MMC=y
 CONFIG_MMC_BLOCK_MINORS=32