Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp642136imm; Wed, 29 Aug 2018 08:34:48 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdai74D/iwqM0NAoz4HpsUOrUqCup84iMwMi194aMjKOj7ozZck1bcpByUUogcegohqUycTI X-Received: by 2002:a17:902:127:: with SMTP id 36-v6mr6646163plb.178.1535556887961; Wed, 29 Aug 2018 08:34:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535556887; cv=none; d=google.com; s=arc-20160816; b=yt44SDd0sm+vR8qvK/XtDQqcNtU/0SElPJ9Pe8pJkYHxI87+HC7Cv6ZstZeZeTus/r V01frrAXN/3B/h0L2/0UJPQW7hT/mwD+Ddz5EeRbzu522IP/HWlbvICQ8oTYw4JEW6TP 0ruBsVpfD5BtQhlIBYDb+zu4sh/imwKCIVc32JAK2dfaOjKp98af8qLJYvjwwra0+XJW i/udHPU2dHwexcGtTH3XxI1fEwpOEbOtPRYKQmMTdG9AfAJxM9tJBMGTmVi29u/EWo5M rSboEoFKzmh4W9OA7gMQZco8kVxyj2dMPtj3w5yBrisReRWG+CQPFt6OPZpSUh3puf9C WkPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=GFBlG/3P29Nvgk7dKLRYkiiudNmGUgTG4l77HMrQYHM=; b=l7UOx7UitRMfGbrOxBaS8aJNF0fY6f6QNSvgiq+3fMGPXEa/6qB7G2+w81kVohovyb qUb9iFIiCZ6u9Lu2vwFx49HW7gzcavd7wSazuVDIxIAJ1gIu9f9cow9NSPM42TDFKznV Q+Y/XZW8XW8sq/d6DbHnaT2Ip6joAR96xOM/HZjk3I3wDypfNIvQ/cQHryHQgLMyjPqE HimWfr6ZHul2C1UMOKQpiTVvOEt4/zCh5fVOcpc5uMb2V42RYHnPq7pvY++u30G/ktQi HSs6du2YbzqP7wJIGAypRwkysX7pxcogV66iaOuzheKgfNF2XA/2Hh13v04hLvtm2eHd cS8A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a61-v6si4242112plc.239.2018.08.29.08.34.32; Wed, 29 Aug 2018 08:34:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729076AbeH2Tau (ORCPT + 99 others); Wed, 29 Aug 2018 15:30:50 -0400 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:1878 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727484AbeH2Tat (ORCPT ); Wed, 29 Aug 2018 15:30:49 -0400 X-IronPort-AV: E=Sophos;i="5.53,303,1531810800"; d="scan'208";a="16202020" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Aug 2018 08:33:20 -0700 Received: from [10.145.4.68] (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Wed, 29 Aug 2018 08:33:19 -0700 Subject: Re: [PATCH 1/2] ASoC: Add driver for PROTO Audio CODEC (with a WM8731) From: Codrin Ciubotariu To: Mark Brown CC: , , , , , , , , References: <20180829144727.13757-1-codrin.ciubotariu@microchip.com> <20180829144727.13757-2-codrin.ciubotariu@microchip.com> <20180829145355.GD27808@sirena.org.uk> <8f1ecff2-aab7-2a1d-a8d3-8d0062a8a9e0@microchip.com> Message-ID: <54d79485-81ef-763a-c896-c6ab3e33b5d1@microchip.com> Date: Wed, 29 Aug 2018 18:33:19 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <8f1ecff2-aab7-2a1d-a8d3-8d0062a8a9e0@microchip.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29.08.2018 18:20, Codrin Ciubotariu wrote: > On 29.08.2018 17:53, Mark Brown wrote: >> 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). > > I could do it. It looks like these constraints are already in the wm8731 driver. I will wait for more comments and then I will send a v2 without this part. Thanks and best regards, Codrin