From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752831AbaCANTS (ORCPT ); Sat, 1 Mar 2014 08:19:18 -0500 Received: from smtp-out-186.synserver.de ([212.40.185.186]:1147 "EHLO smtp-out-167.synserver.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752388AbaCANTR (ORCPT ); Sat, 1 Mar 2014 08:19:17 -0500 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 14471 Message-ID: <5311DE70.7000901@metafoo.de> Date: Sat, 01 Mar 2014 14:19:44 +0100 From: Lars-Peter Clausen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: Xiubo Li CC: broonie@kernel.org, lgirdwood@gmail.com, fabio.estevam@freescale.com, moinejf@free.fr, alsa-devel@alsa-project.org, kuninori.morimoto.gx@renesas.com, tiwai@suse.de, s.hauer@pengutronix.de, timur@tabi.org, linux-kernel@vger.kernel.org, denis@eukrea.com, Guangyu.Chen@freescale.com, mpa@pengutronix.de, shawn.guo@linaro.org Subject: Re: [alsa-devel] [PATCH 01/10] ASoC: core: Add snd_soc_dai_set_tdm_slot_xlate(). References: <1393387175-15539-1-git-send-email-Li.Xiubo@freescale.com> <1393387175-15539-2-git-send-email-Li.Xiubo@freescale.com> In-Reply-To: <1393387175-15539-2-git-send-email-Li.Xiubo@freescale.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/26/2014 04:59 AM, Xiubo Li wrote: > For most cases the rx_mask and tx_mask params have no use for > snd_soc_dai_set_tdm_slot(), because they could be generated by > {XXX_ .}of_xlate_tdm_slot_mask(). > > This patch add snd_soc_dai_set_tdm_slot_xlate() which will replace > the snd_soc_dai_set_tdm_slot() in some use cases to simplify the > code. And for some CODECs or CPU DAI devices there needed much more > work to support the .of_xlate_tdm_slot_mask feature. > > This patch can be applied to most use case of the current DAI drivers. Hi, I'm not quite sure I fully understand what this patch is trying to solve. It adds a variant snd_soc_dai_set_tdm_slot() that instead of taking a rx and tx mask calculates the masks based on the number of slots? In that case I don't really see how the xlate in the name relates to that. xlate is something you'd typically expect in a devicetree context. Maybe one should be called snd_soc_dai_set_tdm_slot() and the other snd_soc_dai_set_tdm_slot_and_masks()? But another question is do we really need this? I don't see the problem that is solved by this patchset. - Lars