Various things
authorDaniel Abrecht <public@danielabrecht.ch>
Thu, 6 Jan 2022 17:21:55 +0000 (18:21 +0100)
committerDaniel Abrecht <public@danielabrecht.ch>
Thu, 6 Jan 2022 17:21:55 +0000 (18:21 +0100)
chroot-build-helper/real-makefile
config/default/b-librem5-phone/rootfs/usr/share/alsa/ucm2/Librem_5/HiFi.conf [new file with mode: 0644]
config/default/b-librem5-phone/rootfs/usr/share/alsa/ucm2/Librem_5/Librem_5.conf [new file with mode: 0644]
config/default/b-pinephone-pro/config
kernel/makefile
script/with-repo.sh
src/make-helper-functions.mk

index 5590cf625b63da0ec206d16671e6b00e15dfe3c7..26c9c384b0d08a4255b981c2335c4f48013142de 100644 (file)
@@ -82,7 +82,8 @@ bin/$(BUILDER_PLATFORM)/$(DISTRO)/$(RELEASE)/%/.build: $$(call repodir,%) build-
          set -x; \
          mkdir -p tmp/repo/pool/ build/; \
          mount -o rbind,rprivate \"\$$project_root/chroot-build-helper/bin/\$$BUILDER_PLATFORM/\$$DISTRO/\$$RELEASE/\" tmp/repo/pool/; \
-         git clone --shared -b \"\$$branch\" \"$$project_root/\$$repodir\" build/src; \
+         git clone --shared -n \"$$project_root/\$$repodir\" build/src; \
+         ( cd build/src; git checkout \"\$$branch\"; ); \
        ); \
        export commit=\"\$$(cd build/src/ && git rev-parse HEAD)\$$([ -z \"\$$(cd build/src/ && git status --porcelain)\" ] || echo -dirty)\"; \
        export version=\"\$$(cd build/src/ && dpkg-parsechangelog --show-field Version | grep -o '^[^+~-]*' | tr -d '\n')+ib~c\$$(cd build/src/ && git rev-list HEAD --count)-\$$commit\"; \
diff --git a/config/default/b-librem5-phone/rootfs/usr/share/alsa/ucm2/Librem_5/HiFi.conf b/config/default/b-librem5-phone/rootfs/usr/share/alsa/ucm2/Librem_5/HiFi.conf
new file mode 100644 (file)
index 0000000..4216aff
--- /dev/null
@@ -0,0 +1,175 @@
+SectionVerb {
+       EnableSequence [
+               cset "name='Digital Playback Volume' 100,100"
+               cset "name='MIXINL IN2L Switch' off"
+               cset "name='MIXINL IN3L Switch' off"
+               cset "name='MIXINR IN2R Switch' off"
+               cset "name='MIXINR IN3R Switch' off"
+               cset "name='INPGAR IN1R Switch' off"
+               cset "name='INPGAR IN2R Switch' off"
+               cset "name='INPGAR IN3R Switch' on"
+               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"
+               cset "name='SPKOUTL PGA' Mixer"
+               cset "name='SPKOUTR PGA' Mixer"
+       ]
+
+       DisableSequence [
+               cset "name='Digital Playback Volume' 0,0"
+       ]
+
+       Value {
+       }
+}
+
+SectionDevice."Handset" {
+       Comment "Handset"
+
+       ConflictingDevice [
+               "Headphones"
+               "Speaker"
+       ]
+
+       EnableSequence [
+               cset "name='Speaker Switch' off,on"
+               cset "name='DAC L/R Swap Switch' on"
+               cset "name='DAC Monomix Switch' on"
+               cset "name='SPKOUTR PGA' DAC"
+               cset "name='Speaker Volume' 121,121"
+               cset "name='Speaker Boost Volume' 2"
+       ]
+
+       DisableSequence [
+               cset "name='Speaker Switch' off,off"
+               cset "name='DAC L/R Swap Switch' off"
+               cset "name='DAC Monomix Switch' off"
+               cset "name='SPKOUTR PGA' Mixer"
+       ]
+
+       Value {
+               PlaybackChannels "2"
+               PlaybackPriority "100"
+               PlaybackVolume "name='Speaker Volume'"
+               PlaybackSwitch "name='Speaker Switch'"
+               PlaybackPCM "hw:${CardId},0"
+       }
+}
+
+SectionDevice."Speaker" {
+       Comment "Speaker"
+
+       ConflictingDevice [
+               "Handset"
+               "Headphones"
+       ]
+
+       EnableSequence [
+               cset "name='Speaker Switch' on,off"
+               cset "name='DAC Monomix Switch' on"
+               cset "name='SPKOUTL PGA' DAC"
+               cset "name='Speaker Volume' 121,121"
+               cset "name='Speaker Boost Volume' 6"
+       ]
+
+       DisableSequence [
+               cset "name='Speaker Switch' off,off"
+               cset "name='DAC Monomix Switch' off"
+               cset "name='SPKOUTL PGA' Mixer"
+       ]
+
+       Value {
+               PlaybackChannels "2"
+               PlaybackPriority "500"
+               PlaybackVolume "name='Speaker Volume'"
+               PlaybackSwitch "name='Speaker Switch'"
+               PlaybackPCM "hw:${CardId},0"
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Headphones"
+
+       ConflictingDevice [
+               "Handset"
+               "Speaker"
+       ]
+
+       EnableSequence [
+               cset "name='Headphone Switch' on,on"
+               cset "name='HPOUTL PGA' 0 unmute"
+               cset "name='HPOUTR PGA' 0 unmute"
+               cset "name='Headphone Aux Volume' 0"
+               cset "name='Headphone Volume' 121,121"
+       ]
+
+       DisableSequence [
+               cset "name='Headphone Switch' off off"
+               cset "name='HPOUTL PGA' 0 mute"
+               cset "name='HPOUTR PGA' 0 mute"
+       ]
+
+       Value {
+               PlaybackPriority "1000"
+               PlaybackChannels "2"
+               PlaybackVolume "name='Headphone Volume'"
+               PlaybackSwitch "name='Headphone Switch'"
+               PlaybackPCM "hw:${CardId},0"
+               JackControl "Headphones Jack"
+       }
+}
+
+SectionDevice."Mic" {
+       Comment "Internal Microphone"
+
+       ConflictingDevice [
+               "Headset"
+       ]
+
+       EnableSequence [
+               cset "name='Digital Capture Volume' 116,116"
+               cset "name='ADC L/R Swap Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Digital Capture Volume' 0,0"
+               cset "name='ADC L/R Swap Switch' off"
+       ]
+
+       Value {
+               CapturePriority "500"
+               CaptureChannels "2"
+               CaptureVolume "name='Digital Capture Volume'"
+               CapturePCM "hw:${CardId},0"
+       }
+}
+
+SectionDevice."Headset" {
+       Comment "Headset Microphone"
+
+       ConflictingDevice [
+               "Mic"
+       ]
+
+       EnableSequence [
+               cset "name='MIXINR IN3R Switch' on"
+               cset "name='MIXINR IN3R Volume' 7"
+       ]
+
+       DisableSequence [
+               cset "name='MIXINR IN3R Switch' off"
+               cset "name='MIXINR IN3R Volume' 0"
+       ]
+
+       Value {
+               CapturePriority "100"
+               CaptureChannels "2"
+               CaptureVolume "name='MIXINR IN3R Volume'"
+               CaptureSwitch "name='MIXINR IN3R Switch'"
+               CapturePCM "hw:${CardId},0"
+               JackControl "Headphones Jack"
+       }
+}
diff --git a/config/default/b-librem5-phone/rootfs/usr/share/alsa/ucm2/Librem_5/Librem_5.conf b/config/default/b-librem5-phone/rootfs/usr/share/alsa/ucm2/Librem_5/Librem_5.conf
new file mode 100644 (file)
index 0000000..d672df2
--- /dev/null
@@ -0,0 +1,6 @@
+Syntax 2
+
+SectionUseCase."HiFi" {
+       File "HiFi.conf"
+       Comment "Default"
+}
index 4d6a3a0da3c977fa14e55cfe8167456bacb22389..84afa3ab010461906af46cad5b563c764b9ca41a 100644 (file)
@@ -4,7 +4,8 @@ FK_MACHINE = Pine64 PinePhonePro
 
 S_COMPONENTS += non-free
 
-repo-branch@linux = orange-pi-5.16
+#repo-branch@linux = orange-pi-5.16
+repo-branch@linux = c6fda0a09217b8c183cf1ef4782746fcfcf055f1
 repo-source@linux = https://github.com/megous/linux.git
 
 UBOOT_CONFIG_TARGET = pinephone-pro-rk3399_defconfig
index 306f8a33b72465bfc0dcc4296f2cd4cdb83b3de5..f91c56e6975a997b82dd140b032bbae37663d95f 100644 (file)
@@ -26,7 +26,7 @@ bin/.done: $$(call repodir,linux) | bin/.dir
          fi; \
          patchdir="$$(realpath "patch/$$BUILDER_PLATFORM/$$KERNEL_PATCHES")"; \
          if [ -n "$$KERNEL_PATCHES" ] && [ -d "$$patchdir" ]; \
-           then ( cd "$$repodir/linux"; git apply "$$patchdir"/*.patch; ); \
+           then ( cd "$$repodir/linux"; for patch in "$$patchdir"/*.patch; do git apply "$$patch"; done ); \
          fi; \
          $(MAKE) -C "$$repodir/linux" ARCH=arm64 CROSS_COMPILE="$$CROSS_COMPILER" "$$KERNEL_CONFIG_TARGET"_defconfig; \
          $(MAKE) -C "$$repodir/linux" ARCH=arm64 CROSS_COMPILE="$$CROSS_COMPILER" KBUILD_IMAGE=arch/arm64/boot/Image bindeb-pkg; \
index e41cab509026b41841c4dd874b501e3b2ab47597..b8404450f60fdd774807da237d7b192c3443cdd0 100755 (executable)
@@ -16,7 +16,8 @@ clone_repo(){
   repo_branch="$(printenv -- "repo-branch@$name")"
   repo_source="$(printenv -- "repo-source@$name")"
   gitrepo="$project_root/repo/$(sed "s / ∕ g" <<<"$repo_source").git"
-  git clone --shared -b "$repo_branch" "$gitrepo" "$repodir/$name"
+  git clone --shared -n "$gitrepo" "$repodir/$name"
+  ( cd "$repodir/$name"; git checkout "$repo_branch"; )
 }
 export repodir="$project_root/build/repo"
 while IFS=, read name; do clone_repo "$name"; done <<<"$1"
index 44b16b694f86a640a8e1fcbc7fb9a7032bfa1194..020d8924e9dbff151fc8728db2f7ac793fdc4715 100644 (file)
@@ -99,7 +99,7 @@ chroot//%:
        CHNS_INTERACTIVE=1 chns "$(realpath $(patsubst chroot//%,%,$@))" /bin/bash
 
 clean:
-       ! echo -n "Please use one of:\n * make clean-build\t# remove all files built for the target image (includes the image)\n * make clean-build-all\t# remove all files that have been built\n * make clean-repo\t# remove the downloaded repos\n * make update-repo\t# clean up all changes made to the repo & update it if possible\n * make clean-all\t# same as 'make clean-repo clean-build'\n * make clean-all-all\t# same as 'make clean-repo clean-build-all'\n * make reset\t\t# same as 'make update-repo clean-build'\n * make reset-all\t# same as 'make update-repo clean-build-all'\n"
+       @! printf "Please use one of:\n * make clean-build\t# remove all files built for the target image (includes the image)\n * make clean-build-all\t# remove all files that have been built\n * make clean-repo\t# remove the downloaded repos\n * make update-repo\t# clean up all changes made to the repo & update it if possible\n * make clean-all\t# same as 'make clean-repo clean-build'\n * make clean-all-all\t# same as 'make clean-repo clean-build-all'\n * make reset\t\t# same as 'make update-repo clean-build'\n * make reset-all\t# same as 'make update-repo clean-build-all'\n"
 
 repo/%.git:
        repo="$(shell echo "$(patsubst repo/%.git,%,$@)" | sed 's ∕ / g')"; \