adjust audio setup

feature/hass
Ingolf Wagner 2020-02-19 06:28:39 +08:00
parent 67618358e0
commit 4e1174d608
Signed by: palo
GPG Key ID: 76BF5F1928B9618B
5 changed files with 31 additions and 24 deletions

View File

@ -55,15 +55,15 @@ in {
# add virtual midi module # add virtual midi module
# ----------------------- # -----------------------
boot = { #boot = {
# to route midi signals # # to route midi signals
# between bitwig and vcvrack # # between bitwig and vcvrack
kernelModules = [ "snd_virmidi" ]; # kernelModules = [ "snd_virmidi" ];
# index=-2 prevents from beeing recognised as the default # # index=-2 prevents from beeing recognised as the default
# audio device # # audio device
# midi_devs limit the number of midi devices. # # midi_devs limit the number of midi devices.
extraModprobeConfig = "options snd-virmidi index=-2 midi_devs=1"; # extraModprobeConfig = "options snd-virmidi index=-2 midi_devs=1";
}; #};
# LADSPA # LADSPA
# ------ # ------
@ -88,12 +88,11 @@ in {
hardware.pulseaudio = { hardware.pulseaudio = {
enable = true; enable = true;
package = pkgs.pulseaudioFull;
# all in audio group can do audio # all in audio group can do audio
systemWide = true; systemWide = true;
package = pkgs.pulseaudioFull;
extraConfig = '' extraConfig = ''
# automatically switch to newly-connected devices # automatically switch to newly-connected devices
@ -112,8 +111,10 @@ in {
sinkDescription = "sink_properties=device.description=${ sinkDescription = "sink_properties=device.description=${
sinkName index sinkName index
}-${queua.label}"; }-${queua.label}";
masterValue = masterValue = if (index == 0) then
if (index == 0) then "" else "master=${sinkName (index - 1)}"; ""
else
"sink_master=${sinkName (index - 1)}";
pluginValue = "plugin=${ladspaPath}/${queua.plugin}"; pluginValue = "plugin=${ladspaPath}/${queua.plugin}";
labelValue = "label=${queua.label}"; labelValue = "label=${queua.label}";
controlValue = "control=${ controlValue = "control=${
@ -133,15 +134,15 @@ in {
# --------------- # ---------------
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
jackScript
# Music making # Music making
jack2Full # ------------
alsaUtils #jackScript
patchage #jack2Full
zynaddsubfx #patchage
#zynaddsubfx
#qjackctl
# qjackctl alsaUtils
# LADSPA # LADSPA
# ------ # ------

View File

@ -49,7 +49,7 @@
services.urxvtd.enable = true; services.urxvtd.enable = true;
system.custom = { bluetooth.enable = true; }; system.custom = { bluetooth.enable = false; };
# temperature / power consumption # temperature / power consumption
# https://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html # https://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html

View File

@ -28,6 +28,9 @@ let
nixStartCopyq = "${pkgs.copyq}/bin/copyq" nixStartCopyq = "${pkgs.copyq}/bin/copyq"
nixShowCopyq = "${pkgs.copyq}/bin/copyq show" nixShowCopyq = "${pkgs.copyq}/bin/copyq show"
nixStartTerminal = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtc" nixStartTerminal = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtc"
nixAlsaRaiseVolume = "${pkgs.alsaUtils}/bin/amixer set Master 5%+"
nixAlsaLowerVolume = "${pkgs.alsaUtils}/bin/amixer set Master 5%-"
nixAlsaMute = "${pkgs.alsaUtils}/bin/amixer set Master toggle"
''; '';
in { in {

View File

@ -330,9 +330,9 @@ myAdditionaKeys
-- Volume Control -- Volume Control
-- --
-- ------------------------------------------------------------ -- ------------------------------------------------------------
[ ("<XF86AudioRaiseVolume>", spawn "amixer set Master 5%+") [ ("<XF86AudioRaiseVolume>", spawn nixAlsaRaiseVolume)
, ("<XF86AudioLowerVolume>", spawn "amixer set Master 5%-") , ("<XF86AudioLowerVolume>", spawn nixAlsaLowerVolume)
, ("<XF86AudioMute>", spawn "amixer set Master toggle") , ("<XF86AudioMute>", spawn nixAlsaMute)
] ++ ] ++
-- ------------------------------------------------------------ -- ------------------------------------------------------------
-- --

View File

@ -14,3 +14,6 @@ nixStartAlbert = ""
nixStartCopyq = "" nixStartCopyq = ""
nixShowCopyq = "" nixShowCopyq = ""
nixStartTerminal = "" nixStartTerminal = ""
nixAlsaRaiseVolume = ""
nixAlsaLowerVolume = ""
nixAlsaMute = ""