diff options
author | Keita Maehara <maehara@debian.org> | 2007-09-19 08:29:37 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 10:50:57 -0400 |
commit | 43115f58e215f2c88c3cc2514dbf47e4643cab5b (patch) | |
tree | f132467fa1ccac6fe4f1bd44cabb98252fcc24c6 /sound/pci/ac97/ac97_codec.c | |
parent | 13043984e7e3952b0030ec8f27eb1e66b6529770 (diff) |
[ALSA] ac97: YMF743 missing controls support (2/2)
These patches enable a few YMF743 controls (Tone/3D/IEC958) that won't
be detected with the current version of ALSA.
The second one contains following changes:
- A chip-specific SPDIF support for YMF743 (It doesn't have AC97
standard SPDIF registers seen on YMF753).
- The implementation for 'IEC958 Playback Source' and 'IEC958 Mute'
are identical to the ones for YMF753. But there is no 'IEC958 Output
Pin' for YMF743.
Signed-off-by: Keita Maehara <maehara@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ac97/ac97_codec.c')
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 0906f1717f2b..e13893d72a2c 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -176,7 +176,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = { | |||
176 | { 0x574d4C09, 0xffffffff, "WM9709", NULL, NULL}, | 176 | { 0x574d4C09, 0xffffffff, "WM9709", NULL, NULL}, |
177 | { 0x574d4C12, 0xffffffff, "WM9711,WM9712", patch_wolfson11, NULL}, | 177 | { 0x574d4C12, 0xffffffff, "WM9711,WM9712", patch_wolfson11, NULL}, |
178 | { 0x574d4c13, 0xffffffff, "WM9713,WM9714", patch_wolfson13, NULL, AC97_DEFAULT_POWER_OFF}, | 178 | { 0x574d4c13, 0xffffffff, "WM9713,WM9714", patch_wolfson13, NULL, AC97_DEFAULT_POWER_OFF}, |
179 | { 0x594d4800, 0xffffffff, "YMF743", NULL, NULL }, | 179 | { 0x594d4800, 0xffffffff, "YMF743", patch_yamaha_ymf743, NULL }, |
180 | { 0x594d4802, 0xffffffff, "YMF752", NULL, NULL }, | 180 | { 0x594d4802, 0xffffffff, "YMF752", NULL, NULL }, |
181 | { 0x594d4803, 0xffffffff, "YMF753", patch_yamaha_ymf753, NULL }, | 181 | { 0x594d4803, 0xffffffff, "YMF753", patch_yamaha_ymf753, NULL }, |
182 | { 0x83847600, 0xffffffff, "STAC9700,83,84", patch_sigmatel_stac9700, NULL }, | 182 | { 0x83847600, 0xffffffff, "STAC9700,83,84", patch_sigmatel_stac9700, NULL }, |
@@ -779,6 +779,12 @@ static int snd_ac97_spdif_default_put(struct snd_kcontrol *kcontrol, struct snd_ | |||
779 | change |= snd_ac97_update_bits_nolock(ac97, AC97_CXR_AUDIO_MISC, | 779 | change |= snd_ac97_update_bits_nolock(ac97, AC97_CXR_AUDIO_MISC, |
780 | AC97_CXR_SPDIF_MASK | AC97_CXR_COPYRGT, | 780 | AC97_CXR_SPDIF_MASK | AC97_CXR_COPYRGT, |
781 | v); | 781 | v); |
782 | } else if (ac97->id == AC97_ID_YMF743) { | ||
783 | change |= snd_ac97_update_bits_nolock(ac97, | ||
784 | AC97_YMF7X3_DIT_CTRL, | ||
785 | 0xff38, | ||
786 | ((val << 4) & 0xff00) | | ||
787 | ((val << 2) & 0x0038)); | ||
782 | } else { | 788 | } else { |
783 | unsigned short extst = snd_ac97_read_cache(ac97, AC97_EXTENDED_STATUS); | 789 | unsigned short extst = snd_ac97_read_cache(ac97, AC97_EXTENDED_STATUS); |
784 | snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); /* turn off */ | 790 | snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); /* turn off */ |
@@ -1375,7 +1381,8 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97) | |||
1375 | for (idx = 0; idx < 2; idx++) { | 1381 | for (idx = 0; idx < 2; idx++) { |
1376 | if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_tone[idx], ac97))) < 0) | 1382 | if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_tone[idx], ac97))) < 0) |
1377 | return err; | 1383 | return err; |
1378 | if (ac97->id == AC97_ID_YMF753) { | 1384 | if (ac97->id == AC97_ID_YMF743 || |
1385 | ac97->id == AC97_ID_YMF753) { | ||
1379 | kctl->private_value &= ~(0xff << 16); | 1386 | kctl->private_value &= ~(0xff << 16); |
1380 | kctl->private_value |= 7 << 16; | 1387 | kctl->private_value |= 7 << 16; |
1381 | } | 1388 | } |