1 From 590c788288e545ef74b77129bc8f747b5365f5d3 Mon Sep 17 00:00:00 2001
2 From: Hugo Villeneuve <hugo@hugovil.com>
3 Date: Thu, 15 Jan 2009 15:40:35 -0500
4 Subject: [PATCH 06/12] ALSA: ASoC: DaVinci: Fix SFFSDR compilation error.
6 Remove dependency on sffsdr_fpga_set_codec_fs() when the
7 SFFSDR FPGA module is not selected.
9 Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
11 sound/soc/davinci/davinci-sffsdr.c | 20 +++++++++++++++++---
12 1 files changed, 17 insertions(+), 3 deletions(-)
14 diff --git a/sound/soc/davinci/davinci-sffsdr.c b/sound/soc/davinci/davinci-sffsdr.c
15 index 1bbde3e..afb61bf 100644
16 --- a/sound/soc/davinci/davinci-sffsdr.c
17 +++ b/sound/soc/davinci/davinci-sffsdr.c
21 #include <asm/mach-types.h>
22 +#ifdef CONFIG_SFFSDR_FPGA
23 #include <asm/plat-sffsdr/sffsdr-fpga.h>
27 #include <mach/edma.h>
28 @@ -42,6 +44,17 @@ static int sffsdr_hw_params(struct snd_pcm_substream *substream,
32 + /* Fsref can be 32000, 44100 or 48000. */
33 + fs = params_rate(params);
35 +#ifndef CONFIG_SFFSDR_FPGA
36 + /* Without the FPGA module, the Fs is fixed at 44100 Hz */
38 + pr_debug("warning: only 44.1 kHz is supported without SFFSDR FPGA module\n");
43 /* Set cpu DAI configuration:
44 * CLKX and CLKR are the inputs for the Sample Rate Generator.
45 * FSX and FSR are outputs, driven by the sample Rate Generator. */
46 @@ -52,12 +65,13 @@ static int sffsdr_hw_params(struct snd_pcm_substream *substream,
50 - /* Fsref can be 32000, 44100 or 48000. */
51 - fs = params_rate(params);
53 pr_debug("sffsdr_hw_params: rate = %d Hz\n", fs);
55 +#ifndef CONFIG_SFFSDR_FPGA
58 return sffsdr_fpga_set_codec_fs(fs);
62 static struct snd_soc_ops sffsdr_ops = {