From patchwork Thu Feb 24 16:38:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 509 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B40F627BBE9; Thu, 24 Feb 2022 16:40:25 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4F17627BBEA for ; Thu, 24 Feb 2022 16:40:25 +0000 (GMT) Received: from localhost ([::1]:40290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNHAG-0006ZG-Fa for patchwork@mira.cbaines.net; Thu, 24 Feb 2022 11:40:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNH9v-0006Xb-S6 for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56359) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNH9u-0000L6-1Q for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNH9t-0002qy-P4 for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53676] [PATCH v2 1/4] services/sound: Normalize pulseaudio-configuration accessor names. References: <20220201041352.14528-1-maxim.cournoyer@gmail.com> In-Reply-To: <20220201041352.14528-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Feb 2022 16:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53676 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53676@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 53676-submit@debbugs.gnu.org id=B53676.164572074610862 (code B ref 53676); Thu, 24 Feb 2022 16:40:01 +0000 Received: (at 53676) by debbugs.gnu.org; 24 Feb 2022 16:39:06 +0000 Received: from localhost ([127.0.0.1]:50247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNH8z-0002p8-OG for submit@debbugs.gnu.org; Thu, 24 Feb 2022 11:39:05 -0500 Received: from mail-qk1-f174.google.com ([209.85.222.174]:36413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNH8x-0002od-Am for 53676@debbugs.gnu.org; Thu, 24 Feb 2022 11:39:04 -0500 Received: by mail-qk1-f174.google.com with SMTP id g24so2285746qkl.3 for <53676@debbugs.gnu.org>; Thu, 24 Feb 2022 08:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jwYIFT94rjG8tPeSUKZdaZQXom6hlZLBBIH/bNXBhiE=; b=AYxRZnrU1rILVvniYnMv4tSjBSRyfh+DaIlE3mtpj5zzA1hghH3iovqLIadbq4MzqB 9z9xmVNPmb18SmeNxZ893L2WoyXdJey/4XuXYONZGqbCay2KhocinJFd9Z645euotgnR b3xJiPW7KYV5gtqCNWvX9poHXmpmCLnj1+NWPPlYo33vWFZLIN/oq13Lx1wSWjNPNyIp nsUfQlECJbMpDwgXeHk8FbSLFo6NdBZKpjk08WcEZ7lQp1dsE6D2I90SMe+9/0rU3Ksp PsI6DGLQ3PSHHoM06W8pwqfaH0t3LulZdr/zE2/QYqOCVdLvX6IPJNc6tzMILRBHuC0z EX6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jwYIFT94rjG8tPeSUKZdaZQXom6hlZLBBIH/bNXBhiE=; b=PLuVVl8Arpx326IeVSbU01jilbKFieL1teDU3Sg81iKAcs4Cme78EgmcMERAhIfFck tjjYqHaoLateGhZpdvSjSy2YXtTZPISo/TkDIA1P9vaFTir8SgtPc/N3R23rjAWNiWZ7 VWMPgNB4HRwbv2L8LYriD7v/v/AcA88NgDq/ma6bigTB/sFwjIq2w+qccbpy6kzWsCWi LU5dx+lV8koxJqpVb5pHExRmcH+SsS0RHf3QSUOFFOlSNgl5DR8fjW3L1zVSGIfHKomc XuflDLiE/l5tOH+mV/MjMYQAr2zLVMIJ9B/6S9MD/tr9Lx3GTfR4HB/N3piB+TbxFXOF x13A== X-Gm-Message-State: AOAM5300Qc4F+3Nyke44wDRI9zj9reVTwFaV9bILCp2i/BXZKlgBRJhT zbdWxk1y1dhKahH/TwsgBlfHaNMuQNTp7w== X-Google-Smtp-Source: ABdhPJxH0gF0Y/cLXoY3SwjIJ465CShgcnhQu2Tw7TUfXAmGbjCShIrXwry6RV1NzZVW80n03cRE8Q== X-Received: by 2002:a37:6c46:0:b0:60d:d526:7e48 with SMTP id h67-20020a376c46000000b0060dd5267e48mr2150971qkc.451.1645720737590; Thu, 24 Feb 2022 08:38:57 -0800 (PST) Received: from localhost.localdomain (dsl-156-1.b2b2c.ca. [66.158.156.1]) by smtp.gmail.com with ESMTPSA id b13sm1900956qtb.71.2022.02.24.08.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:38:57 -0800 (PST) From: Maxim Cournoyer Date: Thu, 24 Feb 2022 11:38:25 -0500 Message-Id: <20220224163828.11330-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/services/sound.scm (): Adjust getter names to match convention. --- gnu/services/sound.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm index 03e62a1e36..9684e06d13 100644 --- a/gnu/services/sound.scm +++ b/gnu/services/sound.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2018, 2020 Oleg Pykhalov ;;; Copyright © 2020 Liliana Marie Prikler ;;; Copyright © 2020 Marius Bakke +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -115,16 +116,16 @@ (define alsa-service-type (define-record-type* pulseaudio-configuration make-pulseaudio-configuration pulseaudio-configuration? - (client-conf pulseaudio-client-conf + (client-conf pulseaudio-configuration-client-conf (default '())) - (daemon-conf pulseaudio-daemon-conf + (daemon-conf pulseaudio-configuration-daemon-conf ;; Flat volumes may cause unpleasant experiences to users ;; when applications inadvertently max out the system volume ;; (see e.g. ). (default '((flat-volumes . no)))) - (script-file pulseaudio-script-file + (script-file pulseaudio-configuration-script-file (default (file-append pulseaudio "/etc/pulse/default.pa"))) - (system-script-file pulseaudio-system-script-file + (system-script-file pulseaudio-configuration-system-script-file (default (file-append pulseaudio "/etc/pulse/system.pa")))) From patchwork Thu Feb 24 16:38:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 511 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BF49C27BBEA; Thu, 24 Feb 2022 16:44:08 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8F75B27BBE9 for ; Thu, 24 Feb 2022 16:44:08 +0000 (GMT) Received: from localhost ([::1]:47308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNHDr-000312-P7 for patchwork@mira.cbaines.net; Thu, 24 Feb 2022 11:44:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNH9v-0006Xc-S8 for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56360) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNH9u-0000LI-9N for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNH9u-0002r6-7b for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53676] [PATCH v2 2/4] gnu: pulseaudio: Graft to adjust configuration. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Feb 2022 16:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53676 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53676@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 53676-submit@debbugs.gnu.org id=B53676.164572075510887 (code B ref 53676); Thu, 24 Feb 2022 16:40:02 +0000 Received: (at 53676) by debbugs.gnu.org; 24 Feb 2022 16:39:15 +0000 Received: from localhost ([127.0.0.1]:50250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNH99-0002pW-1A for submit@debbugs.gnu.org; Thu, 24 Feb 2022 11:39:15 -0500 Received: from mail-qk1-f172.google.com ([209.85.222.172]:34412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNH97-0002pH-72 for 53676@debbugs.gnu.org; Thu, 24 Feb 2022 11:39:13 -0500 Received: by mail-qk1-f172.google.com with SMTP id 185so2292053qkh.1 for <53676@debbugs.gnu.org>; Thu, 24 Feb 2022 08:39:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pfjS6st8V2vxUl+TtaswrzeKmoAYhPWd8TMUzV0AquU=; b=RBP3yUb2Z4EtO+NKJdFQPLeP4HbS5yNVCFeFQ5tc97PY4C4EdHCmToPRMs1cU3bY5A 2zfOY+E/apWyKqXAeYcpRLpTFK0Lgq8fXYOJZXgAoNAUmzM4He6yjZTcnFbGyAPIrfEd YuMfJ4xK0bAH9HoRWlpuGp4/AD42gA08sImGCaU/k9vb7AgDeMbnwiBTotL13gHOAKrZ APrm0NyZdjN7LvQpUAp7Kqpq30E5iE62oL+CwoHpPV5SFyzR0gi98tmZGuEAdOQ5QHCR hV3uz8Fv43MhU3CBygCQFQoPf6t+7u3tTqnyp7DgonKvyL9bvIpapBdxtiXVu4mh6DKu gIxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pfjS6st8V2vxUl+TtaswrzeKmoAYhPWd8TMUzV0AquU=; b=hFjQYT24NksJeBr8PJektUKV+T5QKNi1SAvMT58PgHgbQ3ZcEeVnocFisQczssl6k2 KAMRcYqAyF1CkbcZWkO5+ztWR7BEiB67xarlRvLYEn6z93FHvivptaTgcwRsacTiM6pU ZKygqDDTcBMErovZaEyUkQxDtFu8sx9MNw4vG95o8zRnXCfcE+e1fCOUAIRnfPc1dpWJ r1a80++yoXws3SbR0maOqzr6JCEKuCPXzZEwZsBseCyEud8UBQOusCL0kF0bPX1RCXxt cgCsKy25+uzPlA5BYRMibszc9lo+pHgq4uUC04c1GRB57HE27EZM6uDV/20qcaSBiFxD YzBA== X-Gm-Message-State: AOAM530dWPxf4mBf6G7Dyo7v8yLPd1Zbjhucon3YIsNs1HZZUC1vAUGr ihyZQPqKVFQw0pdOtJLWCVSY4vbO6ccgMQ== X-Google-Smtp-Source: ABdhPJyWXr68fWE5plbclj+zbcGanQ+QY35tjeOzHDT9aeVV6mmknKtlVH9oy6DbOyBJH3vEn5Uw4A== X-Received: by 2002:ae9:e016:0:b0:60d:fbbb:52d7 with SMTP id m22-20020ae9e016000000b0060dfbbb52d7mr2157621qkk.481.1645720747532; Thu, 24 Feb 2022 08:39:07 -0800 (PST) Received: from localhost.localdomain (dsl-156-1.b2b2c.ca. [66.158.156.1]) by smtp.gmail.com with ESMTPSA id b13sm1900956qtb.71.2022.02.24.08.39.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:39:07 -0800 (PST) From: Maxim Cournoyer Date: Thu, 24 Feb 2022 11:38:26 -0500 Message-Id: <20220224163828.11330-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220224163828.11330-1-maxim.cournoyer@gmail.com> References: <20220224163828.11330-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/pulseaudio.scm (pulseaudio/fixed): New variable. (pulseaudio)[replacement]: Graft package with it. --- gnu/packages/pulseaudio.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index fe028b5202..c1b3d33d4a 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -178,6 +178,7 @@ (define-public libsamplerate (define-public pulseaudio (package (name "pulseaudio") + (replacement pulseaudio/fixed) (version "15.0") (source (origin (method url-fetch) @@ -269,6 +270,22 @@ (define-public pulseaudio ;; 'LICENSE' for details. (license l:gpl2+))) +(define pulseaudio/fixed + (package + (inherit pulseaudio) + (arguments + (substitute-keyword-arguments (package-arguments pulseaudio) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'customize-default-script + (lambda _ + (substitute* "src/daemon/default.pa.in" + (("^\\.include.*default.pa.d.*" anchor) + (string-append + ;; Honor PulseAudio script extensions found under + ;; /etc/pulse/default.pa.d. + anchor ".include /etc/pulse/default.pa.d\n"))))))))))) + (define-public pavucontrol (package (name "pavucontrol") From patchwork Thu Feb 24 16:38:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 510 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7724227BBEA; Thu, 24 Feb 2022 16:40:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D63F727BBE9 for ; Thu, 24 Feb 2022 16:40:36 +0000 (GMT) Received: from localhost ([::1]:40916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNHAS-00070I-18 for patchwork@mira.cbaines.net; Thu, 24 Feb 2022 11:40:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNH9v-0006Xa-Re for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56361) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNH9u-0000LN-PY for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNH9u-0002rD-Nh for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53676] [PATCH v2 3/4] services: pulseaudio: Add an extra-script-files configuration field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Feb 2022 16:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53676 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53676@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 53676-submit@debbugs.gnu.org id=B53676.164572075810903 (code B ref 53676); Thu, 24 Feb 2022 16:40:02 +0000 Received: (at 53676) by debbugs.gnu.org; 24 Feb 2022 16:39:18 +0000 Received: from localhost ([127.0.0.1]:50253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNH9C-0002pm-B6 for submit@debbugs.gnu.org; Thu, 24 Feb 2022 11:39:18 -0500 Received: from mail-qv1-f41.google.com ([209.85.219.41]:46790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNH9A-0002pM-Cj for 53676@debbugs.gnu.org; Thu, 24 Feb 2022 11:39:16 -0500 Received: by mail-qv1-f41.google.com with SMTP id j5so4488113qvs.13 for <53676@debbugs.gnu.org>; Thu, 24 Feb 2022 08:39:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=//0UcyvMykC0klOPtwtR6f4nL79ZAGy3oAQCvAhj/kI=; b=I/ZQ0FwbwuV0Ull++DL9p/5s3dI0ZTljma3us9FVW8OvNL3hMBFR2cPFMJIXv7bXVg kzQNNcGby3Mc3alGT1kK8xjt3wj7r/iZHkbR0Ptg54/lc/cJ37PavSX2YTWYnN7yj8Mn rCBdDryVOo9/9FW0nX2MQFV4aNjVxYkNmfjqWMRxqq07wykMoFB80LBOO826OsLOntXS SPd9EKhmna/ida0zcWQ6g/rIb7jOl9mHUOpF45RHigdtkfwGGwf6GcXV7M2D76jgO4mO KZKla0XpuKNxp+Pn3JT/IXVV11WT4DsR55E2NhSBPWAKdaWq4RL6VqrckXrlQPKZCuKY L0pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=//0UcyvMykC0klOPtwtR6f4nL79ZAGy3oAQCvAhj/kI=; b=vPI4PsD4qVGAeHeCQQk6QVynBTgqayt+VWP2NDMB9EMS+4iCIhQa5WSCxDlbCtF2hr HqaXTBeABpFkgfu9SnEVRAJWptHsLzxi2E+3YsHi6Cx1+U3CxDzIamkpb7udQ+tt1DoK wpXSQB8szOVZnVGFUhpa6JLKqow9WKMd43dD9DCBjEUNIauJOYIWu0CFkO+CAyPcnGf+ j/5ni7eHHd7KLA+h2j9M5OQW845pw5RocQKx3am3jGNB11CpzWR5Oz1Maw7J5lmZBSR5 5CD+ZjS4VEoYm0wpbQGAJ3zzTO9Vsd+DSJ4XSJQVhS9sMC0ZsTUlPmlTT2sqP2jxOuA5 u+9Q== X-Gm-Message-State: AOAM5300me/53JUrjV0Re6kJrqNynZTCVJ73NUuZEzpXziOpgmP0MXhW nmHTtk04rd7o+XmbgsrobKkPeuKZi4vDwQ== X-Google-Smtp-Source: ABdhPJyb/PEQ2hJAC13Ws7nhbFpL6JuSDWdxZa41qq197+saUqU1oz4T+w6OXEfeJYDHmJYyNK4RnA== X-Received: by 2002:ac8:5648:0:b0:2ce:dd03:59fa with SMTP id 8-20020ac85648000000b002cedd0359famr3163046qtt.288.1645720750579; Thu, 24 Feb 2022 08:39:10 -0800 (PST) Received: from localhost.localdomain (dsl-156-1.b2b2c.ca. [66.158.156.1]) by smtp.gmail.com with ESMTPSA id b13sm1900956qtb.71.2022.02.24.08.39.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:39:10 -0800 (PST) From: Maxim Cournoyer Date: Thu, 24 Feb 2022 11:38:27 -0500 Message-Id: <20220224163828.11330-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220224163828.11330-1-maxim.cournoyer@gmail.com> References: <20220224163828.11330-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/services/sound.scm () [extra-script-files]: Add field. (extra-script-files->file-union): Add procedure. (pulseaudio-etc): Use it. * doc/guix.texi: Document it. --- doc/guix.texi | 30 ++++++++++++++++++++++++++++++ gnu/services/sound.scm | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f336c26e8a..9941be5033 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -21509,9 +21509,39 @@ List of settings to set in @file{daemon.conf}, formatted just like @item @code{script-file} (default: @code{(file-append pulseaudio "/etc/pulse/default.pa")}) Script file to use as @file{default.pa}. +@item @code{extra-script-files} (default: @code{'())}) +A list of file-like objects defining extra PulseAudio scripts to run at +the initialization of the @command{pulseaudio} daemon, after the main +@code{script-file}. The scripts are deployed to the +@file{/etc/pulse/default.pa.d} directory; they should have the +@samp{.pa} file name extension. For a reference of the available +commands, refer to @command{man pulse-cli-syntax}. + @item @code{system-script-file} (default: @code{(file-append pulseaudio "/etc/pulse/system.pa")}) Script file to use as @file{system.pa}. @end table + +The example below sets the default PulseAudio card profile, the default +sink and the default source to use for a old SoundBlaster Audigy sound +card: +@lisp +(pulseaudio-configuration + (extra-script-files + (list (plain-file "audigy.pa" + (string-append "\ +set-card-profile alsa_card.pci-0000_01_01.0 \ + output:analog-surround-40+input:analog-mono +set-default-source alsa_input.pci-0000_01_01.0.analog-mono +set-default-sink alsa_output.pci-0000_01_01.0.analog-surround-40\n"))))) +@end lisp + +Note that @code{pulseaudio-service-type} is part of +@code{%desktop-services}; if your operating system declaration was +derived from one of the desktop templates, you'll want to adjust the +above example to modify the existing @code{pulseaudio-service-type} via +@code{modify-services} (@pxref{Service Reference, +@code{modify-services}}), instead of defining a new one. + @end deftp @deffn {Scheme Variable} ladspa-service-type diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm index 9684e06d13..eecea1a733 100644 --- a/gnu/services/sound.scm +++ b/gnu/services/sound.scm @@ -26,14 +26,17 @@ (define-module (gnu services sound) #:use-module (gnu services) #:use-module (gnu system pam) #:use-module (gnu system shadow) + #:use-module (guix diagnostics) #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix records) #:use-module (guix store) + #:use-module (guix ui) #:use-module (gnu packages audio) #:use-module (gnu packages linux) #:use-module (gnu packages pulseaudio) #:use-module (ice-9 match) + #:use-module (srfi srfi-1) #:export (alsa-configuration alsa-service-type @@ -125,6 +128,8 @@ (define-record-type* (default '((flat-volumes . no)))) (script-file pulseaudio-configuration-script-file (default (file-append pulseaudio "/etc/pulse/default.pa"))) + (extra-script-files pulseaudio-configuration-extra-script-files + (default '())) (system-script-file pulseaudio-configuration-system-script-file (default (file-append pulseaudio "/etc/pulse/system.pa")))) @@ -145,14 +150,43 @@ (define pulseaudio-environment ("PULSE_CLIENTCONFIG" . ,(apply mixed-text-file "client.conf" (map pulseaudio-conf-entry client-conf))))))) +(define (extra-script-files->file-union extra-script-files) + "Return a G-exp obtained by processing EXTRA-SCRIPT-FILES with FILE-UNION." + + (define (file-like->name file) + (match file + ((? local-file?) + (local-file-name file)) + ((? plain-file?) + (plain-file-name file)) + ((? computed-file?) + (computed-file-name file)) + (_ (leave (G_ "~a is not a local-file, plain-file or \ +computed-file object~%") file)))) + + (define (assert-pulseaudio-script-file-name name) + (unless (string-suffix? ".pa" name) + (leave (G_ "`~a' lacks the required `.pa' file name extension~%") name)) + name) + + (let ((labels (map (compose assert-pulseaudio-script-file-name + file-like->name) + extra-script-files))) + (file-union "default.pa.d" (zip labels extra-script-files)))) + (define pulseaudio-etc (match-lambda - (($ _ _ default-script-file system-script-file) + (($ _ _ default-script-file extra-script-files + system-script-file) `(("pulse" ,(file-union "pulse" `(("default.pa" ,default-script-file) - ("system.pa" ,system-script-file)))))))) + ("system.pa" ,system-script-file) + ,@(if (null? extra-script-files) + '() + `(("default.pa.d" ,(extra-script-files->file-union + extra-script-files))))))))))) (define pulseaudio-service-type (service-type From patchwork Thu Feb 24 16:38:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 508 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 84A5927BBEB; Thu, 24 Feb 2022 16:40:25 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F3B5727BBE9 for ; Thu, 24 Feb 2022 16:40:24 +0000 (GMT) Received: from localhost ([::1]:40284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNHAF-0006Z1-LF for patchwork@mira.cbaines.net; Thu, 24 Feb 2022 11:40:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNH9v-0006Xg-Sl for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56362) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNH9v-0000LQ-AO for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNH9v-0002rM-7w for guix-patches@gnu.org; Thu, 24 Feb 2022 11:40:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53676] [PATCH v2 4/4] services: pulseaudio: Deploy the configuration files to /etc/pulse. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Feb 2022 16:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53676 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53676@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 53676-submit@debbugs.gnu.org id=B53676.164572076210918 (code B ref 53676); Thu, 24 Feb 2022 16:40:03 +0000 Received: (at 53676) by debbugs.gnu.org; 24 Feb 2022 16:39:22 +0000 Received: from localhost ([127.0.0.1]:50256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNH9F-0002q1-Oh for submit@debbugs.gnu.org; Thu, 24 Feb 2022 11:39:22 -0500 Received: from mail-qv1-f50.google.com ([209.85.219.50]:34403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNH9D-0002pV-Cy for 53676@debbugs.gnu.org; Thu, 24 Feb 2022 11:39:19 -0500 Received: by mail-qv1-f50.google.com with SMTP id ba20so4610815qvb.1 for <53676@debbugs.gnu.org>; Thu, 24 Feb 2022 08:39:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vhTTMDJdJkrTEyt5h66ZuKIKIyb4H3aU6NIk7ktcSBo=; b=EEGHfUJWaAmoUDuoDEhTvVp7peSfZ+z2dz2xra4ODF4W6Bhiq+xHBC3paVvkQ9gKmH mtKExMXAaKQTYcikKSLBjSL/ukFqC0Ae2vpqwtxmDw3YJxWKP/1C9ya+Ac2Vw7qe04c0 DMgXs8tSBZBA3fkMXAlUSQrPW27bcEM+2hcTCXernfJjLtYOeD+9IVyaWiDrNKdQ/nj3 OEP1wxqQX6vNkgs0gaIK9d5/cgvsWbovMhb+A4cqunLDMC6RoLNYOKetVcHUabmbo9RP Bbawmd7m2hK5gb/bmwOXhcV0B/iq9xwb0p3e48bbPmfaHZSsEwQofxNd4R2LB1j1evF0 GfYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vhTTMDJdJkrTEyt5h66ZuKIKIyb4H3aU6NIk7ktcSBo=; b=Ka+vq/i3/ueFavOZKNgSzPCcq+Xzl+dyvjvXcAqd7q1gIxMH7B5VFdahugO90PS+Sx MICBqcsfWLJDZkI2zJ334xgLN7kULRfKxT2O42MGBdiat/JmO/x774tvjjly2MrdCj8P DV/NAJtK446Jpkm5rIYnA8OHWdtI3wV+3qlv9KqZQwXQnJmBGImmw46LEhYshU5oAqf+ e5PMJIt+zJtajlGSg4byfJrjaBjw+f28AMs+Z79z+pNqiDKVbywL9lT3TlWPGn2AFn2G /YWmNGYLyi2HMSu6tUCJ3QgszfJoFXyJESD8QWNbLymixXTijOrd/vub2gsXQ/eWbQQU TGug== X-Gm-Message-State: AOAM530888YX0fTUBp81xlgwxxZrrQJuF25nMYIhZXqnHsuU5YTrbum6 ZPSfpuGSHLJ3sMwc9yQY9ODg+Nz5Y3Blag== X-Google-Smtp-Source: ABdhPJwQ8WSX7tu/ad6MIjWEcRW/JTuvq1wZ9Qv/59/7YIF1boYrzgconuWzCdcBBISg2c89zPIaTA== X-Received: by 2002:a05:6214:23cf:b0:42c:a789:146 with SMTP id hr15-20020a05621423cf00b0042ca7890146mr2812205qvb.89.1645720753654; Thu, 24 Feb 2022 08:39:13 -0800 (PST) Received: from localhost.localdomain (dsl-156-1.b2b2c.ca. [66.158.156.1]) by smtp.gmail.com with ESMTPSA id b13sm1900956qtb.71.2022.02.24.08.39.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:39:13 -0800 (PST) From: Maxim Cournoyer Date: Thu, 24 Feb 2022 11:38:28 -0500 Message-Id: <20220224163828.11330-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220224163828.11330-1-maxim.cournoyer@gmail.com> References: <20220224163828.11330-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/services/sound.scm (pulseaudio-environment) [PULSE_CONFIG, PULSE_CLIENTCONFIG]: Use fix locations, and move logic to... (pulseaudio-etc): ... this service extension. Guard against producing empty files. --- gnu/services/sound.scm | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm index eecea1a733..336f6c39a0 100644 --- a/gnu/services/sound.scm +++ b/gnu/services/sound.scm @@ -144,11 +144,11 @@ (define (pulseaudio-conf-entry arg) (define pulseaudio-environment (match-lambda (($ client-conf daemon-conf default-script-file) - `(("PULSE_CONFIG" . ,(apply mixed-text-file "daemon.conf" - "default-script-file = " default-script-file "\n" - (map pulseaudio-conf-entry daemon-conf))) - ("PULSE_CLIENTCONFIG" . ,(apply mixed-text-file "client.conf" - (map pulseaudio-conf-entry client-conf))))))) + ;; These config files kept at a fixed location, so that the following + ;; environment values are stable and do not require the user to reboot to + ;; effect their PulseAudio configuration changes. + '(("PULSE_CONFIG" . "/etc/pulse/daemon.conf") + ("PULSE_CLIENTCONFIG" . "/etc/pulse/client.conf"))))) (define (extra-script-files->file-union extra-script-files) "Return a G-exp obtained by processing EXTRA-SCRIPT-FILES with FILE-UNION." @@ -176,8 +176,8 @@ (define (assert-pulseaudio-script-file-name name) (define pulseaudio-etc (match-lambda - (($ _ _ default-script-file extra-script-files - system-script-file) + (($ client-conf daemon-conf default-script-file + extra-script-files system-script-file) `(("pulse" ,(file-union "pulse" @@ -186,7 +186,18 @@ (define pulseaudio-etc ,@(if (null? extra-script-files) '() `(("default.pa.d" ,(extra-script-files->file-union - extra-script-files))))))))))) + extra-script-files)))) + ,@(if (null? daemon-conf) + '() + `(("daemon.conf" + ,(apply mixed-text-file "daemon.conf" + "default-script-file = " default-script-file "\n" + (map pulseaudio-conf-entry daemon-conf))))) + ,@(if (null? client-conf) + '() + `(("client.conf" + ,(apply mixed-text-file "client.conf" + (map pulseaudio-conf-entry client-conf)))))))))))) (define pulseaudio-service-type (service-type