GNU bug report logs - #74657
[PATCH] gnu: home: home-pipewire: Add extra-content to configuration.

Previous Next

Package: guix-patches;

Reported by: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Date: Mon, 2 Dec 2024 21:17:02 UTC

Severity: normal

Tags: patch

Done: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Janneke Nieuwenhuizen <janneke <at> gnu.org>
Subject: bug#74657: closed (Re: [bug#74657] [PATCH] gnu: home:
 home-pipewire: Add extra-content to configuration.)
Date: Wed, 22 Jan 2025 08:48:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#74657: [PATCH] gnu: home: home-pipewire: Add extra-content to configuration.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 74657 <at> debbugs.gnu.org.

-- 
74657: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74657
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
To: 74657-done <at> debbugs.gnu.org
Cc: "\(" <paren <at> disroot.org>, Ludovic Courtès <ludo <at> gnu.org>,
 Tanguy Le Carrour <tanguy <at> bioneland.org>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, Andrew Tropin <andrew <at> trop.in>
Subject: Re: [bug#74657] [PATCH] gnu: home: home-pipewire: Add extra-content
 to configuration.
Date: Wed, 22 Jan 2025 09:47:21 +0100
Janneke Nieuwenhuizen writes:

> This allows for setting the default sound card/device, e.g.:
>
>     pcm.!default {type hw card 0 device 2}
>     ctl.!default {type hw card 0 device 2}
>
> * gnu/home/services/sound.scm (home-pipewire-configuration)[extra-content]:
> New field.
> * gnu/home/services/sound.scm (home-pipewire-asoundrc): Append it to
> "asoundrc".
> * doc/guix.texi (Sound Home Services): Update accordingly.
>
> Change-Id: I6ecebaaab41cd7313b16a5f365c21789db65664e

Pushed to master as 7080aaf08102ec4c9c976582d6adfa0c14e6c640.

Greetings,
Janneke

-- 
Janneke Nieuwenhuizen <janneke <at> gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com

[Message part 3 (message/rfc822, inline)]
From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: home: home-pipewire: Add extra-content to configuration.
Date: Mon,  2 Dec 2024 22:16:28 +0100
This allows for setting the default sound card/device, e.g.:

    pcm.!default {type hw card 0 device 2}
    ctl.!default {type hw card 0 device 2}

* gnu/home/services/sound.scm (home-pipewire-configuration)[extra-content]:
New field.
* gnu/home/services/sound.scm (home-pipewire-asoundrc): Append it to
"asoundrc".
* doc/guix.texi (Sound Home Services): Update accordingly.

Change-Id: I6ecebaaab41cd7313b16a5f365c21789db65664e
---
 doc/guix.texi               |  3 +++
 gnu/home/services/sound.scm | 11 ++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 8a6640124c..f5bd1bc667 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -47289,6 +47289,9 @@ The WirePlumber package to use.
 @item @code{enable-pulseaudio?} (default: @code{#t}) (type: boolean)
 When true, enable PipeWire's PulseAudio emulation support, allowing
 PulseAudio clients to use PipeWire transparently.
+
+@item @code{extra-content} (default: @code{""}) (type: string)
+Extra content to add to the end of @file{~/.config/alsa/asoundrc}.
 @end table
 @end deftp
 
diff --git a/gnu/home/services/sound.scm b/gnu/home/services/sound.scm
index 313a57305b..5366c0634f 100644
--- a/gnu/home/services/sound.scm
+++ b/gnu/home/services/sound.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2023 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2023 Brian Cully <bjc <at> spork.org>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke <at> gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,7 +50,10 @@ (define-configuration/no-serialization home-pipewire-configuration
   (enable-pulseaudio?
    (boolean #t)
    "When true, enable PipeWire's PulseAudio emulation support, allowing
-PulseAudio clients to use PipeWire transparently."))
+PulseAudio clients to use PipeWire transparently.")
+  (extra-content
+   (string "")
+   "Extra content to add to the end of @file{~/.config/alsa/asoundrc}."))
 
 (define (home-pipewire-shepherd-service config)
   (shepherd-service
@@ -93,7 +97,7 @@ (define (home-pipewire-shepherd-services config)
 
 (define (home-pipewire-asoundrc config)
   (match-record config <home-pipewire-configuration>
-                (pipewire)
+                (pipewire extra-content)
     (mixed-text-file
      "asoundrc"
      "<" pipewire "/share/alsa/alsa.conf.d/50-pipewire.conf>\n"
@@ -103,7 +107,8 @@ (define (home-pipewire-asoundrc config)
      "}\n"
      "ctl_type.pipewire {\n"
      "  lib \"" pipewire "/lib/alsa-lib/libasound_module_ctl_pipewire.so\"\n"
-     "}\n")))
+     "}\n"
+     extra-content)))
 
 (define home-pipewire-disable-pulseaudio-auto-start
   (plain-file "client.conf" "autospawn = no"))
-- 
2.46.0




This bug report was last modified 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.