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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 085E7C433DF for ; Sun, 26 Jul 2020 22:14:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 78B79204EA for ; Sun, 26 Jul 2020 22:14:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="tSF1bQEW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78B79204EA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 139D01684; Mon, 27 Jul 2020 00:13:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 139D01684 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595801667; bh=3irYh/zYRJk0Xp7Mgai3Hs6J0DYUxdxmuELlpXUV/Ys=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tSF1bQEW8DVJPDaMxMgDJd7DSfiWNgtCAVO6ZzA/Wlo6q5mZMXUve76XOvZyaNNz+ rSnhMmTyG3M/pX/3Yo/Mns1OlpSMqeEznHrf3YzWEAgFnpkVq8a8e1GI93hwChKs+O z4iRhmtdLZECU136Ce+PZUh3wlX/Pjb7yu1a4ZSY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8D285F801F7; Mon, 27 Jul 2020 00:13:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 74298F8020B; Mon, 27 Jul 2020 00:13:34 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id C7A12F8013C for ; Mon, 27 Jul 2020 00:13:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C7A12F8013C Date: 27 Jul 2020 07:13:23 +0900 X-IronPort-AV: E=Sophos;i="5.75,400,1589209200"; d="scan'208";a="52859915" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 27 Jul 2020 07:13:23 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id CF78540E81B9; Mon, 27 Jul 2020 07:13:23 +0900 (JST) Message-ID: <877duqylh5.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Daniel Baluta Subject: Re: snd_soc_component_driver substream ops In-Reply-To: References: 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 Cc: Linux-ALSA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Hi Daniel Thank you for asking And sorry for late response, Japan was holiday. > Looking at snd_soc_component_driver I see there > are some operations like: open, close, hw_params, hw_free. (1) > > Now, snd_soc_component_driver has snd_compress_ops. > > Do you think it is worth it to group operations from (1) in a similar structure > maybe snd__ops. It seems snd_soc_component_driver is using many functions and flags. Keeping these in the some structure is better, IMO. I think separating "component" and "compress" is better cleaning ? struct snd_compress_ops { ... }; struct snd_soc_component_driver { ... - const struct snd_compress_ops *compress_ops; ... }; struct snd_soc_component { ... struct snd_soc_component_driver *driver; + const struct snd_compress_ops *compress_ops; ... }; Thank you for your help !! Best regards --- Kuninori Morimoto