From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62195C47084 for ; Tue, 25 May 2021 15:58:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DA0961402 for ; Tue, 25 May 2021 15:58:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DA0961402 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 736236EA73; Tue, 25 May 2021 15:58:33 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 711556EA73 for ; Tue, 25 May 2021 15:58:31 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1621958310; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9otuVabrfXBAVNjVXfRZ1fRmNMAazHRuzbK2fmvWM3U=; b=XQr4aTRedS/QDUdlUqzwT6BMcSV46qP6QyfpZo7IunRcLwL7kV/Zo5CZ51LgTXQb1uBFmK p2/VFwsAxaLHP2A6Rlm2sJsCoWeE8PfMznbK6Kct7K2rvhdIzlSS9uB7UcbbWOnvNM4V3H GSG4vLE+18pIhdoa44Bv1wEgBcFXtDM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1621958310; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9otuVabrfXBAVNjVXfRZ1fRmNMAazHRuzbK2fmvWM3U=; b=Rvk7eQvmQiSQ7i/FUG5qH1eVgSbyV1QTWCBCE5w+9tOOf18sNl1CqhffYm0y5TC3YXKwzP VRM8MmDLJ7fzxlCQ== Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DAFECAB71; Tue, 25 May 2021 15:58:29 +0000 (UTC) Date: Tue, 25 May 2021 17:58:29 +0200 Message-ID: From: Takashi Iwai To: Maxime Ripard Subject: Re: [PATCH v2 01/12] ALSA: doc: Clarify IEC958 controls iface In-Reply-To: <20210525132354.297468-2-maxime@cerno.tech> References: <20210525132354.297468-1-maxime@cerno.tech> <20210525132354.297468-2-maxime@cerno.tech> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Tim Gover , linux-doc@vger.kernel.org, David Airlie , dri-devel@lists.freedesktop.org, Takashi Iwai , Nicolas Saenz Julienne , Daniel Vetter , Phil Elwell , Dave Stevenson , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, Nicolas Saenz Julienne , Liam Girdwood , Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , linux-arm-kernel@lists.infradead.org, Dom Cobley , Jonathan Corbet , linux-kernel@vger.kernel.org, Rob Herring , Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, 25 May 2021 15:23:43 +0200, Maxime Ripard wrote: > > The doc currently mentions that the IEC958 Playback Default should be > exposed on the PCM iface, and the Playback Mask on the mixer iface. > > It's a bit confusing to advise to have two related controls on two > separate ifaces, and it looks like the drivers that currently expose > those controls use any combination of the mixer and PCM ifaces. > > Let's try to clarify the situation a bit, and encourage to at least have > the controls on the same iface. > > Signed-off-by: Maxime Ripard Reviewed-by: Takashi Iwai thanks, Takashi > --- > .../sound/kernel-api/writing-an-alsa-driver.rst | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst > index e6365836fa8b..01d59b8aea92 100644 > --- a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst > +++ b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst > @@ -3508,14 +3508,15 @@ field must be set, though). > > “IEC958 Playback Con Mask” is used to return the bit-mask for the IEC958 > status bits of consumer mode. Similarly, “IEC958 Playback Pro Mask” > -returns the bitmask for professional mode. They are read-only controls, > -and are defined as MIXER controls (iface = > -``SNDRV_CTL_ELEM_IFACE_MIXER``). > +returns the bitmask for professional mode. They are read-only controls. > > Meanwhile, “IEC958 Playback Default” control is defined for getting and > -setting the current default IEC958 bits. Note that this one is usually > -defined as a PCM control (iface = ``SNDRV_CTL_ELEM_IFACE_PCM``), > -although in some places it's defined as a MIXER control. > +setting the current default IEC958 bits. > + > +Due to historical reasons, both variants of the Playback Mask and the > +Playback Default controls can be implemented on either a > +``SNDRV_CTL_ELEM_IFACE_PCM`` or a ``SNDRV_CTL_ELEM_IFACE_MIXER`` iface. > +Drivers should expose the mask and default on the same iface though. > > In addition, you can define the control switches to enable/disable or to > set the raw bit mode. The implementation will depend on the chip, but > -- > 2.31.1 >