From 719a10a997b698911dbb572694e977da080902c7 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Sat, 8 Aug 2026 20:48:28 +0200 Subject: [PATCH] aports: add soc-fairphone-fp6-audio (topology, amp config, UCM) Files copied byte-identical from the tested dev phone; installed to the exact deployed paths (the spaced tplg/UCM filenames come from the machine driver's card name). Wired into the image via extra_packages. Co-Authored-By: Claude Fable 5 --- README.md | 7 +- .../device/soc-fairphone-fp6-audio/APKBUILD | 38 ++++++++ .../device/soc-fairphone-fp6-audio/HiFi.conf | 86 ++++++++++++++++++ .../soc-fairphone-fp6-audio/aw88261_acf.bin | Bin 0 -> 4328 bytes .../soc-fairphone-fp6-audio/fp6-tplg.bin | Bin 0 -> 11328 bytes .../ucm-milos-fp6.conf | 11 +++ build.sh | 2 + 7 files changed, 141 insertions(+), 3 deletions(-) create mode 100644 aports/device/soc-fairphone-fp6-audio/APKBUILD create mode 100644 aports/device/soc-fairphone-fp6-audio/HiFi.conf create mode 100644 aports/device/soc-fairphone-fp6-audio/aw88261_acf.bin create mode 100644 aports/device/soc-fairphone-fp6-audio/fp6-tplg.bin create mode 100644 aports/device/soc-fairphone-fp6-audio/ucm-milos-fp6.conf diff --git a/README.md b/README.md index 43aa4b5..555b1fb 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,9 @@ with the `aports/` overlay in this repository: ## Roadmap -- [ ] End-to-end pipeline validation (`build.sh` has TODO(validate) markers) -- [ ] Speaker-audio userspace files (AudioReach topology + UCM; firmware - redistribution being sorted out) +- [x] End-to-end pipeline validation (first complete image built 2026-08-08) +- [x] Speaker-audio userspace files (`soc-fairphone-fp6-audio`: topology, + amp config, UCM — byte-identical to the tested dev-phone set; blob + provenance to be settled before this repo goes public) - [ ] imsd 0.3.0 tag (aport currently needs it published) - [ ] Nightly schedule once the first dispatched run is green diff --git a/aports/device/soc-fairphone-fp6-audio/APKBUILD b/aports/device/soc-fairphone-fp6-audio/APKBUILD new file mode 100644 index 0000000..bd71838 --- /dev/null +++ b/aports/device/soc-fairphone-fp6-audio/APKBUILD @@ -0,0 +1,38 @@ +# Audio userspace files for the Fairphone 6 that no upstream package ships +# yet: the AudioReach topology (built from Catcrafts/audioreach-topology +# branch fp6), the AW88261 amp config blob, and the UCM profile. Files are +# byte-identical to the ones deployed and tested on the development FP6. +# The tplg/UCM target filenames contain spaces, hence the safe source names. +maintainer="Jorijn van der Graaf " +pkgname=soc-fairphone-fp6-audio +pkgver=1 +pkgrel=0 +pkgdesc="Fairphone 6 audio topology, amp firmware and UCM profile" +url="https://forgejo.catcrafts.net/Catcrafts/audioreach-topology" +arch="noarch" +license="BSD-3-Clause" +options="!check" +source=" + fp6-tplg.bin + aw88261_acf.bin + ucm-milos-fp6.conf + HiFi.conf +" + +package() { + install -Dm644 "$srcdir"/fp6-tplg.bin \ + "$pkgdir/usr/lib/firmware/qcom/milos/Fairphone (Gen. 6)-tplg.bin" + install -Dm644 "$srcdir"/aw88261_acf.bin \ + "$pkgdir"/usr/lib/firmware/qcom/milos/fairphone/fp6/aw88261_acf.bin + install -Dm644 "$srcdir"/ucm-milos-fp6.conf \ + "$pkgdir/usr/share/alsa/ucm2/conf.d/milos/Fairphone (Gen. 6).conf" + install -Dm644 "$srcdir"/HiFi.conf \ + "$pkgdir"/usr/share/alsa/ucm2/Fairphone/fp6/HiFi.conf +} + +sha512sums=" +51071c574b9f5899c78ba9fe1b6f3bbda2195e6d274014a05869ae56ed0ff18e15678bd7d78cd68846900d3c579556328e229842152cffd943186d43344ed33c fp6-tplg.bin +a84b0595ae71b0bb594034a9f5fd77b984c9086cd917f32524c4b5172bc72a426e5d188d18dbccdb587f66d60fa15cad441fffcd48a3a1ce66335199b61e0350 aw88261_acf.bin +3bb268f9fcb8d1c0b42741b67da42b6361bab259e7211d9930919995ebe7dcf67826e6d4f00ff5e4fe5b52067fe90d00212158c3b4879d1bee481e87f0623206 ucm-milos-fp6.conf +2a189c3141fedc43f8eb19f4df1e43487223d524e27da3f948556d224cca1f493f6815ada191953fb79a19d5c5abadb21de7b3ece7b74b0929338c216e21e84a HiFi.conf +" diff --git a/aports/device/soc-fairphone-fp6-audio/HiFi.conf b/aports/device/soc-fairphone-fp6-audio/HiFi.conf new file mode 100644 index 0000000..c69f349 --- /dev/null +++ b/aports/device/soc-fairphone-fp6-audio/HiFi.conf @@ -0,0 +1,86 @@ +SectionVerb { + Value { + TQ "HiFi" + } + EnableSequence [ + cset "name='SEN_MI2S_RX Audio Mixer MultiMedia1' 1" + cset "name='MultiMedia2 Mixer TX_CODEC_DMA_TX_3' 1" + ] +} + +SectionDevice."Speaker" { + Comment "Internal stereo speakers (2x AW88261)" + + EnableSequence [ + cset "name='Amplifier L PCM Playback Volume' 352" + cset "name='Amplifier R PCM Playback Volume' 352" + ] + + DisableSequence [ + cset "name='Amplifier L PCM Playback Volume' 0" + cset "name='Amplifier R PCM Playback Volume' 0" + ] + + Value { + PlaybackPriority 100 + PlaybackPCM "hw:${CardId},0" + } +} + +SectionDevice."Mic" { + Comment "Handset microphone (AMIC1, bottom edge)" + + # WCD9378 ADC1 -> SoundWire -> TX macro DEC0 -> TX_CODEC_DMA_TX_3. + # 'TX SMIC MUX0' takes the mux item name SWR_MIC0, not the + # SWR_INPUT0 widget it routes from. + # + # The codec-side controls only exist when the stock wcd9378 + # driver owns the TX slave. With the SDCA-class prototype driver + # (sdca-mobile branch) the codec bring-up happens in the kernel + # on PDE power-up and the card exposes no codec controls; only + # the TX macro half of the sequence applies then. + If.codec { + Condition { + Type ControlExists + Control "name='ADC1 MUX'" + } + True { + EnableSequence [ + cset "name='ADC1 MUX' CH1_AMIC1" + cset "name='ADC1 Switch' 1" + cset "name='ADC1 Volume' 12" + cset "name='TX0 MODE' ADC_NORMAL" + cset "name='TX0 SEQUENCER Switch' 1" + cset "name='TX SMIC MUX0' SWR_MIC0" + cset "name='TX DEC0 MUX' SWR_MIC" + cset "name='TX_DEC0 Volume' 84" + cset "name='TX_AIF1_CAP Mixer DEC0' 1" + ] + + DisableSequence [ + cset "name='TX_AIF1_CAP Mixer DEC0' 0" + cset "name='TX0 SEQUENCER Switch' 0" + cset "name='ADC1 Switch' 0" + cset "name='TX SMIC MUX0' ZERO" + ] + } + False { + EnableSequence [ + cset "name='TX SMIC MUX0' SWR_MIC0" + cset "name='TX DEC0 MUX' SWR_MIC" + cset "name='TX_DEC0 Volume' 84" + cset "name='TX_AIF1_CAP Mixer DEC0' 1" + ] + + DisableSequence [ + cset "name='TX_AIF1_CAP Mixer DEC0' 0" + cset "name='TX SMIC MUX0' ZERO" + ] + } + } + + Value { + CapturePriority 100 + CapturePCM "hw:${CardId},1" + } +} diff --git a/aports/device/soc-fairphone-fp6-audio/aw88261_acf.bin b/aports/device/soc-fairphone-fp6-audio/aw88261_acf.bin new file mode 100644 index 0000000000000000000000000000000000000000..2e6bebec085069c52f70ea6d4c8d8eb19c23d615 GIT binary patch literal 4328 zcmd^>O-vI(7>3{7cKb(L{{2ZHLZXRA4^U{Sir7^{kYG}N6cr9YTeJ$AfKq~*^uPg< z#&|PE6Y*lg#d!3f3GqgZ#CRZ_jK^xc5WRq!^_yMVZrcSd?!l~+%yz!nnK#pCzIkVD zYn6`HpbuI_j76_SLs@Ukx9mXN3^=JfsJ!CTBX|l1V}8HKSFh@pr~ot#dujALYCNX) z=*{sQdDRqZme*#-EZSV3OY46VfR{9OEE0-DCn96{DoRgb`g~e{mldcWiHYmcP-HW4 z>fcg-a#A%@;p3p5M^u|_z&ic@jt?QtD_VRwWbpTe}6I1p(Fnk zpA`R&lI`>7ytFVt_9XU5%Ao+USMelvK3LT%hpE#X?0^GxaJJTCcF_aT+kh8m z8nL$Q#nO}yx4$$YvFZnGM=(8e6vLKgymuc%$kKvm+;Ip(0CQ3&zM>1smTm~~9@uuC z1<#)Y{JmJ5K96Pb05*Mjo~4l1DeHD33TUoi}n;$qxZZ6FW=59jdI&?tb>o z(6bSkYnX5%fI`?qZ$@GCwLGn5Y;Xpo`h_y7vbapnUF<^w85#_@qx%{;d zkXVYZ4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