From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AAODM6tHHmQroAAASxT56A (envelope-from ) for ; Sat, 25 Mar 2023 02:00:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id i02WMqtHHmTzKwAAG6o9tA (envelope-from ) for ; Sat, 25 Mar 2023 02:00:27 +0100 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 9BDD433792 for ; Sat, 25 Mar 2023 02:00:27 +0100 (CET) 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=1679706027; 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=fpwzK0cL1fRICiVNleUMs47Yx09S9ocKXU/nZ7o7Ao7c245OdKeYPxeCs72Cj/5UlROgAQ O378W1CwyRoIzhsH7lwZplU75dBlSjWK3hfYcnUGNfp69tHb4R4qehQzz9HDmpZhQBLa+x JB8dWdhp8wqoVAjJ8apt9cYLAt73tWGr1dprEzJSSwnmtnQhPDDHvR9BdEPWvoSKGl+i4L rrsBoYNJFF5J85dAoWWAGz7KL2JQIPBgbrCRkHkOwiFof5oq2mL1X3iRRVvUFdW3GlCW0Z JF/B66Ho2kmINF6fCbFF3JUXacguy6lhln+lqwbqzDUksmEmR+IGrE+LSfpQRA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679706027; a=rsa-sha256; cv=none; b=BF3Yco7Shr5goAFy+y0WaOPadU46dJfU+KeEJC2LpNLutioGYKdci2ShGJMW5lMl2Sfz1Q nDHxW+sQhsCYhQYaqocuEFi3dXDByWc5zgi68jtYUorNldNsQce2oj2cJsgwzc6UQH3MHQ pgPtQJqPF0nBxCP5LsZKRLMLipzjH9SFBZyfS2pNh4/yfJfOYTWSeL2roywh4p50y6DD8B LV8mavlMEPFGnB+5IH9TFJYTJmBRzQv0YJJj7b4T1BKAaelobdZ33yphcg+wtd65MX2AsP 0yilt+7WMS+dEc4iLzDZvnePZAXYod6wDb7wMgcuXRQxjFDLqd8eIogdJYtMeA== 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 1pfsGR-0003mQ-1d; Fri, 24 Mar 2023 21:00:17 -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 1pfsGL-0003lE-BR for guix-patches@gnu.org; Fri, 24 Mar 2023 21:00:05 -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 1pfsGK-0001Yg-2e for guix-patches@gnu.org; Fri, 24 Mar 2023 21:00:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pfsGI-0008Tb-TY for guix-patches@gnu.org; Fri, 24 Mar 2023 21:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62298] [PATCH v3 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: Sat, 25 Mar 2023 01:00:02 +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.167970597432522 (code B ref 62298); Sat, 25 Mar 2023 01:00:02 +0000 Received: (at 62298) by debbugs.gnu.org; 25 Mar 2023 00:59:34 +0000 Received: from localhost ([127.0.0.1]:41789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfsFp-0008ST-KB for submit@debbugs.gnu.org; Fri, 24 Mar 2023 20:59:33 -0400 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]:53382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfsFo-0008SM-RW for 62298@debbugs.gnu.org; Fri, 24 Mar 2023 20:59:33 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id 84A372090F; Sat, 25 Mar 2023 01:59:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id D729B80098; Sat, 25 Mar 2023 01:51:10 +0100 (CET) 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 xjTmlnpUxFAW; Sat, 25 Mar 2023 01:51:10 +0100 (CET) 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 4034C8009A; Sat, 25 Mar 2023 01:51:10 +0100 (CET) From: Bruno Victal Date: Sat, 25 Mar 2023 00:46:46 +0000 Message-Id: <1fd3e13d1fb65d10fbf9bb6714a82f6a3c43c2e2.1679705137.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: 9BDD433792 X-Spam-Score: -0.23 X-Migadu-Spam-Score: -0.23 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: 9cqQQsxzQcAd * 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