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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 C51B5C2B9F8 for ; Tue, 25 May 2021 15:58:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A68A961401 for ; Tue, 25 May 2021 15:58:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233872AbhEYQAH (ORCPT ); Tue, 25 May 2021 12:00:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:41500 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232858AbhEYQAB (ORCPT ); Tue, 25 May 2021 12:00:01 -0400 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 Cc: Jaroslav Kysela , Mark Brown , dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Liam Girdwood , Takashi Iwai , devicetree@vger.kernel.org, Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , linux-doc@vger.kernel.org, Eric Anholt , Nicolas Saenz Julienne , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Maxime Ripard , Nicolas Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, Daniel Vetter , linux-rpi-kernel@lists.infradead.org, Jonathan Corbet , Rob Herring 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >