From ca4b0f980f8b03374f48cbb4937d3ed3150c0c3e Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Thu, 5 Mar 2009 17:04:41 -0500 Subject: [PATCH 07/12] ALSA: ASoC: Davinci: Fix SFFSDR FPGA module codec FS bug. This prevented the FPGA from properly configuring the codec FS when the SFFSDR FPGA was compiled as a module. Signed-off-by: Hugo Villeneuve --- sound/soc/davinci/davinci-sffsdr.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/davinci/davinci-sffsdr.c b/sound/soc/davinci/davinci-sffsdr.c index afb61bf..b20e36c 100644 --- a/sound/soc/davinci/davinci-sffsdr.c +++ b/sound/soc/davinci/davinci-sffsdr.c @@ -25,10 +25,10 @@ #include #include #include -#ifdef CONFIG_SFFSDR_FPGA -#include -#endif +#if defined(CONFIG_SFFSDR_FPGA) || defined(CONFIG_SFFSDR_FPGA_MODULE) +#include +#endif #include #include @@ -47,7 +47,7 @@ static int sffsdr_hw_params(struct snd_pcm_substream *substream, /* Fsref can be 32000, 44100 or 48000. */ fs = params_rate(params); -#ifndef CONFIG_SFFSDR_FPGA +#if !defined(CONFIG_SFFSDR_FPGA) && !defined(CONFIG_SFFSDR_FPGA_MODULE) /* Without the FPGA module, the Fs is fixed at 44100 Hz */ if (fs != 44100) { pr_debug("warning: only 44.1 kHz is supported without SFFSDR FPGA module\n"); @@ -67,10 +67,10 @@ static int sffsdr_hw_params(struct snd_pcm_substream *substream, pr_debug("sffsdr_hw_params: rate = %d Hz\n", fs); -#ifndef CONFIG_SFFSDR_FPGA - return 0; -#else +#if defined(CONFIG_SFFSDR_FPGA) || defined(CONFIG_SFFSDR_FPGA_MODULE) return sffsdr_fpga_set_codec_fs(fs); +#else + return 0; #endif } -- 1.5.4.5