Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1583
b: refs/heads/master
c: e5b3f45
h: refs/heads/master
i:
  1581: ef395a3
  1579: 6cfc579
  1575: 1f107d3
  1567: bf27d2b
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed May 29, 2005
1 parent 2a5ae5b commit 8223df0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 604cf499256af85703bd4858da56e777ec71714d
refs/heads/master: e5b3f45f5d442b57dd07dd4f914f7e6cf4d183f1
19 changes: 13 additions & 6 deletions trunk/sound/pci/ac97/ac97_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1526,13 +1526,8 @@ static const snd_kcontrol_new_t snd_ac97_ad1888_controls[] = {
.get = snd_ac97_ad1888_downmix_get,
.put = snd_ac97_ad1888_downmix_put
},
#if 0
AC97_SINGLE("Surround Jack as Input", AC97_AD_MISC, 12, 1, 0),
AC97_SINGLE("Center/LFE Jack as Input", AC97_AD_MISC, 11, 1, 0),
#else
AC97_SURROUND_JACK_MODE_CTL,
AC97_CHANNEL_MODE_CTL,
#endif
};

static int patch_ad1888_specific(ac97_t *ac97)
Expand Down Expand Up @@ -1601,6 +1596,18 @@ static const snd_kcontrol_new_t snd_ac97_ad1985_controls[] = {
AC97_SINGLE("Exchange Center/LFE", AC97_AD_SERIAL_CFG, 3, 1, 0)
};

static void ad1985_update_jacks(ac97_t *ac97)
{
/* shared Line-In */
snd_ac97_update_bits(ac97, AC97_AD_MISC, 1 << 12,
is_shared_linein(ac97) ? 0 : 1 << 12);
/* shared Mic */
snd_ac97_update_bits(ac97, AC97_AD_MISC, 1 << 11,
is_shared_micin(ac97) ? 0 : 1 << 11);
snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 9 << 11,
is_shared_micin(ac97) ? 0 : 9 << 11);
}

static int patch_ad1985_specific(ac97_t *ac97)
{
int err;
Expand All @@ -1616,7 +1623,7 @@ static struct snd_ac97_build_ops patch_ad1985_build_ops = {
#ifdef CONFIG_PM
.resume = ad18xx_resume,
#endif
.update_jacks = ad1888_update_jacks,
.update_jacks = ad1985_update_jacks,
};

int patch_ad1985(ac97_t * ac97)
Expand Down

0 comments on commit 8223df0

Please sign in to comment.