Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp533726ybl; Thu, 15 Aug 2019 23:23:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqynRr/PqiWNgZnTGU36yAo4NeMzjoMkIzdDJixLfZxUDyC5kSeOj0ql1o8CFb70Wp+5ys5S X-Received: by 2002:a65:518a:: with SMTP id h10mr4524877pgq.117.1565936632787; Thu, 15 Aug 2019 23:23:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565936632; cv=none; d=google.com; s=arc-20160816; b=We6rz/wARvRjBuwQVu0hdMw84vBruKTpp4EUpsvZjKxUgZroky6ft1O5rb7CN7YEzE UkNDjCP0j12I3HVITrXyN/xqaxcFHEtAfeBzqBtfhtFJiqN/6eOnwmQq/2wuv8Iox+lw J5lbdxr/5/RRSKStRW59PhlAAvZ/9ucV+ci/62HpHnS42XpWzUZ5fKuPBt04wQerDR5u +RSbCQ8XPflU+RLSF43neTkJWOsVrZ5n8yNTmhep7hS6KMRBU/SvzYIfKWU4buyRUuMv NUkQFVMk4sOLcUGvo4p6OSgVUJPQazglH78ArRGlVf+FvvGgToIC9bi7BJIrLO8hUzN5 /vCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=v14OzUMjNE/HZfmgpIMBDvJqOK1CswJ2VwtCDJGNi9A=; b=pg9ECxSt5WIoRL68vTVfmy6AMV+QiTBPqr86e96QQAD422ZGa+v/T49ZjwrWl+w1ey OIAa1kv/NLf+gj9sKeksiKMgaWCGxE43s2+DSFyg4kv54zijuZiIQOyV7nhnpMYRt2Vl nTSkmLTXq8KdLoUYLgw7OlIJpzGvEtR77ezOrIDzQthwHxh7DmpubwRRDBJ7L3tNdZMZ CQPh8MFFD2A8f0d3fOZTMHxzB6Xo6S9bzn86d+18ktnCtnnGQOB6rkhJdB1ipYzLU/xJ ACDIoTPiXCrCDDCgErgFNLbtchH0G0lMMaL6iaZ6xpTdc0fncwDu1+555P9BgeahL4iC tsHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d2YLXXBO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a4si2359270pjo.83.2019.08.15.23.23.36; Thu, 15 Aug 2019 23:23:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d2YLXXBO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726759AbfHPGWe (ORCPT + 99 others); Fri, 16 Aug 2019 02:22:34 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42235 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726603AbfHPGWd (ORCPT ); Fri, 16 Aug 2019 02:22:33 -0400 Received: by mail-lj1-f194.google.com with SMTP id l14so4295746ljj.9 for ; Thu, 15 Aug 2019 23:22:32 -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=CYUYsVCTry8G55KFbDKyuAU0DQr8oxEQUbJjy/0YJwreLZCc8OB3I3WkSbKWV6RMwM +/bRzgIwr1Wxsp84KrrigOPmEgZYHk3r5JGOLHd3fES6VOGbAkhDcpH3ClDZGYvTiOfH B3F35wfDpyP6zzEWzgdqlspmz8HPEnWcaE83fZ/OpcSGRbzqMyPhuEnc9oDBJno8uu9P pKqWqC4Mqg65SsaW/CgR7thRqR3FWnzPUd+YWhohyQJ2lk2gcv0/QUiM9lCaDzEmNmwT 8/uKuIkwvO8pBtOpfgNlrmiPhWlxUMcAQjgiQ/h8DS+c1obWdb7+gEhqIAB+OeJl/4Sn TODw== X-Gm-Message-State: APjAAAUyD2v8ofIIFC6Xq/tOsjo8FyQ9mCGkwmQBT9wmWVOlWry4II7y 8HsX9DyKnKD2Az3JqFO5dzeJl/DbxkWqPAHLmvlxBkh3 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 Cc: Maxime Ripard , Chen-Yu Tsai , linux-sunxi , linux-arm-kernel , Liam Girdwood , linux-kernel , Linux-ALSA , "Andrea Venturi (pers)" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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