e4a5537b6e57a4a43fe8cf71b011b8243536de67
[openembedded.git] /
1 From ca4b0f980f8b03374f48cbb4937d3ed3150c0c3e Mon Sep 17 00:00:00 2001
2 From: Hugo Villeneuve <hugo@hugovil.com>
3 Date: Thu, 5 Mar 2009 17:04:41 -0500
4 Subject: [PATCH 07/12] ALSA: ASoC: Davinci: Fix SFFSDR FPGA module codec FS bug.
5
6 This prevented the FPGA from properly configuring the codec FS when
7 the SFFSDR FPGA was compiled as a module.
8
9 Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
10 ---
11  sound/soc/davinci/davinci-sffsdr.c |   14 +++++++-------
12  1 files changed, 7 insertions(+), 7 deletions(-)
13
14 diff --git a/sound/soc/davinci/davinci-sffsdr.c b/sound/soc/davinci/davinci-sffsdr.c
15 index afb61bf..b20e36c 100644
16 --- a/sound/soc/davinci/davinci-sffsdr.c
17 +++ b/sound/soc/davinci/davinci-sffsdr.c
18 @@ -25,10 +25,10 @@
19  #include <asm/gpio.h>
20  #include <asm/dma.h>
21  #include <asm/mach-types.h>
22 -#ifdef CONFIG_SFFSDR_FPGA
23 -#include <asm/plat-sffsdr/sffsdr-fpga.h>
24 -#endif
25  
26 +#if defined(CONFIG_SFFSDR_FPGA) || defined(CONFIG_SFFSDR_FPGA_MODULE)
27 +#include <mach/sffsdr-fpga.h>
28 +#endif
29  #include <mach/asp.h>
30  #include <mach/edma.h>
31  
32 @@ -47,7 +47,7 @@ static int sffsdr_hw_params(struct snd_pcm_substream *substream,
33         /* Fsref can be 32000, 44100 or 48000. */
34         fs = params_rate(params);
35  
36 -#ifndef CONFIG_SFFSDR_FPGA
37 +#if !defined(CONFIG_SFFSDR_FPGA) && !defined(CONFIG_SFFSDR_FPGA_MODULE)
38         /* Without the FPGA module, the Fs is fixed at 44100 Hz */
39         if (fs != 44100) {
40                 pr_debug("warning: only 44.1 kHz is supported without SFFSDR FPGA module\n");
41 @@ -67,10 +67,10 @@ static int sffsdr_hw_params(struct snd_pcm_substream *substream,
42  
43         pr_debug("sffsdr_hw_params: rate = %d Hz\n", fs);
44  
45 -#ifndef CONFIG_SFFSDR_FPGA
46 -       return 0;
47 -#else
48 +#if defined(CONFIG_SFFSDR_FPGA) || defined(CONFIG_SFFSDR_FPGA_MODULE)
49         return sffsdr_fpga_set_codec_fs(fs);
50 +#else
51 +       return 0;
52  #endif
53  }
54  
55 -- 
56 1.5.4.5
57