Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp611541imm; Wed, 29 Aug 2018 07:55:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbxQnPMUTfnWyUTA7TK7/nlSSbZ9axduA31TDZM23TN3aNXEZuu4Ev1FfLKVwXfB4BYSYsN X-Received: by 2002:a63:4425:: with SMTP id r37-v6mr6002186pga.391.1535554524703; Wed, 29 Aug 2018 07:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535554524; cv=none; d=google.com; s=arc-20160816; b=TRm3IZlifRSpsLemtUSCelbIBu7vFsd2zNKXUk269Dz+g27c9tcEjwkfQTzf+uQTg6 DDOi/nA4PbLgK0P4+1GnV/7T4d4US/w6g4GMZmOHw2YDrULYnnOA4NNeCDW8QERDnKg1 ynBYDRjJWZihkWpLKA6yjQF25HU9FxX78Wvga7UW6SE8iTY551cmKkzzouLW0/577VSh 92I5LGIBXRWh6IX9g9KwP0Qw+BBnIpxTmHYsnigxDxbR7WtTMS246jyEagkLmb7LYh3V LP6jeZVwfHfeOUWyjR7HXxV4V7DmCFL4l0AR6L6QVCN5o36bo+iaH8guloca4oAwshFh txZw== 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:dkim-signature:arc-authentication-results; bh=ogjZgVaAFNI7XWFWHBYtVz+qOnA4jZ3sO5MUfHwYjL8=; b=Zb6T/gpehU1lKyLwa40ykJxhSKXblR09ntAznxMmDUJmwRdjcSmvyxDaiUOWBVcCeG PSG/79ZJ5WLSzEU/MvymAQoyqKEaLq3xvsl8bDdJWw4QZ96lAIFMQsylYHrJALIfakr/ 6UlFI7dzoQdKlK3h983AKK6mBBaVEAjYXnfvTj9zyu9T5mCimlE0S3BYpCy6YEFyRO/f lwc8NIreztGZ4CygxkU7LLH0cI0Z5hxzmO3dVf9G0pGWRX4nTtQtoyyiuOwHHuugiP2r DAKcsg2RoBEUN/as2kF85Vb/fhndAtDhqefc+a/E6kiMnEKAJmSKmQBi6QuECuaA8z5w xZkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="V/5EjNs5"; 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 t7-v6si4167899pgh.307.2018.08.29.07.55.09; Wed, 29 Aug 2018 07:55:24 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="V/5EjNs5"; 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 S1728748AbeH2SvX (ORCPT + 99 others); Wed, 29 Aug 2018 14:51:23 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:57422 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727537AbeH2SvW (ORCPT ); Wed, 29 Aug 2018 14:51:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ogjZgVaAFNI7XWFWHBYtVz+qOnA4jZ3sO5MUfHwYjL8=; b=V/5EjNs5YTnuFphKy+xtCcAIO Sj+8b21rUb212IsrF9RAfv37zbRaMbwwuTf3bBb8nE/Rc3Kawv6wCLuc4B1PY5ONjidJJYxpuOwY/ d5O+IPFQab0mCLs95CgOpb6StSpLblVa8xSEwY3uUFR9Ib3dj0fvRuWcSULfYCEOORqqM=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1fv1r2-0000Mr-0l; Wed, 29 Aug 2018 14:53:56 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 8A646112486B; Wed, 29 Aug 2018 15:53:55 +0100 (BST) Date: Wed, 29 Aug 2018 15:53:55 +0100 From: Mark Brown To: Codrin Ciubotariu Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, robh+dt@kernel.org, alexandre.belloni@bootlin.com, nicolas.ferre@microchip.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, florian.meier@koalo.de, cristian.birsan@microchip.com Subject: Re: [PATCH 1/2] ASoC: Add driver for PROTO Audio CODEC (with a WM8731) Message-ID: <20180829145355.GD27808@sirena.org.uk> References: <20180829144727.13757-1-codrin.ciubotariu@microchip.com> <20180829144727.13757-2-codrin.ciubotariu@microchip.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KdquIMZPjGJQvRdI" Content-Disposition: inline In-Reply-To: <20180829144727.13757-2-codrin.ciubotariu@microchip.com> X-Cookie: Not every question deserves an answer. User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --KdquIMZPjGJQvRdI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 29, 2018 at 05:47:26PM +0300, Codrin Ciubotariu wrote: > +static const unsigned int wm8731_rates_12288000[] = { > + 8000, 32000, 48000, 96000, > +}; > + > +static struct snd_pcm_hw_constraint_list wm8731_constraints_12288000 = { > + .list = wm8731_rates_12288000, > + .count = ARRAY_SIZE(wm8731_rates_12288000), > +}; > + > +static int snd_proto_startup(struct snd_pcm_substream *substream) > +{ > + /* Setup constraints, because there is a 12.288 MHz XTAL on the board */ > + snd_pcm_hw_constraint_list(substream->runtime, 0, > + SNDRV_PCM_HW_PARAM_RATE, > + &wm8731_constraints_12288000); > + return 0; > +} This bit is better added to the CODEC driver since it'll apply to any system where there's this clock rate (someone else could come in and add other rates, no need to do that yourself though it'd be nice of course). That also has the nice bonus that with that I think you'd be able to use the graph card rather than a custom driver? --KdquIMZPjGJQvRdI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAluGs4IACgkQJNaLcl1U h9BMcQf9HdY9EONm+yWwQ7kU0mb+CJjqPSHn4kRKd7wuVKMauN0RyzVZKPpdhO4A Kp3reX0sY5uqvKk2V1zh7/ceOHoMM+l3g+Gj+tmWF2eXEcuovP9fFNZY2HPG1Tjw eU+focC0h/2AiT/y//70B3FhDAjH/Chd4Jtqpmdm3qfmfNbFaw42eJS+oA2eBK/f 4ZRO0Q1uj3N1YnGOsrsRR3+wFveVoVf+zG7tPPQJYQICxXj5MZf9ExiWSjfTl6/b VN/qXMdOMGOT/2EKJzSFRTWKu4WKlJOdURxnTzHgeXxas7DF63pEeXgKdq22yq/Y 7GVcZisHHftdm8xEdQpW5GsZaP60Ng== =5Nmi -----END PGP SIGNATURE----- --KdquIMZPjGJQvRdI--