From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 6G0RFkaSIGSEIgAASxT56A (envelope-from ) for ; Sun, 26 Mar 2023 20:43:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id yNciFUaSIGSSeQEAG6o9tA (envelope-from ) for ; Sun, 26 Mar 2023 20:43:18 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 21D1CAB2 for ; Sun, 26 Mar 2023 20:43:17 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679856198; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=660G2lZJAEl0Y1zFbF26UP8W1q10Y4bzU9Z0eL2LK2E=; b=oota9fTYHv2mBYUaLVRziLrmRU6CNd1gCDSTopY9aqfnWxX/FQYriSFQmGjMJal0/VaYPa f7XbyeuTYsx2g+GN7QYnq8VK59EwdPO0pyC0WwkthIbmXSUKwRS62eRt5pnw39WublH9S8 hy77znyj8TjyTld+Txjl6AzUGmxCenKbW3s4NtdJjqmEMtRTWgpg78rMRpHBoqGSCGq2RQ dSONFHKFVCp8SAMAe0MY3d13cRRhc6xX/QiSnmLMY9BrGGnLf2ox2WBJBRd0iQOsQPr3PC mAN5pSd5x/7DXN36cPeQcm2OEclGl1KjwRAo0+2CwZ8vDBEOZq+00cIzFyTjfA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679856198; a=rsa-sha256; cv=none; b=f5yDYCVEKNF5uPKZas+BLtIi3V0uuEvuVgMEYIe0qiJPPrB4ZMVIvIdwuYfO1avjCwJO4v 9qa5MYJBsgg6mUBcXOl22dhy9w3mZxPSZn35WOsAHh/Xv0Kclq0pIfcFYnPOWFpj2zGRif RxxnbTvckZB5qmx1/IHzYeO0+HP96WT5HX5EmWINzaIU0avEjR1Zm4x3kZJDiKPlZXIb6s 15n3+NHdlwX7A93aPvc3hjHHsj2XIHkAzEvISXZWWTHvJjFdlJ89Eq2YCChAZmfkgBSKmZ Vwz3eDjwYEj3FAzebWi1UbpNkZHHWpCQGhNNrZxq4z95neGgv60m8gdfxVJvmA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgVKa-0007IT-HN; Sun, 26 Mar 2023 14:43:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgVKY-0007Hf-5i for guix-patches@gnu.org; Sun, 26 Mar 2023 14:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pgVKX-0001EL-Rc for guix-patches@gnu.org; Sun, 26 Mar 2023 14:43:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pgVKX-0003BO-Nn for guix-patches@gnu.org; Sun, 26 Mar 2023 14:43:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62298] [PATCH v4 3/5] services: mpd: Fix unintentional API breakage for mixer-type field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 26 Mar 2023 18:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62298 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62298@debbugs.gnu.org Cc: ludo@gnu.org, Bruno Victal , liliana.prikler@gmail.com, maxim.cournoyer@gmail.com Received: via spool by 62298-submit@debbugs.gnu.org id=B62298.167985615712169 (code B ref 62298); Sun, 26 Mar 2023 18:43:01 +0000 Received: (at 62298) by debbugs.gnu.org; 26 Mar 2023 18:42:37 +0000 Received: from localhost ([127.0.0.1]:45801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgVK8-0003A2-QC for submit@debbugs.gnu.org; Sun, 26 Mar 2023 14:42:37 -0400 Received: from smtpm5.myservices.hosting ([185.26.105.236]:59332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgVK7-00039r-Ff for 62298@debbugs.gnu.org; Sun, 26 Mar 2023 14:42:35 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm5.myservices.hosting (Postfix) with ESMTP id F37F020CED; Sun, 26 Mar 2023 20:42:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 937A280097; Sun, 26 Mar 2023 20:42:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yu3eC5vG5Qid; Sun, 26 Mar 2023 20:42:33 +0200 (CEST) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id EC4E280098; Sun, 26 Mar 2023 20:42:32 +0200 (CEST) From: Bruno Victal Date: Sun, 26 Mar 2023 19:41:31 +0100 Message-Id: <51fec2a2060a2f6f3da0a83775b0e85402581db4.1679855983.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: X-Migadu-Queue-Id: 21D1CAB2 X-Spam-Score: 0.47 X-Migadu-Spam-Score: 0.47 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: dpgakEdexYmg * gnu/services/audio.scm (mpd-output)[mixer-type]: Use sanitizer to accept both strings and symbols as values. --- gnu/services/audio.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index c073b85a32..bc4aed71dc 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -140,6 +140,11 @@ (define (uglify-field-name field-name) (define list-of-symbol? (list-of symbol?)) + +;;; +;;; MPD +;;; + (define (mpd-serialize-field field-name value) (let ((field (if (string? field-name) field-name (uglify-field-name field-name))) @@ -294,7 +299,17 @@ (define-configuration mpd-output for this audio output: the @code{hardware} mixer, the @code{software} mixer, the @code{null} mixer (allows setting the volume, but with no effect; this can be used as a trick to implement an external mixer -External Mixer) or no mixer (@code{none}).") +External Mixer) or no mixer (@code{none})." + (sanitizer + (lambda (x) ; TODO: deprecated, remove me later. + (cond + ((symbol? x) + (warning (G_ "symbol value for 'mixer-type' is deprecated, \ +use string instead~%")) + (symbol->string x)) + ((string? x) x) + (else + (configuration-field-error #f 'mixer-type x)))))) (replay-gain-handler maybe-string -- 2.39.1