Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3736152ybv; Mon, 10 Feb 2020 05:33:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwXzOxO9L2a7tdVGN59enX2iSeXfbf8bnPmeAS5kKxAY8FoM+/8Q69zZsOonvuCjl5yBrsO X-Received: by 2002:a9d:5885:: with SMTP id x5mr1052436otg.132.1581341617781; Mon, 10 Feb 2020 05:33:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581341617; cv=none; d=google.com; s=arc-20160816; b=pniFrZKyyUyUYHZIYo0nZPmDu9MLRxYkGgnqEHgDp15clheZA0Q9PfRFST1Ry2LLQK eQmcYnFgNycJpcCqIF0BZHkuy8auDSibyuPmuh/ykudQuD7tLFOInTN40/RN10sv3KI0 2KrB4yJ0feBY7qZfxGBTYMOtwg76xT7FbSTxSp9mVuWcTEEPcwTe6W6DFAJOcCy+NWj/ DdmrvBcK9fum5Lqa5iiG+hh0Nk4MHs6cCw/OULA7bBl02PORQWEtORjqRNzHl0oz7n9K ML6r7f0JAoUBLn/szl689S1CSQsQlIR92wCq7nKYw4eoOgD9mqSpQlWnk4MdkpP08a7U 8jhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wPS2n+yNH0vQcE4+BCIFSmQ1AtpWEDYd/YfoR4TKamI=; b=uBuxkBGan9fYna94ag8mMGjyxdjk23U1vyB1mmHUufoa0zyC5Zbo/EWpca0fsljsps j+gFcslVA/XJFdecKzYho0DpI4EoLaPJg1Qpaj+MQcph15Cd6h9YgjcP5PbDt/3+rw/D G24WsB50nx+r+1mKghLxjNtVov00dE1YL92F7v9+5R0fsKPQT1ghIOpH/qcH9RWJWi3M gb6bLI4zQPKDOSYiLh0Jv5DUz50j5oV7xx/wbJK93OHxAard8R+wRXnlVxThus4R6rKM WGQYNMZmG/BR+37tRd0pbhjmzK/8ML2HAqiDj7QEp/a3ivMwBjkDcuSeenABjEINDhBl mbMw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q126si178055oia.8.2020.02.10.05.33.25; Mon, 10 Feb 2020 05:33:37 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731548AbgBJNbr (ORCPT + 99 others); Mon, 10 Feb 2020 08:31:47 -0500 Received: from foss.arm.com ([217.140.110.172]:33622 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729392AbgBJNbq (ORCPT ); Mon, 10 Feb 2020 08:31:46 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C1FB71FB; Mon, 10 Feb 2020 05:31:45 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 467A93F68E; Mon, 10 Feb 2020 05:31:45 -0800 (PST) Date: Mon, 10 Feb 2020 13:31:43 +0000 From: Mark Brown To: Adam Serbinski Cc: Srini Kandagatla , Rob Herring , Bjorn Andersson , Andy Gross , Mark Rutland , Liam Girdwood , Patrick Lai , Banajit Goswami , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/8] ASoC: qdsp6: q6afe: add support to pcm ports Message-ID: <20200210133143.GG7685@sirena.org.uk> References: <20200207205013.12274-1-adam@serbinski.com> <20200209154748.3015-1-adam@serbinski.com> <20200209154748.3015-3-adam@serbinski.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JkW1gnuWHDypiMFO" Content-Disposition: inline In-Reply-To: <20200209154748.3015-3-adam@serbinski.com> X-Cookie: Avoid gunfire in the bathroom tonight. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --JkW1gnuWHDypiMFO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 09, 2020 at 10:47:42AM -0500, Adam Serbinski wrote: > =20 > +#define AFE_API_VERSION_PCM_CONFIG 0x1 > +/* Enumeration for the auxiliary PCM synchronization signal > + * provided by an external source. > + */ > + > +#define AFE_PORT_PCM_SYNC_SRC_EXTERNAL 0x0 > +/* Enumeration for the auxiliary PCM synchronization signal > + * provided by an internal source. > + */ This is a *weird* commenting style for these #defines and it's not consistent within the block, I'm seeing at least 3 different styles. > +/* Payload of the #AFE_PARAM_ID_PCM_CONFIG command's > + * (PCM configuration parameter). > + */ > + > +struct afe_param_id_pcm_cfg { Similar weird commenting here, please follow coding-style.rst. > + switch (cfg->fmt & SND_SOC_DAIFMT_MASTER_MASK) { > + case SND_SOC_DAIFMT_CBS_CFS: > + pcfg->pcm_cfg.sync_src =3D AFE_PORT_PCM_SYNC_SRC_INTERNAL; > + break; > + case SND_SOC_DAIFMT_CBM_CFM: > + /* CPU is slave */ > + pcfg->pcm_cfg.sync_src =3D AFE_PORT_PCM_SYNC_SRC_EXTERNAL; > + break; > + default: > + break; > + } Why is this not returning an error on unsupported values? > + > + switch (cfg->sample_rate) { > + case 8000: > + pcfg->pcm_cfg.frame_setting =3D AFE_PORT_PCM_BITS_PER_FRAME_128; > + break; > + case 16000: > + pcfg->pcm_cfg.frame_setting =3D AFE_PORT_PCM_BITS_PER_FRAME_64; > + break; > + } Same here. --JkW1gnuWHDypiMFO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl5BWz8ACgkQJNaLcl1U h9COgAf/dQvwNK7v2nSAj2+698541KzAw+rU1oHMPrfL47b7+8WMLtY8dn2B7TiM 1dBCzYpTotvmbnXSoGQMztG89ws70Csele03jew7S8MfRuwnrbAEbp3mR8KW+ylI GkjNxUGHH97SWdkJ92q3bH4wkRJVAtS6nAudxv7So3vi1WNmGGLgwCODlKzLII1j 7mmUkvhMwjqGBxqOrIifT7yTlnqCZyIHKqUQk7xIPO+on5jZ0QVvB9HZ5xISM1HV /3it4Gmoc3P5bGf+N9Y0UF3Bc11Wgaq7+XXSMccyUv7Ze5h3ZtTGUidbeWsYNfGf vBl163xXITHNtKVJSYgNX1CAKUV9OQ== =kiNx -----END PGP SIGNATURE----- --JkW1gnuWHDypiMFO--