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=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 1B16BC4727E for ; Fri, 2 Oct 2020 01:45:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CEF1A206DC for ; Fri, 2 Oct 2020 01:45:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387546AbgJBBpu (ORCPT ); Thu, 1 Oct 2020 21:45:50 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:50996 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727780AbgJBBpu (ORCPT ); Thu, 1 Oct 2020 21:45:50 -0400 Date: 02 Oct 2020 10:45:48 +0900 X-IronPort-AV: E=Sophos;i="5.77,325,1596466800"; d="scan'208";a="58497899" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 02 Oct 2020 10:45:48 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 72FE740061BA; Fri, 2 Oct 2020 10:45:48 +0900 (JST) Message-ID: <878scpl7yg.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Sameer Pujar Cc: , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v3 06/13] ASoC: simple-card-utils: Expose new members for asoc_simple_priv In-Reply-To: <1601573587-15288-7-git-send-email-spujar@nvidia.com> References: <1601573587-15288-1-git-send-email-spujar@nvidia.com> <1601573587-15288-7-git-send-email-spujar@nvidia.com> User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Sameer Thank you for the patch > Add new members in struct 'asoc_simple_priv'. Idea is to leverage > simple or graph card driver as much as possible and vendor can > maintain a thin driver to control the behavior by populating these > newly exposed members. re-use simple/audio-graph driver is nice idea. My planning next new audio-graph2 can renuse it. > diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h > index 86a1e95..9825308 100644 > --- a/include/sound/simple_card_utils.h > +++ b/include/sound/simple_card_utils.h > @@ -56,6 +56,10 @@ struct asoc_simple_priv { > struct asoc_simple_dai *dais; > struct snd_soc_codec_conf *codec_conf; > struct gpio_desc *pa_gpio; > + const struct snd_soc_ops *ops; > + unsigned int force_dpcm:1; > + uintptr_t dpcm_selectable; > + void *data; > }; I have opinions about these. About dpcm_selectable, indeed current audio-graph is using it as "uintptr_t", but as you know, it checks whether it was non-NULL or not only. This means we can use it as bit-field. BTW, do we need to have dpcm_selectable at priv ? One note is that, -scu- user is only me (locally), and it will be removed when audio-graph2 was created. (My plan is keep code for you, but remove compatible) About *data, I think we can avoid *data if driver side priv includes asoc_simple_priv ? struct my_priv { struct asoc_simple_priv *simple; ... }; #define simple_to_priv(_simple) container_of((_simple), struct my_priv, simple) Thank you for your help !! Best regards --- Kuninori Morimoto