]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] Disable AC97 AUX and VIDEO controls for WM9705 touchscreen
authorRodolfo Giometti <giometti@linux.it>
Mon, 19 Jun 2006 13:04:54 +0000 (15:04 +0200)
committerJaroslav Kysela <perex@suse.cz>
Thu, 22 Jun 2006 19:34:29 +0000 (21:34 +0200)
This patch by Rodolfo Giometti disables the AC97 AUX and VIDEO controls
on the WM9705 when the touchscreen is selected as the AUX and VIDEO
lines are shared with the touch controller.
Changes:-
 o Added AC97_HAS_NO_AUX flag
 o Test for AC97_HAS_NO_AUX flag in snd_ac97_mixer_build()
 o Sets AC97_HAS_NO_VIDEO and AC97_HAS_NO_AUX in patch_wolfson05() when
WM9705 touch driver is selected.

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/ac97_codec.h
sound/pci/ac97/ac97_codec.c
sound/pci/ac97/ac97_patch.c

index b45a7371274806f2c058bc7a43cb7c59a3e82124..446afc3ea27fab8b506e7f2c274311ecc0bd6c67 100644 (file)
 #define AC97_HAS_NO_MIC        (1<<15) /* no MIC volume */
 #define AC97_HAS_NO_TONE       (1<<16) /* no Tone volume */
 #define AC97_HAS_NO_STD_PCM    (1<<17) /* no standard AC97 PCM volume and mute */
+#define AC97_HAS_NO_AUX                (1<<18) /* no standard AC97 AUX volume and mute */
 
 /* rates indexes */
 #define AC97_RATES_FRONT_DAC   0
index f8389c2d3e60b1444a3308e8ee87d51f3ea4368a..0abf2808d59f7e375db77dd2c2f0d23eb07640c3 100644 (file)
@@ -1348,9 +1348,11 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97)
        }
 
        /* build Aux controls */
-       if (snd_ac97_try_volume_mix(ac97, AC97_AUX)) {
-               if ((err = snd_ac97_cmix_new(card, "Aux Playback", AC97_AUX, ac97)) < 0)
-                       return err;
+       if (!(ac97->flags & AC97_HAS_NO_AUX)) {
+               if (snd_ac97_try_volume_mix(ac97, AC97_AUX)) {
+                       if ((err = snd_ac97_cmix_new(card, "Aux Playback", AC97_AUX, ac97)) < 0)
+                               return err;
+               }
        }
 
        /* build PCM controls */
index 1c47ee3d7ef82948ecf8b81cb307f1765adc5cbe..cc93ee619086c3e9877073570c0a01963bf1c184 100644 (file)
@@ -464,6 +464,10 @@ int patch_wolfson05(struct snd_ac97 * ac97)
 {
        /* WM9705, WM9710 */
        ac97->build_ops = &patch_wolfson_wm9705_ops;
+#ifdef CONFIG_TOUCHSCREEN_WM9705
+       /* WM9705 touchscreen uses AUX and VIDEO for touch */
+       ac97->flags |=3D AC97_HAS_NO_VIDEO | AC97_HAS_NO_AUX;
+#endif
        return 0;
 }