[alsa-devel] [PATCH 1/4] ALSA: ASoC: Davinci: Fix SFFSDR FPGA module codec FS bug

Hugo Villeneuve hugo at hugovil.com
Tue Mar 10 04:32:06 CET 2009


This prevented the FPGA from properly configuring the codec FS when
the SFFSDR FPGA was compiled as a module.

Signed-off-by: Hugo Villeneuve <hugo at hugovil.com>
---
 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 74f1eb3..1d10957 100644
--- a/sound/soc/davinci/davinci-sffsdr.c
+++ b/sound/soc/davinci/davinci-sffsdr.c
@@ -25,10 +25,10 @@
 
 #include <asm/dma.h>
 #include <asm/mach-types.h>
-#ifdef CONFIG_SFFSDR_FPGA
-#include <asm/plat-sffsdr/sffsdr-fpga.h>
-#endif
 
+#if defined(CONFIG_SFFSDR_FPGA) || defined(CONFIG_SFFSDR_FPGA_MODULE)
+#include <mach/sffsdr-fpga.h>
+#endif
 #include <mach/asp.h>
 #include <mach/edma.h>
 
@@ -48,7 +48,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");
@@ -68,10 +68,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.5



More information about the Alsa-devel mailing list