Commit 8b4a309a authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

D:2003/08/27 17:17:31
C:AC97 Codec Core
A:Takashi Iwai <tiwai@suse.de>
F:include/ac97_codec.h:1.31->1.32 
F:pci/ac97/ac97_codec.c:1.101->1.102 
F:pci/ac97/ac97_local.h:1.1->1.2 
F:pci/ac97/ac97_patch.c:1.19->1.20 
L:- added the support for stereo mute switches on AD198x.
L:- clean up of creation routines of normal stereo controls.
parent 0ceb4137
......@@ -248,6 +248,7 @@
#define AC97_AD_MULTI (1<<1) /* Analog Devices - multi codecs */
#define AC97_CS_SPDIF (1<<2) /* Cirrus Logic uses funky SPDIF */
#define AC97_CX_SPDIF (1<<3) /* Conexant's spdif interface */
#define AC97_STEREO_MUTES (1<<4) /* has stereo mute bits */
/* rates indexes */
#define AC97_RATES_FRONT_DAC 0
......
This diff is collapsed.
......@@ -25,7 +25,7 @@
#define AC97_SINGLE(xname, reg, shift, mask, invert) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_single, \
.get = snd_ac97_get_single, .put = snd_ac97_put_single, \
.private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
.private_value = (reg) | ((shift) << 8) | ((mask) << 16) | ((invert) << 24) }
/* ac97_codec.c */
extern const char *snd_ac97_stereo_enhancements[];
......
......@@ -776,10 +776,13 @@ int patch_ad1980(ac97_t * ac97)
ac97->build_ops = &patch_ad1980_build_ops;
/* Switch FRONT/SURROUND LINE-OUT/HP-OUT default connection */
/* it seems that most vendors connect line-out connector to headphone out of AC'97 */
/* Stereo mutes enabled */
misc = snd_ac97_read(ac97, AC97_AD_MISC);
snd_ac97_write_cache(ac97, AC97_AD_MISC, misc |
AC97_AD198X_LOSEL |
AC97_AD198X_HPSEL);
AC97_AD198X_HPSEL |
AC97_AD198X_MSPLT);
ac97->flags |= AC97_STEREO_MUTES;
return 0;
}
......@@ -793,13 +796,16 @@ int patch_ad1985(ac97_t * ac97)
/* switch front/surround line-out/hp-out */
/* center/LFE, surround in High-Z mode */
/* AD-compatible mode */
/* Stereo mutes enabled */
snd_ac97_write_cache(ac97, AC97_AD_MISC, misc |
AC97_AD198X_VREFD |
AC97_AD198X_LOSEL |
AC97_AD198X_HPSEL |
AC97_AD198X_CLDIS |
AC97_AD198X_LODIS |
AC97_AD198X_MSPLT |
AC97_AD198X_AC97NC);
ac97->flags |= AC97_STEREO_MUTES;
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