From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C23A17C3 for ; Fri, 20 May 2022 10:25:13 +0000 (UTC) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24K5UCxB026795; Fri, 20 May 2022 05:24:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=WSOvhMBIg+CnexC+Y8X+ZG7BYMkoKeetiZYSiJmE0cw=; b=E3MDFwXsbJRiBaE4OT2ai+JBwbYdqbCNDnTM5WTrjlOXZlrikeuJ1tiL+m5bGqsZo03j hZNgysmRG2QNG9jfqt9CJyU1HKdQikMi9FpVUiaR7mHeBwbTedb07Mex56RR9EocUbFP vjQtPAGfK1wk5RM/9IUs9D/tVUYW0yOqIgk1qYoeQRhBJEla3nFqJiatKvzERFcXHqSI Q+/Hno0xMo5/BjF4Kn3iHQ0QMOXFJX9/9GuLbAmIRVv9J84ewdgkmDjMuNAiVSG2dbUO otHvJplf8L8ZVHcLm7hZgWu0kIHYmP+5RyytltwUsoK/TaAybqvdQMM8AE7gkhiA4klo dQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3g28upg6de-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 20 May 2022 05:24:48 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 20 May 2022 11:24:47 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Fri, 20 May 2022 11:24:47 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 20F84458; Fri, 20 May 2022 10:24:47 +0000 (UTC) Date: Fri, 20 May 2022 10:24:47 +0000 From: Charles Keepax To: Kuninori Morimoto CC: , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 56/56] ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local Message-ID: <20220520102447.GL38351@ediswmail.ad.cirrus.com> References: <20220519154318.2153729-1-ckeepax@opensource.cirrus.com> <20220519154318.2153729-57-ckeepax@opensource.cirrus.com> <87czg98193.wl-kuninori.morimoto.gx@renesas.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <87czg98193.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: EewLKkNvojqM2gQAbwrh9EQ5fKjwiv7u X-Proofpoint-ORIG-GUID: EewLKkNvojqM2gQAbwrh9EQ5fKjwiv7u X-Proofpoint-Spam-Reason: safe On Fri, May 20, 2022 at 01:02:33AM +0000, Kuninori Morimoto wrote: > > Hi > > This is not related to this patch, but... > > > -static inline int snd_soc_component_is_codec(struct snd_soc_component *component) > > -{ > > - return component->driver->non_legacy_dai_naming; > > -} > (snip) > > +static inline int asoc_simple_component_is_codec(struct snd_soc_component *component) > > +{ > > + return component->driver->endianness; > > +} > > I have added "endianness" "non_legacy_dai_naming" to component > when convert old "Codec style" into current "Component style". > All codec needs to have these 2. > > 69941bab7c7aeaa7bf7e84397e294c17f0b7c6df > ("ASoC: snd_soc_component_driver has non_legacy_dai_naming") > > 273d778ef38a8861f880e9df5799029dc82bd55d > ("ASoC: snd_soc_component_driver has endianness") > > The reason why I didn't use "codec" was that try to keep > original style as much as possible. > But it seems this is good time to use "codec" for it ? > I think the code will be more understandable. > > - .endianness > - .non_legacy_dai_naming > + .is_codec Yeah I considered this but it didn't really feel like the right way to go to me. Firstly, at this stage we almost certainly need to keep the endianness and non_legacy_dai_naming flags, there are corner cases when endianness probably shouldn't be applied to CODECs (as noted in my endianness series), and there are platform drivers that use non_legacy_dai_naming. We could add an is_codec flag along side the other two. But it means a whole extra flag and means the the core is still requiring a concept of what is a CODEC driver, which really we want to get rid of as part of componentisation. My thinking was that, whilst making this function local to the driver isn't perfect, simple card will be used with simple CODECs that are likely to exist on a standard audio bus, and thus have endianness and the newer graph cards don't require specific identification of what is a CODEC driver. So it probably works as a solution for now. > > Thank you for your help !! Absolutely no problem, thank you for all the work you have done on this over the years. Thanks, Charles 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CA4F1C433F5 for ; Fri, 20 May 2022 10:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=O6dEKVCBhngQ+KwyL3GYEXc+0VqGpx0x+mIneoH47b8=; b=ogQNolW9F29sZX 1ZADh2sv9tzeCiYYa5qHdLmipHBGN7RFkNuU1IJrGpyqVBnT0M0m8kSP0sMxRhDfpu7J+8epSeyMI ENtULCxZNjrIHi4R9HTl/ViAkZs8h6pTXoUVtyNO7JFlmLvN199KA5oCBMLQq/F5DnkzecI2NfRAU 3We+I1LspwTjYerxyn4MP9KzeG59bL1gT8f/4/xoLgeNE7a7T9iHCCJ18LSfpIZTHjyr8UC7zrZJ8 Xb/I+9VS+GyOOpgzg29PLzQA0ODaY52UgrZLJy/xyoc6FvO/ju9JWjpzKGIHslghQC0qJkdn4xJYo b6Kiw2xdIBflggHCRNoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrzos-00BsP0-04; Fri, 20 May 2022 10:25:18 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrzop-00BsMw-IA; Fri, 20 May 2022 10:25:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:CC:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=WSOvhMBIg+CnexC+Y8X+ZG7BYMkoKeetiZYSiJmE0cw=; b=EOoktUHChXRYEYWKii5MVDtiyi kS+dAPJ6Ekg5JNdq1mEhTUSUYvxSProQ9DM1LfwfVLYm0V6/djh5F6aCoswLJTh2BXFGKZgRFGsCM vRWlX3xtLjoiGT7Yrpe+aIubWp+q58YH+G6yHpvxomkBykyH/6hV46yxR1V7bq5OtknIHwuAgUDiH NNE5pSzb33dNJFoaD/ayO1UjFh2sA8dgFBS+mKa2Yx8gQ9g7zh87iTVPShBkYwjFqLG6/51mVHtO9 wULbVakzYssjMprd26LEupA6EXdq9XcTSqZQ+2JNOXPlhEeF84qKwt81Rs+Gz6iFjCzU1WGQDxpbx KsVYRJTA==; Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrzoh-002JLT-0u; Fri, 20 May 2022 10:25:09 +0000 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24K5UCxB026795; Fri, 20 May 2022 05:24:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=WSOvhMBIg+CnexC+Y8X+ZG7BYMkoKeetiZYSiJmE0cw=; b=E3MDFwXsbJRiBaE4OT2ai+JBwbYdqbCNDnTM5WTrjlOXZlrikeuJ1tiL+m5bGqsZo03j hZNgysmRG2QNG9jfqt9CJyU1HKdQikMi9FpVUiaR7mHeBwbTedb07Mex56RR9EocUbFP vjQtPAGfK1wk5RM/9IUs9D/tVUYW0yOqIgk1qYoeQRhBJEla3nFqJiatKvzERFcXHqSI Q+/Hno0xMo5/BjF4Kn3iHQ0QMOXFJX9/9GuLbAmIRVv9J84ewdgkmDjMuNAiVSG2dbUO otHvJplf8L8ZVHcLm7hZgWu0kIHYmP+5RyytltwUsoK/TaAybqvdQMM8AE7gkhiA4klo dQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3g28upg6de-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 20 May 2022 05:24:48 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 20 May 2022 11:24:47 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Fri, 20 May 2022 11:24:47 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 20F84458; Fri, 20 May 2022 10:24:47 +0000 (UTC) Date: Fri, 20 May 2022 10:24:47 +0000 From: Charles Keepax To: Kuninori Morimoto CC: , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 56/56] ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local Message-ID: <20220520102447.GL38351@ediswmail.ad.cirrus.com> References: <20220519154318.2153729-1-ckeepax@opensource.cirrus.com> <20220519154318.2153729-57-ckeepax@opensource.cirrus.com> <87czg98193.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87czg98193.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: EewLKkNvojqM2gQAbwrh9EQ5fKjwiv7u X-Proofpoint-ORIG-GUID: EewLKkNvojqM2gQAbwrh9EQ5fKjwiv7u X-Proofpoint-Spam-Reason: safe X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220520_112507_643729_1CA32371 X-CRM114-Status: GOOD ( 27.63 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Fri, May 20, 2022 at 01:02:33AM +0000, Kuninori Morimoto wrote: > > Hi > > This is not related to this patch, but... > > > -static inline int snd_soc_component_is_codec(struct snd_soc_component *component) > > -{ > > - return component->driver->non_legacy_dai_naming; > > -} > (snip) > > +static inline int asoc_simple_component_is_codec(struct snd_soc_component *component) > > +{ > > + return component->driver->endianness; > > +} > > I have added "endianness" "non_legacy_dai_naming" to component > when convert old "Codec style" into current "Component style". > All codec needs to have these 2. > > 69941bab7c7aeaa7bf7e84397e294c17f0b7c6df > ("ASoC: snd_soc_component_driver has non_legacy_dai_naming") > > 273d778ef38a8861f880e9df5799029dc82bd55d > ("ASoC: snd_soc_component_driver has endianness") > > The reason why I didn't use "codec" was that try to keep > original style as much as possible. > But it seems this is good time to use "codec" for it ? > I think the code will be more understandable. > > - .endianness > - .non_legacy_dai_naming > + .is_codec Yeah I considered this but it didn't really feel like the right way to go to me. Firstly, at this stage we almost certainly need to keep the endianness and non_legacy_dai_naming flags, there are corner cases when endianness probably shouldn't be applied to CODECs (as noted in my endianness series), and there are platform drivers that use non_legacy_dai_naming. We could add an is_codec flag along side the other two. But it means a whole extra flag and means the the core is still requiring a concept of what is a CODEC driver, which really we want to get rid of as part of componentisation. My thinking was that, whilst making this function local to the driver isn't perfect, simple card will be used with simple CODECs that are likely to exist on a standard audio bus, and thus have endianness and the newer graph cards don't require specific identification of what is a CODEC driver. So it probably works as a solution for now. > > Thank you for your help !! Absolutely no problem, thank you for all the work you have done on this over the years. Thanks, Charles _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F410C433EF for ; Fri, 20 May 2022 10:25:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Gs7Abw6v+2w2OmJNHm6fqhSIhlztni3IHF71bJXp5Q4=; b=A5dmwg50Rs5/bu hxSsMNM9ikKGfjiNFUsRibwMgJjDUQ48LlfkUABnvBnYwx3UPmtVOVtsERbObKxrReJUdBIsH+wuZ T3svj+RtAOmNzxRfEEIGn12ap3qSgcTLUACffBVc4K1XxYgE9nrFsu48zY4JOytF6hX3dVtVu/qoj cBGe4f0kj6Dni84NSTzCSC2sePbkOIHntCCujp1otVRHGY1TJ4zELrriQKHJmA6I2BEJIS8k/5P0P T+jDx0nOKx5Bhy/xpM7m2ct77TLWZ0uxo4W2ftVgadRtfEMyJZfXnxhWaXWOX89F8GQRvCPO0G0BI kWL6R2Jl0j5bikOTRakw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrzor-00BsOi-3E; Fri, 20 May 2022 10:25:17 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrzop-00BsMw-IA; Fri, 20 May 2022 10:25:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:CC:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=WSOvhMBIg+CnexC+Y8X+ZG7BYMkoKeetiZYSiJmE0cw=; b=EOoktUHChXRYEYWKii5MVDtiyi kS+dAPJ6Ekg5JNdq1mEhTUSUYvxSProQ9DM1LfwfVLYm0V6/djh5F6aCoswLJTh2BXFGKZgRFGsCM vRWlX3xtLjoiGT7Yrpe+aIubWp+q58YH+G6yHpvxomkBykyH/6hV46yxR1V7bq5OtknIHwuAgUDiH NNE5pSzb33dNJFoaD/ayO1UjFh2sA8dgFBS+mKa2Yx8gQ9g7zh87iTVPShBkYwjFqLG6/51mVHtO9 wULbVakzYssjMprd26LEupA6EXdq9XcTSqZQ+2JNOXPlhEeF84qKwt81Rs+Gz6iFjCzU1WGQDxpbx KsVYRJTA==; Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrzoh-002JLT-0u; Fri, 20 May 2022 10:25:09 +0000 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24K5UCxB026795; Fri, 20 May 2022 05:24:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=WSOvhMBIg+CnexC+Y8X+ZG7BYMkoKeetiZYSiJmE0cw=; b=E3MDFwXsbJRiBaE4OT2ai+JBwbYdqbCNDnTM5WTrjlOXZlrikeuJ1tiL+m5bGqsZo03j hZNgysmRG2QNG9jfqt9CJyU1HKdQikMi9FpVUiaR7mHeBwbTedb07Mex56RR9EocUbFP vjQtPAGfK1wk5RM/9IUs9D/tVUYW0yOqIgk1qYoeQRhBJEla3nFqJiatKvzERFcXHqSI Q+/Hno0xMo5/BjF4Kn3iHQ0QMOXFJX9/9GuLbAmIRVv9J84ewdgkmDjMuNAiVSG2dbUO otHvJplf8L8ZVHcLm7hZgWu0kIHYmP+5RyytltwUsoK/TaAybqvdQMM8AE7gkhiA4klo dQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3g28upg6de-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 20 May 2022 05:24:48 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 20 May 2022 11:24:47 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Fri, 20 May 2022 11:24:47 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 20F84458; Fri, 20 May 2022 10:24:47 +0000 (UTC) Date: Fri, 20 May 2022 10:24:47 +0000 From: Charles Keepax To: Kuninori Morimoto CC: , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 56/56] ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local Message-ID: <20220520102447.GL38351@ediswmail.ad.cirrus.com> References: <20220519154318.2153729-1-ckeepax@opensource.cirrus.com> <20220519154318.2153729-57-ckeepax@opensource.cirrus.com> <87czg98193.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87czg98193.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: EewLKkNvojqM2gQAbwrh9EQ5fKjwiv7u X-Proofpoint-ORIG-GUID: EewLKkNvojqM2gQAbwrh9EQ5fKjwiv7u X-Proofpoint-Spam-Reason: safe X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220520_112507_643729_1CA32371 X-CRM114-Status: GOOD ( 27.63 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Fri, May 20, 2022 at 01:02:33AM +0000, Kuninori Morimoto wrote: > > Hi > > This is not related to this patch, but... > > > -static inline int snd_soc_component_is_codec(struct snd_soc_component *component) > > -{ > > - return component->driver->non_legacy_dai_naming; > > -} > (snip) > > +static inline int asoc_simple_component_is_codec(struct snd_soc_component *component) > > +{ > > + return component->driver->endianness; > > +} > > I have added "endianness" "non_legacy_dai_naming" to component > when convert old "Codec style" into current "Component style". > All codec needs to have these 2. > > 69941bab7c7aeaa7bf7e84397e294c17f0b7c6df > ("ASoC: snd_soc_component_driver has non_legacy_dai_naming") > > 273d778ef38a8861f880e9df5799029dc82bd55d > ("ASoC: snd_soc_component_driver has endianness") > > The reason why I didn't use "codec" was that try to keep > original style as much as possible. > But it seems this is good time to use "codec" for it ? > I think the code will be more understandable. > > - .endianness > - .non_legacy_dai_naming > + .is_codec Yeah I considered this but it didn't really feel like the right way to go to me. Firstly, at this stage we almost certainly need to keep the endianness and non_legacy_dai_naming flags, there are corner cases when endianness probably shouldn't be applied to CODECs (as noted in my endianness series), and there are platform drivers that use non_legacy_dai_naming. We could add an is_codec flag along side the other two. But it means a whole extra flag and means the the core is still requiring a concept of what is a CODEC driver, which really we want to get rid of as part of componentisation. My thinking was that, whilst making this function local to the driver isn't perfect, simple card will be used with simple CODECs that are likely to exist on a standard audio bus, and thus have endianness and the newer graph cards don't require specific identification of what is a CODEC driver. So it probably works as a solution for now. > > Thank you for your help !! Absolutely no problem, thank you for all the work you have done on this over the years. Thanks, Charles _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DEC82C433EF for ; Fri, 20 May 2022 10:25:47 +0000 (UTC) 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 81BEA16FE; Fri, 20 May 2022 12:24:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 81BEA16FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653042345; bh=Ctcih0AxGGxU/GpcGZz5CZ8rkyHC/3xFQsqauWCyEHk=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uhZOlx3zEs5Ks8+xuxqbBxkRtN8bz8KHNGHywSchKkW58AxHxOwONTF+aXCgZT1vD lmFivnGK/I4+mY7tX8Uh6rOw788sOvhjKTo6PJAD+33E1XR9Kn5B3KVrG37EhDOA2y 37j0tKCi+hGI5FZYaR0enAfwJTpbjp8ULTqEPYkw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1CECBF800D2; Fri, 20 May 2022 12:24:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DD328F8019D; Fri, 20 May 2022 12:24:53 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3D5C0F800D2 for ; Fri, 20 May 2022 12:24:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3D5C0F800D2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="E3MDFwXs" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24K5UCxB026795; Fri, 20 May 2022 05:24:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=WSOvhMBIg+CnexC+Y8X+ZG7BYMkoKeetiZYSiJmE0cw=; b=E3MDFwXsbJRiBaE4OT2ai+JBwbYdqbCNDnTM5WTrjlOXZlrikeuJ1tiL+m5bGqsZo03j hZNgysmRG2QNG9jfqt9CJyU1HKdQikMi9FpVUiaR7mHeBwbTedb07Mex56RR9EocUbFP vjQtPAGfK1wk5RM/9IUs9D/tVUYW0yOqIgk1qYoeQRhBJEla3nFqJiatKvzERFcXHqSI Q+/Hno0xMo5/BjF4Kn3iHQ0QMOXFJX9/9GuLbAmIRVv9J84ewdgkmDjMuNAiVSG2dbUO otHvJplf8L8ZVHcLm7hZgWu0kIHYmP+5RyytltwUsoK/TaAybqvdQMM8AE7gkhiA4klo dQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3g28upg6de-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 20 May 2022 05:24:48 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 20 May 2022 11:24:47 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Fri, 20 May 2022 11:24:47 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 20F84458; Fri, 20 May 2022 10:24:47 +0000 (UTC) Date: Fri, 20 May 2022 10:24:47 +0000 From: Charles Keepax To: Kuninori Morimoto Subject: Re: [PATCH 56/56] ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local Message-ID: <20220520102447.GL38351@ediswmail.ad.cirrus.com> References: <20220519154318.2153729-1-ckeepax@opensource.cirrus.com> <20220519154318.2153729-57-ckeepax@opensource.cirrus.com> <87czg98193.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <87czg98193.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: EewLKkNvojqM2gQAbwrh9EQ5fKjwiv7u X-Proofpoint-ORIG-GUID: EewLKkNvojqM2gQAbwrh9EQ5fKjwiv7u X-Proofpoint-Spam-Reason: safe Cc: cezary.rojewski@intel.com, heiko@sntech.de, alsa-devel@alsa-project.org, nicolas.ferre@microchip.com, srinivas.kandagatla@linaro.org, peter.ujfalusi@gmail.com, linux-stm32@st-md-mailman.stormreply.com, jbrunet@baylibre.com, pierre-louis.bossart@linux.intel.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, linux-imx@nxp.com, linux-mips@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-xtensa@linux-xtensa.org, nsaenz@kernel.org, broonie@kernel.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com, lgirdwood@gmail.com, daniel@zonque.org, kernel@pengutronix.de, shawnguo@kernel.org, jarkko.nikula@bitmer.com 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" On Fri, May 20, 2022 at 01:02:33AM +0000, Kuninori Morimoto wrote: > > Hi > > This is not related to this patch, but... > > > -static inline int snd_soc_component_is_codec(struct snd_soc_component *component) > > -{ > > - return component->driver->non_legacy_dai_naming; > > -} > (snip) > > +static inline int asoc_simple_component_is_codec(struct snd_soc_component *component) > > +{ > > + return component->driver->endianness; > > +} > > I have added "endianness" "non_legacy_dai_naming" to component > when convert old "Codec style" into current "Component style". > All codec needs to have these 2. > > 69941bab7c7aeaa7bf7e84397e294c17f0b7c6df > ("ASoC: snd_soc_component_driver has non_legacy_dai_naming") > > 273d778ef38a8861f880e9df5799029dc82bd55d > ("ASoC: snd_soc_component_driver has endianness") > > The reason why I didn't use "codec" was that try to keep > original style as much as possible. > But it seems this is good time to use "codec" for it ? > I think the code will be more understandable. > > - .endianness > - .non_legacy_dai_naming > + .is_codec Yeah I considered this but it didn't really feel like the right way to go to me. Firstly, at this stage we almost certainly need to keep the endianness and non_legacy_dai_naming flags, there are corner cases when endianness probably shouldn't be applied to CODECs (as noted in my endianness series), and there are platform drivers that use non_legacy_dai_naming. We could add an is_codec flag along side the other two. But it means a whole extra flag and means the the core is still requiring a concept of what is a CODEC driver, which really we want to get rid of as part of componentisation. My thinking was that, whilst making this function local to the driver isn't perfect, simple card will be used with simple CODECs that are likely to exist on a standard audio bus, and thus have endianness and the newer graph cards don't require specific identification of what is a CODEC driver. So it probably works as a solution for now. > > Thank you for your help !! Absolutely no problem, thank you for all the work you have done on this over the years. Thanks, Charles 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6CD55C433F5 for ; Fri, 20 May 2022 11:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oO6Cegt462i3ZbWaxKybFbDf3riMA+yoFZz2197ANjw=; b=I33NwmToh4uCoi DVFhBUb5cgXz2FnN6dCt4Zf3UsuOjxCJrbUBtjmd1/KjGYQf6pqq8cAP0ZXo6RK2muVmhX+vvDiC0 CEjdCHT9gz4vfcFy/3xV0ChkBDxXZIs59FnBZQx89CY024krHR6lrucZn5CbxfqlRFCWBAzvQmua1 dvh6ATwQCDnSs7FWzHseAltLKhqr/C6k77wrATy5ByFMlXNEafzcvsB5nfKCb5uslAtp03ejb2TEf MLMMH6/NyZ0p1l/ptRtVjUlSGx+8ZOxuDDpQ3ykEfITpTa5CjkQkr6yVuBNnFYY2MFXshgVcBhpj1 ipOCiafjSNjbZQbPhnTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns0qJ-00C5ge-Su; Fri, 20 May 2022 11:30:51 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrzop-00BsMw-IA; Fri, 20 May 2022 10:25:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:CC:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=WSOvhMBIg+CnexC+Y8X+ZG7BYMkoKeetiZYSiJmE0cw=; b=EOoktUHChXRYEYWKii5MVDtiyi kS+dAPJ6Ekg5JNdq1mEhTUSUYvxSProQ9DM1LfwfVLYm0V6/djh5F6aCoswLJTh2BXFGKZgRFGsCM vRWlX3xtLjoiGT7Yrpe+aIubWp+q58YH+G6yHpvxomkBykyH/6hV46yxR1V7bq5OtknIHwuAgUDiH NNE5pSzb33dNJFoaD/ayO1UjFh2sA8dgFBS+mKa2Yx8gQ9g7zh87iTVPShBkYwjFqLG6/51mVHtO9 wULbVakzYssjMprd26LEupA6EXdq9XcTSqZQ+2JNOXPlhEeF84qKwt81Rs+Gz6iFjCzU1WGQDxpbx KsVYRJTA==; Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrzoh-002JLT-0u; Fri, 20 May 2022 10:25:09 +0000 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24K5UCxB026795; Fri, 20 May 2022 05:24:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=WSOvhMBIg+CnexC+Y8X+ZG7BYMkoKeetiZYSiJmE0cw=; b=E3MDFwXsbJRiBaE4OT2ai+JBwbYdqbCNDnTM5WTrjlOXZlrikeuJ1tiL+m5bGqsZo03j hZNgysmRG2QNG9jfqt9CJyU1HKdQikMi9FpVUiaR7mHeBwbTedb07Mex56RR9EocUbFP vjQtPAGfK1wk5RM/9IUs9D/tVUYW0yOqIgk1qYoeQRhBJEla3nFqJiatKvzERFcXHqSI Q+/Hno0xMo5/BjF4Kn3iHQ0QMOXFJX9/9GuLbAmIRVv9J84ewdgkmDjMuNAiVSG2dbUO otHvJplf8L8ZVHcLm7hZgWu0kIHYmP+5RyytltwUsoK/TaAybqvdQMM8AE7gkhiA4klo dQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3g28upg6de-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 20 May 2022 05:24:48 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 20 May 2022 11:24:47 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Fri, 20 May 2022 11:24:47 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 20F84458; Fri, 20 May 2022 10:24:47 +0000 (UTC) Date: Fri, 20 May 2022 10:24:47 +0000 From: Charles Keepax To: Kuninori Morimoto CC: , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 56/56] ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local Message-ID: <20220520102447.GL38351@ediswmail.ad.cirrus.com> References: <20220519154318.2153729-1-ckeepax@opensource.cirrus.com> <20220519154318.2153729-57-ckeepax@opensource.cirrus.com> <87czg98193.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87czg98193.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: EewLKkNvojqM2gQAbwrh9EQ5fKjwiv7u X-Proofpoint-ORIG-GUID: EewLKkNvojqM2gQAbwrh9EQ5fKjwiv7u X-Proofpoint-Spam-Reason: safe X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220520_112507_643729_1CA32371 X-CRM114-Status: GOOD ( 27.63 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org On Fri, May 20, 2022 at 01:02:33AM +0000, Kuninori Morimoto wrote: > > Hi > > This is not related to this patch, but... > > > -static inline int snd_soc_component_is_codec(struct snd_soc_component *component) > > -{ > > - return component->driver->non_legacy_dai_naming; > > -} > (snip) > > +static inline int asoc_simple_component_is_codec(struct snd_soc_component *component) > > +{ > > + return component->driver->endianness; > > +} > > I have added "endianness" "non_legacy_dai_naming" to component > when convert old "Codec style" into current "Component style". > All codec needs to have these 2. > > 69941bab7c7aeaa7bf7e84397e294c17f0b7c6df > ("ASoC: snd_soc_component_driver has non_legacy_dai_naming") > > 273d778ef38a8861f880e9df5799029dc82bd55d > ("ASoC: snd_soc_component_driver has endianness") > > The reason why I didn't use "codec" was that try to keep > original style as much as possible. > But it seems this is good time to use "codec" for it ? > I think the code will be more understandable. > > - .endianness > - .non_legacy_dai_naming > + .is_codec Yeah I considered this but it didn't really feel like the right way to go to me. Firstly, at this stage we almost certainly need to keep the endianness and non_legacy_dai_naming flags, there are corner cases when endianness probably shouldn't be applied to CODECs (as noted in my endianness series), and there are platform drivers that use non_legacy_dai_naming. We could add an is_codec flag along side the other two. But it means a whole extra flag and means the the core is still requiring a concept of what is a CODEC driver, which really we want to get rid of as part of componentisation. My thinking was that, whilst making this function local to the driver isn't perfect, simple card will be used with simple CODECs that are likely to exist on a standard audio bus, and thus have endianness and the newer graph cards don't require specific identification of what is a CODEC driver. So it probably works as a solution for now. > > Thank you for your help !! Absolutely no problem, thank you for all the work you have done on this over the years. Thanks, Charles _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic