alsa-ucm-conf: switch to postmarketos version
This commit is contained in:
@@ -15,7 +15,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# upstream alsa ships with PinePhone audio configs, but they don't actually produce sound.
|
# upstream alsa ships with PinePhone audio configs, but they don't actually produce sound.
|
||||||
# see: <https://github.com/alsa-project/alsa-ucm-conf/pull/134>
|
# - still true as of 2024-05-26
|
||||||
|
# - see: <https://github.com/alsa-project/alsa-ucm-conf/pull/134>
|
||||||
#
|
#
|
||||||
# we can substitute working UCM conf in two ways:
|
# we can substitute working UCM conf in two ways:
|
||||||
# 1. nixpkgs' override for the `alsa-ucm-conf` package
|
# 1. nixpkgs' override for the `alsa-ucm-conf` package
|
||||||
@@ -23,9 +24,20 @@ in
|
|||||||
# 2. set ALSA_CONFIG_UCM2 = /path/to/ucm2 in the relevant places
|
# 2. set ALSA_CONFIG_UCM2 = /path/to/ucm2 in the relevant places
|
||||||
# - e.g. pulsewire service.
|
# - e.g. pulsewire service.
|
||||||
# - easy to miss places, though.
|
# - easy to miss places, though.
|
||||||
packageUnwrapped = pkgs.alsa-ucm-pinephone-manjaro.override {
|
#
|
||||||
inherit (cfg.config) preferEarpiece;
|
# alsa-ucm-pinephone-manjaro (2024-05-26):
|
||||||
};
|
# - headphones work
|
||||||
|
# - "internal earpiece" works
|
||||||
|
# - "internal speaker" is silent (maybe hardware issue)
|
||||||
|
# - 3.5mm connection is flapping when playing to my car, which eventually breaks audio and requires restarting wireplumber
|
||||||
|
# packageUnwrapped = pkgs.alsa-ucm-pinephone-manjaro.override {
|
||||||
|
# inherit (cfg.config) preferEarpiece;
|
||||||
|
# };
|
||||||
|
# alsa-ucm-pinephone-pmos (2024-05-26):
|
||||||
|
# - headphones work
|
||||||
|
# - "internal earpiece" works
|
||||||
|
# - "internal speaker" is silent (maybe hardware issue)
|
||||||
|
packageUnwrapped = pkgs.alsa-ucm-pinephone-pmos; #< TODO: plumb `preferEarpiece`
|
||||||
|
|
||||||
sandbox.enable = false; #< only provides $out/share/alsa
|
sandbox.enable = false; #< only provides $out/share/alsa
|
||||||
|
|
||||||
|
24
pkgs/additional/alsa-ucm-pinephone-pmos/default.nix
Normal file
24
pkgs/additional/alsa-ucm-pinephone-pmos/default.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# see: https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/main/device-pine64-pinephone/
|
||||||
|
# - APKBUILD and ucm/ files
|
||||||
|
{ alsa-ucm-conf
|
||||||
|
, fetchFromGitLab
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
pmaports = fetchFromGitLab {
|
||||||
|
owner = "postmarketOS";
|
||||||
|
repo = "pmaports";
|
||||||
|
rev = "006256a0d001bf131963b69b24ae538e0bff4998";
|
||||||
|
hash = "sha256-AL3wxDN4V9K7eindEkDGNlBLV4vVMf9b7ny0BQwvbek=";
|
||||||
|
};
|
||||||
|
pmosAdditions = "${pmaports}/device/main/device-pine64-pinephone/ucm";
|
||||||
|
in alsa-ucm-conf.overrideAttrs (upstream: {
|
||||||
|
postInstall = (upstream.postInstall or "") + ''
|
||||||
|
install -Dm644 -t $out/share/alsa/ucm2/PinePhone \
|
||||||
|
${pmosAdditions}/HiFi.conf \
|
||||||
|
${pmosAdditions}/PinePhone.conf \
|
||||||
|
${pmosAdditions}/VoiceCall.conf
|
||||||
|
mkdir -p $out/share/alsa/ucm2/conf.d/simple-card
|
||||||
|
ln -sf $out/share/alsa/ucm2/PinePhone/PinePhone.conf \
|
||||||
|
$out/share/alsa/ucm2/conf.d/simple-card/PinePhone.conf
|
||||||
|
'';
|
||||||
|
})
|
@@ -21,6 +21,7 @@ let
|
|||||||
|
|
||||||
### ADDITIONAL PACKAGES
|
### ADDITIONAL PACKAGES
|
||||||
alsa-ucm-pinephone-manjaro = callPackage ./additional/alsa-ucm-pinephone-manjaro { };
|
alsa-ucm-pinephone-manjaro = callPackage ./additional/alsa-ucm-pinephone-manjaro { };
|
||||||
|
alsa-ucm-pinephone-pmos = callPackage ./additional/alsa-ucm-pinephone-pmos { };
|
||||||
blast-ugjka = callPackage ./additional/blast-ugjka { };
|
blast-ugjka = callPackage ./additional/blast-ugjka { };
|
||||||
bootpart-uefi-x86_64 = callPackage ./additional/bootpart-uefi-x86_64 { };
|
bootpart-uefi-x86_64 = callPackage ./additional/bootpart-uefi-x86_64 { };
|
||||||
cargoDocsetHook = callPackage ./additional/cargo-docset/hook.nix { };
|
cargoDocsetHook = callPackage ./additional/cargo-docset/hook.nix { };
|
||||||
|
Reference in New Issue
Block a user