Commit 7ee4a21d authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Takashi Iwai <tiwai@suse.de>

AC97 Codec Core
fixes by James Courtier-Dutton <James@superbug.demon.co.uk>:

- fixed the wrong detection of SPDIF output.  SPDIF-out is enabled
  on all chip revisions.
- fixed the ac97 codec name shown in proc file, using ac97->id.
parent 6797fbb9
......@@ -898,7 +898,6 @@ static struct snd_ac97_build_ops patch_alc650_ops = {
int patch_alc650(ac97_t * ac97)
{
unsigned short val;
int spdif = 0;
ac97->build_ops = &patch_alc650_ops;
......@@ -907,22 +906,16 @@ int patch_alc650(ac97_t * ac97)
ac97->spec.dev_flags = (ac97->id == 0x414c4722 ||
ac97->id == 0x414c4723);
/* check spdif (should be only on rev.E) */
if (ac97->spec.dev_flags) {
val = snd_ac97_read(ac97, AC97_EXTENDED_STATUS);
if (val & AC97_EA_SPCV)
spdif = 1;
}
/* enable AC97_ALC650_GPIO_SETUP, AC97_ALC650_CLOCK for R/W */
snd_ac97_write_cache(ac97, AC97_ALC650_GPIO_STATUS,
snd_ac97_read(ac97, AC97_ALC650_GPIO_STATUS) | 0x8000);
if (spdif) {
/* enable AC97_ALC650_GPIO_SETUP, AC97_ALC650_CLOCK for R/W */
snd_ac97_write_cache(ac97, AC97_ALC650_GPIO_STATUS,
snd_ac97_read(ac97, AC97_ALC650_GPIO_STATUS) | 0x8000);
/* Enable SPDIF-IN only on Rev.E and above */
if (ac97->spec.dev_flags) {
/* enable spdif in */
snd_ac97_write_cache(ac97, AC97_ALC650_CLOCK,
snd_ac97_read(ac97, AC97_ALC650_CLOCK) | 0x03);
} else
ac97->ext_id &= ~AC97_EI_SPDIF; /* disable extended-id */
}
val = snd_ac97_read(ac97, AC97_ALC650_MULTICH);
val &= ~0xc000; /* slot: 3,4,7,8,6,9 */
......
......@@ -37,15 +37,12 @@
static void snd_ac97_proc_read_main(ac97_t *ac97, snd_info_buffer_t * buffer, int subidx)
{
char name[64];
unsigned int id;
unsigned short val, tmp, ext, mext;
static const char *spdif_slots[4] = { " SPDIF=3/4", " SPDIF=7/8", " SPDIF=6/9", " SPDIF=res" };
static const char *spdif_rates[4] = { " Rate=44.1kHz", " Rate=res", " Rate=48kHz", " Rate=32kHz" };
static const char *spdif_rates_cs4205[4] = { " Rate=48kHz", " Rate=44.1kHz", " Rate=res", " Rate=res" };
id = snd_ac97_read(ac97, AC97_VENDOR_ID1) << 16;
id |= snd_ac97_read(ac97, AC97_VENDOR_ID2);
snd_ac97_get_name(NULL, id, name, 0);
snd_ac97_get_name(NULL, ac97->id, name, 0);
snd_iprintf(buffer, "%d-%d/%d: %s\n\n", ac97->addr, ac97->num, subidx, name);
if ((ac97->scaps & AC97_SCAP_AUDIO) == 0)
goto __modem;
......
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