Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753470Ab3GJGMO (ORCPT ); Wed, 10 Jul 2013 02:12:14 -0400 Received: from nasmtp01.atmel.com ([192.199.1.246]:27592 "EHLO DVREDG02.corp.atmel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752111Ab3GJGMM (ORCPT ); Wed, 10 Jul 2013 02:12:12 -0400 Message-ID: <51DCFB24.4080107@atmel.com> Date: Wed, 10 Jul 2013 14:11:48 +0800 From: Bo Shen User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Richard Genoud CC: Mark Brown , Nicolas Ferre , Liam Girdwood , =?UTF-8?B?VXdlIEtsZWluZS1Lw7ZuaWc=?= , Lars-Peter Clausen , , , , Subject: Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards References: <1373372929-17800-1-git-send-email-richard.genoud@gmail.com> <1373379933-32749-1-git-send-email-richard.genoud@gmail.com> <1373379933-32749-2-git-send-email-richard.genoud@gmail.com> In-Reply-To: <1373379933-32749-2-git-send-email-richard.genoud@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.168.5.13] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2056 Lines: 92 Hi Richard, On 7/9/2013 22:25, Richard Genoud wrote: [snip] > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > + > +#include "../codecs/wm8731.h" > +#include "atmel-pcm.h" > +#include "atmel_ssc_dai.h" I think some of the header file include is not needed. I keep them as simple as following: ---8>--- #include #include #include #include #include #include #include "../codecs/wm8731.h" #include "atmel_ssc_dai.h" ---<8--- > +#define MCLK_RATE 12288000 > + > +#define DRV_NAME "sam9x5-snd-wm8731" > + > +/* > + * Authorized rates are: > + * Rate = MCLK_RATE / (n * 2) > + * Where n is in [1..4095] > + * (cf register SSC_CMR) > + */ > +static unsigned int rates[] = { > + 8000, > + 16000, > + 32000, > + 48000, > + 64000, > + 96000, > +}; This is decided by the codec, while not ssc when ssc in slave mode. > +static struct snd_pcm_hw_constraint_list hw_rates = { > + .count = ARRAY_SIZE(rates), > + .list = rates, > +}; > + [snip] > + > + at91sam9x5ek_dai.dai_fmt = snd_soc_of_parse_daifmt(np, "atmel,"); We can put this into at91sam9x5ek_dai directly, not need to parse it then. example as following: ---8>--- .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, ---<8--- Best Regards, Bo Shen -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/