Commit 5a813f11 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] Fix CM9761A codec support

AC97 Codec
Fixed the codec patch for (probably) CM9761A.  It looks incompatible
with other CM9761 models.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c6d76f09
......@@ -120,7 +120,8 @@ static const ac97_codec_id_t snd_ac97_codec_ids[] = {
{ 0x434d4961, 0xffffffff, "CMI9739", patch_cm9739, NULL },
{ 0x434d4978, 0xffffffff, "CMI9761", patch_cm9761, NULL },
{ 0x434d4982, 0xffffffff, "CMI9761", patch_cm9761, NULL },
{ 0x434d4983, 0xffffffff, "CMI9761", patch_cm9761, NULL },
/* { 0x434d4983, 0xffffffff, "CMI9761", patch_cm9761, NULL }, */
{ 0x434d4983, 0xffffffff, "CMI9761A", patch_cm9761a, NULL },
{ 0x43525900, 0xfffffff8, "CS4297", NULL, NULL },
{ 0x43525910, 0xfffffff8, "CS4297A", patch_cirrus_spdif, NULL },
{ 0x43525920, 0xfffffff8, "CS4298", patch_cirrus_spdif, NULL },
......
......@@ -2094,6 +2094,34 @@ int patch_cm9761(ac97_t *ac97)
return 0;
}
/* CM9761-A is incompatible with CM9761 */
int patch_cm9761a(ac97_t *ac97)
{
unsigned short val;
ac97->build_ops = &patch_cm9761_ops;
#if 0
/* enable spdif */
/* force the SPDIF bit in ext_id - codec doesn't set this bit! */
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);
ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */
#endif
/* set-up multi channel */
val = snd_ac97_read(ac97, AC97_CM9761_MULTI_CHAN);
val |= (1 << 4);
snd_ac97_write_cache(ac97, AC97_CM9761_MULTI_CHAN, val);
/* FIXME: set up GPIO */
snd_ac97_write_cache(ac97, 0x70, 0x0100);
snd_ac97_write_cache(ac97, 0x72, 0x0020);
return 0;
}
/*
* VIA VT1616 codec
......
......@@ -53,6 +53,7 @@ int patch_alc850(ac97_t * ac97);
int patch_cm9738(ac97_t * ac97);
int patch_cm9739(ac97_t * ac97);
int patch_cm9761(ac97_t * ac97);
int patch_cm9761a(ac97_t * ac97);
int patch_vt1616(ac97_t * ac97);
int patch_it2646(ac97_t * ac97);
int mpatch_si3036(ac97_t * ac97);
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