diff --git a/device/testing/device-pine64-pinetab/APKBUILD b/device/testing/device-pine64-pinetab/APKBUILD index 1367bdfc7..9619bc2e2 100644 --- a/device/testing/device-pine64-pinetab/APKBUILD +++ b/device/testing/device-pine64-pinetab/APKBUILD @@ -2,7 +2,7 @@ pkgname=device-pine64-pinetab pkgdesc="PINE64 PineTab" pkgver=0.1 -pkgrel=18 +pkgrel=19 url="https://postmarketos.org" license="MIT" arch="aarch64" @@ -17,6 +17,8 @@ subpackages=" " install="$pkgname.post-install" source=" + ucm/HiFi.conf + ucm/sun50i-a64-audio.conf deviceinfo uboot-script.cmd sysrq.conf @@ -71,6 +73,12 @@ package() { install -D -m644 "$srcdir"/sysrq.conf \ "$pkgdir"/etc/sysctl.d/sysrq.conf + # Alsa usecase manager config + install -D -m644 "$srcdir"/sun50i-a64-audio.conf \ + "$pkgdir"/usr/share/alsa/ucm2/sun50i-a64-audio/sun50i-a64-audio.conf + install -D -m644 "$srcdir"/HiFi.conf \ + "$pkgdir"/usr/share/alsa/ucm2/sun50i-a64-audio/HiFi.conf + # Fix for the meta key on v1 keyboard dock, probably not needed on newer revisions install -Dm644 "$srcdir"/99-pinetab-keyboard.hwdb \ "$pkgdir"/etc/udev/hwdb.d/99-pinetab-keyboard.hwdb @@ -82,7 +90,9 @@ nonfree_firmware() { mkdir "$subpkgdir" } -sha512sums="0f5efb1ab4b23f086e41ee8851872201778c0a149d7cac4feeb5c9a2ef50b48499500da296b581f69c6aa675720298df301a464b3ae3e7499a36a7bc0d101e75 deviceinfo +sha512sums="61bbb5467b51c3cee041f5c8eccf704a5b7861a2a3efff06cf91eb3291034636f78d9fd9d5ad9826c6a781092065f5a5eb72068e692712aed30f41e4f661b902 HiFi.conf +3bdf9d4c41058680d488d9b4a2ac5fd693ceddc5f319a577480546f8af7d9d64c9d3196e73cb0c00e793697eef4ad075c88c3d274702a5387c15945bc749d844 sun50i-a64-audio.conf +0f5efb1ab4b23f086e41ee8851872201778c0a149d7cac4feeb5c9a2ef50b48499500da296b581f69c6aa675720298df301a464b3ae3e7499a36a7bc0d101e75 deviceinfo 1f3108007bd443f86ed8af2b2d84705c52ffcf73809a90ef5e4a1f618b73ab39baf8f8139d578c88e66f589464f8c47d53f72bf46f14b8fa78d962ae10d7d6d2 uboot-script.cmd f4b5509fd6a8b23f3667f5e7262b3a19c607a37cb9eaf7d0e93eb826d45c26ec12df4810879bacb8e4042bb83cc80b2b436224c8d47b6d67361369a724bbf7ee sysrq.conf 9e71c61bfa72b60e749c4dc04f17eb59d25de822765e81e65c937d6be5236d3951a652b69a1ab973abe6add9f34705be5dbaa98bbfa25daf7504dd50b28524c2 sway.conf diff --git a/device/testing/device-pine64-pinetab/ucm/HiFi.conf b/device/testing/device-pine64-pinetab/ucm/HiFi.conf new file mode 100644 index 000000000..5c6614364 --- /dev/null +++ b/device/testing/device-pine64-pinetab/ucm/HiFi.conf @@ -0,0 +1,97 @@ +SectionVerb { + EnableSequence [ + cset "name='Headphone Playback Switch' off" + cset "name='Headphone Source Playback Route' DAC" + cset "name='Line In Playback Switch' off" + cset "name='Line Out Playback Switch' off" + cset "name='Line Out Source Playback Route' Mono Differential" + cset "name='Mic1 Playback Switch' off" + cset "name='AIF1 DA0 Playback Volume' 160" + cset "name='AIF1 Loopback Switch' off" + cset "name='AIF2 Loopback Switch' off" + cset "name='AIF3 Loopback Switch' off" + cset "name='AIF3 ADC Capture Route' None" + cset "name='AIF3 DAC Playback Route' None" + cset "name='DAC Playback Switch' on" + cset "name='DAC Playback Volume' 160" + cset "name='DAC Mixer ADC Playback Switch' off" + cset "name='DAC Mixer AIF1 DA0 Playback Switch' on" + cset "name='DAC Mixer AIF2 DAC Playback Switch' off" + cset "name='DAC Reversed Playback Switch' off" + + cset "name='Line In Capture Switch' off" + cset "name='Mic1 Capture Switch' off" + cset "name='Mic1 Boost Volume' 7" + cset "name='Mixer Capture Switch' off" + cset "name='Mixer Reversed Capture Switch' off" + cset "name='ADC Capture Volume' 160" + cset "name='ADC Gain Capture Volume' 7" + cset "name='AIF1 AD0 Capture Volume' 160" + cset "name='AIF1 AD0 Mixer ADC Capture Switch' on" + cset "name='AIF2 ADC Mixer ADC Capture Switch' off" + cset "name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off" + cset "name='AIF2 ADC Mixer AIF2 DAC Rev Capture Switch' off" + cset "name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off" + cset "name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off" + ] + + Value { + PlaybackPCM "hw:${CardId},0" + CapturePCM "hw:${CardId},0" + } +} + +SectionDevice."Speaker" { + Comment "Internal speaker" + EnableSequence [ + cset "name='AIF1 DA0 Stereo Playback Route' Mix Mono" + cset "name='Line Out Playback Switch' on" + cset "name='Line Out Playback Volume' 100%" + ] + + DisableSequence [ + cset "name='Line Out Playback Switch' off" + ] + + Value { + PlaybackVolume "Line Out Playback Volume" + PlaybackSwitch "Line Out Playback Switch" + PlaybackChannels 2 + PlaybackPriority 300 + PlaybackPCM "hw:${CardId},0" + } +} +SectionDevice."Mic" { + Comment "Internal Microphone" + EnableSequence [ + cset "name='Mic1 Capture Switch' on" + ] + DisableSequence [ + cset "name='Mic1 Capture Switch' off" + ] + Value { + CapturePriority 500 + CapturePCM "hw:${CardId},0" + CaptureChannels 2 + } +} +SectionDevice."Headphones" { + Comment "Headset" + EnableSequence [ + cset "name='AIF1 DA0 Stereo Playback Route' Stereo" + cset "name='Headphone Playback Switch' on" + cset "name='Headphone Playback Volume' 40%" + ] + + DisableSequence [ + cset "name='Headphone Playback Switch' off" + ] + + Value { + PlaybackVolume "Headphone Playback Volume" + PlaybackSwitch "Headphone Playback Switch" + PlaybackChannels 2 + PlaybackPriority 100 + PlaybackPCM "hw:${CardId},0" + } +} diff --git a/device/testing/device-pine64-pinetab/ucm/sun50i-a64-audio.conf b/device/testing/device-pine64-pinetab/ucm/sun50i-a64-audio.conf new file mode 100644 index 000000000..51875ed9b --- /dev/null +++ b/device/testing/device-pine64-pinetab/ucm/sun50i-a64-audio.conf @@ -0,0 +1,6 @@ +Syntax 2 + +SectionUseCase."HiFi" { + File "HiFi.conf" + Comment "Play HiFi quality music" +}