Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3738770ybv; Mon, 10 Feb 2020 05:36:16 -0800 (PST) X-Google-Smtp-Source: APXvYqzKUIkfC3ZbkORWPkrlw7OuD1X9OK7/5srgZSddFfkdqhEnJadIIKkXJW/Wq2wbf1HriiEM X-Received: by 2002:a05:6808:643:: with SMTP id z3mr847867oih.19.1581341776560; Mon, 10 Feb 2020 05:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581341776; cv=none; d=google.com; s=arc-20160816; b=sc+ccB3nPey6XMVN2ucXYkQmZ8DGI8ZCclxez2AS7eJwcVhPKtw+PUb9nKkwUrBkQO qY2Yoq5qptk6iG7XGK0MsMBAcNBd36nf1IwfbIL17l1CSi7P6y1EYApABytyb9PMSMrq vRUWt8McZycXoeygxdKZT4hLHMSc75ynLEYmg5pTjP/50X0CY6mGe3kbJiOXBSsJ5f7m vNQ1UUk2XRZP3sIq3Odk4DpQg7Sal95Hf+39V+1R79Z/nw9qis1FAKwHrHnR8puU5F0v ro46V1fGQbBOev9I/n3FCRuO3PlRlRBwgU1s/H2YAkFUaMoA4fFdT98kYGzZ367dXePu UbYA== 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=5RIqFvhir5fv7/qOK7EktOKkvJ17ohIDQcvubadquqc=; b=yCuupbUdaOCcGVrEdi+2mHnSjwwnbV84IW7NiL0xh2YUVlUEP/MYRchf7GO+rpaHyB 2t0YM719+qinzXPnZe7UTxwiYskGXbv1t71mKG9BVq40LrZcttx108+PeLQg7Nvq+m07 sClzDUr8zC/cjjFxq7fTmikZEInoTLEnEB7o4Y1BSn+4pThIkTR0JgQC6Xsgkyw6jML3 +4HjqHvUrPfOgHB8qPSzUJWFeyieu3fUkMGZeHqu8Zl2pbj9oPPppU5Cl/KcTxftvD/r hed0I6FS6g/9eD08r1A20k+HJ8DKfvynPVwa3CBQjkXXjke3lRM1hzYz8ZohQkQoFKl5 kSJg== 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 q6si210412otg.248.2020.02.10.05.36.04; Mon, 10 Feb 2020 05:36:16 -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 S1731568AbgBJNeV (ORCPT + 99 others); Mon, 10 Feb 2020 08:34:21 -0500 Received: from foss.arm.com ([217.140.110.172]:33724 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727960AbgBJNeT (ORCPT ); Mon, 10 Feb 2020 08:34:19 -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 96CA41FB; Mon, 10 Feb 2020 05:34:18 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1B98A3F68E; Mon, 10 Feb 2020 05:34:17 -0800 (PST) Date: Mon, 10 Feb 2020 13:34:16 +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 3/8] ASoC: qdsp6: q6afe-dai: add support to pcm port dais Message-ID: <20200210133416.GH7685@sirena.org.uk> References: <20200207205013.12274-1-adam@serbinski.com> <20200209154748.3015-1-adam@serbinski.com> <20200209154748.3015-4-adam@serbinski.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rCwQ2Y43eQY6RBgR" Content-Disposition: inline In-Reply-To: <20200209154748.3015-4-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 --rCwQ2Y43eQY6RBgR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Feb 09, 2020 at 10:47:43AM -0500, Adam Serbinski wrote: > +static int q6pcm_hw_params(struct snd_pcm_substream *substream, > + struct snd_pcm_hw_params *params, > + struct snd_soc_dai *dai) > +{ > + struct q6afe_dai_data *dai_data = dev_get_drvdata(dai->dev); > + struct q6afe_pcm_cfg *pcm = &dai_data->port_config[dai->id].pcm_cfg; > + > + pcm->sample_rate = params_rate(params); > + This and set_fmt() don't do any validation of the value being set. > static const struct snd_soc_dai_ops q6tdm_ops = { > .prepare = q6afe_dai_prepare, > .shutdown = q6afe_dai_shutdown, > - .set_sysclk = q6afe_mi2s_set_sysclk, > + .set_sysclk = q6afe_tdm_set_sysclk, > .set_tdm_slot = q6tdm_set_tdm_slot, > .set_channel_map = q6tdm_set_channel_map, > .hw_params = q6tdm_hw_params, This looks like a separate bug fix that should be split out? > + }, { > + .playback = { > + .stream_name = "Primary PCM Playback", > + .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000, > + .formats = SNDRV_PCM_FMTBIT_S16_LE | > + SNDRV_PCM_FMTBIT_S24_LE, > + .rate_min = 8000, > + .rate_max = 16000, > + }, It is surprising to see rate_min and rate_max specified when we're not using _KNOT, and again there's weird formatting here with the tabs before the rate values. --rCwQ2Y43eQY6RBgR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl5BW9cACgkQJNaLcl1U h9Dh8wf9GPgsAk8A8fx5UolrgGZJ4NvmqNg6lr8kiZW80V0qguFTuNNYITV/GtSe 3hR5xFD6RWuu3W60mOEK6zra9dWXC++UUK9zROYY3AHiDqmJAfsPQRx9Pi6SoJSf sHWco6VGMY308dMXp9ebWYAWHYjTHE/oKkbuCcjmwg/4qdgknwITb45vKDsGOk7U KDq0QvV0RUTw3jtXPiwP93+UGwFOVHTnGPkYQVQPQiUi2N9/f41iWwry69B09wOW GT/OYTl2NMH+pjmW+/XWcPwhp2cVaJa7c8v4JNl8QvYgIyEzyYwY945J7AxzhzXT o4oM+MZSKad4PBHQ3/tbxddygF5rKg== =fc13 -----END PGP SIGNATURE----- --rCwQ2Y43eQY6RBgR--