From patchwork Mon May 4 16:10:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanu Kaskinen X-Patchwork-Id: 6327851 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0ECE4BEEE1 for ; Mon, 4 May 2015 16:11:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D64020251 for ; Mon, 4 May 2015 16:11:45 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 094F320211 for ; Mon, 4 May 2015 16:11:44 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C9E592606D2; Mon, 4 May 2015 18:11:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id D123D260606; Mon, 4 May 2015 18:11:29 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id B533626060C; Mon, 4 May 2015 18:11:28 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by alsa0.perex.cz (Postfix) with ESMTP id 7A7662605B2 for ; Mon, 4 May 2015 18:11:21 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 04 May 2015 09:10:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,366,1427785200"; d="scan'208";a="689676048" Received: from tkkaskin-mobl3.ger.corp.intel.com (HELO tkkaskin-mobl3.ger.corp.intel.com.ger.corp.intel.com) ([10.252.14.230]) by orsmga001.jf.intel.com with ESMTP; 04 May 2015 09:10:42 -0700 From: Tanu Kaskinen To: alsa-devel@alsa-project.org Date: Mon, 4 May 2015 19:10:38 +0300 Message-Id: <1430755838-16445-1-git-send-email-tanu.kaskinen@linux.intel.com> X-Mailer: git-send-email 1.9.3 Cc: Takashi Iwai , Liam Girdwood , Mark Brown , Arun Raghavan , David Henningsson Subject: [alsa-devel] [PATCH] ucm: allow multiple devices in JackHWMute X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP One jack may mute multiple devices, so let's make JackHWMute a list of device names instead of just a single device name. Signed-off-by: Tanu Kaskinen Acked-by: Liam Girdwood Acked-by: Mark Brown --- include/use-case.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) Changes in v2: - Fixed the typo that Arun pointed out. - Send to alsa-devel (v1 was accidentally not sent to the list). diff --git a/include/use-case.h b/include/use-case.h index e3308b1..c7789c0 100644 --- a/include/use-case.h +++ b/include/use-case.h @@ -311,14 +311,15 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr, * applications are likely to support only one or the other. * * If **JackHWMute** is set, it indicates that when the jack is plugged - * in, the hardware automatically mutes some other device. The - * JackHWMute value is the name of the muted device. Note that - * JackHWMute should be used only when the hardware enforces the - * automatic muting. If the hardware doesn't enforce any muting, it may - * still be tempting to set JackHWMute to trick upper software layers to - * e.g. automatically mute speakers when headphones are plugged in, but - * that's application policy configuration that doesn't belong to UCM - * configuration files. + * in, the hardware automatically mutes some other device(s). The + * JackHWMute value is a space-separated list of device names (this + * isn't compatible with device names with spaces in them, so don't use + * such device names!). Note that JackHWMute should be used only when + * the hardware enforces the automatic muting. If the hardware doesn't + * enforce any muting, it may still be tempting to set JackHWMute to + * trick upper software layers to e.g. automatically mute speakers when + * headphones are plugged in, but that's application policy + * configuration that doesn't belong to UCM configuration files. */ int snd_use_case_get(snd_use_case_mgr_t *uc_mgr, const char *identifier,