Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-10 Thread Mark Brown
On Wed, Jul 10, 2013 at 11:25:37AM +0200, Richard Genoud wrote: > 2013/7/9 Mark Brown : > > Shouldn't the SSC driver be enforcing this constraint if it comes from > > the SSC hardware? If the clock is reprogrammable the usual convention > > for drivers is to not constrain if the clock is set to

Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-10 Thread Richard Genoud
2013/7/10 Bo Shen : > Hi Richard, Hi ! > On 7/9/2013 22:25, Richard Genoud wrote: > [snip] > > >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include >> + >> +#include >> +#include >> +#include >> +#include >> + >>

Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-10 Thread Richard Genoud
2013/7/9 Mark Brown : > On Tue, Jul 09, 2013 at 04:25:27PM +0200, Richard Genoud wrote: > >> +/* >> + * Authorized rates are: >> + * Rate = MCLK_RATE / (n * 2) >> + * Where n is in [1..4095] >> + * (cf register SSC_CMR) >> + */ >> +static unsigned int rates[] = { >> + 8000, >> + 16000, >>

Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-10 Thread Bo Shen
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

Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-10 Thread Bo Shen
Hi Richard, On 7/9/2013 22:25, Richard Genoud wrote: [snip] +#include linux/module.h +#include linux/moduleparam.h +#include linux/kernel.h +#include linux/clk.h +#include linux/timer.h +#include linux/interrupt.h +#include linux/platform_device.h +#include linux/i2c.h + +#include

Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-10 Thread Richard Genoud
2013/7/9 Mark Brown broo...@kernel.org: On Tue, Jul 09, 2013 at 04:25:27PM +0200, Richard Genoud wrote: +/* + * Authorized rates are: + * Rate = MCLK_RATE / (n * 2) + * Where n is in [1..4095] + * (cf register SSC_CMR) + */ +static unsigned int rates[] = { + 8000, + 16000, +

Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-10 Thread Richard Genoud
2013/7/10 Bo Shen voice.s...@atmel.com: Hi Richard, Hi ! On 7/9/2013 22:25, Richard Genoud wrote: [snip] +#include linux/module.h +#include linux/moduleparam.h +#include linux/kernel.h +#include linux/clk.h +#include linux/timer.h +#include linux/interrupt.h +#include

Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-10 Thread Mark Brown
On Wed, Jul 10, 2013 at 11:25:37AM +0200, Richard Genoud wrote: 2013/7/9 Mark Brown broo...@kernel.org: Shouldn't the SSC driver be enforcing this constraint if it comes from the SSC hardware? If the clock is reprogrammable the usual convention for drivers is to not constrain if the clock

Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-09 Thread Mark Brown
On Tue, Jul 09, 2013 at 04:25:27PM +0200, Richard Genoud wrote: > +/* > + * 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, > +

[PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-09 Thread Richard Genoud
From: Nicolas Ferre Description of the Asoc machine driver for an at91sam9x5 based board with a wm8731 audio DAC. Wm8731 is clocked by a crystal and used as a master on the SSC/I2S interface. Its connections are a headphone jack and an Line input jack. [Richard: this is based on an old patch

[PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-09 Thread Richard Genoud
From: Nicolas Ferre nicolas.fe...@atmel.com Description of the Asoc machine driver for an at91sam9x5 based board with a wm8731 audio DAC. Wm8731 is clocked by a crystal and used as a master on the SSC/I2S interface. Its connections are a headphone jack and an Line input jack. [Richard: this is

Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-09 Thread Mark Brown
On Tue, Jul 09, 2013 at 04:25:27PM +0200, Richard Genoud wrote: +/* + * 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, +