Hi,

On Fri, Jul 02, 2010 at 22:42:25, Raffaele Recalcati wrote:
> From: Raffaele Recalcati <raffaele.recalc...@bticino.it>
> 
>     Added two clocking options for dm365 McBSP peripheral when used
>     with I2S timings, that are SND_SOC_DAIFMT_CBS_CFS (the cpu generates
>     clock and frame sync) and SND_SOC_DAIFMT_CBS_CFM (the cpu gets clock
>     from external pin and generates frame sync).
>     A slave clock management can be important when the external codec needs
>     the system clock and the bit clock synchronized (tested with uda1345).
>     This patch has been developed against the:
>         
> http://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git
>     git tree and has been tested on bmx board (similar to dm365 evm, but using
>     uda1345 as external audio codec).
> 
> Signed-off-by: Raffaele Recalcati <raffaele.recalc...@bticino.it>
> Signed-off-by: Davide Bonfanti <davide.bonfa...@bticino.it>
> ---
>  sound/soc/davinci/davinci-i2s.c |  111 +++++++++++++++++++++++++++++++++++---
>  sound/soc/davinci/davinci-i2s.h |    5 ++
>  2 files changed, 107 insertions(+), 9 deletions(-)
> 
> diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
> index adadcd3..a893538 100644
> --- a/sound/soc/davinci/davinci-i2s.c
> +++ b/sound/soc/davinci/davinci-i2s.c
> @@ -26,6 +26,7 @@
>  #include <mach/asp.h>
>  
>  #include "davinci-pcm.h"
> +#include "davinci-i2s.h"
>  
>  
>  /*
> @@ -68,16 +69,21 @@
>  #define DAVINCI_MCBSP_RCR_RDATDLY(v) ((v) << 16)
>  #define DAVINCI_MCBSP_RCR_RFIG               (1 << 18)
>  #define DAVINCI_MCBSP_RCR_RWDLEN2(v) ((v) << 21)
> +#define DAVINCI_MCBSP_RCR_RFRLEN2(v) ((v) << 24)
> +#define DAVINCI_MCBSP_RCR_RPHASE     (1 << 31)
>  
>  #define DAVINCI_MCBSP_XCR_XWDLEN1(v) ((v) << 5)
>  #define DAVINCI_MCBSP_XCR_XFRLEN1(v) ((v) << 8)
>  #define DAVINCI_MCBSP_XCR_XDATDLY(v) ((v) << 16)
>  #define DAVINCI_MCBSP_XCR_XFIG               (1 << 18)
>  #define DAVINCI_MCBSP_XCR_XWDLEN2(v) ((v) << 21)
> +#define DAVINCI_MCBSP_XCR_XFRLEN2(v) ((v) << 24)
> +#define DAVINCI_MCBSP_XCR_XPHASE     (1 << 31)
>  
>  #define DAVINCI_MCBSP_SRGR_FWID(v)   ((v) << 8)
>  #define DAVINCI_MCBSP_SRGR_FPER(v)   ((v) << 16)
>  #define DAVINCI_MCBSP_SRGR_FSGM              (1 << 28)
> +#define DAVINCI_MCBSP_SRGR_CLKSM     (1 << 29)
>  

Use "BIT(x)" instead of (1 << x).

Regards,
Sudhakar


_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to