From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 iBqmNBmTGGQz0QAASxT56A (envelope-from ) for ; Mon, 20 Mar 2023 18:08:41 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aCurNBmTGGS4bAAAauVa8A (envelope-from ) for ; Mon, 20 Mar 2023 18:08:41 +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 AE1591476F for ; Mon, 20 Mar 2023 18:08:41 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679332121; 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=ob3WPJ8q3wI0H9WTBL2gEuYhGPi7dl7i07EZxR8GwBY=; b=al5LNPosFRdc0DH4CHiZTBKXDlHDClkYcIo+YfxEW3Nx2L8/Yp844FWfTwjRZcWuxtJkfX KrspGug+8HT6PhqQZst2SR1erZgGWZnDhwzIUOxxUUlu7RIB/obQ2E/Sj90l6ri3tRhumj NAT9z04+G0zkm1KD4+b7JuiaOPNeMOjqzOKBwl3O3en5jV6E6IWxNlfU6sHBeqs787w6+2 oTL7/vaCdet5MY923waK3pdDSY5QESWQLqtfJNMvP6kvczmZ6ulefafzLVZf1s3N0O/RJL PifTfRfpJsocvulRwtZRRSz/keSr01Vd4CS7lsQVAlViiaKQilnij+AZKxG48A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679332121; a=rsa-sha256; cv=none; b=iWx5oIjwW3zuKkQassDF7bXu+npL/B6HO2onSdTNQQttyzcrvAUNx3UJ8dLRvL+2kFDx8D 0fvrgU1fgl9tZE5RLyI+wRvjfM20wObzGbE3pNGRLRrrVljjipBYnnIDo77x4drboljJel egyAte6l8UjY7ZCnhoF0e3ATQy76xSFiAmNWRmzH6O+HRXbrIEQM/z/ElpbRzj8ASfXmdh R56nJYgeLHnNPCIEE6fOXsy4f+iF+b9y2jRgXVarMs6u33CdNLrwi7ooM9E0FWtcFYSBd4 ZOA8vxRXeSoeCWVY/gyDTdGzUIkep8UNJOKAUOm0lLDjv1qQ3RANxZcrtquGQA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peIzM-0002dN-Oi; Mon, 20 Mar 2023 13:08: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 1peIzL-0002bv-85 for guix-patches@gnu.org; Mon, 20 Mar 2023 13:08:03 -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 1peIzK-0005ob-Vj for guix-patches@gnu.org; Mon, 20 Mar 2023 13:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peIzK-00030s-RI for guix-patches@gnu.org; Mon, 20 Mar 2023 13:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62298] [PATCH 5/8] 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: Mon, 20 Mar 2023 17:08: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.167933204411484 (code B ref 62298); Mon, 20 Mar 2023 17:08:02 +0000 Received: (at 62298) by debbugs.gnu.org; 20 Mar 2023 17:07:24 +0000 Received: from localhost ([127.0.0.1]:55637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peIyh-0002z3-Fj for submit@debbugs.gnu.org; Mon, 20 Mar 2023 13:07:23 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:40258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peIyd-0002yL-LD for 62298@debbugs.gnu.org; Mon, 20 Mar 2023 13:07:20 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 1942E20FAB; Mon, 20 Mar 2023 18:07:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id C0937800A5; Mon, 20 Mar 2023 18:07:17 +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 t94z_oZknZ6n; Mon, 20 Mar 2023 18:07:17 +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 3690B8009D; Mon, 20 Mar 2023 18:07:17 +0100 (CET) From: Bruno Victal Date: Mon, 20 Mar 2023 17:07:10 +0000 Message-Id: <2e1f2722a4dd77e590bdda0b6b394675c9835f7c.1679332019.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: AE1591476F X-Spam-Score: -1.06 X-Migadu-Spam-Score: -1.06 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: 2IUR4MdatDA3 * 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 e5b065a479..ec6b3c5466 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 + (leave (G_ "invalid input for 'mixer-type'~%"))))))) (replay-gain-handler maybe-string -- 2.39.1