From 2d47ede894a3735c49c205ef627eb56a8ec4792e Mon Sep 17 00:00:00 2001 From: Anton Bambura Date: Fri, 10 Jun 2022 02:43:12 +0300 Subject: [PATCH] temp/alsa-ucm-conf-google-gru: new aport (MR 3215) --- temp/alsa-ucm-conf-google-gru/APKBUILD | 34 +++++++++ .../HiFi-headphones.conf | 72 +++++++++++++++++++ .../HiFi-speakers.conf | 67 +++++++++++++++++ .../rk3399-gru-soun.conf | 13 ++++ 4 files changed, 186 insertions(+) create mode 100644 temp/alsa-ucm-conf-google-gru/APKBUILD create mode 100644 temp/alsa-ucm-conf-google-gru/HiFi-headphones.conf create mode 100644 temp/alsa-ucm-conf-google-gru/HiFi-speakers.conf create mode 100644 temp/alsa-ucm-conf-google-gru/rk3399-gru-soun.conf diff --git a/temp/alsa-ucm-conf-google-gru/APKBUILD b/temp/alsa-ucm-conf-google-gru/APKBUILD new file mode 100644 index 000000000..957861175 --- /dev/null +++ b/temp/alsa-ucm-conf-google-gru/APKBUILD @@ -0,0 +1,34 @@ +# A temporary package until these MRs are merged and available in Alpine: +# - https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596 +# - https://github.com/alsa-project/alsa-ucm-conf/pull/162 +# Maintainer: Jenneron +pkgname=alsa-ucm-conf-google-gru +pkgver=1 +pkgrel=0 +pkgdesc="ALSA Use Case Manager configuration for Google Gru Chromebooks" +url="https://alsa-project.org" +arch="aarch64" +license="BSD-3-Clause" +source=" + HiFi-headphones.conf + HiFi-speakers.conf + rk3399-gru-soun.conf +" +options="!check" # no tests +depends="alsa-ucm-conf" +replaces="alsa-ucm-conf" + +package() { + install -Dm644 rk3399-gru-soun.conf \ + "$pkgdir"/usr/share/alsa/ucm2/conf.d/rk3399-gru-soun/rk3399-gru-soun.conf + install -Dm644 HiFi-headphones.conf \ + "$pkgdir"/usr/share/alsa/ucm2/conf.d/rk3399-gru-soun/HiFi-headphones.conf + install -Dm644 HiFi-speakers.conf \ + "$pkgdir"/usr/share/alsa/ucm2/conf.d/rk3399-gru-soun/HiFi-speakers.conf +} + +sha512sums=" +60f80a072b24a434f8c697e88064482113c4cb6c8fd81f0b53a694d9b6af40aa64aeb6ada17d178a26900ebf8b1b09aaab7a83825db032b9e8c32ed2417ea1cd HiFi-headphones.conf +69d250637616103770fac1a83421bae54559220974a142ecb618ef24fc5deaf53699dbf215bb3f094447525c643e3fbf3530524ef6fd57f1c383dc8c6ad4cec6 HiFi-speakers.conf +54b662d6f66bf1694bce3993e3e2c779ee0d6cf9eee3964f894672b5ee0d540d705ee1127020fa52aa20fc2ebd7d5449779d369e7bb51d14c4f11729479b197e rk3399-gru-soun.conf +" diff --git a/temp/alsa-ucm-conf-google-gru/HiFi-headphones.conf b/temp/alsa-ucm-conf-google-gru/HiFi-headphones.conf new file mode 100644 index 000000000..bc138420a --- /dev/null +++ b/temp/alsa-ucm-conf-google-gru/HiFi-headphones.conf @@ -0,0 +1,72 @@ +SectionVerb { + Value { + MinBufferLevel "512" + } + + EnableSequence [ + cset "name='Stereo1 DMIC Mux' DMIC1" + cset "name='Sto1 ADC MIXL DMIC Switch' on" + cset "name='Sto1 ADC MIXR DMIC Switch' on" + + cset "name='Mixer Out FilterL DACL Switch' on" + cset "name='Mixer Out FilterR DACR Switch' on" + cset "name='Playback Digital Switch' on" + cset "name='Headphone Switch' on" + + cset "name='Mixin Volume' 11" + cset "name='Mixin Switch' on" + cset "name='Mixer In Mic Switch' on" + cset "name='Out DAIL Mux' ADC" + cset "name='Out DAIR Mux' ADC" + cset "name='ADC1 Capture Volume' 51" + cset "name='Mic Volume' 6" + cset "name='Capture Digital Switch' on" + cset "name='Mic Switch' on" + + cset "name='Speakers Switch' off" + cset "name='Int Mic Switch' off" + cset "name='Headphones Switch' off" + cset "name='Headset Mic Switch' off" + ] +} + +SectionDevice."Headphones" { + Comment "Headphones" + + Value { + PlaybackPriority 200 + PlaybackPCM "hw:${CardId},2" + #PlaybackMixerElem "Headphone" + JackControl "Headphones Jack" + } + + EnableSequence [ + cset "name='Headphones Switch' on" + cset "name='DAC Soft Mute Switch' off" + cset "name='Headphone Switch' on" + ] + + DisableSequence [ + cset "name='Headphone Switch' off" + cset "name='DAC Soft Mute Switch' on" + cset "name='Headphones Switch' off" + ] +} + +SectionDevice."Mic" { + Comment "Internal Microphone" + + Value { + CapturePriority 100 + CapturePCM "hw:${CardId},1" + CaptureMixerElem "ADC1" + } + + EnableSequence [ + cset "name='Int Mic Switch' on" + ] + + DisableSequence [ + cset "name='Int Mic Switch' off" + ] +} diff --git a/temp/alsa-ucm-conf-google-gru/HiFi-speakers.conf b/temp/alsa-ucm-conf-google-gru/HiFi-speakers.conf new file mode 100644 index 000000000..354c5163d --- /dev/null +++ b/temp/alsa-ucm-conf-google-gru/HiFi-speakers.conf @@ -0,0 +1,67 @@ +SectionVerb { + Value { + MinBufferLevel "512" + } + + EnableSequence [ + cset "name='Stereo1 DMIC Mux' DMIC1" + cset "name='Sto1 ADC MIXL DMIC Switch' on" + cset "name='Sto1 ADC MIXR DMIC Switch' on" + + cset "name='Mixer Out FilterL DACL Switch' on" + cset "name='Mixer Out FilterR DACR Switch' on" + cset "name='Playback Digital Switch' on" + cset "name='Headphone Switch' on" + + cset "name='Mixin Volume' 11" + cset "name='Mixin Switch' on" + cset "name='Mixer In Mic Switch' on" + cset "name='Out DAIL Mux' ADC" + cset "name='Out DAIR Mux' ADC" + cset "name='ADC1 Capture Volume' 51" + cset "name='Mic Volume' 6" + cset "name='Capture Digital Switch' on" + cset "name='Mic Switch' on" + + cset "name='Speakers Switch' off" + cset "name='Int Mic Switch' off" + cset "name='Headphones Switch' off" + cset "name='Headset Mic Switch' off" + ] +} + +SectionDevice."Speaker" { + Comment "Speaker" + + Value { + PlaybackPriority 100 + PlaybackPCM "hw:${CardId}" + PlaybackMixerElem "Speakers" + } + + EnableSequence [ + cset "name='Speakers Switch' on" + ] + + DisableSequence [ + cset "name='Speakers Switch' off" + ] +} + +SectionDevice."Mic" { + Comment "Internal Microphone" + + Value { + CapturePriority 100 + CapturePCM "hw:${CardId},1" + CaptureMixerElem "ADC1" + } + + EnableSequence [ + cset "name='Int Mic Switch' on" + ] + + DisableSequence [ + cset "name='Int Mic Switch' off" + ] +} diff --git a/temp/alsa-ucm-conf-google-gru/rk3399-gru-soun.conf b/temp/alsa-ucm-conf-google-gru/rk3399-gru-soun.conf new file mode 100644 index 000000000..8fd1680e7 --- /dev/null +++ b/temp/alsa-ucm-conf-google-gru/rk3399-gru-soun.conf @@ -0,0 +1,13 @@ +Syntax 2 + +Comment "Rockchip Gru card" + +SectionUseCase."HiFi-speakers" { + File "HiFi-speakers.conf" + Comment "Speakers" +} + +SectionUseCase."HiFi-headphones" { + File "HiFi-headphones.conf" + Comment "Headphones" +}