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=-0.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 6D3DBC3A59C for ; Fri, 16 Aug 2019 06:22:49 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 408C02064A for ; Fri, 16 Aug 2019 06:22:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BNJfukjo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="d2YLXXBO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 408C02064A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Yty3PcSI1ENICheD3+STQrc+MctGXUxcr48OMnwXlJo=; b=BNJfukjo/ibodk UbjExZXLEq2OhhGrwlbzHTpHP9vgmw3qDaHhE0IOySPw5tzHZNFZjFFRe3jPeKbi70/llwuKp0Uha mNvxPaxLqMzomgsCRu4iDpQLT1YxWf5d+UoMVPl2Q0kE6Ye040KGThMEY7kNLSGA+woeCUIlGeA7z OnTg5v+Y91SRUfdio0gZWlCgDykdGP86pzHQmefrg/0j4DMuRv0jHZb8hrtFsZawEeVpqTeR0e3IT rT0lyAbCmgq0LxcmUtOtIS6bJ4QjugnfXtdAs2Y/OgICax7CiBZbkRJ76y5/AXfeEuPCW56cBGy5j DyELnOuli7p6LgR8MX7Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hyVdF-0003PE-TC; Fri, 16 Aug 2019 06:22:37 +0000 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hyVdC-0003OK-57 for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2019 06:22:35 +0000 Received: by mail-lj1-x244.google.com with SMTP id t3so4279337ljj.12 for ; Thu, 15 Aug 2019 23:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v14OzUMjNE/HZfmgpIMBDvJqOK1CswJ2VwtCDJGNi9A=; b=d2YLXXBOzD77vCmyMvNMNkLFQOk7NUI1qpgaDcil7EdRabwka633i5xOEC3ejL7pYY Wh44in0bgl21+YBTpijwOL92QY34JVSDRu48ytxYYkABfv4odbonMAnA3Nxe2cRjAWVA yl16HvY4gjb4mXLnUmMC5DWAnMQEtvU8s9mub2TsrRAslQfWbxFfvTEo4byXrIT7U/BU ddujW/xmZ1w5/dXspnNrvQFag4c+3/qm7lAw7hQVJr0nkWCCYYr6CSFfwB4KV5OX4KOi P0UmbrAsOQtYPm2DQ1mzBdxRoOL8UWH79mJ2rHUYPJphWQifjjlUBMBHOd0c/75WvAdQ Ithg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v14OzUMjNE/HZfmgpIMBDvJqOK1CswJ2VwtCDJGNi9A=; b=KRSJxiNi6/INSO1UbFWB+hAscAytgDaltNMXIvvc9V5T8hZY28WR7n4b9TKfgfHvSk m7MlLpmWqby8aDjCg7QrFVuDd8tUPvM9KLHBCVka3pMEVzTTE5y52B2TIfN4u5gmZamG OfaeYjfx7WB/a0dEM20m7lCdSsN66YV9K+c0rznMD3nvPCXPx4n3c62BJ34xy4EDlTYw LkwesxoeJV7qd9x46GxQZcW4ZmjijlFaOgO5/hmUQ+l8kaFKEoYJw+/sk8bj0Tl04JK4 iKMI79P7LT2w99KdkVR9HRWEl3QngpfOPlTdMlFgvIxmHs1Es6QYiTHMG5AINajshyGH kA9A== X-Gm-Message-State: APjAAAUQg8NwQK72rL34wPQBMVr6nDH2ajoyLmS5ZMJ04HaljPpjMVFP 13JarZolPxdhkAXqNWt0bzzuwSUG7yf/1FhLzho= X-Google-Smtp-Source: APXvYqwhioniLpZMMBXNvBmmi5v2yWJBAdLohCrRL1i0nxn3uIqNq01gaFdnIoMaSgfpTsi8KzDMhjIp1PuPqIbAlHw= X-Received: by 2002:a2e:978e:: with SMTP id y14mr4692405lji.10.1565936551522; Thu, 15 Aug 2019 23:22:31 -0700 (PDT) MIME-Version: 1.0 References: <20190814060854.26345-1-codekipper@gmail.com> <20190814060854.26345-3-codekipper@gmail.com> <20190814093011.GD4640@sirena.co.uk> In-Reply-To: <20190814093011.GD4640@sirena.co.uk> From: Code Kipper Date: Fri, 16 Aug 2019 08:22:20 +0200 Message-ID: Subject: Re: [PATCH v5 02/15] ASoC: sun4i-i2s: Add set_tdm_slot functionality To: Mark Brown X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190815_232234_200395_D4595699 X-CRM114-Status: GOOD ( 13.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux-ALSA , linux-kernel , Liam Girdwood , "Andrea Venturi \(pers\)" , linux-sunxi , Maxime Ripard , Chen-Yu Tsai , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 14 Aug 2019 at 11:30, Mark Brown wrote: > > On Wed, Aug 14, 2019 at 08:08:41AM +0200, codekipper@gmail.com wrote: > > From: Marcus Cooper > > > > Codecs without a control connection such as i2s based HDMI audio and > > the Pine64 DAC require a different amount of bit clocks per frame than > > This isn't a universal property of CODECs without a control, and it's > something that CODECs with control can require too. ACK > > > return sun4i_i2s_set_clk_rate(dai, params_rate(params), > > - params_width(params)); > > + i2s->tdm_slots ? > > + i2s->slot_width : params_width(params)); > > Please write normal conditional statements unless there's a strong > reason to do otherwise, it makes things more legible. ACK > > > +static int sun4i_i2s_set_dai_tdm_slot(struct snd_soc_dai *dai, > > + unsigned int tx_mask, > > + unsigned int rx_mask, > > + int slots, int width) > > +{ > > + struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); > > + > > + i2s->tdm_slots = slots; > > + > > + i2s->slot_width = width; > > + > > + return 0; > > +} > > No validation of the parameters here? ACK Thanks, CK _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel