rbuh
This commit is contained in:
parent
67619e3478
commit
50eb5f227a
5 changed files with 537 additions and 456 deletions
154
extras/analog-input-internal-mic.conf
Normal file
154
extras/analog-input-internal-mic.conf
Normal file
|
|
@ -0,0 +1,154 @@
|
||||||
|
# This file is part of PulseAudio.
|
||||||
|
#
|
||||||
|
# PulseAudio is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# PulseAudio is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
|
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
; For devices where a 'Internal Mic' or 'Internal Mic Boost' element exists
|
||||||
|
; 'Int Mic' and 'Int Mic Boost' are for compatibility with kernels < 2.6.38
|
||||||
|
;
|
||||||
|
; See analog-output.conf.common for an explanation on the directives
|
||||||
|
|
||||||
|
[General]
|
||||||
|
priority = 89
|
||||||
|
description-key = analog-input-microphone-internal
|
||||||
|
|
||||||
|
[Jack Mic]
|
||||||
|
state.plugged = no
|
||||||
|
state.unplugged = unknown
|
||||||
|
|
||||||
|
[Jack Dock Mic]
|
||||||
|
state.plugged = no
|
||||||
|
state.unplugged = unknown
|
||||||
|
|
||||||
|
[Jack Front Mic]
|
||||||
|
state.plugged = no
|
||||||
|
state.unplugged = unknown
|
||||||
|
|
||||||
|
[Jack Rear Mic]
|
||||||
|
state.plugged = no
|
||||||
|
state.unplugged = unknown
|
||||||
|
|
||||||
|
[Jack Internal Mic Phantom]
|
||||||
|
state.plugged = unknown
|
||||||
|
state.unplugged = unknown
|
||||||
|
required-any = any
|
||||||
|
|
||||||
|
[Element Capture]
|
||||||
|
switch = mute
|
||||||
|
volume = merge
|
||||||
|
override-map.1 = all
|
||||||
|
override-map.2 = all-left,all-right
|
||||||
|
|
||||||
|
[Element Internal Mic Boost]
|
||||||
|
required-any = any
|
||||||
|
switch = select
|
||||||
|
volume = zero
|
||||||
|
override-map.1 = all
|
||||||
|
override-map.2 = all-left,all-right
|
||||||
|
|
||||||
|
[Option Internal Mic Boost:on]
|
||||||
|
name = input-boost-on
|
||||||
|
|
||||||
|
[Option Internal Mic Boost:off]
|
||||||
|
name = input-boost-off
|
||||||
|
|
||||||
|
[Element Int Mic Boost]
|
||||||
|
required-any = any
|
||||||
|
switch = select
|
||||||
|
volume = zero
|
||||||
|
override-map.1 = all
|
||||||
|
override-map.2 = all-left,all-right
|
||||||
|
|
||||||
|
[Option Int Mic Boost:on]
|
||||||
|
name = input-boost-on
|
||||||
|
|
||||||
|
[Option Int Mic Boost:off]
|
||||||
|
name = input-boost-off
|
||||||
|
|
||||||
|
[Element Internal Mic]
|
||||||
|
required-any = any
|
||||||
|
switch = mute
|
||||||
|
volume = merge
|
||||||
|
override-map.1 = all
|
||||||
|
override-map.2 = all-left,all-right
|
||||||
|
|
||||||
|
[Element Int Mic]
|
||||||
|
required-any = any
|
||||||
|
switch = mute
|
||||||
|
volume = merge
|
||||||
|
override-map.1 = all
|
||||||
|
override-map.2 = all-left,all-right
|
||||||
|
|
||||||
|
[Element Input Source]
|
||||||
|
enumeration = select
|
||||||
|
|
||||||
|
[Option Input Source:Internal Mic]
|
||||||
|
name = analog-input-microphone-internal
|
||||||
|
required-any = any
|
||||||
|
|
||||||
|
[Option Input Source:Int Mic]
|
||||||
|
name = analog-input-microphone-internal
|
||||||
|
required-any = any
|
||||||
|
|
||||||
|
[Element Capture Source]
|
||||||
|
enumeration = select
|
||||||
|
|
||||||
|
[Option Capture Source:Internal Mic]
|
||||||
|
name = analog-input-microphone-internal
|
||||||
|
required-any = any
|
||||||
|
|
||||||
|
[Option Capture Source:Int Mic]
|
||||||
|
name = analog-input-microphone-internal
|
||||||
|
required-any = any
|
||||||
|
|
||||||
|
[Element Mic]
|
||||||
|
switch = off
|
||||||
|
volume = off
|
||||||
|
|
||||||
|
[Element Dock Mic]
|
||||||
|
switch = off
|
||||||
|
volume = off
|
||||||
|
|
||||||
|
[Element Front Mic]
|
||||||
|
switch = off
|
||||||
|
volume = off
|
||||||
|
|
||||||
|
[Element Rear Mic]
|
||||||
|
switch = off
|
||||||
|
volume = off
|
||||||
|
|
||||||
|
[Element Headphone Mic]
|
||||||
|
switch = off
|
||||||
|
volume = off
|
||||||
|
|
||||||
|
[Element Headphone Mic Boost]
|
||||||
|
switch = off
|
||||||
|
volume = off
|
||||||
|
|
||||||
|
[Element Mic Boost]
|
||||||
|
switch = off
|
||||||
|
volume = off
|
||||||
|
|
||||||
|
[Element Dock Mic Boost]
|
||||||
|
switch = off
|
||||||
|
volume = off
|
||||||
|
|
||||||
|
[Element Front Mic Boost]
|
||||||
|
switch = off
|
||||||
|
volume = off
|
||||||
|
|
||||||
|
[Element Rear Mic Boost]
|
||||||
|
switch = off
|
||||||
|
volume = off
|
||||||
|
|
||||||
|
.include analog-input-mic.conf.common
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
# else false;
|
# else false;
|
||||||
# in
|
# in
|
||||||
{
|
{
|
||||||
|
# programs.noisetorch.enable = true;
|
||||||
# aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
# aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
||||||
# aagl.inputs.nixpkgs.follows = "nixpkgs";
|
# aagl.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,8 @@
|
||||||
security.sudo-rs.enable = true;
|
security.sudo-rs.enable = true;
|
||||||
security.sudo.enable = false;
|
security.sudo.enable = false;
|
||||||
|
|
||||||
i18n.inputMethod = lib.mkDefault {
|
i18n.inputMethod = {
|
||||||
enable = true;
|
enable = lib.mkDefault true;
|
||||||
type = "fcitx5";
|
type = "fcitx5";
|
||||||
fcitx5.addons = with pkgs; [
|
fcitx5.addons = with pkgs; [
|
||||||
fcitx5-gtk
|
fcitx5-gtk
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,12 @@
|
||||||
programs.partition-manager.enable = false;
|
programs.partition-manager.enable = false;
|
||||||
|
|
||||||
services.printing.enable = false;
|
services.printing.enable = false;
|
||||||
i18n.inputMethod = {};
|
i18n.inputMethod.enable = false;
|
||||||
|
|
||||||
services.xserver.enable = false;
|
|
||||||
services.desktopManager.plasma6.enable = false;
|
services.desktopManager.plasma6.enable = false;
|
||||||
|
|
||||||
# services.pipewire.enable = false;
|
|
||||||
# services.pulseaudio.enable = true;
|
|
||||||
hardware.raspberry-pi."4" = {
|
hardware.raspberry-pi."4" = {
|
||||||
|
apply-overlays-dtmerge.enable = true;
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
fkms-3d.enable = true;
|
fkms-3d.enable = true;
|
||||||
};
|
};
|
||||||
|
|
@ -34,79 +32,6 @@
|
||||||
boot.loader.efi.canTouchEfiVariables = false;
|
boot.loader.efi.canTouchEfiVariables = false;
|
||||||
|
|
||||||
# Configure for modesetting in the device tree
|
# Configure for modesetting in the device tree
|
||||||
hardware.deviceTree = {
|
|
||||||
overlays = [
|
|
||||||
# Equivalent to:
|
|
||||||
# https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/cma-overlay.dts
|
|
||||||
{
|
|
||||||
name = "rpi4-cma-overlay";
|
|
||||||
dtsText = ''
|
|
||||||
// SPDX-License-Identifier: GPL-2.0
|
|
||||||
/dts-v1/;
|
|
||||||
/plugin/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
compatible = "brcm,bcm2711";
|
|
||||||
|
|
||||||
fragment@0 {
|
|
||||||
target = <&cma>;
|
|
||||||
__overlay__ {
|
|
||||||
size = <(512 * 1024 * 1024)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
# Equivalent to:
|
|
||||||
# https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts
|
|
||||||
{
|
|
||||||
name = "rpi4-vc4-fkms-v3d-overlay";
|
|
||||||
dtsText = ''
|
|
||||||
// SPDX-License-Identifier: GPL-2.0
|
|
||||||
/dts-v1/;
|
|
||||||
/plugin/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
compatible = "brcm,bcm2711";
|
|
||||||
|
|
||||||
fragment@1 {
|
|
||||||
target = <&fb>;
|
|
||||||
__overlay__ {
|
|
||||||
status = "disabled";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@2 {
|
|
||||||
target = <&firmwarekms>;
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@3 {
|
|
||||||
target = <&v3d>;
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@4 {
|
|
||||||
target = <&vc4>;
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# Also configure the system for modesetting.
|
|
||||||
services.xserver.videoDrivers = lib.mkBefore [
|
|
||||||
"modesetting" # Prefer the modesetting driver in X11
|
|
||||||
"fbdev" # Fallback to fbdev
|
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "/dev/disk/by-label/NIXOS_SD";
|
device = "/dev/disk/by-label/NIXOS_SD";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,18 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
# let
|
||||||
|
# boostless = pkgs.pipewire.overrideAttrs (old: {
|
||||||
|
# postInstall =
|
||||||
|
# old.postInstall or ""
|
||||||
|
# + ''
|
||||||
|
# '';
|
||||||
|
# });
|
||||||
|
# in
|
||||||
|
{
|
||||||
|
environment.etc."alsa-card-profile/analog-input-internal-mic.conf".source = ../extras/analog-input-internal-mic.conf;
|
||||||
|
|
||||||
hardware.opengl.extraPackages = with pkgs; [
|
hardware.opengl.extraPackages = with pkgs; [
|
||||||
amdvlk
|
amdvlk
|
||||||
];
|
];
|
||||||
|
|
@ -30,16 +41,6 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# boot.kernelPatches = [
|
|
||||||
# (lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.11")
|
|
||||||
# {
|
|
||||||
# name = "cros_ec_lpc";
|
|
||||||
# patch = pkgs.fetchpatch {
|
|
||||||
# url = "https://patchwork.kernel.org/series/840830/mbox/";
|
|
||||||
# sha256 = "sha256-7jSEAGInFC+a+ozCyD4dFz3Qgh2JrHskwz7UfswizFw=";
|
|
||||||
# };
|
|
||||||
# })
|
|
||||||
# ];
|
|
||||||
# nixpkgs.overlays = [
|
# nixpkgs.overlays = [
|
||||||
# (final: prev: {
|
# (final: prev: {
|
||||||
# libinput = prev.libinput.overrideAttrs (old: {
|
# libinput = prev.libinput.overrideAttrs (old: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue