Disable AC97 AUX and VIDEO controls for WM9705 touchscreen
PATCH 1/1 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.
include/sound/ac97_codec.h +1 -0
@@ -378,6 +378,7 @@#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
sound/pci/ac97/ac97_codec.c +5 -3
@@ -1335,9 +1335,11 @@ static int snd_ac97_mixer_build(struct s }/* 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 */
sound/pci/ac97/ac97_patch.c +4 -0
@@ -464,6 +464,10 @@ int patch_wolfson05(struct snd_ac97 * ac {/* 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 ; }
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
Takashi Iwai
AppliedAt Sun, 18 Jun 2006 14:13:36 +0100,
Quoted 7 lines · Liam Girdwood
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:-
Quoted 7 lines
o Added
AC97_HAS_NO_AUXflag
o Test forAC97_HAS_NO_AUXflag insnd_ac97_mixer_build()
o SetsAC97_HAS_NO_VIDEOandAC97_HAS_NO_AUXinpatch_wolfson05()when
WM9705 touch driver is selected.Signed-off-by Rodolfo Giometti <[email protected]>Signed-off-by Liam Girdwood <[email protected]>
Thanks, applied to HG tree.
Takashi
Quoted 56 lines
[2 wm9705-video.patch <text/x-patch; UTF-8 (7bit)>]
Index:linux-2.6-asoc/include/sound/ac97_codec.h
===================================================================include/sound/ac97_codec.h +1
-0@@ -378,6 +378,7 @@#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 0Index:
linux-2.6-asoc/sound/pci/ac97/ac97_codec.c
===================================================================sound/pci/ac97/ac97_codec.c +5
-3@@ -1335,9 +1335,11 @@ static int snd_ac97_mixer_build(struct s }/* 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:
linux-2.6-asoc/sound/pci/ac97/ac97_patch.c
===================================================================sound/pci/ac97/ac97_patch.c +4
-0@@ -464,6 +464,10 @@ int patch_wolfson05(struct snd_ac97 * ac {/* 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 ; }[3 <text/plain; us-ascii (7bit)>]
[4 <text/plain; us-ascii (7bit)>]
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel