Commit 1459c784 authored by Rodolfo Giometti's avatar Rodolfo Giometti Committed by Jaroslav Kysela

[ALSA] Disable AC97 AUX and VIDEO controls for WM9705 touchscreen

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: default avatarRodolfo Giometti <giometti@linux.it>
Signed-off-by: default avatarLiam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 396f739e
...@@ -378,6 +378,7 @@ ...@@ -378,6 +378,7 @@
#define AC97_HAS_NO_MIC (1<<15) /* no MIC volume */ #define AC97_HAS_NO_MIC (1<<15) /* no MIC volume */
#define AC97_HAS_NO_TONE (1<<16) /* no Tone 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_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 */ /* rates indexes */
#define AC97_RATES_FRONT_DAC 0 #define AC97_RATES_FRONT_DAC 0
......
...@@ -1348,10 +1348,12 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97) ...@@ -1348,10 +1348,12 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97)
} }
/* build Aux controls */ /* build Aux controls */
if (!(ac97->flags & AC97_HAS_NO_AUX)) {
if (snd_ac97_try_volume_mix(ac97, AC97_AUX)) { if (snd_ac97_try_volume_mix(ac97, AC97_AUX)) {
if ((err = snd_ac97_cmix_new(card, "Aux Playback", AC97_AUX, ac97)) < 0) if ((err = snd_ac97_cmix_new(card, "Aux Playback", AC97_AUX, ac97)) < 0)
return err; return err;
} }
}
/* build PCM controls */ /* build PCM controls */
if (ac97->flags & AC97_AD_MULTI) { if (ac97->flags & AC97_AD_MULTI) {
......
...@@ -464,6 +464,10 @@ int patch_wolfson05(struct snd_ac97 * ac97) ...@@ -464,6 +464,10 @@ int patch_wolfson05(struct snd_ac97 * ac97)
{ {
/* WM9705, WM9710 */ /* WM9705, WM9710 */
ac97->build_ops = &patch_wolfson_wm9705_ops; 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; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment