Commit 9c22b78f authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] Fix CM9761 again

AC97 Codec
Fixed the silent output playback problem on CM9761.
The SPDIF_CTRL register (0x6c) bit 17 was the culprit.

The master volume is back again since it seems to have some
influence on the looped input sounds.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 3ca29229
......@@ -2036,10 +2036,13 @@ int patch_cm9761(ac97_t *ac97)
{
unsigned short val;
/* CM9761 has no Master and PCM volume although the register reacts */
ac97->flags |= AC97_HAS_NO_MASTER_VOL | AC97_HAS_NO_PCM_VOL;
snd_ac97_write_cache(ac97, AC97_MASTER, 0x8000);
snd_ac97_write_cache(ac97, AC97_PCM, 0x8000);
/* CM9761 has no PCM volume although the register reacts */
/* Master volume seems to have _some_ influence on the analog
* input sounds
*/
ac97->flags |= /*AC97_HAS_NO_MASTER_VOL |*/ AC97_HAS_NO_PCM_VOL;
snd_ac97_write_cache(ac97, AC97_MASTER, 0x8808);
snd_ac97_write_cache(ac97, AC97_PCM, 0x8808);
ac97->spec.dev_flags = 0; /* 1 = model 82 revision B */
if (ac97->id == AC97_ID_CM9761_82) {
......@@ -2059,7 +2062,8 @@ int patch_cm9761(ac97_t *ac97)
ac97->ext_id |= AC97_EI_SPDIF;
/* to be sure: we overwrite the ext status bits */
snd_ac97_write_cache(ac97, AC97_EXTENDED_STATUS, 0x05c0);
snd_ac97_write_cache(ac97, AC97_CM9761_SPDIF_CTRL, 0x0209);
/* Don't set 0x0200 here. This results in the silent analog output */
snd_ac97_write_cache(ac97, AC97_CM9761_SPDIF_CTRL, 0x0009);
ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */
/* set-up multi channel */
......@@ -2086,7 +2090,7 @@ int patch_cm9761(ac97_t *ac97)
val = 0x321c;
#endif
val = snd_ac97_read(ac97, AC97_CM9761_MULTI_CHAN);
val |= (1 << 4);
val |= (1 << 4); /* front on */
snd_ac97_write_cache(ac97, AC97_CM9761_MULTI_CHAN, val);
/* FIXME: set up GPIO */
......
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