History

[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.

Rodolfo Giometti committed 20 years ago

Commit 1459c781 parent 396f7393 files · +10 −3Browse files

Unified · Split

3 files
  1. include/sound/ac97_codec.h +1 −0
  2. sound/pci/ac97/ac97_codec.c +5 −3
  3. sound/pci/ac97/ac97_patch.c +4 −0
include/sound/ac97_codec.h+1−0
@@ -378,6 +378,7 @@ · 377 unmodified lines
378378 #define AC97_HAS_NO_MIC (1<<15) /* no MIC volume */
379379 #define AC97_HAS_NO_TONE (1<<16) /* no Tone volume */
380380 #define AC97_HAS_NO_STD_PCM (1<<17) /* no standard AC97 PCM volume and mute */
381+#define AC97_HAS_NO_AUX (1<<18) /* no standard AC97 AUX volume and mute */
381382
382383 /* rates indexes */
383384 #define AC97_RATES_FRONT_DAC 0
sound/pci/ac97/ac97_codec.c+5−3
@@ -1348,9 +1348,11 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97) · 1347 unmodified lines
13481348 }
13491349
13501350 /* build Aux controls */
1351− if (snd_ac97_try_volume_mix(ac97, AC97_AUX)) {
1352− if ((err = snd_ac97_cmix_new(card, "Aux Playback", AC97_AUX, ac97)) < 0)
1353− return err;
1351+ if (!(ac97->flags & AC97_HAS_NO_AUX)) {
1352+ if (snd_ac97_try_volume_mix(ac97, AC97_AUX)) {
1353+ if ((err = snd_ac97_cmix_new(card, "Aux Playback", AC97_AUX, ac97)) < 0)
1354+ return err;
1355+ }
13541356 }
13551357
13561358 /* build PCM controls */
sound/pci/ac97/ac97_patch.c+4−0
@@ -464,6 +464,10 @@ int patch_wolfson05(struct snd_ac97 * ac97) · 463 unmodified lines
464464 {
465465 /* WM9705, WM9710 */
466466 ac97->build_ops = &patch_wolfson_wm9705_ops;
467+#ifdef CONFIG_TOUCHSCREEN_WM9705
468+ /* WM9705 touchscreen uses AUX and VIDEO for touch */
469+ ac97->flags |=3D AC97_HAS_NO_VIDEO | AC97_HAS_NO_AUX;
470+#endif
467471 return 0;
468472 }
469473