summaryrefslogtreecommitdiffstats
path: root/sound/soc/atmel
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-08 19:18:19 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-08 19:18:19 +0200
commit22df8eb4fe293d67c98732e02a2dbef0d9c6cd96 (patch)
tree0167b8ca82bf81869536b6961b2417ac690cbb19 /sound/soc/atmel
parentASoC: Use CODEC as clock master on AT91SAM9G20-EK (diff)
downloadlinux-22df8eb4fe293d67c98732e02a2dbef0d9c6cd96.tar.xz
linux-22df8eb4fe293d67c98732e02a2dbef0d9c6cd96.zip
ASoC: Disable microphone input for AT91SAM9G20-EK by default
As shipped the board does not have inputs but it is relatively straightforward to modify the board to hook them up so support is provided in the driver. When these modifications have not been made enabling the microphone stage can cause problems. Add an ifdef to disable this by default. Don't put it into Kconfig since users will have to get their soldering irons out to change things. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/atmel')
-rw-r--r--sound/soc/atmel/sam9g20_wm8731.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c
index 9abab94fe2c4..ba93df79f265 100644
--- a/sound/soc/atmel/sam9g20_wm8731.c
+++ b/sound/soc/atmel/sam9g20_wm8731.c
@@ -56,6 +56,13 @@
#define MCLK_RATE 12000000
+/*
+ * As shipped the board does not have inputs. However, it is relatively
+ * straightforward to modify the board to hook them up so support is left
+ * in the driver.
+ */
+#undef ENABLE_MIC_INPUT
+
static struct clk *mclk;
static int at91sam9g20ek_startup(struct snd_pcm_substream *substream)
@@ -170,8 +177,13 @@ static int at91sam9g20ek_wm8731_init(struct snd_soc_codec *codec)
snd_soc_dapm_nc_pin(codec, "RLINEIN");
snd_soc_dapm_nc_pin(codec, "LLINEIN");
- /* always connected */
+#ifdef ENABLE_MIC_INPUT
snd_soc_dapm_enable_pin(codec, "Int Mic");
+#else
+ snd_soc_dapm_nc_pin(codec, "Int Mic");
+#endif
+
+ /* always connected */
snd_soc_dapm_enable_pin(codec, "Ext Spk");
snd_soc_dapm_sync(codec);